Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive gregpath search #1571

Open
rpspringuel opened this issue Dec 31, 2022 · 1 comment · Fixed by #1543
Open

Recursive gregpath search #1571

rpspringuel opened this issue Dec 31, 2022 · 1 comment · Fixed by #1543

Comments

@rpspringuel
Copy link
Contributor

Right now we use the same mechanism as the graphics package to add additional directories for GregorioTeX to search for gabc files (See gregoriotex-main.tex lines 1938-1943). While this is relatively straightforward code, it doesn't allow you to look in subdirectories of the added directories.

I.e. given music/antiphons/The_Lord_our_King.gabc exists relative to the main document, the following won't work

\gresetgregpath{{music/}}
\gregorioscore{antiphons/The_Lord_our_King.gabc}

Though this does:

\gresetgregpath{{music/antiphons/}}
\gregorioscore{The_Lord_our_King.gabc}

I propose that we switch to the mechanism used by lyluatex for specifying and searching additional paths (i.e. having Lua do it instead of TeX). See lyluatex.lua lines 106-121 and 145-160.

@rpspringuel
Copy link
Contributor Author

The problem here isn't one of not being able to look in subdirectories, as it turns out. After a careful inspection of the log I discovered that the first does find the gabc file. What causes the problem is the attempt to remove old gtex files because antiphons doesn't exist relative to the current working directory, it exists relative to the gregpath. While there are multiple possible fixes for this, the simplest seems to be to finish #1543, as forcing the gtex files into a temporary directory that we create means we always know were to find them.

@rpspringuel rpspringuel linked a pull request Oct 10, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant