Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Jul 8 '12 at 15:54

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 8 down vote accepted

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.

share|improve this answer
    
amazing, thank you –  mottalrd Jul 8 '12 at 1:40
    
Werner, you’re too kind. ;-) Actually creating a project is the only way for what the OP wants to achieve. –  Speravir Jul 8 '12 at 17:16

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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