43

Despite having gone through

Configure TexnicCenter with something else than Adobe Reader X

and having looked at the TeXnicCenter + Sumatra Tutorial, there seems to some little changes for TeXnicCenter version 2.0 as of May 2013. How can I make TeXnicCenter 2.0 to work with Sumatra?

Mario S. E.
  • 18,609
  • 1
    Can you add a real question? – karlkoeller May 31 '13 at 10:18
  • @karlkoeller I don't have a question, I simply used the answer your own question option, because I recently came up with this issue. Unfortunately, the answers contained in the site are outdated. – Mario S. E. May 31 '13 at 10:54
  • Sorry, I thought that to answer your own question one would have to post the question and then to post an answer. But I'm quite new here... – karlkoeller May 31 '13 at 11:37
  • 1
    @karlkoeller you are right, Mario wrote only the question and no answer. Mario can you please add an answer and change the question? Or to left a comment behind that questions showing wrong informations? – Mensch May 31 '13 at 12:14
  • Please skip to StackJack 's comment of Aug 23rd '18 below the accepted answer –  Oct 06 '18 at 00:52

2 Answers2

49

Follow all the steps mentioned in the TeXnicCenter + Sumatra Tutorial, but keep in mind these few things:

  1. In the (La)TeX tab / (La)TeX compiler section / Command line arguments to pass to the compiler bar, you should write: -synctex=-1 -interaction=nonstopmode "%Wm"

  2. In the Viewer tab / Executable path section, what should be written is: "C:\Program Files\SumatraPDF\SumatraPDF.exe" -inverse-search "\"C:\Program Files\TeXnicCenter\TeXnicCenter.exe\" /ddecmd \"[goto('%f','%l')]\"". Please note:

    1.1 What should be written is a complete line, with spaces between line breakings (it just doesn't fit entirely here to show).

    1.1.1 The path could be different in your computer (e.g., your path for the executable file could be in "C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe") or depending on your system's language could be something like C:\Programme\...

    1.2 If you copy + paste from Adobe Reader from the tutorial, it is not going to work, as it seems to copy the ' as ` instead.

    1.3 The new executable file for TeXnicCenter 2.0 is actually named TeXnicCenter.exe, not TEXCNTR.EXE, as it appears in the tutorial.

  3. In the Viewer tab / View project's output section, you should select DDE command and the command should be "%bm.pdf" (as described in the tutorial) and the server should be SUMATRA. The topic should be control

  4. In the Viewer tab / Forward search section, you should select DDE command and the command should be [ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)] (as described in the tutorial) and the server should be SUMATRA. The topic should be control

  5. In the Viewer tab / Close document before running (La)TeX section you should select Do not close.

Graphical Description:

enter image description here

Paul Gaborit
  • 70,770
  • 10
  • 176
  • 283
Mario S. E.
  • 18,609
  • Is it possible to add graphics to text and mention what has mainly changed with respect to configuring TeXnicCenter 2 Beta 1 and Sumatra pdf 2.3.2 compared to earlier sumatra versions in either Q or A to be more user friendly/catchy ? – texenthusiast May 31 '13 at 20:01
  • 1
    thanks a lot for note 1.2!!! I was searching this mistake for quite some time... –  Jul 03 '13 at 08:56
  • You're welcome @user33135, and Welcome to TeX.SX! Usually, we don't put a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. – Mario S. E. Jul 03 '13 at 10:51
  • @user33135: You can also give feedback by replying “Yes” to the question “Was this post useful to you?”. You’ll find this question under every post. Once you’ve gathered 15 reputation points on this site, you’ll be able to upvote answers – Mario S. E. Jul 03 '13 at 10:51
  • For me this is working well, thank you, but ONE thing still annoys me: The viewer sumatra doesn't popup to the front (foreground), so I always have to select it. And about the inverse search: Is that normal that by double clicking the cursor does NOT automatically skip to the double-clicked word but only to the paragraph/sentence/item?? – tim Nov 08 '13 at 13:55
  • 1
    @bjoern It is normal that when you do double click on a word in the Sumatra pdf you'll get directed to the paragraph in TeXnicCenter. Regarding the popup, it works perfectly with me (Windows Vista + TeXnicCenter 2.02 + Sumatra 2.3.2) – Mario S. E. Nov 08 '13 at 14:10
  • Tried different things but cant get it to work to always get to the front... I even tried to use a DDE command to close sumatra before compiling thus always reopening because upon reopening, it comes to the front focus. But the close command didn't work either.. – tim Nov 10 '13 at 19:49
  • 1
    As an additional comment, always check the full path of Sumatra and of TeXnicCenter using the command prompt. I was confused by a Windows in Italian, where these programs appears under "Programmi" but are in reality under "Program Files" – Marco Lombardi Jan 15 '14 at 14:12
  • I had to restart TeXnicCenter to get this change to work. – Jess Riedel Apr 17 '14 at 17:56
  • This explanation nearly worked for me on TexnicCentre 2.02 on Windows. I had to remove the " at the beginning and end of the Executable path. These " are shown in the graphical description. Has anyone else been able to get this suggestion to work when including the "? I found it would work if I had already loaded up sumatra. Should the Executable path be changed in the answer? – Chogg Aug 17 '15 at 20:48
  • @Chogg No, the answer is just fine. Those " are there so the system knows where to find the pdf reader. I also have TeXnicCenter 2.02 and my complete entry (including path) is "C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe" -inverse-search "\"C:\Program Files\TeXnicCenter\TeXnicCenter.exe\" /ddecmd \"[goto('%f','%l')]\"" – Mario S. E. Aug 19 '15 at 21:10
  • 1
    On the news site of WinEdt it is stated that 'PDF macros no longer use DDE for SumatraPDF. Using the command line switch -forward-search is faster and more reliable. Using a command line switch (if it exists) is always preferable (simple is better). Besides DDE does not (and will not) support Unicode!'

    Is this also true for TeXnicCenter? If so, an example how to set up the viewer settings using command line instead of DDE would be very much appreciated.

    – StackJack Aug 23 '18 at 08:28
  • 1
    @StackJack Your wish is my command line :-) see CLI answer –  Oct 05 '18 at 19:13
5

One further point to consider is the the language of the OS you're using. As I had to learn two different names in links (C:\Programme\... vs C:\Program Files\... which point to the same directory for a German Win 7 OS and are mapped by the OS automatically) are two different directories for the DDE. While the forward search was working as intended, the inverse search always fired up a new instance which lead to a project already in use clash.

After fixing this issue, everything works fine :)

Werner
  • 603,163