# [OS X TeX] jobname

Themis Matsoukas matsoukas at psu.edu
Tue May 8 10:42:08 EDT 2007

```On May 7, 2007, at 7:43 PM, Alain Schremmer wrote:

>
> On Apr 23, 2007, at 6:49 PM, Alain Schremmer wrote:
>
>> […] my original query which was:
>>
>>> Given a file ROOT that \include{FILE}, \jobname in FILE returns
>>> ROOT which makes sense but is there a way to get FILE instead of
>>> ROOT?
>
> I have finally solved the problem or, rather, after looking up the
> site suggested by Sneep,
>
> 	http://www.tex.ac.uk/cgi-bin/texfaq2html?label=filename
> [...]

Alain,

If I understand it, your method works with \include{FILE}. Does it
work with \input{FILE}?  Ross Moore's code of 1/24/07 works very well
with \input and I've been using it since (thanks Ross!). However, I
use this in a root file with lots of \input (not \include). BTW,
Ross' code will not work with \include --it returns the root file

Themis