[Tex/LaTex] Adding a keyboard shortcut to the compile process in TeXnicCenter

texniccenterviewers

I am using TeXnicCenter, and have just updated to Adobe Reader X. All in all I'm doing okay with the change, but I have one minor tweak that I'd want to make: I prefer the "Read Mode" view in Adobe Reader X, but AFAIK there is no way of setting that to be the default view in the standalone reader (it is the default view in a browser, however).

What I would like is some method of automatically switching to Read Mode after the compile process is complete. The approach I was thinking of (though I would welcome any alternatives!) was to use the keyboard shortcut for switching to Read Mode (it is Ctrl + H). I have a macro recording program on my computer, so I can record

Ctrl + Shift + F5 Delay[x milliseconds] Ctrl + H

which will compile and display the document (Ctrl + Shift + F5), wait x milliseconds, then switch to Read Mode (Ctrl + H), but the problem is that depending on the packages being loaded, the compilation time for different documents can vary widely, and I'd like the delay between the two key combinations to be no longer than necessary. If the PDF output hasn't been opened by the end of the delay, the TeXnicCenter window is still in focus and Ctrl + H is applied there.

My question is whether there is a way of incorporating the command "apply Ctrl + H" into the LaTeX => PDF output profile, and specifically, in a manner such that it will be executed directly after the PDF output has been opened. Perhaps there is something I can add to that "Command" field under "View project's output"?

Best Answer

Also with the recently published version 2.0 beta 1 of TeXnicCenter the simple, but unsatisfactory answer is:

No, there is no solution inside of TeXnicCenter.

Nevertheless some ideas:

  • Was always suggested by percusse: Use SumatraPDF. It supports DDE commands, cf. DDE commands for SumatraPDF. It has a presentation mode with Ctrl + L and a fullscreen modus with Ctrl + Shift + L or F11. See, if one of them fits your favorite read mode of Adobe Reader. This program reloads the PDF itself, no need for closing.
    In the rare cases, if you are really in need of opening a PDF file in Adobe Reader, you can do this from the “File” menu in SumatraPDF, and it will be redirected to the same active page. (Also, if you installed other PDF readers, you can open the file in these from this menu.)

  • Use PDF-XChange Viewer. It has a very similar read mode (key F11). PDF-XChange Viewer does not support DDE commands, but command line arguments instead, one is for closing. For this see in the manual file available as separate download, but included in the installer version.
    If you really need to open a PDF file in Adobe Reader, you can do this from a symbol inside of PDF-XChange Viewer, and again it will be redirected to the same active page. The read mode is remembered by the program also after closing.

  • Use a program like AutoHotkey as your “PDF Viewer”. Of course, then you are yourself responsible for programming the open and close rules for your actual PDF Viewer.