-
Notifications
You must be signed in to change notification settings - Fork 165
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
\inputminted
support: files missing from shell-escape working directory
#835
Comments
Thanks for reporting! Your diagnosis sounds correct, and I agree that using absolute paths should work around the issue but definitely isn't a real solution. I think the first step here would be to check out how |
Hi, I also opened a discussion here. |
#708 introduced shell-escape support, which (as motivated in #38) is needed for the exceedingly popular
minted
package for typesetting syntax-highlighted source code.However, shell-escape support alone is not enough to support
minted
--in particular, the\inputminted
command does not work correctly. Here is a simple project demonstrating the issue: tectonic-minted-test.tar.gz. Its contents are:hello.tex
world.py
When running
tectonic -Z shell-escape
in the above project, the following error is returned:After some digging around, I think I've figured the reason for this error.
\write18{pwd}
).\write18{ls -l}
shows an empty list).minted
invokes thepygmentize
shell command, it tries to load the source file (expecting it to be in the current project working directory) but fails to find it because its working directory is actually set to something like/tmp/.tmpVGQl7T
.This being the cause gives rise to a temporary workaround: passing
\inputminted
an absolute rather than relative path makes Tectonic run correctly.However, I think this workaround is somewhat suboptimal (limits portability of the project/depends on the absolute path of the project; clunky to type; etc.); I think it would be ideal to somehow allow minted to access files from the project directory.
I'm not sure, technically, how this would be done--maybe special-case support, e.g. what Tectonic did for Biber, may be required. Or maybe there's a simpler solution. I'm raising this issue because I imagine, given the popularity of
minted
, I must not be the only one facing this trouble.The text was updated successfully, but these errors were encountered: