[latexrefman-commits] [SCM] latexrefman updated: r913 - trunk
jimhefferon at gnu.org.ua
jimhefferon at gnu.org.ua
Wed May 26 21:21:00 CEST 2021
Author: jimhefferon
Date: 2021-05-26 19:21:00 +0000 (Wed, 26 May 2021)
New Revision: 913
Modified:
trunk/latex2e.html
trunk/latex2e.info
trunk/latex2e.pdf
trunk/latex2e.texi
Log:
translate jobname text back from fr
Modified: trunk/latex2e.html
===================================================================
--- trunk/latex2e.html 2021-05-26 14:36:00 UTC (rev 912)
+++ trunk/latex2e.html 2021-05-26 19:21:00 UTC (rev 913)
@@ -553,7 +553,7 @@
<ul class="no-bullet">
<li><a id="toc-Command-line-options-1" href="#Command-line-options">28.1 Command line options</a></li>
<li><a id="toc-Command-line-input-1" href="#Command-line-input">28.2 Command line input</a></li>
- <li><a id="toc-TeX_0027s-job-name" href="#Jobname">28.3 TeX’s job name</a></li>
+ <li><a id="toc-Job-name" href="#Jobname">28.3 Job name</a></li>
<li><a id="toc-Recovering-from-errors-1" href="#Recovering-from-errors">28.4 Recovering from errors</a></li>
</ul></li>
<li><a id="toc-Document-templates-1" href="#Document-templates">Appendix A Document templates</a>
@@ -23754,25 +23754,86 @@
<p>
Next: <a href="#Recovering-from-errors" accesskey="n" rel="next">Recovering from errors</a>, Previous: <a href="#Command-line-input" accesskey="p" rel="prev">Command line input</a>, Up: <a href="#Command-line-interface" accesskey="u" rel="up">Command line interface</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
-<span id="TeX_0027s-job-name"></span><h3 class="section">28.3 TeX’s job name</h3>
+<span id="Job-name"></span><h3 class="section">28.3 Job name</h3>
-<p>When you run <code><code>pdflatex</code> <var>options</var> <var>argument</var></code>, if
-<var>argument</var> does not start with a backslash then TeX considers it
-the name of a file to input. Otherwise it waits for the first
-<code>\input</code> instruction and the name of the input file will be the job
-name. This is used to name the log file the output file. The
-<code>jobname</code> option overrides that process and directly specifies the
-name. See <a href="#Command-line-input">Command line input</a>, for an example of its use.
+<span id="index-_005cjobname"></span>
+<span id="index-Job-name"></span>
+
+<p>Running LaTeX creates a number of files, including the output but
+also including others. These files are named with the job name. The
+most common case is the simplest, where for instance the command
+<code>pdflatex thesis</code> creates <code>thesis.pdf</code> and also
+<code>thesis.log</code> and <code>thesis.aux</code>. Here the job name is
+<code>thesis</code>.
</p>
+<p>In general, the command is <code><var>latex-engine</var> <var>options</var>
+<var>argument</var></code>, where <var>latex-engine</var> is one of <code>pdflatex</code>,
+<code>xelatex</code>, or <code>lualatex</code>, or <code>dviluatex</code>, or
+<code>latex</code>. If <var>argument</var> does not start with a backslash, as
+above with <code>thesis</code>, then TeX considers it the name of a file to
+input as the document root. The name of that root file, without the
+<samp>.tex</samp> extension, is the job name. If <var>argument</var> does start
+with a backslash, or if TeX is in interactive mode, then it waits for
+the first <code>\input</code> instruction, and the job name is the name of the
+input file.
+</p>
+<p>There are two more possibilities for the job name. To directly specify
+it, use the <code>jobname</code> option. <a href="#Command-line-input">Command line input</a> has an
+example, generating the outputs <samp>students.pdf</samp> and
+<samp>professors.pdf</samp> from the same source, <samp>principal.tex</samp>.
+</p>
+<p>The final possibility is that the default job name is <samp>texput</samp>. So
+for example, if there is no <code>jobname</code> option and the compilation
+stops before the first <code>\input</code>, then the product log will be named
+<samp>texput.log</samp>. A special case of this is that in recent versions of
+LaTeX the job name is also <samp>texput</samp> if the first <code>\input</code>
+occurs by being indirectly called by either <code>\documentclass</code> or
+<code>\RequirePackage</code>. So this will produce a file named
+<samp>texput.pdf</samp>.
+</p>
+<div class="example">
+<pre class="example">pdflatex "\documentclass{minimal}\begin{document}Hello!\end{document}"
+</pre></div>
+<p>However, this special case only applies to those two commands. Here,
+</p>
<div class="example">
-<pre class="example">pdflatex -jobname=aa "\RequirePackage[draft]{graphicx}\input{aa.tex}"
+<pre class="example">pdflatex "\documentclass{article}\usepackage{lipsum}\input{thesis}"
</pre></div>
-<p>The <code>jobname</code> option is there because otherwise the output file
-would be <samp>graphicx.pdf</samp>, as <code>\RequirePackage</code> does an
-<code>\input</code> of its own.
+
+<p>the output file is <samp>lipsum.pdf</samp>, as <code>\usepackage</code> calls
+<code>\input</code>.
</p>
+<p>Within the document, the macro <code>\jobname</code> expands to the job name.
+(When you run LaTeX on a file whose name contains spaces, the string
+returned by <code>\jobname</code> contains matching start and end quotes.)
+In the expansion of that macro, all characters are of
+catcode 12 (other) except that spaces are category 10.
+So printing the job name can cause problems if the file name contains
+non-ASCII characters.
+</p>
+<p>Because of this catcode restriction, to use the job name in a
+conditional, one solution is to use a macro of text from the
+<samp>xtring</samp> package in its star variant, which is insensitive to
+catcode. For example, in the following text the footnote "Including
+Respublica Bananensis Francorum." is only present if the task name
+starts with <samp>my-doc</samp>.
+</p>
+<div class="example">
+<pre class="example">If a democracy is just a regime where citizens vote then
+all banana republics \IfBeginWith*{\jobname}{my-doc}%
+{\footnote{Including Respublica Bananensis Francorum.}}{} are
+democracies.
+</pre></div>
+<p>The potential problem for the unstarred version of <code>\IfBeginWith</code>
+is that the <code>-</code> in ‘<samp>my-doc</samp>’ has catcode 11, while in
+<code>\jobname</code>, if a <code>-</code> is there then it has catcode 12.
+</p>
+<p>Manipulating the value of <code>\jobname</code> inside of a document cannot
+change the name of the output file or the log file.
+</p>
+
<hr>
<span id="Recovering-from-errors"></span><div class="header">
<p>
@@ -24545,6 +24606,7 @@
<tr><td></td><td valign="top"><a href="#index-_005citshape"><code>\itshape</code></a>:</td><td> </td><td valign="top"><a href="#Font-styles">Font styles</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005cj-_0028dotless-j_0029"><code>\j <span class="roman">(dotless j)</span></code></a>:</td><td> </td><td valign="top"><a href="#Accents">Accents</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005cjmath"><code>\jmath</code></a>:</td><td> </td><td valign="top"><a href="#Math-symbols">Math symbols</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-_005cjobname"><code><code>\jobname</code></code></a>:</td><td> </td><td valign="top"><a href="#Jobname">Jobname</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005cJoin"><code>\Join</code></a>:</td><td> </td><td valign="top"><a href="#Math-symbols">Math symbols</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005ck-_0028ogonek_0029"><code>\k <span class="roman">(ogonek)</span></code></a>:</td><td> </td><td valign="top"><a href="#Accents">Accents</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005ckappa"><code>\kappa</code></a>:</td><td> </td><td valign="top"><a href="#Math-symbols">Math symbols</a></td></tr>
@@ -25747,6 +25809,7 @@
<tr><td></td><td valign="top"><a href="#index-item_005fx2"><code>item_x2</code></a>:</td><td> </td><td valign="top"><a href="#makeindex">makeindex</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="Index_cp_letter-J">J</th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Job-name">Job name</a>:</td><td> </td><td valign="top"><a href="#Jobname">Jobname</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-jobname">jobname</a>:</td><td> </td><td valign="top"><a href="#Command-line-options">Command line options</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-JPEG-files">JPEG files</a>:</td><td> </td><td valign="top"><a href="#g_t_005cincludegraphics">\includegraphics</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-JPG-files">JPG files</a>:</td><td> </td><td valign="top"><a href="#g_t_005cincludegraphics">\includegraphics</a></td></tr>
Modified: trunk/latex2e.info
===================================================================
--- trunk/latex2e.info 2021-05-26 14:36:00 UTC (rev 912)
+++ trunk/latex2e.info 2021-05-26 19:21:00 UTC (rev 913)
@@ -16435,21 +16435,71 @@
File: latex2e.info, Node: Jobname, Next: Recovering from errors, Prev: Command line input, Up: Command line interface
-28.3 TeX's job name
-===================
+28.3 Job name
+=============
-When you run 'pdflatex OPTIONS ARGUMENT', if ARGUMENT does not start
-with a backslash then TeX considers it the name of a file to input.
-Otherwise it waits for the first '\input' instruction and the name of
-the input file will be the job name. This is used to name the log file
-the output file. The 'jobname' option overrides that process and
-directly specifies the name. *Note Command line input::, for an example
-of its use.
+Running LaTeX creates a number of files, including the output but also
+including others. These files are named with the job name. The most
+common case is the simplest, where for instance the command 'pdflatex
+thesis' creates 'thesis.pdf' and also 'thesis.log' and 'thesis.aux'.
+Here the job name is 'thesis'.
- pdflatex -jobname=aa "\RequirePackage[draft]{graphicx}\input{aa.tex}"
- The 'jobname' option is there because otherwise the output file would
-be 'graphicx.pdf', as '\RequirePackage' does an '\input' of its own.
+ In general, the command is 'LATEX-ENGINE OPTIONS ARGUMENT', where
+LATEX-ENGINE is one of 'pdflatex', 'xelatex', or 'lualatex', or
+'dviluatex', or 'latex'. If ARGUMENT does not start with a backslash,
+as above with 'thesis', then TeX considers it the name of a file to
+input as the document root. The name of that root file, without the
+'.tex' extension, is the job name. If ARGUMENT does start with a
+backslash, or if TeX is in interactive mode, then it waits for the first
+'\input' instruction, and the job name is the name of the input file.
+ There are two more possibilities for the job name. To directly
+specify it, use the 'jobname' option. *note Command line input:: has an
+example, generating the outputs 'students.pdf' and 'professors.pdf' from
+the same source, 'principal.tex'.
+
+ The final possibility is that the default job name is 'texput'. So
+for example, if there is no 'jobname' option and the compilation stops
+before the first '\input', then the product log will be named
+'texput.log'. A special case of this is that in recent versions of
+LaTeX the job name is also 'texput' if the first '\input' occurs by
+being indirectly called by either '\documentclass' or '\RequirePackage'.
+So this will produce a file named 'texput.pdf'.
+
+ pdflatex "\documentclass{minimal}\begin{document}Hello!\end{document}"
+
+ However, this special case only applies to those two commands. Here,
+
+ pdflatex "\documentclass{article}\usepackage{lipsum}\input{thesis}"
+
+ the output file is 'lipsum.pdf', as '\usepackage' calls '\input'.
+
+ Within the document, the macro '\jobname' expands to the job name.
+(When you run LaTeX on a file whose name contains spaces, the string
+returned by '\jobname' contains matching start and end quotes.) In the
+expansion of that macro, all characters are of catcode 12 (other) except
+that spaces are category 10. So printing the job name can cause
+problems if the file name contains non-ASCII characters.
+
+ Because of this catcode restriction, to use the job name in a
+conditional, one solution is to use a macro of text from the 'xtring'
+package in its star variant, which is insensitive to catcode. For
+example, in the following text the footnote "Including Respublica
+Bananensis Francorum." is only present if the task name starts with
+'my-doc'.
+
+ If a democracy is just a regime where citizens vote then
+ all banana republics \IfBeginWith*{\jobname}{my-doc}%
+ {\footnote{Including Respublica Bananensis Francorum.}}{} are
+ democracies.
+
+ The potential problem for the unstarred version of '\IfBeginWith' is
+that the '-' in 'my-doc' has catcode 11, while in '\jobname', if a '-'
+is there then it has catcode 12.
+
+ Manipulating the value of '\jobname' inside of a document cannot
+change the name of the output file or the log file.
+
File: latex2e.info, Node: Recovering from errors, Prev: Jobname, Up: Command line interface
@@ -17198,6 +17248,7 @@
* \itshape: Font styles. (line 34)
* \j (dotless j): Accents. (line 19)
* \jmath: Math symbols. (line 283)
+* \jobname: Jobname. (line 6)
* \Join: Math symbols. (line 280)
* \k (ogonek): Accents. (line 73)
* \kappa: Math symbols. (line 287)
@@ -18605,6 +18656,7 @@
* item_2: makeindex. (line 87)
* item_x1: makeindex. (line 94)
* item_x2: makeindex. (line 104)
+* Job name: Jobname. (line 6)
* jobname: Command line options.
(line 43)
* JPEG files: \includegraphics. (line 6)
@@ -19985,14 +20037,14 @@
Ref: output directory593297
Node: Command line input594996
Node: Jobname596825
-Node: Recovering from errors597640
-Node: Document templates598985
-Node: beamer template599419
-Node: article template600061
-Node: book template600524
-Node: Larger book template601003
-Node: Index602545
-Ref: Command Index602631
+Node: Recovering from errors600107
+Node: Document templates601452
+Node: beamer template601886
+Node: article template602528
+Node: book template602991
+Node: Larger book template603470
+Node: Index605012
+Ref: Command Index605098
End Tag Table
Modified: trunk/latex2e.pdf
===================================================================
(Binary files differ)
Modified: trunk/latex2e.texi
===================================================================
--- trunk/latex2e.texi 2021-05-26 14:36:00 UTC (rev 912)
+++ trunk/latex2e.texi 2021-05-26 19:21:00 UTC (rev 913)
@@ -20726,28 +20726,87 @@
@node Jobname
- at section @TeX{}'s job name
+ at section Job name
- at c xx TODO, align on the French version which is far more complete and
- at c accurate.
-When you run @code{@command{pdflatex} @var{options} @var{argument}}, if
- at var{argument} does not start with a backslash then @TeX{} considers it
-the name of a file to input. Otherwise it waits for the first
- at code{\input} instruction and the name of the input file will be the job
-name. This is used to name the log file the output file. The
- at code{jobname} option overrides that process and directly specifies the
-name. @xref{Command line input}, for an example of its use.
+ at findex @code{\jobname}
+ at cindex Job name
+Running @LaTeX{} creates a number of files, including the output but
+also including others. These files are named with the job name. The
+most common case is the simplest, where for instance the command
+ at code{pdflatex thesis} creates @code{thesis.pdf} and also
+ at code{thesis.log} and @code{thesis.aux}. Here the job name is
+ at code{thesis}.
+In general, the command is @code{@var{latex-engine} @var{options}
+ at var{argument}}, where @var{latex-engine} is one of @command{pdflatex},
+ at command{xelatex}, or @code{lualatex}, or @code{dviluatex}, or
+ at code{latex}. If @var{argument} does not start with a backslash, as
+above with @code{thesis}, then @TeX{} considers it the name of a file to
+input as the document root. The name of that root file, without the
+ at file{.tex} extension, is the job name. If @var{argument} does start
+with a backslash, or if @TeX{} is in interactive mode, then it waits for
+the first @code{\input} instruction, and the job name is the name of the
+input file.
+
+There are two more possibilities for the job name. To directly specify
+it, use the @code{jobname} option. @ref{Command line input} has an
+example, generating the outputs @file{students.pdf} and
+ at file{professors.pdf} from the same source, @file{principal.tex}.
+
+The final possibility is that the default job name is @file{texput}. So
+for example, if there is no @code{jobname} option and the compilation
+stops before the first @code{\input}, then the product log will be named
+ at file{texput.log}. A special case of this is that in recent versions of
+ at LaTeX{} the job name is also @file{texput} if the first @code{\input}
+occurs by being indirectly called by either @code{\documentclass} or
+ at code{\RequirePackage}. So this will produce a file named
+ at file{texput.pdf}.
+
+ at example
+pdflatex "\documentclass@{minimal@}\begin@{document@}Hello!\end@{document@}"
+ at end example
+
+However, this special case only applies to those two commands. Here,
+
@c credit Herbert Voss: https://tex.stackexchange.com/a/17236/121234
@example
-pdflatex -jobname=aa "\RequirePackage[draft]@{graphicx@}\input@{aa.tex@}"
+pdflatex "\documentclass@{article@}\usepackage@{lipsum@}\input@{thesis@}"
@end example
-The @code{jobname} option is there because otherwise the output file
-would be @file{graphicx.pdf}, as @code{\RequirePackage} does an
- at code{\input} of its own.
+the output file is @file{lipsum.pdf}, as @code{\usepackage} calls
+ at code{\input}.
+Within the document, the macro @code{\jobname} expands to the job name.
+(When you run @LaTeX{} on a file whose name contains spaces, the string
+returned by @code{\jobname} contains matching start and end quotes.)
+In the expansion of that macro, all characters are of
+catcode at tie{}12 (other) except that spaces are category at tie{}10.
+So printing the job name can cause problems if the file name contains
+non-ASCII characters.
+
+Because of this catcode restriction, to use the job name in a
+conditional, one solution is to use a macro of text from the
+ at file{xtring} package in its star variant, which is insensitive to
+catcode. For example, in the following text the footnote "Including
+Respublica Bananensis Francorum." is only present if the task name
+starts with @file{my-doc}.
+
+ at example
+If a democracy is just a regime where citizens vote then
+all banana republics \IfBeginWith*@{\jobname@}@{my-doc@}%
+@{\footnote@{Including Respublica Bananensis Francorum.@}@}@{@} are
+democracies.
+ at end example
+
+The potential problem for the unstarred version of @code{\IfBeginWith}
+is that the @code{-} in @samp{my-doc} has catcode at tie{}11, while in
+ at code{\jobname}, if a @code{-} is there then it has catcode at tie{}12.
+
+Manipulating the value of @code{\jobname} inside of a document cannot
+change the name of the output file or the log file.
+
+
@node Recovering from errors
@section Recovering from errors
More information about the latexrefman-commits
mailing list.