7

I am using TeXShop 3.26 under Mavericks. I have SyncTeX selected as the sync method. Searching works both ways in general (source to pdf and pdf to source). However, when editing a multifile source where there is a "root" document with sections included with \input{}, and similarly subsections within those, forward search (source to PDF) doesn't work. Nothing happens. PDF to source still works fine.

Is this known/expected behaviour? Is there any setting I can make to fix it?

1 Answer 1

8
+100

In section 2.4 (Working with a Large Document) of the "TEXShop tips & tricks" there are some clues for you.

It is often handy to break a large document into more manageable subordinate parts and then create a “root” file which contains the preamble and \include commands to bring all the parts together for typesetting. To have TEXShop "know" which file to typeset when working on a subordinate file put the line

% !TEX root = path/to/rootfile.tex

at the top of your subordinate file; path/to/rootfile.tex is the relative or absolute path to the root file for this document.

This is has two benefits:

  1. If you Command ⌘+T in included file, Texshop will still typeset the correct root.
  2. Sources and pdf are properly synchronized for searching


P.S. You can access to "TEXShop tips & tricks" from help menu.

3
  • Could someone test this and tell me, if it works? Thank you, Pouya, I'd like to give you that bounty but I can't proof your work.
    – LaRiFaRi
    Jun 11, 2015 at 15:08
  • @LaRiFaRi, I will check it tonight and will update the answer accordingly. Give me couple of hours please...
    – Pouya
    Jun 11, 2015 at 17:26
  • 2
    @LaRiFaRi, tested it on Texshop 3.18, OS X Mavericks. It works fine.
    – Pouya
    Jun 11, 2015 at 18:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .