LaTeX forum ⇒ TeXShopTeXShop problems with Forward Search (in Typesetting)

Information and discussion about TeXShop, an integrated LaTeX environment for Mac OS X
Posts: 5
Joined: Thu Jan 29, 2009 9:47 pm

TeXShop problems with Forward Search (in Typesetting)

Postby nfarnoud » Sun Feb 08, 2009 5:54 am

I use TeXShop 2.18 to write LaTex on my mac system. But I have the following issue in typesetting and am clueless how to solve it!

I have no problem in searching from "preview" to the "source" ( : hold down the command key while clicking at a spot in the Preview window. The source window will become active and the corresponding TeX input commands will be highlighted in yellow). But I can NOT always do the opposite. The issue is that my main source file has a lot of \input sub-sections. If I command+click on a text which is in the "main" text of the original "source file" I CAN see it in the preview (corresponding spot will be circled in red in the preview). But if I select a text that is in one of the sub-section input source files, nothing is selected in the preview! (just rarely some random location in the preview would be selected)

This is a major problem since my document is very large and therefore almost all of my text is in sub-section input files.
I greatly appreciate your help on this!

*** More info about my TeXShop preferences:
Typesetting Default Command: LaTex
Typesetting Default Script: Tex+Ghostscript
Sync Method: Sync Tex



Posts: 2
Joined: Wed Aug 28, 2013 2:31 pm

Postby jjbw » Wed Aug 28, 2013 2:36 pm

Did you ever solve this, nfarnoud? I have exactly the same issue currently with a large thesis document, using TexShop 3.23 in Mountain Lion. Would love to hear how to fix it!

Posts: 2
Joined: Wed Aug 28, 2013 2:31 pm

Postby jjbw » Wed Aug 28, 2013 5:35 pm

In case others have this problem as well: I found the answer in the (excellent) "TexShop Tips and Tricks" document which you can access through the help menu. Saved!

Pasting the text below:

2.4 Working with a Large Document
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
  1. % !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. Once this is done TEXShop will typeset the root file if you press Type- set → Typeset (Cmd-T) even though you are editing a subordinate file and properly synchronize between the Source and pdf. E.g., if the root file is called mygreatbook.tex and the chapter files, chapter1.tex, etc., are in a chapters sub-folder below the root file then place the line
  1. % !TEX root = ../mygreatbook.tex

at the top of each of the chapter files. The ../ means go up one folder level to find the root file.

Return to “TeXShop”

Who is online

Users browsing this forum: No registered users and 1 guest