LaTeX forum ⇒ Generalsync with Sumatra pdf config

General information and discussion about TeXnicCenter
murraye
Posts: 34
Joined: Sat Aug 15, 2009 6:25 pm

sync with Sumatra pdf config

Postby murraye » Sat Aug 15, 2009 6:33 pm

I'm confused about the Viewer "Path of executable" setting in the profile to allow inverse search from Sumatra PDF. Specifically, I'm unsure what the tutorial "How_to_Sumatra_EN.pdf" is saying about the punctuation there: "If you copy the command lines and paths from e.g. Adobe Reader an apostrophe (right)
gets an accent (wrong). This breaks functionality. Therefore you have to replace them."

Which is correct for the single-quotes in the inverse-search flag there (or is it some other version?):

  1. -inverse-search "\"D:\WP\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto(’%f’,’%l’)]’\""


  1. -inverse-search "\"D:\WP\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto('%f','%1')]'\""


My keyboard has a left single-quote (`) and an upright single-quote (').
Last edited by cgnieder on Wed Aug 21, 2013 10:59 pm, edited 1 time in total.
Reason: added code markup

Tags:

latexian
Posts: 19
Joined: Wed Aug 05, 2009 7:57 am

Postby latexian » Mon Aug 17, 2009 6:58 am

maybe no body use sumatra here.
so they cannot help you to solve it.

MartinC
Posts: 152
Joined: Wed Jan 17, 2007 10:09 pm

Postby MartinC » Mon Aug 17, 2009 4:34 pm

You must use the upright quotes, like this:

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

murraye
Posts: 34
Joined: Sat Aug 15, 2009 6:25 pm

Postby murraye » Mon Aug 17, 2009 6:35 pm

OK, I can now search backwards from the pdf file in Sumatra to the source tex file in TeXnicCenter by double-clicking at some point in the pdf document. However:
  1. In Sumatra there's now a strange blue band of color going across the first page several lines down from the top of the document. And this blue band has a little purple square in it.
  2. How do I search from the tex source to the pdf? (I presume this is what is meant by "forward search".

Of course my document includes \usepackage{pdfsync}.

This is with MiKTeX 2.7.
Last edited by cgnieder on Wed Aug 21, 2013 11:02 pm, edited 2 times in total.
Reason: added inline code markup

MartinC
Posts: 152
Joined: Wed Jan 17, 2007 10:09 pm

Postby MartinC » Mon Aug 17, 2009 7:44 pm

  1. This is the line that indicates the place you were searching.
  2. Do not use the pdfsync package. Use the synctex option instead, i.e.
  1. latex --synctex=-1 foo.tex


For forward search, you need to set the DDE command like this:

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

server: SUMATRA topic: control

See also:

http://william.famille-blum.org/blog/

murraye
Posts: 34
Joined: Sat Aug 15, 2009 6:25 pm

Postby murraye » Mon Aug 17, 2009 8:46 pm

MartinC wrote:
  1. This is the line that indicates the place you were searching.
  2. Do not use the pdfsync package. Use the synctex option instead, i.e.
  1. latex --synctex=-1 foo.tex


For forward search, you need to set the DDE command like this:

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

server: SUMATRA topic: control

See also:

http://william.famille-blum.org/blog/


No that blue band appears arbitrarily at a fixed position in the pdf file, no matter where I subsequently search.

OK, I am NOT using the pdfsync package now, and I DO have the output profile settings the same as what you say....
  • I still get that blue band.
  • How do I do search from the tex source to the pdf document?

MartinC
Posts: 152
Joined: Wed Jan 17, 2007 10:09 pm

Postby MartinC » Tue Aug 18, 2009 5:58 pm

The blue band will always be there, it indicates the line corresponding to the forward search you did. The blue band will not print, however.

To search from the tex source to the pdf document, you just click on the "View Output" icon (F5 shortcut).

murraye
Posts: 34
Joined: Sat Aug 15, 2009 6:25 pm

Postby murraye » Tue Aug 18, 2009 7:11 pm

MartinC wrote:The blue band will always be there, it indicates the line corresponding to the forward search you did. The blue band will not print, however.

To search from the tex source to the pdf document, you just click on the "View Output" icon (F5 shortcut).


Thank you! Is all that documented anywhere in SumatraPDF or TeXnicCenter? (I hadn't found it there.)

willsh
Posts: 8
Joined: Mon Jan 04, 2010 10:59 pm

Postby willsh » Mon Jan 04, 2010 11:07 pm

I have been trying to get forward and inverse search to work with TeXnicCenter and Sumatra but so far have not had success following the tutorial on TeXnicCenter's site.

I have no clue what is not working or how to debug it. I tried following the instructions carefully in the tutorial mentioned above several times in succession to make sure I did not have a typo and also tried some variations on the commands that I saw on some other forums, but I always get the same errors.

When I try to "Build and view the current file," I get the error:

  1. "[ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)]
  2.  
  3. Cannot execute the command."


If I then double click inside the Sumatra window, I get "Synchronization file cannot be opened"

Any ideas on what I should try to do next to get sync working? I just installed MikTeX 2.8, TeXnicCenter, and Sumatra today so everything should be up to date. Also, I chose "yes" for "Install missing packages on the fly" in MikTeX because I saw on another forum that choosing "Ask me" could lead to errors.
Last edited by cgnieder on Wed Aug 21, 2013 11:06 pm, edited 1 time in total.
Reason: code markup

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Mon Jan 04, 2010 11:18 pm

willsh wrote:I have been trying to get forward and inverse search to work with TeXnicCenter and Sumatra but so far have not had success following the tutorial on TeXnicCenter's site. [...]

Got to the TXC Tutorials section where you can find a document with instructions how to make TXC and SumatraPDF work together.


Best regards and welcome to the board
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1


Return to “General”

Who is online

Users browsing this forum: No registered users and 6 guests