GeneralYap inverse search and TeXnicCenter ...

General information and discussion about TeXnicCenter
Soroush
Posts: 21
Joined: Thu Feb 01, 2007 5:33 pm

Yap inverse search and TeXnicCenter ...

Post by Soroush »

Hi!
I'm using Yap with TeXnicCenter \beta 6.21 due to the forward/inverse feature. (I was using Adobe Acrobat, but it kept starting at the beginning of the document).

The forward search works fine, but despite Yap being automatically set up to work with TeXnicCenter, it doesn't do an inverse search. When I double click a point in Yap, nothing happens. If TeXnicCenter is closed, and I double click a point, it will open TeXnicCenter, but not the document, and nothing else would happen.

Am I doing something wrong?

(This is the code in Yap's options for working with TeXnicCenter:

Code: Select all

"C:\Program Files\Latex\TeXnicCenter\TEXCNTR.EXE" /ddecmd "[goto('%f', '%l')]"
)
Last edited by Soroush on Tue Feb 06, 2007 5:45 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

tramir
Posts: 12
Joined: Fri Jan 26, 2007 12:58 am

Yap inverse search and TeXnicCenter ...

Post by tramir »

Can you check if source specials are included in the DVI? Look at the build profile in TexnicCenter (from the menus, Build/Define output profiles and choose the Latex=> DVI or whatever build profile you're using) if in the LaTeX compiler command line arguments you have something like --src. If not, then just add it before the "%pm" part. For instance, my command line arguments would look like this:

Code: Select all

--src -max-print-line=120 -shell-escape "%pm"
(the first option is for source specials, the second is so that the error output is not wrapped too much, and the third is so that LaTeX keeps running even if it finds an error)

Mircea
Last edited by tramir on Tue Feb 06, 2007 10:11 pm, edited 1 time in total.
Soroush
Posts: 21
Joined: Thu Feb 01, 2007 5:33 pm

Yap inverse search and TeXnicCenter ...

Post by Soroush »

Tramir,
I went to Build > Define Output Profile > LaTeX => DVI. In the LaTeX tab, and in the 'Command line arguments to pass to the compiler' text box, I added the code you gave me. It still didn't work.
Previously, I had this code written in the text box (which didn't work either!):

Code: Select all

--src -interaction=nonstopmode "%Wm"
Could it be something else?
Last edited by Soroush on Wed Feb 07, 2007 11:33 am, edited 1 time in total.
tramir
Posts: 12
Joined: Fri Jan 26, 2007 12:58 am

Re: Yap inverse search and TeXnicCenter ...

Post by tramir »

These are a couple of things I can think of quickly:
1. would you consider upgrading to the last version of TexnicCenter (which is 7.01)?
2. check if you run anything after latex: in TexnicCenter, go again to Define Output profiles and check if you have anything in the Postprocessor tab.
3. finally, sorry to say this, and please don't take it personal, but it happens to me very often: make sure you're actually using this profile.

Let me know if you did these things and it still didn't work. My guess is that it's something on the side of TC, because Yap does call TC when you double-click in you DVI file (if source specials were not available, YAP would complain about it). So I would start by upgrading TC.

Mircea
Soroush
Posts: 21
Joined: Thu Feb 01, 2007 5:33 pm

Re: Yap inverse search and TeXnicCenter ...

Post by Soroush »

Mircea;
1. I forgot to say this before, but I upgraded to \beta 7.01 yesterday. I used the script you wrote in your previous post in this new version, which of course didn't work.
2. Ok, I was using the LaTeX => DVI profile, and in the Postprocessor tab, there is nothing (=blank).
3. :) No problem! I checked again. I was using the LaTeX => DVI profile.

Strange, ha?!

Also, as you said, it's probably not Yap, since when I double-click a point (or press 'e') in Yap, momentarily the pointer hourglass icon shows, but nothing happens afterwards. Or, if TC is closed, it opens it, but doesn't open any files, let alone go to a specific part of the file.

Thank you for your help!
tramir
Posts: 12
Joined: Fri Jan 26, 2007 12:58 am

Re: Yap inverse search and TeXnicCenter ...

Post by tramir »

Honestly, that is strange. I don't really know what else to suggest. It seems like the problem is the DDE communication between Yap and TC, but I don't know why it would happen. I'll see if I can think of anything else and I'll let you know. Sorry I can't do more.
Mircea
Soroush
Posts: 21
Joined: Thu Feb 01, 2007 5:33 pm

Re: Yap inverse search and TeXnicCenter ...

Post by Soroush »

Thanks! : )
I've tried playing with the code, but still no luck.
Soroush
Posts: 21
Joined: Thu Feb 01, 2007 5:33 pm

Re: Yap inverse search and TeXnicCenter ...

Post by Soroush »

Does anybody have a solution for this? :|
Soroush
Posts: 21
Joined: Thu Feb 01, 2007 5:33 pm

Yap inverse search and TeXnicCenter ...

Post by Soroush »

I've played more with this, and I think it's something wrong with TeXnicCenter.

I tried to manually use the DDE commands (taken from the Help file of the program) in the command prompt and the only ones that work are:

Code: Select all

TEXCNTR /nosplash
TEXCNTR filename
TEXCNTR /dde
If I use

Code: Select all

TEXCNTR /l linenumber filename
it only opens the file and doesn't take the cursor to the specific line.

I also tried

Code: Select all

TEXCNTR /ddecmd "[goto('linenumber','filename')]"
nothing happens!

I assume that something is wrong that I can only open TNC, and open files but nothing else!
Anybody else having this issue?
Last edited by Soroush on Wed Apr 04, 2007 3:12 pm, edited 1 time in total.
eh9
Posts: 2
Joined: Wed May 09, 2007 12:34 am

Yap inverse search and TeXnicCenter ...

Post by eh9 »

See http://www.latex-community.org/viewtopic.php?f=31&t=268 for a solution to this problem that worked for me.
Last edited by eh9 on Wed May 09, 2007 12:49 am, edited 1 time in total.
Post Reply