I'm using SublimeText2 with LaTeXTools on Ubuntu 14.04LTS and TeXLive 2015.
When I press ctrl+b, it generates the .aux
and dfb_latexmk
file but no pdf. My problem was described in a previous post here. The suggested solution does not work for me (changing the builder to simple).
I've also tried to delete everything except the .tex
file and recompile, with the same result. I tried Tools–>Build System–>LaTeX, but I get the same results. I tried the platform-specific recommendations in the LaTeXTools recommendations (i.e., removing the space in = 'E
and quoting $pdflatex
command); but they didn't seem to work.
The problem is not with a specific file. When I ran ctrl+b on a TeX file I wrote a while ago, it shows the pdf; but if I try to change the file, it shows the same pdf (i.e. the pdf is not changed to reflect the changes I made in the file). I assume it uses the already-complied pdf and does not compile a new one.
Running latexmk test.tex -pdf
from command line works without a problem.
Here is a snippet from the console of ST2:
<class 'traditionalBuilder.TraditionalBuilder'>
Welcome to thread Thread-4
2
[u'/usr/local/texlive/2015/bin/x86_64-linux/latexmk', u'-cd', u'-e', u"$pdflatex = 'pdflatex -interaction=nonstopmode -synctex=1 %S %O'", u'-f', u'-pdf', u'test.tex']
Finished normally
12
Exception in thread Thread-4:
Traceback (most recent call last):
File ".\threading.py", line 532, in __bootstrap_inner
File "./makePDF.py", line 164, in run
IOError: [Errno 2] No such file or directory: u'/home/.../test.log'
EDIT In response to ig0774 suggestion, here is the output of latexmk
`Stdout:
Latexmk: This is Latexmk, John Collins, 5 February 2015, version: 4.43a.
Latexmk: Changing directory to './'
Rule 'pdflatex': Rules & subrules not known to be previously run:
pdflatex
Rule 'pdflatex': The following rules & subrules became out-of-date:
'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'q/pdflatex -interaction=nonstopmode -synctex=1 -recorder "test.tex"/'
------------
Latexmk: applying rule 'pdflatex'...
sh: 1: q/pdflatex: not found
Failure to make 'test.pdf'
Collected error summary (may duplicate other messages):
pdflatex: (Pdf)LaTeX failed to generate the expected log file 'test.log'
Latexmk: Did not finish processing file 'test.tex':
(Pdf)LaTeX failed to generate the expected log file 'test.log'
Latexmk: Undoing directory change
Latexmk: Errors, in force_mode: so I tried finishing targets`
Changing back to "command" : ["/usr/local/texlive/2015/bin/x86_64-linux/latexmk", "-cd", "-e", "$pdflatex = '%E -interaction=nonstopmode -synctex=1 %S %O'", "-f", "-pdf"]
I get the following stdout:
`Stdout:
Latexmk: This is Latexmk, John Collins, 5 February 2015, version: 4.43a.
Latexmk: Changing directory to './'
Rule 'pdflatex': File changes, etc:
Non-existent destination files:
'test.pdf'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex -interaction=nonstopmode -synctex=1 "test.tex" -recorder '
------------
Latexmk: applying rule 'pdflatex'...
sh: 1: pdflatex: not found
Failure to make 'test.pdf'
Collected error summary (may duplicate other messages):
pdflatex: (Pdf)LaTeX failed to generate the expected log file 'test.log'
Latexmk: Did not finish processing file 'test.tex':
(Pdf)LaTeX failed to generate the expected log file 'test.log'
Latexmk: Undoing directory change
Latexmk: Errors, in force_mode: so I tried finishing targets`
Best Answer
This is a comment not a question, but it's too long to fit into the comment field.
Let's try to get the output from
latexmk
when its run through Sublime Text since it seems to be different from runninglatexmk
from the console. To do this we'll need to modify your local copy ofmakePDF.py
.To find this file:
makePDF.py
in Sublime Text (or an editor of your choice)To edit this file:
data = open(self.caller.tex_base + ".log", 'rb').read()
Replace line 164 with this block of code:
NB: all the spacing should be tabs and the code should be indented to line up with the comments.
After doing this, re-run the compilation. It will give you the output from
latexmk
. Post that here and we might be able to better diagnose the issue.So it seems as if there's a mismatch between the
$PATH
on your console and the$PATH
visible to Sublime Text, so thatpdflatex
is not visible to the Sublime Text path. (I'm assuming that, since it works from the console, thatpdflatex
is actually installed on your machine and that you haven't touched thetexpath
setting to remvoe$PATH
from it). So:which pdflatex
pdflatex
to thetexpath
setting in platform settings bit ofLaTeXTools.sublime-settings
.Try re-compiling and see what happens.