0

I was using TexStudio and everything was fine (each time I compiled, the preview appeared at the right side). Then, I need to change the file of the pdf generated from the tex code. So, I used this solution. However, everytime I compiled, the content in the preview is not updated anymore. Any way to make it work with %& -job-name=mypdf.pdf at the top?

Lev
  • 145
  • AFAIK TeXstudio always expects that the log and the pdf file have the same basename like the root TeX file. Can't you use a tex file mypdf.tex as root, that just uses one \input <originaltexfile>.tex? – cabohah Dec 08 '23 at 15:17

1 Answers1

1

You can add | txs:///view-pdf "mypdf.pdf" to your magic comment to specify which file should be shown in the pdf viewer:

% !TeX program = pdflatex -jobname=mypdf  % | txs:///view-pdf "mypdf.pdf"
\documentclass{beamer}

\begin{document}

\begin{frame} abc \end{frame}

\end{document}