Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am able to forward search from an emacs buffer containing my top level tex file to sumatrapdf by using the f8 key which is bound to Sumatra-jump-to-line. If i visit a buffer with a file included in the first buffer Sumatra incorrectly tries to find a PDF associated with that buffer. Are there any ways to make forward search work from the include file buffer?

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

I just tested this on my Emacs/Sumatra combination. If you add the following to the end of the included file:

%%% Local Variables: 
%%% TeX-master: "path-to/masterfile"
%%% End: 

When you do a forward search from the subfile, such as a chapter included in the master file, it should take you to the proper location in the master PDF. This should also let you compile the master document from the individual .tex files. This is all assuming that you are using AUCTeX as your LaTeX mode in Emacs.

Edit: After you add this to your component .tex file you may need to close the file and reopen it in Emacs for AUCTeX to load the local variables.

share|improve this answer
    
That works perfectly and I really should have known that Auctex would have a way to point to the master file. Note to self: read Auctex documentation more carefully. –  mcheema Apr 15 '12 at 9:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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