So, I have just spend a while struggling with understanding why my present TeXnicCenter installation won’t open files in Adobe Acrobat Reader X – it has, for years, worked on and off, with no apparent reason for being in either state. Once upon a time, a simple reboot would allow me to once again access the pdf-output directly.
However, those days are gone and I decided to actively try to understand the issue.
After having googled far and wide, I discovered a very interesting discussion at adobe’s website:
the short version is that when we get the well-known message
“Cannot execute the command: [DocOpen(“%bm.pdf”)][FileOpen(“%bm.pdf”)]”
we should press alt+f7, go to the latex->pdf profile, under viewer, and change “server” from
“acroview” to “acroviewR10”. At least if we are using Reader 10 (as I am, at present). The forum discussion also informs us that in the future this name will change with the version, so a Reader XI will require acroviewR11 and so forth.
Interesting… The nice people at the TeXnicCenter project have informed me that the next version will feature a wizard which figures this out by itself.
However, I find that even when this, very important, detail is sorted out, I still do not have access to “Forward Search”, meaning that the pdf-file is opened in the place that I am presently editing. Looking a bit deeper into the issue, I get the impression that this will never work, because the DDE-command that Acrobat Reader will accept (DocGoto, as detailed here) expects as page-number, while it seems TeXnicCenter will only supply a line-number (but I am by no means learned in the ways of DDE, so it may just be me doing it wrong).
Even if that was solved, we would still not have reached the end of the matter, though, since even if it did work, we would still be missing out on “Inverse Search”, meaning that the viewer can point me back to the place in tex-file that a specific word is written (or, rather, a paragraph). Both of these feature are incredibly handy, especially if you have ever done a large project in pdf and have had to repeatedly scroll down 20+ pages to see if the figure you just added looks right.
What to do instead: use sumatra! (http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader.html)
It will do all of the above, and how to make it happen is explained here:
http://theseekersquill.wordpress.com/tag/texniccenter/. Because I’m a relatively cautious one, and I have no idea if that blog will be up forever (or as long as this one, anyway), I’ll just copy-paste the important bits:
To configure TeXnicCenter to view document output using Sumatra PDF:
The Sumatra PDF viewer integrates nicely with TeXnicCenter supporting both forward-search and inverse-search.
The Sumatra PDF viewer integrates nicely with TeXnicCenter supporting both forward-search and inverse-search.
- Run TeXnicCenter.
- Select Build | Define Output Profiles | (La)Tex Tab
- Select Add to add a new profile.
Enter the profile name: Latex => PDF (Sumatra)
- Select Add to add a new profile.
- Under the (La)TeX Tab
- Select the checkbox: Run (La)TeX compiler
- Path to the latex compiler:
C:\software\MiKTeX 2.8\miktex\bin\pdflatex.exe
Note: The path references may be different on your computer. - Command line arguments to pass to the compiler:
-interaction=nonstopmode “%pm” -synctex=-1
- Path to the latex compiler:
- Unselect the checkbox: Do not use BibTeX in this profile
- Path to BibTeX executable:
C:\software\MiKTeX 2.8\miktex\bin\bibtex.exe - Command lne arguments to pass to BibTeX:
“%bm”
- Path to BibTeX executable:
- Unselect the checkbox: MakeIndex
- Path to MakeIndex executable:
C:\software\MiKTeX 2.8\miktex
\bin\makeindex.exe
Note: The path should be on one line, I split the path here to ensure it displays clearly.There should be no space at the line break between miktex and \bin. - Command line arguments to pass to MakeIndex:
“%bm”
- Path to MakeIndex executable:
- Select the checkbox: Run (La)TeX compiler
- The Postprocessor tab may be left blank.
- Under the Viewer Tab:
- Path to executable:
C:\software\SumatraPDF\SumatraPDF.exe
-inverse-search “\”C:\software\TeXnicCenter\TEXCNTR.EXE\”
/ddecmd \”[goto(‘%f’,’%l’)]\””
Note: The path should be on one line, I split the path here to ensure it displays clearly. There should be a space inserted at the position of the line breaks:
- one space after SumatraPDF.EXE
- another space after TEXCNTR.EXE\“
- For View project’s output:
- Enable Command line argument
- Command: “%bm.pdf”
- For Forward Search:
- Enable DDE command:
- Command:[ForwardSearch(“%bm.pdf”,”%Wc”,%l,0)]
- Server: sumatra
- Topic: control
- For Close document before running (La)Tex
- Enable Do not close.
I hope this was of some help =)