You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature and the current behavior/state
Currently, the TeXstudio internal viewer expects the generated PDF path to be the same as the source $\TeX$ document, except for the file extension. It would be useful if it could instead read the PDF path from the .latexmkrc file if it exists, as it could be different when using latexmk. The requested feature only applies if the meta-command Default Compiler is set to txs:///latexmk.
As far as I can see, currently, one can only override this path on a case-by-case basis, which requires changing settings when switching between projects, and it would be useful if this could be automated.
Who will benefit from this feature?
My primary goal here is to be able to build the document while keeping the project root directory relatively tidy. For this, I am using latexmk with a .latexmkrc file in the project root directory. In the .latexmkrc file, I am using the configuration variables $aux_dir (to specify a directory for .aux, .bbl, .blg, .log, .out... files), $out_dir (to specify a directory for .pdf and .synctex.gz), $jobname (to specify the generated artefacts base name) and $do_cd (to specify whether to cd to the main source directory before processing). More information about these variables can be found in the manual on pages 30, 45, 41 and 36, respectively.
Any Other info
Starting with the default settings, I have set the command Latexmk to the full path of the latexmk executable and set the meta-command Default Compiler to txs:///latexmk. Then, compiling a main.tex file succeeds, and the generated files have the correct name and are stored in the directories specified in the .latexmkrc file. However, the TeXstudio internal viewer does not display the PDF file and shows the error message:
Failed to find file "full/path/to/the/project/root/directory/main.pdf"; perhaps, it has been deleted.
Opening the PDF file using File > Open partially works in the sense that Compile updates the viewer and Go to Source works. However, the Go to PDF, View and Build and View commands remove the PDF from the viewer and result in the above error message.
The issue could be reproduced using the main.tex document:
\documentclass{amsart}
\begin{document}
Example
\end{document}
It is not clear to me whether latexmk could report the generated PDF location in a 'dry run', but it could specify the location of the rc file it uses, if any, using the command:
latexmk -rc-report
A different issue is that, when compiling with the command txs:///latexmk, TeXstudio Log is empty, and TeXstudio Messages are too brief compared to latexmk output when run on the command line. I could report this as a separate issue if needed.
The text was updated successfully, but these errors were encountered:
Describe the feature and the current behavior/state
Currently, the$\TeX$ document, except for the file extension. It would be useful if it could instead read the PDF path from the
TeXstudio
internal viewer expects the generated PDF path to be the same as the source.latexmkrc
file if it exists, as it could be different when usinglatexmk
. The requested feature only applies if the meta-commandDefault Compiler
is set totxs:///latexmk
.As far as I can see, currently, one can only override this path on a case-by-case basis, which requires changing settings when switching between projects, and it would be useful if this could be automated.
Who will benefit from this feature?
My primary goal here is to be able to build the document while keeping the project root directory relatively tidy. For this, I am using
latexmk
with a.latexmkrc
file in the project root directory. In the.latexmkrc
file, I am using the configuration variables$aux_dir
(to specify a directory for.aux
,.bbl
,.blg
,.log
,.out
... files),$out_dir
(to specify a directory for.pdf
and.synctex.gz
),$jobname
(to specify the generated artefacts base name) and$do_cd
(to specify whether tocd
to the main source directory before processing). More information about these variables can be found in the manual on pages 30, 45, 41 and 36, respectively.Any Other info
Starting with the default settings, I have set the command
Latexmk
to the full path of thelatexmk
executable and set the meta-commandDefault Compiler
totxs:///latexmk
. Then, compiling amain.tex
file succeeds, and the generated files have the correct name and are stored in the directories specified in the.latexmkrc
file. However, theTeXstudio
internal viewer does not display the PDF file and shows the error message:Opening the PDF file using
File > Open
partially works in the sense thatCompile
updates the viewer andGo to Source
works. However, theGo to PDF
,View
andBuild and View
commands remove the PDF from the viewer and result in the above error message.The issue could be reproduced using the
main.tex
document:and the
.latexmkrc
file:It is not clear to me whether
latexmk
could report the generated PDF location in a 'dry run', but it could specify the location of the rc file it uses, if any, using the command:A different issue is that, when compiling with the command
txs:///latexmk
,TeXstudio
Log is empty, andTeXstudio
Messages are too brief compared tolatexmk
output when run on the command line. I could report this as a separate issue if needed.The text was updated successfully, but these errors were encountered: