Sumatra Texlipse Eclipse Forward and Inverse Search Problem


#1

I’m trying to use Sumatra as an external viewer for the Texlipse (latex) environment on Eclipse.
The setup given by jörg on https://joerglenhard.wordpress.com/2011/12/29/texlipse-and-sumatrapdf/ works for the inverse search (Eclipse Oxygen.1a Release (4.7.1a) 32bit // sumatra 4.7.1a 64bit portable on Win7 64bit with Java 32bit) but the Forward search can’t find anything. (I tried with minimal document, because i was not sure whether my rather esoteric document was to blame, but no joy). Sumatra 3.1.1 32 bit portable performed exactly the same.
Could anyone advise on how to proceed?
Thanks!


#2

Latest stable version is 3.1.2, so no idea where you got 4.7.1a from or why you’re using 3.1.1. If 3.1.2 doesn’t work fine (assuming you configured it for search properly), try the latest pre-release version and see.


#3

Thanks SumatraPeter, typo there. 4.7.1a was version of Eclipse, 64bit Version of Sumatra was 3.1.1.
Now tried with 3.1.2 32bit version of Sumatra, [EDIT: and both the 32 bit and 64bit prerelease] still just inverse search.
PdfLatex is called with:

-interaction=nonstopmode --src-specials %input -synctex=-1 %input

Sumatra is called with:

-reuse-instance %fullfile

…and gets this DDE command:

[ForwardSearch("%fullfile","%texfile",%line, 0,0,1)]

(with “Server” set to SUMATRA, and “Topic” to control)
“Viewer supports forward search” is checked


#4

long time since tried DDE but calls can be pedantic about syntax

check your DDE calls work standalone as expected

under standard SumatraPDF options have you set the correct syntax for your editor (each one can be different) it should look something like

javaw -classpath “C:\Users\joerg\Desktop\eclipse-3.7.1\eclipse\plugins\net.sourceforge.texlipse_1.5.0\texlipse.jar” net.sourceforge.texlipse.viewer.util.FileLocationClient -p 55000 -f “%f” -l %l

NOTE the normal (double) quote marks around %f

for call back, treble check the documentation as you may need to verify the path as part of the parameters
"path to the PDF document" (if this path is omitted and the document isn’t already open, SumatraPDF won’t open it for you)

try to debug each way exactly what syntax is sent and received


#5

Hi GitHubRulesOK,

thank you for your answer. I treble-checked the sumatra-settings (though they profess to only be interesting for Inverse, which works anyway) - and they are in order (i did not have the quotes around %f, but that seems to inly matter if there are whitespaces in the path.

I have no idea how to

check your DDE calls work standalone as expected

Can you advise?

Thanks!


#6

In the past I have used tools such as CMCDDE by Commence Corp to test if the DDE calls work from the command line
parsing your [ForwardSearch("%fullfile","%texfile",%line, 0,0,1)]
I note you have a space which may be causing a problem (i.e try with %line,0,0 etc)

also can you test your calling line
-reuse-instance %fullfile by replacing with
Viewer arguments:
-reuse-instance “%fullfile” -forward-search “%texfile” %line


#7

I now use your extended Viewer arguments, and removed the space in the DDE-command, The reply to a Forward search is still “Forward search failed”-“The position could not be found in any currently open pdf files”, inverse search still works, though.

EDIT - I tried CMCDDE, but the lack of documentation is disturbing :slight_smile:
I tried this with sumatra already running:

cmcdde SUMATRA control [ForwardSearch(“d:\Switch.pdf”,“d:\Switch.synctex”,10,0,0,1)]
Error: Could not send DDE command.

and this with sumatra not running:

cmcdde SUMATRA control "[ForwardSearch(“d:\Switch.pdf”,“d:\Switch.synctex”,10,0,0,1)]"
Error: Could not initiate a DDE conversation.
App name: SUMATRA
Topic name: control

…so i’m not sure what the problem is with the command, or my way of giving it (note that i tried quotes around the command and not, in both scenarios, no change in behaviour.

Thanks for sticking with this!


#8

@loonquawl

I have not forgotten you
I revisited my old DDE notes and realised they needed a brush up so last few weeks have been testing MiKTeX in various ways starting from CLI onwards, you may find some tips in [How-To] Part1 - Using CLI & DDE with SumatraPDF