-
Notifications
You must be signed in to change notification settings - Fork 125
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
TEXINPUTS are not followed #25
Comments
Packages like The current development version of It's possible that the |
Le 26 mars 2014 à 18:11, Geoffrey Poore notifications@github.com a écrit :
Yes, I understand that.
I don't think so, the problem is the input directory.
texi2dvi, when called with --tidy, will create a directory In the case of minted, since texi2dvi changed the current To make sure that TEXINPUTS is accurate (and in order to implement So, I would say that what would be needed, would be to have Alternatively, it might be simpler to use tools such as kpsewhich. $ ls questions/prog1.cc Thanks for your quick answer! |
LaTeX's |
Le 26 mars 2014 à 18:32, Geoffrey Poore notifications@github.com a écrit :
Hi Geoffrey, Yes, I do understand that it affects the input too, given However here it is not only a question of directory, but also of Changing texi2dvi to use -output-directory, given that not all I would like to emphasize that here the main issue is minted is an amazing improvement over listings, but the fact that I guess that minted fires some shell code to call pygmentize behind pygmentize SOURCE-FILE by pygmentize $(kpsewhich SOURCE-FILE 2>/dev/null || echo SOURCE-FILE) to have it work. Or maybe like this, to be safer on special s=$(kpsewhich 'SOURCE-FILE' 2>/dev/null) Cheers,
|
Le 27 mars 2014 à 10:33, Akim Demaille akim.demaille@gmail.com a écrit :
I met another instance of that problem right now: I'm write an The master file uses a store a existing questions,
|
Hi, I have again met that issue, which is really making the use of minted troublesome. Do you have plans to address this? Don't you think the kpsewhich approach would solve cleanly your problem? Thanks in advance! |
I am working to address this, but I can't give it a high priority relative to other issues, since I need to learn the basics of another build tool and attempt to find a solution that will function under all operating systems with both MikTeX and TeX Live. At this point, I expect to have a solution (assuming one exists) by January. In the meantime, feel free to experiment with the style file. The command that is used to call Pygments is on lines 324, 339, and 668 of |
Thanks for the feedback! I will try to toy with the style file, indeed. However, when I have given it a shot (because I'm really eager to use |
I'm not sure what would cause a lack of color. Putting the style file in the same directory as the TeX source should work. I've used it that way under Windows and Linux. You might try downloading the file again, using the GitHub raw view, to make sure it came through OK. |
Well, I tried harder, and found: passing [draft] to the document class removes the style. This is a difference with the minted that comes with my TeXLive (1.7 I think). How can I avoid that without removing the [draft] from {article}? |
I wasn't thinking about the new draft mode. It turns off highlighting, which means there are absolutely no slowdowns due to highlighting code (not even the slight overhead involved with caching). |
Ah, thanks for the draft=false :) I had tried passing |
I'm just getting back to this. I can't get
with Also, |
hi Geoffrey,
I did as follows. It fails with texi2pdf, works with pdflatex. akim@padam /tmp $ cat main.tex \usepackage{minted} \begin{document} \inputminted{c}{foo.c} \end{document} [Loading MPS to PDF converter (version 2006.09.02).] akim@padam /tmp $ texi2pdf --clean --shell-escape --batch main.tex (/tmp/./main.tex (/opt/local/share/texmf-texlive/tex/latex/base/article.cls ! LaTeX Error: File `main.out.pyg' not found. Type X to quit or to proceed, Enter file name: l.7 \inputminted{c}{foo.c} This is: \ProvidesPackage{minted}[2011/09/17 v1.7 Yet another Pygments shim for LaTeX] Using --debug and --verbose will help see what texi2dvi |
\makeatletter
\renewcommand\minted@pygmentize[2][\jobname.pyg]{
\def\minted@cmd{pygmentize -l #2 -f latex -F tokenmerge
\minted@opt{gobble} \minted@opt{texcl} \minted@opt{mathescape}
\minted@opt{startinline} \minted@opt{funcnamehighlighting}
\minted@opt{linenos} -P "verboptions=\minted@opt{extra}"
-o \jobname.out.pyg \detokenize{$}(kpsewhich "#1" || "#1")}
\immediate\write18{\minted@cmd}
% For debugging, uncomment:
%\immediate\typeout{\minted@cmd}
\ifthenelse{\equal{\minted@opt@bgcolor}{}}
{}
{\begin{minted@colorbg}{\minted@opt@bgcolor}}
\input{\jobname.out.pyg}
\ifthenelse{\equal{\minted@opt@bgcolor}{}}
{}
{\end{minted@colorbg}}
\DeleteFile{\jobname.out.pyg}}
\makeatother |
For future reference on this and any related issues in the future, the |
That's right. But seriously, shell scripts should never be |
…); fixed \inputminted bug when using outputdir; improved error messages on Pygments failure; prep for 2.0 release
The latest commit adds a |
Hi,
I'm sorry, this bug report is not against the current git version of the package, but against the one I have via TeXlive: 2011/09/17. However, according to what I saw, there is no difference.
I'm using various tools such as texi2pdf to compile my latex files. Such tools, to avoid cluttering the working directory, compile elsewhere. To make sure that \input and companions work properly, the TEXINPUTS envvar is used. It appears that listings handles this properly, but minted does not.
It would be really nice if it did.
Thanks!
The text was updated successfully, but these errors were encountered: