[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] [RFC] parsing \jobname in LaTeX files?
From: |
Marcin Borkowski |
Subject: |
Re: [AUCTeX-devel] [RFC] parsing \jobname in LaTeX files? |
Date: |
Tue, 01 Sep 2015 08:51:32 +0200 |
On 2015-09-01, at 07:46, Tassilo Horn <address@hidden> wrote:
> Mosè Giordano <address@hidden> writes:
>
> Hi Mosè,
>
>> I'd like to do a little survey: does someone find useful to correctly
>> parse \jobname in LaTeX files? To be clear, as it is now,
>>
>> \include{\jobname-foo}
>> \addbibresource{\jobname.bib}
>>
>> are ignored by the parser.[1] Do you think it's valuable to make
>> \jobname be replaced by `(TeX-master-file)' when parsing the file?
>>
>> This should be feasible by changing `LaTeX-auto-cleanup' and some
>> regexps in `LaTeX-auto-regexp-list', but before starting hacking on it
>> I'd like some feedback.
>
> I don't use \jobname so I don't have a real opinion on this. But
> \jobname could be anything, the basename of the master file is just the
> default, no? That is, I could set `TeX-command-extra-options' to
> "-jobname foo" although my document is bar.tex, and then \jobname
> expands to "foo".
For the record, the above is true about any control sequence, of course:
you can always do \def\jobname{42} etc. My opinion is that if a user
changes things like \jobname, s/he should know what s/he's doing, and
strange effects/breakage of AUCTeX's parser are acceptable.
BTW, one thing where \jobname is very useful for me is typesetting
different versions of the same document, based on whether a certain
substring is present in \jobname. Then, I can use symlinks to have
different, but synchronized versions of the document. Seems not related
to this discussion, though.
> Bye,
> Tassilo
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University