Consider the following LaTeX document.
\documentclass{article} \usepackage{libertine} \usepackage{fontspec} \usepackage{polyglossia} \iffalse \setdefaultlanguage{hebrew} \fi \begin{document} Hello, world! \end{document} After finishing writing the document, I hit C-c RET twice.
Scenario 1 - with the
\iffalse ... \fias shownAfter the first time the message
LaTeX: successfully formatted {1} pageappears in the echo line. After the second time the messageView command: TeX-evince-sync-viewappears in the echo line. If I now hitRET, a pdf viewer opens with the processed document.Scenario 2 - without the
\iffalseand without the\fitagsAfter both the first and the second time the message
You should run LaTeX again to get references right, {1} pageappears in the echo line. The pdf file is created and, when opened manually, looks fine, but the pdf viewer does not open from within Emacs as in scenario 1.
How can I get the same behavior of scenario 1, specifically the automatic opening of the synched pdf file, under the setup of scenario 2?
xetexorluatex. However, the simplest thing to do would simply be to useC-c C-v(TeX-view) after you've compiled the file.C-c C-c)? After I compile, I get the "You should run LaTeX again..." message to which you're referring, butC-c C-vopens the viewer right up. (Note, also, that you canC-c C-cand selectViewand it should do the same thing.)Viewbutton doesn't work either. When clicked, the messagetool-bar view-appears in the echo line, and nothing more. In particular, the pdf viewer does not open. The same behavior registers (both when using the keyboard shortcuts as well as when clicking the button) when the\iffalse ... \fidirectives are in place.(setq TeX-PDF-mode t).