question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compiling using Latexmk produces DVI output no matter what dropdown option is set in the output format.

See original GitHub issue

Type 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:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
PHPiratescommented, Sep 21, 2020

I think the best default behaviour is to allow the run configuration to append to what is in the .latexmkrc file

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.

0reactions
ralphieraccooncommented, Sep 21, 2020

I see, so that’s why it worked before, I wasn’t using any output format arguments in my .latexmkrc file 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 .latexmkrc for a number of .tex files 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 .latexmkrc file, as then it’s clear the user is using it to determine the output format.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found