Compiling using Latexmk produces DVI output no matter what dropdown option is set in the output format.
See original GitHub issueType of JetBrains IDE (IntelliJ, PyCharm, etc.) and version
PyCharm 2020.2
Operating System
Windows 10
TeXiFy IDEA version
0.7.1-alpha.3
What I did (steps to reproduce)
Compiled a .tex file using Latexmk with the following .latexmkrc options:
$latex = 'latex %O --shell-escape %S';
$pdflatex = 'lualatex %O --shell-escape %S';
and “PDF” selected in the output format dropdown.
Expected behavior
A .PDF file is produced.
Actual behavior
A .DVI file is produced (which often results in compilation errors such as “Cannot determine size of graphic” for \includegraphics)
Temporary Fix
Adding -pdf to the Custom compiler arguments fixes the problem.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
LATEXMK(1) General Commands Manual ... - TeXDoc
Latexmk completely automates the process of compiling a LaTeX document. ... If FORMAT is dvi, then dvi output is turned on, and postscript...
Read more >dvi mode - Which TeX programs produce dvi output? - TeX
Which TeX programs produce dvi output? · 2. Both pdfTeX and pdfLaTeX can be directed to produce either dvi files or pdf files....
Read more >latexmk(1) - Debian Manpages
If FORMAT is dvi, then dvi output is turned on, and postscript and pdf output are turned off. This is equivalent to using...
Read more >Support for Latexmkrc · Issue #1586 · Hannah-Sten/TeXiFy-IDEA
In latexmkrc, the config is $pdf_mode = 5; $xelatex = "xelatex -no-pdf ... Compiling using Latexmk produces DVI output no matter what dropdown...
Read more >latex-suite.txt
This makes vim invoke Latex-Suite when you open a tex file. filetype plugin ... this is mostly a matter of taste. but LaTeX...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is what happens, in fact it is unavoidable: latexmk will simply read the latexmkrc file first (it did that in the old situation too, as it’s a latexmk feature), and after that apply the command line arguments given by TeXiFy. Since this meant that configurations in latexmkrc files were always overridden by TeXiFy for some arguments like output format (example in #1586) it was not possible in the old sitation to use latexmkrc files as intended, because output format would be always overridden to be pdf. I have to check but it might be the case that the output format is the only setting that should default to ‘use latexmkrc configuration’, as other default arguments are not reflected in the UI.
I see, so that’s why it worked before, I wasn’t using any output format arguments in my
.latexmkrcfile so I never noticed a problem and it worked for my use case. Going forward your default argument idea seems like the best option, I don’t know about others but I tend to use a mix of both, use the.latexmkrcfor a number of.texfiles in the same folder for options that apply to all of them (like using LuaLaTeX to typeset huge datasets) and then have a run configuration for each individual file with command line arguments and output format only for that file.I think latexmk uses DVI by default unless I’m mistaken. Another option might be to disable the drop down if
$-pdf;or$-dvi;are detected in the.latexmkrcfile, as then it’s clear the user is using it to determine the output format.