1

I've been following these advices to set up inverse command line from SumatraPDF (I have the latest version) to TeXnicCenter…

So in the settings of Sumatra, I've entered the following command line:

InverseSearchCmdLine = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\TeXnicCenter\TeXnicCenter.exe"/nosplash/ddecmd"[goto('%f','%l')]"

EnableTeXEnhancements = true

and in TeXnicCenter, here are my settings:

here

and

here.

So, rigorously what is asked in the informations. But it still doesn't work… Any ideas?

  • 1
    Off topic: you should avoid using the redirection over the start menu in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\TeXnicCenter\TeXnicCenter.exe. It is better to use the direct path C:\Program Files\TeXnicCenter\TeXnicCenter.exe. – AndiW Feb 27 '19 at 20:18
  • de rien... enchanté... – AndiW Feb 28 '19 at 23:27
2

Your profile settings for "(La)TeX" are okay, but there are some missing configuration in the part "Viewer". Please see my configuration:

viewer configuration

In the first marked line with two red arrows you should have

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

Of course you need to change the path for SumatraPDF and TeXnicCenter for your needs.

Please see that you need to activate the DDE commands (red arrow in second column) and you need to add the commands

[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]

and

[ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)]

With all the changes I marked with the red arrows SumatraPDF and after clicking on "Ok" your changed profile "LaTeX -> PDF (Sumatra)" should work in TeXnicCenter ...

|improve this answer|||||
  • 12 sec ahead... :-) – AndiW Feb 27 '19 at 20:12
1

The OP settings were generally correct except there were some missing spaces ensure the punctuation is correct when you cut and paste!

AndiW got it pert right "It is better to use the direct path C:\Program Files\TeXnicCenter\TeXnicCenter.exe." – AndiW

Just an update to confirm in SumatraPDF-settings.txt file the command needs to be the exact (quoted if needs be) path to TexnicCentre.exe followed by /ddecmd "[goto('%f', '%l')]" so a typical value (with " around TexnicCentre, when a path includes a space) may be

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

Note this is the only case in SumatraPDF where a DDE command needs to be used (it is a TexnicCentre limitation to avoid dual start and may not support foreign filenames) you can add /nosplash but keep a space eitherside.

The latest advice is DO NOT USE DDE it is depreciated and may be modified in windows as a potential security problem. Also see its removal in other editors below.
DO NOT USE -INVERSE-SEARCH it is depreciated (it will delay the repeated calls)
DO NOT USE -REUSE-INSTANCE it is depreciated (it does not work the same way it used to)

Please stick to the original instructions in the first link they were updated for a reason and will be supported in this century. Or follow the cut down version here https://tex.stackexchange.com/a/453731/170109

To see why WinEdt recommend this method over the years since SumatraPDF forward/reverse search was first developed with that editor see the following extract from http://www.winedt.com/news.html

"•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!"

enter image description here

The OP used a slightly different setting to that shown here.
The command is equally correct (better) if it is set to

-forward-search "%Wc" %l "%Bm.pdf"
|improve this answer|||||
  • Thanks for your precision. I stuck to your recommendations and with AndiW's suggestion it worked. :) – Clotilde_C Feb 28 '19 at 22:34
0

SE!

I remember having similar problems once with the command line option. Here on my machine this setting in profiles works:

enter image description here

Please note that the clipped topline reads

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

You might want to adapt the C:\Program Files (x86) C:\Program Files to your needs - they are the base locations of TeXnicCenter and SumatraPDF.

Hope that helps...

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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