Maybe this is asking too much, or again maybe it is easy and i just missed the instructions.

Sometimes while working on a project, in WinEdt, with a set Main File, I need to look at TeX files that do not belong in the project. So, I can open any such file and read it as a source file (and then close it again before saving the project). But so far as I know now, I cannot show its pdf while the project is open, since it is not included in the Main File of the project.

Is there a command that would show the pdf of a file not in the project without closing or changing the project? As Ulrike Fischer comments I could unset and then afterwards reset the main file. Or I can close the project and look at the pdf of the other file. But I often want to go back and forth a lot and that kills a lot of time. Is there a quicker way way to access the pdf of a file that is not included in the project?

Note this is opposite to the question Compiling multi-file LaTeX file since OP of that question did want to compile the project and not some other file.

  • 2
    You can change the current main file with project -> set main file (Ctrl + F5). – Ulrike Fischer Nov 25 '17 at 15:19

You cannot do this with default WinEdt settings.

Nevertheless, if all you need is a shortcut for this, let's say Shift+Alt+R, simply do the following.

Go to "Options" -> "Options Interface" and double-click the "Main Menu" item:

enter image description here

A local copy of MainMenu.ini gets opened. In this file, just after the lines


add the following lines

    CAPTION="View Current PDF"
          `Exe('%b\Exec\PDF\PDF Preview.edt');`+

At this point press Shift+Ctrl+F9 to reload the file.

Now the shortcut Shift+Alt+R opens the pdf related to the current file, while Shift+Ctrl+R opens the pdf related to the main file.

If you don't like Shift+Alt+R as a shortcut for this, simply double-click on the keyword SHORTCUT in the code and change it.

| improve this answer | |
  • Worked perfectly on the first try. – Colin McLarty Nov 25 '17 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.