2

I'm posting this here because I've had this happen to me multiple times and no Google search ever brings up the solution. I'm running Windows 10 with 64-bit MikTex installed and I use TeXnicCenter as my editor/compiler IDE.

Problem

I have installed Sumatra and set up LaTex --> PDF workflow with reverse-search. However, instead of opening the source LaTex file in TeXnicCenter, it will open in Notepad++ instead. This is infuriating.

The default command line settings for TeXnicCenter's reverse-search are not escaped properly and therefore will fail to open the instance of TeXnicCenter that launched Sumatra. I suspect it will open your default text editor on other people's machines.

Solution

  1. In TeXnicCenter's menu, go to: Build --> Define Output Profiles...

  2. Select your target build profile. In my setup, it is LaTeX => PDF.

  3. Select the Viewer tab.

  4. In the "Executable path" field, my incorrect configuration (set by default installation) was:

    C:\Program Files\SumatraPDF\SumatraPDF.exe -inverse-search "\"C:\Program Files\TeXnicCenter\TeXnicCenter.exe\" /ddecmd \"[goto('%f','%l')]\""

    Add double-quotes around the first argument so that it looks like the following:

    "C:\Program Files\SumatraPDF\SumatraPDF.exe" -inverse-search "\"C:\Program Files\TeXnicCenter\TeXnicCenter.exe\" /ddecmd \"[goto('%f','%l')]\""

Your reverse search should now work properly.

Henri Menke
  • 109,596
Ryan G
  • 21
  • DDE is depreciated AND Inverse search is depreciated neither are required simply follow this guide https://tex.stackexchange.com/questions/453670/adobe-reader-makes-texniccenter-crash-alternative-sumatra/453731?r=SearchResults&s=1|0.0000#453731 –  Jan 23 '19 at 03:44

0 Answers0