# [OS X TeX] Finding errors with \input statements in TeXShop?

Herbert Schulz herbs at wideopenwest.com
Fri May 4 16:50:33 EDT 2012

On May 4, 2012, at 3:32 PM, David Derbes wrote:

>
> On May 4, 2012, at 3:13 PM, Herbert Schulz wrote:
>
>>
>> On May 4, 2012, at 3:03 PM, Demitri Muna wrote:
>>
>>> Hi,
>>>
>>> I have a very long LaTeX document in TeXShop, and as such I've broken into several files. For each chapter, I use
>>>
>>> \input{chapter1.tex}
>>> \input{chapter2.tex}
>>> etc.
>>>
>>> The "main" file is actually very short. When I compile and invariable get errors, it gives me the line number of the main file. Is there a way for TeXShop to jump to (or open) the actual file that contains the error via the "goto error" button? It would seem that a project-style UI would be a nice improvement here. :)
>>>
>>> Cheers,
>>> Demitri
>>
>> Howdy,
>>
>> What version of TeXShop are you using? How are you compiling your file. If you've been using TeXShop for a long time please take a look at TeXShop->Preferences->Engine and see if the commands in the pdfTeX section the Latex line has --file-line-error as an option.
>>
>> How old is your TeX distribution? That has a bearing on this too!
>>
>> Good Luck,
>>
>> Herb Schulz
>> (herbs at wideopenwest dot com)
>
> I'm writing a book and doing precisely the same as Demitri (so far, 31 sections; each is roughly a half a chapter.)  My main file sets up all the packages used and a couple of new commands and other stylistic stuff (with massive help from Lars Madsen--THANK YOU!), but is probably no more than 120 lines (of which 64 or so are "'input"). When I get an error, the line number cited is for the line number in the relevant chapter (which I usually can work out as I know which chapter I've been working in), NOT the main file. AFAIK I'm using the most up-to-date version of the distribution.
>
> I don't think I did anything to this preference...
>
> David Derbes
> U of Chicago Laboratory Schools

Howdy,

Please try this and see if it changes that behavior. I will assume you are using either TeXShop 2.43 or 3.0x. With TeXShop NOT running move the the ~/Library/Preferences/TeXShop.plist file to your desktop and restart TeXShop. (Yes, I know that you have lost all your settings but be patient.) Now try to do the same thing and see if the Go To Error (Ctl-Cmd-E) takes you to the correct file and line. If that happens what I suggested holds true.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)