Reflect in run config UI if settings are being overridden by a certain .latexmkrc file
See original GitHub issueType of JetBrains IDE (IntelliJ, PyCharm, etc.) and version
IntelliJ IDEA 2020.3 (Community Edition) Build #IC-203.5981.155, built on November 30, 2020 Runtime version: 11.0.9+11-b1145.21 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: ParNew, ConcurrentMarkSweep Memory: 725M Cores: 12 Registry: ide.tooltip.initialDelay=590, ide.balloon.shadow.size=0 Non-Bundled Plugins: Statistic, com.intellij.ideolog, net.seesharpsoft.intellij.plugins.csv, net.vektah.codeglance, mobi.hsz.idea.gitignore, name.kropp.intellij.makefile, Dart, DBN, io.flutter, Docker, org.jetbrains.plugins.hocon, org.intellij.scala, org.jetbrains.kotlin, izhangzhihao.rainbow.brackets, PythonCore, nl.rubensten.texifyidea
TeXiFy IDEA version
0.7.1
Latexmk version
4.70b (possibly relevant)
What I did (steps to reproduce)
- Set the compiler option to “Latexmk” in the run configuration
- Set the main file to compile as “test.tex” (see minimal example below for the full text of this file)
- Set the directory for auxiliary files as the “out” directory in the path to the containing directory for test.tex (the two are adjacent within the same containing directory)
- Set the directory for the output files as the same as above
- Set the output format to PDF in the run configuration
- Saved and ran the configuration
Minimal example to reproduce the problem
\documentclass{article}
\begin{document}
test
\end{document}
Expected behavior
A PDF with the text “test” is created
Actual behavior
An error is produced stating that Latexmk is unable to convert from DVI to PDF. This is because the TeXiFy IDEA plugin is passing the custom compiler argument -output-format=pdf when the PDF option is selected from the “Output format” dropdown. However, Latexmk does not have this option. Instead, it relies on the -pdf flag to accomplish the same thing. When this flag is manually added to the custom compiler arguments, the issue goes away. With previous versions of Latexmk and TeXiFy IDEA, this was not required.
Additionally, when I change the compiler from Latexmk, all three of pdfLaTeX, LuaLaTeX, and XeLaTeX compile the document without any problems; only Latexmk gives me the error mentioned.
The full stacktrace of the exception thrown
latexmk -output-format=pdf -output-directory=/path/to/out -aux-directory=/path/to/out test.tex
Rc files read:
/path/to/.latexmkrc
Latexmk: This is Latexmk, John Collins, 29 September 2020, version: 4.70b.
Latexmk: In reading rule 'pdflatex' in '/path/to/out/test.fdb_latexmk',
rule is not currently active.
Rule 'latex': The following rules & subrules became out-of-date:
'latex'
------------
Run number 1 of rule 'latex'
------------
------------
Running 'latex -output-format=pdf -recorder -output-directory="/path/to/out" "test.tex"'
------------
Set environment variable BIBINPUTS='/path/to/out;'
Set environment variable TEXINPUTS='/path/to/out;'
Latexmk: applying rule 'latex'...
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.12)
entering extended mode
(test.tex
LaTeX2e <2020-10-01> patch level 2
L3 programming layer <2020-12-07> xparse <2020-03-03>
(/path/to/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/path/to/size10.clo))
(/path/to/l3backend-pdftex.def)
(/path/to/out/test.aux)
[1{/path/to/pdftex.map}]
(/path/to/out/test.aux) )<
/path/to/cmr10.pfb>
Output written on /path/to/out/test.pdf (1 page, 11050 bytes).
Transcript written on /path/to/out/test.log.
Latexmk: Log file says output to 'out/test.pdf'
Latexmk: ===For rule 'latex', the extensions differ between the
actual output file 'out/test.pdf',
and the expected output '/path/to/out/test.dvi'.
I could not accommodate the changed output extension
(either because the configuration does not allow it
or because there is a conflict with requested filetypes).
----------------------
This message may duplicate earlier message.
Latexmk: Failure in processing file 'test.tex':
Could not handle change of output extension
----------------------
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs, or warnings treated as errors.
Latexmk: Examining '/path/to/out/test.log'
=== TeX engine is 'pdfTeX'
Latexmk: Errors, so I did not complete making targets
Process finished with exit code 12
Issue Analytics
- State:
- Created 3 years ago
- Comments:9

Top Related StackOverflow Question
After briefly looking at the codebase, I believe this will be a simple enough fix that I could attack it with my spare cycles. If you don’t mind, please assign this to me.
Because it is related to the new run config, I fixed it in that branch, and will be released eventually together with the rest, so I consider this issue fixed.