tom-tan / auctex-latexmk

This library adds LatexMk support to AUCTeX.
93 stars 24 forks source link

Using auctex-latexmk with pdf? #4

Closed drorata closed 11 years ago

drorata commented 11 years ago

I fail to use your nice code, and it seems like it is because I have to use pdf for my compilation. Therefore, these lines in .latexmkrc

$latex = "platex -interaction=nonstopmode"; $dvipdf = 'perl -e "exec(\'dvipdfmx\', \$ARGV[0])"';

seems to break my compilation. Is there a way to tell latexmk to use pdflatex using your work?

tom-tan commented 11 years ago

You can use pdflatex by setting $pdf_mode=1 in .latexmkrc. For more details about $pdf_mode, please see the manpage of latexmk.

drorata commented 11 years ago

Thanks for the quick answer!

Worked like a charm! Do I really need the lines: $latex = "platex -interaction=nonstopmode"; $dvipdf = 'perl -e "exec(\'dvipdfmx\', \$ARGV[0])"'; ?

Maybe you would like to add something to the documentation? In case one has projects that have to be compiled using latex and others using pdflatex, then I guess an easy solution would be to use local .latexmkrc files.

Thanks anyway and all the best, Dror

On Oct 5, 2013, at 18:25 PM, tom tan wrote:

You can use pdflatex by setting $pdf_mode=1 in .latexmkrc. For more details about $pdf_mode, please see the manpage of latexmk.

— Reply to this email directly or view it on GitHub.

tom-tan commented 11 years ago

Do I really need the lines: $latex = "platex -interaction=nonstopmode"; $dvipdf = 'perl -e "exec(\'dvipdfmx\', \$ARGV[0])"'; ?

For pdflatex users, these lines are not needed. They are used when $pdf_mode=3 (i.e. make PDF with latex and dvipdfmx).

Maybe you would like to add something to the documentation? In case one has projects that have to be compiled using latex and others using pdflatex, then I guess an easy solution would be to use local .latexmkrc files.

Thank you for your advice. I'll fix it later.

tom-tan commented 11 years ago

done!

tom-tan commented 11 years ago

I close this issue because $pdf_mode=1 works in most cases and now it is described in the document.