![]() Unless pygmentize is installed under /usr/local/bin, the GUI will not be able to localize the command-line utility. As a consequence, the PATH environment variable is not the same for GUI Applications. This is because GUI applications such as TeXShop or Texmaker are not able to see your environment variables (unless they are launched from a Terminal). On a recent MacOS, it is likely that you encounter the above error, even if Pygments is installed. Enter the following into a terminal: python3 -m pip show Pygments The first thing to do is to make sure that Pygments is installed on your machine (the OP has already done this). The OP reports the following error message: ! Package minted Error: You must have `pygmentize' installed to use this package You'll have a shortcut for using the shell escape only when you choose to, by pressing Alt+ Shift+ F1 In line next to "PdfLaTeX" there should be "/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode %.texĬhange it into "/usr/texbin/pdflatex" -synctex=1 -shell-escape -interaction=nonstopmode %.texīeware that this opens some security issues, so remove -shell-escape when typesetting documents you get from non trusted sources.Ī safer way could be to define a "User command": go to the menu User > User Commands > Edit User Commands and in the upper space write something such as "pdftex-shell-escape" in the lower space write the string above. Now it's only a question of telling Texmaker that you want to execute external programs such as pygmentize: go to the "Preferences" menu in Texmaker and choose the "Commands" tab. If there's a path after "Is there pygmentize?" you'll be OK. You'll see in the produced path.pdf file what pdftex sees as PATH. If oen intend to create a sytem- or user-wide custom format, it is worth using one time the command line, thus providing a more meaningful jobnameto be used to name the format.Write a file path.tex containing exactly this: \catcode`:=\activeĪnd run from the Terminal the command pdftex -shell-escape path Of course the format created here by using the above shown typesetting tools will be called mwe.fmt, but can be renamed. The second line is a TeWworks-style magic command interpreted by the editor only, in contrast to the first one which is interpreted by the (pdf)(la)tex compiler. Pdflatex -file-line-error -shell-escape -fmt=MyPreamble -recorder -synctex=1 "$bfname"Īnd invoking MyLaTeX from TeXShop, I get the dreaded red error message:Ĭompiling the foo-x-barComplete.tex, which is simply: \input, being placed after the \csname endofdump\endcsname, is not included in the format, and can therefore be modified without to need to rebuild the custom format. I have the following file saved as MyLaTeX.engine: #!/bin/shīfname=$(dirname "$1")/"`basename "$1". With TeXShop things are not quite the same. I get identical results as command line compilation (again, no red error message). Yields the correct result (no red error message):įurthermore, the following (change how the file name is specified, see the "Update" section below) also works: pdflatex -file-line-error -shell-escape -fmt=MyPreamble -recorder -synctex=1. ![]() Then I try to use this preamble in four different ways to process foo-x-bar.tex:Ĭommand Line compilation ( works): pdflatex -file-line-error -shell-escape -fmt=MyPreamble -recorder -synctex=1 foo-x-bar.tex I suspect something is not quite right with the MyLaTeX.engine script invoked by TeXShop, but don't know for sure.Īfter saving MyPreamble.tex defined below, I first compile the preamble via the command line: pdflatex -ini -jobname=MyPreamble "&pdflatex MyPreamble.tex\dump" But, things work as expected if I use TeXworks, or command line compilation. ![]() ![]() I am not getting the desired behavior when I use TeXShop and the precompiled. The example below tests that the value of the token \MyToken is set to the portion of the file name between the two dashes. fmt file, I am trying to speed up compilation by generating a. ![]() As per my earlier question, Can't get real currfile if used in precompiled. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |