I'm having problems building a book file (using the memoir class) in the latest version of TeXnicCenter on Windows 7:

  1. I have a main file which uses \includefrom{} to include each chapter; TeXnicCenter only lets me build from that main file, otherwise it gives a long string of errors. I tried writing %!TEX root = ../realbook.tex at the top of each chapter file, but that doesn't help...

  2. I'm building a PDF directly. When I select "Build and view current file," after it builds, TeXnicCenter opens Adobe Acrobat Reader (without opening the newly-built file) and then freezes for ~15 seconds. Is there any way to fix this?

  3. I cannot build while the PDF is open. It gives me this error: \newcommand{\blank}[1]{\rule{#1}{0.4pt}} Is there something else I can use, maybe a PDF synchronization package for Windows?

  • 1
    Under Build > Define Output Profiles..., select the profile you are using on the left. Then click the Viewer tab on the right. It should show the PDF Viewer options. Under the Close document before running (La)TeX section, you need to activate the DDE command radio button and specify the "Command" [DocClose("%bm.pdf")]. Since I'm using Adobe Reader, my "Server" is acroview and "Topic" is control.
    – Werner
    Dec 2, 2011 at 21:01
  • 9
    The reason you cannot build when the PDF is open, is that Adobe Reader locks the file for editing. Other PDF viewers, such as Sumatra, will not lock the file, but update it if the viewer detects changes. Dec 2, 2011 at 21:20
  • 2
    +1 for replacing Adobe Reader with Sumatra, at least for TeXnicCenter uses. Dec 3, 2011 at 2:07
  • 2
    Also, I think %TEX root = is a TeXworks-specific feature, and not something that TeXnicCenter supports. Dec 3, 2011 at 2:11
  • 2
    Have you tried creating a project?
    – cmhughes
    Dec 3, 2011 at 5:54

1 Answer 1


As commented to the question the last two problems are Adobe Acrobat specific and due to the fact that Adobe Reader locks the file for editing, hence the file cannot be changed. But some other PDF readers lead by the recent Sumatra PDF can do this seamlessly. WinEdt 6, in fact, looks for Sumatra PDF and uses it as default. Conversely, SumatraPDF also recognize a limited number of editors.

Since your problems except No.1 is solved, the remaining fix/trick/shortcut is to select Build Menu -> Build and View Output instead of Build Menu -> Current View -> Build and View which assumes that you have defined a project and indicated your main file.

Their respective keyboard shortcuts are Ctrl+F5 and Ctrl+Shift+F5 and the first one is the one you might want to use.

  • Exactly what I was doing wrong--thank you precusse! Dec 3, 2011 at 21:35

You must log in to answer this question.

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