On Mar 29, 2018, at 11:59 AM, René Schwaiger <sanssecours@me.com> wrote:Hi Kyle,On 29.03.2018, at 15:45 , Kyle Johnson <kbj@linguist.umass.edu> wrote:
On Mar 27, 2018, at 2:33 AM, René Schwaiger <sanssecours@me.com> wrote:
Hi Kyle,On 27.03.2018, at 24:27 , Kyle Johnson <kbj@linguist.umass.edu> wrote:
I’ve recently moved to a new machine (an iMac Pro), and have successfully installed Texlive 2017 and TextMate. When I use other LaTeX editors, I can successfully typeset LaTeX files, but not when I use TextMate. I typeset in the old fashioned dvips->ps->pdf way, and the problem I seem to be having is with the ps2pdf utility, that finishes the conversion of the file from postscript to pdf. The error message says that this utility has run too many times. When I view the postscript file that is created during this process, it looks fine and I can get Preview (and Skim) to translate it into a pdf.
Because other editors can typeset fine, I’m thinking that there is something wrong with the way that TextMate calls the ps2pdf process on my machine. Has anyone experienced this problem?
I just tried the following:
1. Create a new file in TextMate
2. Paste the following content into the file
%!TEX TS-program = latex
\documentclass{article}
\begin{document}
Hello, World!
\end{document}
3. Save the file as `test.tex` in the directory `Downloads`
4. Run “Typeset & View (PDF)” (`⌘` + `R`)
, which failed printing a very uninformative error message in the process:
The file /Users/rene/Downloads/test.pdf does not exist. 134:139: execution error: Can’t make file "HD:Users:rene:Downloads:test.pdf" into type alias. (-1700)
Error 1 opening viewer
Command latexmk -pdfps -f -r /tmp/latexmkrc -r '/Users/rene/Library/Application Support/TextMate/Bundles/LaTeX.tmbundle/Support/config/latexmkrc' test.tex exited with status 12
. The problem on my machine was a broken Ghostscript installation. After I fixed the issue by running `brew unlink ghostscript; brew link ghostscript` everything worked fine. Did you maybe forget to install Ghostscript? You can check if Ghostscript is installed by running `ps2pdf` inside a Terminal window. If that is not the problem can you please send me a minimal example document that causes the error you described?Thanks in advance,
Kyle Johnson
Kind regards,
René
Thanks for your quick and helpful response, René.
ps2pdf works from the Terminal command line. And a minimal document — the one you suggested for instance — has the same problem when I run Typeset+View. The error message I get is:
***************
Running 'ps2pdf "foo.ps" "foo.pdf"'
------------
For rule 'ps2pdf', running '&do_viewfile( )' ...
sh: ps2pdf: command not found
Rule 'ps2pdf': File changes, etc:
Changed files, or newly in use since previous run(s):
'foo.ps'
Collected error summary (may duplicate other messages):
ps2pdf: Command for 'ps2pdf' gave return code 32512
'ps2pdf' needed too many passes
The file /Users/kbj/Desktop/foo.pdf does not exist. 130:135: execution error: Can’t make file "Macintosh HD:Users:kbj:Desktop:foo.pdf" into type alias. (-1700)
Error 1 opening viewer
Command latexmk -pdfps -f -r /tmp/latexmkrc -r '/Users/kbj/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/config/latexmkrc' foo.tex exited with status 12
*************
Does this help identify the issue?
thank you very much for the helpful reply. As far as I can tell “Typeset & View (PDF)” is unable to locate `ps2pdf`. I assume the cause of this is the environment variable `PATH` which does not contain the parent folder of `ps2pdf`. I added the default location of Homebrew’s `ps2pdf` program `/usr/local/bin` to the `PATH` variable of “Typeset & View (PDF)” [1].
You can check the location of `ps2pdf` on your machine by entering the command
which ps2pdf
in a Terminal window. If the command prints the location `/usr/local/bin/ps2pdf`, then translating the sample document should work after TextMate updates the LaTeX bundle on your machine. If `which ps2pdf` prints a different path, please send me the location so I can add it to Typeset & View’s environment too.
By the way: Until TextMate updates your LaTeX bundle you can also fix your problem by setting the variable
PATH
in “TextMate” → “Preferences…” → “Variables” to the value
$PATH:/usr/local/bin
.
[1]: https://github.com/textmate/latex.tmbundle/commit/4048e101
As always: thanks,
Kyle
Kind regards,
René
_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate