6

I use TeXnicCenter to build my LaTeX documents under Windows 7.

I usually have 3-4 tabs open in TeXnicCenter corresponding to the different sections of my document. To build my document I have to go to the first tab (the index of my file), build, and then go back to the old tab where I was editing (one of the sections).

Is there a smarter way of doing this? I would like a hotkey that just move to the first tab and compile. F5 only compiles the current tab, it is not aware if it is the index or not.

0

2 Answers 2

10

You can create a project rather than just working with regular files. Each project has a "main file", so that when you "build the project", it builds the main file, which may be different from the actively selected window/tab.

Start a new project (menu option File > New Project) and specify the main file or change the main file for an existing project (menu option Project > Properties):

enter image description here

Now use the "Build and View Output" Ctrl+F5 rather than the usual "Build and View Current File" Ctrl+Shift+F5.

1
  • Werner, you’re too kind. ;-) Actually creating a project is the only way for what the OP wants to achieve.
    – Speravir
    Jul 8, 2012 at 17:16
6

You can also convert a regular TeX input file to a project as follows.

Step 1

Let trash.tex be your regular TeX input file. Open it as shown in the following figure.

enter image description here

Step 2

Choose Project and click Create with active file as main file as follows.

enter image description here

Step 3

Click OK and done!

enter image description here

Now you can TeXify the project with one-click.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .