[texworks] Manual: 5.2 Special comment strings - % !TeX jobname = "Some Other Name"
Paul A Norman
paul.a.norman at gmail.com
Sat Jul 13 10:27:03 CEST 2019
Thanks Reinhard,
Generally these special comments or so-called *magic comments*, are in
the TeXworks manual already (under *5.2 Special comment strings* ), and
there is a thread covering the jobname thing here...
https://tex.stackexchange.com/questions/289152/defining-the-pdf-output-file-within-the-document-file-using-job-name
The line %& -jobname=myName is one of these so-called *magic comments*,
which can be interpreted by *some editors* (TeXstudio, TeXworks). This is
hence not an intrinsic feature of pdftex and compiling from the command
line will thus result in those magic comments being ignored. – Henri Menke
<https://tex.stackexchange.com/users/10995/henri-menke> Jan 25 '16 at 12:21
<https://tex.stackexchange.com/questions/289152/defining-the-pdf-output-file-within-the-document-file-using-job-name#comment700037_289152>
-
-
@HenriMenke No, this is a magic line for the TeX engine and is not
interpreted by editors, *as far as I know*. Some implementations of TeX
allow -jobname there some don't: MiKTeX does, TeX Live doesn't. – egreg
<https://tex.stackexchange.com/users/4427/egreg> Jan
<https://tex.stackexchange.com/questions/289152/defining-the-pdf-output-file-within-the-document-file-using-job-name#comment700086_289152>
Its useful for example when you are using this package
\usepackage[1-9,18-24,131-136,401, 429-431]{*pagesel*}
Allowing you to output selected page ranges - while retaining internal
linking and bookmarks, unlike package pdfpages which can extract page
ranges from an existing .pdf, but tends not to maintain internal links.
So being able to reset the out put pdf document name on a need by need
basis, allows for getting out the page range selection you want, under a
new output name, that does not interfere with the existing already rendered
full document, and the links work within the page range rendered using
*pagesel*
So I was just looking for the correct form to use (under MiKTEx) from
within TeXworks.
Kind regards,
Paul
On Sat, 13 Jul 2019 at 16:01, Reinhard Kotucha <reinhard.kotucha at web.de>
wrote:
> On 2019-07-12 at 12:53:31 +1200, Paul A Norman wrote:
>
> > HI,
> >
> > Does TeXworks have an undocumented special comment string for
> > something like:
> >
> > % !TeX job-name = "Some Other Name"
>
> Presumably not. What exactly do you want to achieve? IMO opinion
> a text editor is the worst place for such nasty things.
>
> There are certainly better solutions which don't depend on a
> particular text editor. But we have to know exactly what you want to
> achieve.
>
> Regards,
> Reinhard
>
> --
> ------------------------------------------------------------------
> Reinhard Kotucha Phone: +49-511-3373112
> Marschnerstr. 25
> D-30167 Hannover mailto:reinhard.kotucha at web.de
> ------------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texworks/attachments/20190713/221e8492/attachment.html>
More information about the texworks
mailing list