[latexrefman-commits] [SCM] latexrefman updated: r664 - trunk
jimhefferon at gnu.org.ua
jimhefferon at gnu.org.ua
Wed Jun 27 21:42:18 CEST 2018
Author: jimhefferon
Date: 2018-06-27 22:42:18 +0300 (Wed, 27 Jun 2018)
New Revision: 664
Modified:
trunk/ChangeLog
trunk/latex2e.html
trunk/latex2e.info
trunk/latex2e.pdf
trunk/latex2e.texi
Log:
Terminal input/uoutput and Command line; more to do on the latter
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2018-06-27 15:05:18 UTC (rev 663)
+++ trunk/ChangeLog 2018-06-27 19:42:18 UTC (rev 664)
@@ -1,3 +1,11 @@
+2018-06-27 Jim Hefferon <jhefferon at smcvt.edu>
+
+ * latex2e.texi (Terminal input/output) Added synopsis, examples.
+ (Command line) Give synopsis calling syntax. Expanded
+ into sections the command options, including a discussion of shell
+ escape. Put in stub for putting commands on the command line,
+ and for recovering from errors.
+
2018-06-26 Jim Hefferon <jhefferon at smcvt.edu>
* latex2e.texi (Front/back matter) Expanded the entries for the
Modified: trunk/latex2e.html
===================================================================
--- trunk/latex2e.html 2018-06-27 15:05:18 UTC (rev 663)
+++ trunk/latex2e.html 2018-06-27 19:42:18 UTC (rev 664)
@@ -499,7 +499,12 @@
<li><a name="toc-_005ctypein-1" href="#g_t_005ctypein">27.1 <code>\typein</code></a></li>
<li><a name="toc-_005ctypeout-1" href="#g_t_005ctypeout">27.2 <code>\typeout</code></a></li>
</ul></li>
- <li><a name="toc-Command-line-1" href="#Command-line">28 Command line</a></li>
+ <li><a name="toc-Command-line-1" href="#Command-line">28 Command line</a>
+ <ul class="no-bullet">
+ <li><a name="toc-Command-line-options-1" href="#Command-line-options">28.1 Command line options</a></li>
+ <li><a name="toc-Command-line-input-1" href="#Command-line-input">28.2 Command line input</a></li>
+ <li><a name="toc-Recovering-from-errors-1" href="#Recovering-from-errors">28.3 Recovering from errors</a></li>
+ </ul></li>
<li><a name="toc-Document-templates-1" href="#Document-templates">Appendix A Document templates</a>
<ul class="no-bullet">
<li><a name="toc-beamer-template-1" href="#beamer-template">A.1 <code>beamer</code> template</a></li>
@@ -14701,7 +14706,7 @@
<p>Caution: the <code>\ensuremath</code> command is useful but not a panacea.
</p>
<div class="example">
-<pre class="example">\newcommand{\alf2}{\ensuremath{\alpha2}}
+<pre class="example">\newcommand{\alf}{\ensuremath{\alpha}}
You get an alpha in text mode: \alf.
But compare the correct spacing in $\alf+\alf$ with the spacing in \alf+\alf.
</pre></div>
@@ -19916,13 +19921,10 @@
<a name="index-indexes"></a>
<a name="index-_005cmakeindex"></a>
-<p>The command <code>\makeindex</code> enables creating indexes. Put this in
-the preamble.
-</p>
<a name="index-_005cindex"></a>
<a name="index-_002eidx-file"></a>
-<p>This shows a document that has an index.
+<p>This document has an index.
</p>
<div class="example">
<pre class="example">\documentclass{article}
@@ -19941,15 +19943,15 @@
<p>The <code>\usepackage{makeidx}</code> and <code>\makeindex</code> in the preamble
bring in the relevant commands.
</p>
-<p>Producing an index is a three stage process. First you declare index
-entries with the <code>\index</code> command (see <a href="#g_t_005cindex">\index</a>). When you run
-LaTeX, the <code>\index</code> writes its information to an auxiliary file
-<samp><var>root-name</var>.idx</samp>. Next, to alphabetize and to do other
-manipulations you run an external command, typically <code>makeindex</code>
-or <code>xindy</code> (see <a href="#makeindex">makeindex</a>). These output a file
-<samp><var>root-name</var>.ind</samp>. Finally, you bring the information back
-into your document and typeset it with the <code>\printindex</code> command
-(see <a href="#g_t_005cprintindex">\printindex</a>).
+<p>Producing an index is a three stage process. First, in the document
+body you declare index entries with the <code>\index</code> command
+(see <a href="#g_t_005cindex">\index</a>). When you run LaTeX, the <code>\index</code> writes its
+information to an auxiliary file <samp><var>root-name</var>.idx</samp>. Next, to
+alphabetize and to do other manipulations you run an external command,
+typically <code>makeindex</code> or <code>xindy</code> (see <a href="#makeindex">makeindex</a>).
+These output a file <samp><var>root-name</var>.ind</samp>. Finally, you bring the
+information back into your document and typeset it with the
+<code>\printindex</code> command (see <a href="#g_t_005cprintindex">\printindex</a>).
</p>
<a name="index-package_002c-showidx"></a>
<a name="index-showidx-package"></a>
@@ -21135,6 +21137,22 @@
wait for you to type a line of input. This line of input ends when you
hit the return key.
</p>
+<p>For example, this
+</p>
+<div class="example">
+<pre class="example">As long as I live I shall never forget \typein{Enter student name:}
+</pre></div>
+
+<p>coupled with this command line interaction
+</p>
+<div class="example">
+<pre class="example">Enter student name:
+
+\@typein=Aphra Behn
+</pre></div>
+
+<p>gives the output ‘<samp>... never forget Aphra Behn</samp>’.
+</p>
<p>The first command version, <code>\typein{<var>prompt-msg</var>}</code>, causes
the input you typed to be processed as if it had been included in the
input file in place of the <code>\typein</code> command.
@@ -21142,9 +21160,25 @@
<p>In the second command version the optional argument <code><var>cmd</var></code>
argument must be a command name — it must begin with a backslash, \.
This command name is then defined or redefined to be the input that you
-typed.
+typed. For example, this
</p>
+<div class="example">
+<pre class="example">\typein[\student]{Enter student name:}
+\typeout{Recommendation for \student .}
+</pre></div>
+<p>gives this output on the command line,
+</p>
+<div class="example">
+<pre class="example">Enter student name:
+
+\student=John Dee
+Recommendation for John Dee.
+</pre></div>
+
+<p>where the user has entered ‘<samp>John Dee.</samp>’
+</p>
+
<hr>
<a name="g_t_005ctypeout"></a>
<div class="header">
@@ -21164,17 +21198,35 @@
<p>Print <code>msg</code> on the terminal and in the <code>log</code> file.
</p>
-<p>Commands in <code>msg</code> that are defined with <code>\newcommand</code> or
+<p>This
+</p>
+<div class="example">
+<pre class="example">\newcommand{\student}{John Dee}
+\typeout{Recommendation for \student .}
+</pre></div>
+
+<p>outputs ‘<samp>Recommendation for John Dee</samp>’. Like what happens here with
+<code>\student</code>, commands that are defined with <code>\newcommand</code> or
<code>\renewcommand</code> (among others) are replaced by their definitions
before being printed.
</p>
<p>LaTeX’s usual rules for treating multiple spaces as a single space
-and ignoring spaces after a command name apply to <code>msg</code>. To get
-a single space independent of surrounding spaces, use the
-<code>\space</code> command in <code>msg</code>. A <code>^^J</code> in
-<code>msg</code> prints a newline.
+and ignoring spaces after a command name apply to <code>msg</code>. As above,
+use the command <code>\space</code> to get a single space, independent of
+surrounding spaces. Use <code>^^J</code> to get a newline. Get a percent
+character with <code>\csname @percentchar\endcsname</code>.
</p>
+<p>This command can be useful for simple debugging, as here:
+</p>
+<div class="example">
+<pre class="example">\newlength{\jhlength}
+\setlength{\jhlength}{5pt}
+\typeout{The length is \the\jhlength.}
+</pre></div>
+<p>produces on the command line ‘<samp>The length is 5.0pt</samp>’.
+</p>
+
<hr>
<a name="Command-line"></a>
<div class="header">
@@ -21186,23 +21238,230 @@
<a name="index-command-line"></a>
-<a name="index-_002etex_002c-default-extension"></a>
-<p>The input file specification indicates the file to be formatted;
-TeX uses <samp>.tex</samp> as a default file extension. If you omit the
-input file entirely, TeX accepts input from the terminal. You can
-also specify arbitrary LaTeX input by starting with a backslash.
-For example, this processes <samp>foo.tex</samp> without pausing after every
-error:
+<p>Synopsis, one of:
</p>
<div class="example">
-<pre class="example">latex '\nonstopmode\input foo.tex'
+<pre class="example">pdflatex
+pdflatex <var>option</var> ... <var>latex-filename</var> <var>commands</var>
+pdflatex <var>option</var> ... <var>latex-filename</var>.tex <var>commands</var>
+pdflatex <var>option</var> ... <var>first-line-with-backslash</var>
</pre></div>
+<p>or, less often, one of:
+</p>
+<div class="example">
+<pre class="example">latex
+latex <var>option</var> ... <var>latex-filename</var> <var>commands</var>
+latex <var>option</var> ... <var>latex-filename</var>.tex <var>commands</var>
+latex <var>option</var> ... <var>first-line-with-backslash</var>
+</pre></div>
+
+<p>Run LaTeX on the input file <samp><var>latex-filename</var>.tex</samp>.
+</p>
+<p>This will run LaTeX on the file <samp>thesis.tex</samp>, creating the
+output <samp>thesis.pdf</samp>.
+</p>
+<div class="example">
+<pre class="example"><code>pdflatex</code> thesis
+</pre></div>
+
+<p><a name="index-_002etex_002c-default-extension"></a>
+As in that example, <samp>.tex</samp> is the default file extension.
+</p>
+<p>The synopsis shows two commands, <code>pdflatex</code> and <code>latex</code>.
+The original TeX program output a custom format, DVI. pdfTeX is a
+modification of that program. It is completely backward compatible.
+But it can output directly to PDF and so can take advantage of PDF’s
+extra features such as hyperlinks, support for modern image formats such
+as JPG and PNG, and ubiquitous viewing programs. In short, if you run
+<code>pdflatex</code> then you will by default get PDF and have access to
+all its modern features, while if you run <code>latex</code> then you will
+get DVI. The description here assumes pdfLaTeX.
+</p>
+<p>If your command line invocation has no arguments or options at all then
+<code>pdflatex</code> prompts the user for input from the terminal (escape
+from this by entering <code><control>-D</code>).
+</p>
+<p>See <a href="#Command-line-options">Command line options</a> for a selection of the most useful command
+line options.
+</p>
+<p>If the first non-option argument begins with a backslash then all such
+arguments are interpreted as a line of LaTeX input (see <a href="#Command-line-input">Command line input</a>). If it does not begin with a backslash then
+<code>pdflatex</code> assumes it is the name of a file, which will be the
+job file. In this case, any remaining <var>commands</var> are processed as
+<code>pdflatex</code> commands.
+</p>
+<p>If LaTeX finds an error in your document then by default it stops and
+asks you about it. See <a href="#Recovering-from-errors">Recovering from errors</a> for an outline of what
+to do.
+</p>
+<p>See <a href="#TeX-engines">TeX engines</a> for other system commands invoking LaTeX.
+</p>
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">• <a href="#Command-line-options" accesskey="1">Command line options</a>:</td><td> </td><td align="left" valign="top">Read text from the terminal.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Command-line-input" accesskey="2">Command line input</a>:</td><td> </td><td align="left" valign="top">Write text to the terminal.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Recovering-from-errors" accesskey="3">Recovering from errors</a>:</td><td> </td><td align="left" valign="top">When something goes wrong.
+</td></tr>
+</table>
+
+
+<hr>
+<a name="Command-line-options"></a>
+<div class="header">
+<p>
+Next: <a href="#Command-line-input" accesskey="n" rel="next">Command line input</a>, Up: <a href="#Command-line" accesskey="u" rel="up">Command line</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Concept-Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Command-line-options-1"></a>
+<h3 class="section">28.1 Command line options</h3>
+
<a name="index-_002d_002dhelp-command_002dline-option"></a>
-<p>With many, but not all, implementations, command-line options can also
-be specified in the usual Unix way, starting with ‘<samp>-</samp>’ or
-‘<samp>--</samp>’. For a list of those options, try ‘<samp>latex --help</samp>’.
+<p>With many implementations you can specify command line options
+by prefixing them with ‘<samp>-</samp>’ or ‘<samp>--</samp>’.
+For instance, use ‘<samp>-</samp>’ for TeX Live on GNU/Linux or MacTeX on Apple,
+and use ‘<samp>--</samp>’ for MikTeX on Windows.
+These are the options relevant to ordinary document authoring. For a
+full list, try the command line command ‘<samp>latex --help</samp>’.
</p>
+<dl compact="compact">
+<dt><code>version</code>
+<a name="index-version"></a>
+</dt>
+<dd><p>Show the current version, like ‘<samp>pdfTeX 3.14159265-2.6-1.40.16 (TeX
+Live 2015/Debian)</samp>’, along with a small amount of additional information,
+and exit.
+</p>
+</dd>
+<dt><code>help</code>
+<a name="index-help"></a>
+</dt>
+<dd><p>Give a brief usage message that is useful as a prompt, and exit.
+</p>
+</dd>
+<dt><code>interaction=[batchmode|nonstopmode|scrollmode|errorstopmode]</code>
+<a name="index-interaction_003d_005bbatchmode_007cnonstopmode_007cscrollmode_007cerrorstopmode_005d"></a>
+</dt>
+<dd><p>When TeX is compiling a document it does so in one of four modes. In
+<em>errorstop mode</em> (the default), TeX stops at each error and asks
+for user intervention. In <em>batch mode</em> it prints nothing on the
+terminal, errors are scrolled as if the user hit <code><return></code> at
+every error, and missing files cause the job to abort. In <em>nonstop
+mode</em> diagnostic message appear on the terminal but as in batch mode
+there is no user interaction. In <em>scroll mode</em> TeX only stops
+for missing files or keyboard input.
+</p>
+<p>For instance, starting LaTeX with the command line <code>pdflatex
+-interaction=batchmode <var>filename</var></code> eliminates most command line
+output.https://tex.stackexchange.com/a/128190/121234
+</p>
+</dd>
+<dt><code>jobname=<var>string</var></code>
+<a name="index-jobname_003dstring"></a>
+</dt>
+<dd><p>Set the value of TeX’s <code>jobname</code> to the string. The most
+obvious effect of this is that the output file will then be
+<samp><var>string</var>.pdf</samp>.
+</p>
+<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 tile inputs that file. Otherwise <code>pdflatex</code> waits
+for the first <code>\input</code> instruction and the name of the input file
+will be the job name, used for name of the log file and the output file.
+This option short-circuits that process and directly specifies the name.
+See <a href="#Command-line-input">Command line input</a> for an example of its use.
+</p>
+</dd>
+<dt><code>output-directory=<var>directory</var></code>
+<a name="index-output_002ddirectory_003ddirectory"></a>
+</dt>
+<dd><p>Use the existing directory <var>directory</var> to write files in.
+</p>
+</dd>
+<dt><code>shell-escape</code>
+<a name="index-shell_002descape"></a>
+</dt>
+<dt><code>no-shell-escape</code>
+<a name="index-no_002dshell_002descape"></a>
+</dt>
+<dt><code>enable-write18</code>
+<a name="index-enable_002dwrite18"></a>
+</dt>
+<dt><code>disable-write18</code>
+<a name="index-disable_002dwrite18"></a>
+</dt>
+<dd><p>Enable or disable <code>\write18{<var>shell command</var>}</code>. The first two
+are available with TeX Live or MacTeX while the second two come
+with MikTeX.
+</p>
+<a name="index-package_002c-sagetex"></a>
+<a name="index-sagetex-package"></a>
+
+<p>Sometimes you want to run external system commands from inside a
+LaTeX file. For instance the package <samp>sagetex</samp> allows you to
+have the mathematics software system <i>Sage</i> do calculations or draw
+graphs and then incorporate that output in your document. For this
+TeX provides the <code>\write18</code> command.
+</p>
+<p>But with this functionality enabled, security issues could happen if you
+compiled a LaTeX file from the Internet. By default <code>\write18</code>
+is disabled. (More precisely, by default TeX Live, MacTeX, and
+MikTeX allow the execution of a limited number of TeX-related
+programs, which they distribute.)
+</p>
+<p>If you call <code>\write18{ls -l}</code> with the option
+<code>no-shell-escape</code> then you do not get an error, but the log file
+says ‘<samp>runsystem(ls -l)...disabled</samp>’.
+</p>
+</dd>
+<dt><code>halt-on-error</code>
+<a name="index-halt_002don_002derror"></a>
+</dt>
+<dd><p>Stop processing at the first error.
+</p>
+</dd>
+<dt><code>file-line-error</code>
+<a name="index-file_002dline_002derror"></a>
+</dt>
+<dt><code>no-file-line-error</code>
+<a name="index-no_002dfile_002dline_002derror"></a>
+</dt>
+<dd><p>Enable or disable <code><var>filename</var>:<var>lineno</var>:<var>error</var></code>-style
+error messages. These are only available with TeX Live or MacTeX.
+</p></dd>
+</dl>
+
+
+<hr>
+<a name="Command-line-input"></a>
+<div class="header">
+<p>
+Next: <a href="#Recovering-from-errors" accesskey="n" rel="next">Recovering from errors</a>, Previous: <a href="#Command-line-options" accesskey="p" rel="prev">Command line options</a>, Up: <a href="#Command-line" accesskey="u" rel="up">Command line</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Concept-Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Command-line-input-1"></a>
+<h3 class="section">28.2 Command line input</h3>
+
+<p>As part of the command line invocation of LaTeX you can also specify
+arbitrary input by starting with a backslash. For example,
+this loads the package <samp>graphicx</samp> with the option <code>draft</code>.
+</p>
+<div class="example">
+<pre class="example">pdflatex -jobname=myfile "\RequirePackage[draft]{graphicx} \input{myfile.tex}"
+</pre></div>
+
+<p>The graphic files are read for their size information, but not incorporated
+into the PDF.
+</p>
+
+<hr>
+<a name="Recovering-from-errors"></a>
+<div class="header">
+<p>
+Previous: <a href="#Command-line-input" accesskey="p" rel="prev">Command line input</a>, Up: <a href="#Command-line" accesskey="u" rel="up">Command line</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Concept-Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Recovering-from-errors-1"></a>
+<h3 class="section">28.3 Recovering from errors</h3>
+
<a name="index-_002a-prompt"></a>
<a name="index-prompt_002c-_002a"></a>
<a name="index-_005cstop"></a>
@@ -21210,9 +21469,8 @@
‘<samp>*</samp>’ prompt, it is waiting for input. You can type <code>\stop</code>
(and return) and it will prematurely end the document.
</p>
-<p>See <a href="#TeX-engines">TeX engines</a>, for other system commands invoking LaTeX.
-</p>
+
<hr>
<a name="Document-templates"></a>
<div class="header">
@@ -21574,7 +21832,7 @@
<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Concept-Index_cp_symbol-1">*</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-_002a-prompt">‘<samp>*</samp>’ prompt</a>:</td><td> </td><td valign="top"><a href="#Command-line">Command line</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-_002a-prompt">‘<samp>*</samp>’ prompt</a>:</td><td> </td><td valign="top"><a href="#Recovering-from-errors">Recovering from errors</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002a_002dform-of-environment-commands"><code>*</code>-form of environment commands</a>:</td><td> </td><td valign="top"><a href="#g_t_005cnewenvironment-_0026-_005crenewenvironment">\newenvironment & \renewenvironment</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002a_002dform-of-sectioning-commands"><code>*</code>-form of sectioning commands</a>:</td><td> </td><td valign="top"><a href="#Sectioning">Sectioning</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002a_002dform_002c-defining-new-commands">*-form, defining new commands</a>:</td><td> </td><td valign="top"><a href="#g_t_005cnewcommand-_0026-_005crenewcommand">\newcommand & \renewcommand</a></td></tr>
@@ -22236,6 +22494,7 @@
<tr><td></td><td valign="top"><a href="#index-package_002c-polyglossia-1"><span class="roman">package</span>, <code>polyglossia</code></a>:</td><td> </td><td valign="top"><a href="#g_t_005ctoday">\today</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-package_002c-polyglossia-2"><span class="roman">package</span>, <code>polyglossia</code></a>:</td><td> </td><td valign="top"><a href="#Table-of-contents-etc_002e">Table of contents etc.</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-package_002c-polyglossia-3"><span class="roman">package</span>, <code>polyglossia</code></a>:</td><td> </td><td valign="top"><a href="#g_t_005cindex">\index</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-package_002c-sagetex"><span class="roman">package</span>, <code>sagetex</code></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-package_002c-setspace"><span class="roman">package</span>, <code>setspace</code></a>:</td><td> </td><td valign="top"><a href="#Low_002dlevel-font-commands">Low-level font commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-package_002c-showidx"><span class="roman">package</span>, <code>showidx</code></a>:</td><td> </td><td valign="top"><a href="#Indexes">Indexes</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-package_002c-siunitx"><span class="roman">package</span>, <code>siunitx</code></a>:</td><td> </td><td valign="top"><a href="#g_t_007e">~</a></td></tr>
@@ -22311,7 +22570,7 @@
<tr><td></td><td valign="top"><a href="#index-pounds-symbol">pounds symbol</a>:</td><td> </td><td valign="top"><a href="#Text-symbols">Text symbols</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-preamble_002c-defined">preamble, defined</a>:</td><td> </td><td valign="top"><a href="#Starting-and-ending">Starting and ending</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-predefined-lengths">predefined lengths</a>:</td><td> </td><td valign="top"><a href="#Predefined-lengths">Predefined lengths</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-prompt_002c-_002a">prompt, ‘<samp>*</samp>’</a>:</td><td> </td><td valign="top"><a href="#Command-line">Command line</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-prompt_002c-_002a">prompt, ‘<samp>*</samp>’</a>:</td><td> </td><td valign="top"><a href="#Recovering-from-errors">Recovering from errors</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-pronunciation">pronunciation</a>:</td><td> </td><td valign="top"><a href="#Overview">Overview</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Concept-Index_cp_letter-Q">Q</a></th><td></td><td></td></tr>
@@ -22363,6 +22622,7 @@
<tr><td></td><td valign="top"><a href="#index-running-header-and-footer-style">running header and footer style</a>:</td><td> </td><td valign="top"><a href="#g_t_005cpagestyle">\pagestyle</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Concept-Index_cp_letter-S">S</a></th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-sagetex-package"><code>sagetex</code> <span class="roman">package</span></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-sans-serif-font">sans serif font</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-Scaled-point">Scaled point</a>:</td><td> </td><td valign="top"><a href="#Units-of-length">Units of length</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-scaling">scaling</a>:</td><td> </td><td valign="top"><a href="#g_t_005cscalebox">\scalebox</a></td></tr>
@@ -22666,6 +22926,8 @@
<a class="summary-letter" href="#Command-Index_fn_letter-I"><b>I</b></a>
+<a class="summary-letter" href="#Command-Index_fn_letter-J"><b>J</b></a>
+
<a class="summary-letter" href="#Command-Index_fn_letter-L"><b>L</b></a>
<a class="summary-letter" href="#Command-Index_fn_letter-M"><b>M</b></a>
@@ -22698,7 +22960,7 @@
<tr><td></td><td valign="top"><a href="#index-_0026"><code>&</code></a>:</td><td> </td><td valign="top"><a href="#tabular">tabular</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Command-Index_fn_symbol-2">-</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-_002d_002dhelp-command_002dline-option"><code>--help <span class="roman">command-line option</span></code></a>:</td><td> </td><td valign="top"><a href="#Command-line">Command line</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-_002d_002dhelp-command_002dline-option"><code>--help <span class="roman">command-line option</span></code></a>:</td><td> </td><td valign="top"><a href="#Command-line-options">Command line options</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Command-Index_fn_symbol-3">.</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002eaux-file"><code>.aux <span class="roman">file</span></code></a>:</td><td> </td><td valign="top"><a href="#Output-files">Output files</a></td></tr>
@@ -23432,7 +23694,7 @@
<tr><td></td><td valign="top"><a href="#index-_005cstackrel"><code>\stackrel</code></a>:</td><td> </td><td valign="top"><a href="#g_t_005cstackrel">\stackrel</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005cstar"><code>\star</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-_005cstepcounter"><code>\stepcounter</code></a>:</td><td> </td><td valign="top"><a href="#g_t_005cstepcounter">\stepcounter</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-_005cstop"><code>\stop</code></a>:</td><td> </td><td valign="top"><a href="#Command-line">Command line</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-_005cstop"><code>\stop</code></a>:</td><td> </td><td valign="top"><a href="#Recovering-from-errors">Recovering from errors</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005cstrut"><code>\strut</code></a>:</td><td> </td><td valign="top"><a href="#g_t_005cstrut">\strut</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005csubparagraph"><code>\subparagraph</code></a>:</td><td> </td><td valign="top"><a href="#Sectioning">Sectioning</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005csubparagraph-1"><code>\subparagraph</code></a>:</td><td> </td><td valign="top"><a href="#g_t_005csubsubsection-_0026-_005cparagraph-_0026-_005csubparagraph">\subsubsection & \paragraph & \subparagraph</a></td></tr>
@@ -23678,6 +23940,7 @@
<tr><td></td><td valign="top"><a href="#index-delim_005fr"><code>delim_r</code></a>:</td><td> </td><td valign="top"><a href="#makeindex">makeindex</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-description"><code>description</code></a>:</td><td> </td><td valign="top"><a href="#g_t_005cnewglossaryentry">\newglossaryentry</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-description-environment"><code><code>description</code> <span class="roman">environment</span></code></a>:</td><td> </td><td valign="top"><a href="#description">description</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-disable_002dwrite18"><code>disable-write18</code></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-displaymath-environment"><code><code>displaymath</code> <span class="roman">environment</span></code></a>:</td><td> </td><td valign="top"><a href="#displaymath">displaymath</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-displaymath-environment-1"><code><code>displaymath</code> <span class="roman">environment</span></code></a>:</td><td> </td><td valign="top"><a href="#Math-formulas">Math formulas</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-document-environment"><code><code>document</code> <span class="roman">environment</span></code></a>:</td><td> </td><td valign="top"><a href="#document">document</a></td></tr>
@@ -23688,6 +23951,7 @@
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Command-Index_fn_letter-E">E</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-em-1"><code>em</code></a>:</td><td> </td><td valign="top"><a href="#Units-of-length">Units of length</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-enable_002dwrite18"><code>enable-write18</code></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-enumerate-environment"><code><code>enumerate</code> <span class="roman">environment</span></code></a>:</td><td> </td><td valign="top"><a href="#enumerate">enumerate</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-environment_002c-abstract"><code><span class="roman">environment</span>, <code>abstract</code></code></a>:</td><td> </td><td valign="top"><a href="#abstract">abstract</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-environment_002c-array"><code><span class="roman">environment</span>, <code>array</code></code></a>:</td><td> </td><td valign="top"><a href="#array">array</a></td></tr>
@@ -23731,6 +23995,7 @@
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Command-Index_fn_letter-F">F</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-figure-environment"><code><code>figure</code> <span class="roman">environment</span></code></a>:</td><td> </td><td valign="top"><a href="#figure">figure</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-file_002dline_002derror"><code>file-line-error</code></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-filecontents-environment"><code><code>filecontents</code> <span class="roman">environment</span></code></a>:</td><td> </td><td valign="top"><a href="#filecontents">filecontents</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-filecontents_002a-environment"><code><code>filecontents*</code> <span class="roman">environment</span></code></a>:</td><td> </td><td valign="top"><a href="#filecontents">filecontents</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-final-option"><code>final <span class="roman">option</span></code></a>:</td><td> </td><td valign="top"><a href="#Document-class-options">Document class options</a></td></tr>
@@ -23746,6 +24011,8 @@
<tr><td></td><td valign="top"><a href="#index-group_005fskip"><code>group_skip</code></a>:</td><td> </td><td valign="top"><a href="#makeindex">makeindex</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Command-Index_fn_letter-H">H</a></th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-halt_002don_002derror"><code>halt-on-error</code></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-help"><code>help</code></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-http_003a_002f_002fpuszcza_002egnu_002eorg_002eua_002fsoftware_002flatexrefman_002f-home-page"><code><a href="http://puszcza.gnu.org.ua/software/latexrefman/">http://puszcza.gnu.org.ua/software/latexrefman/</a> <span class="roman">home page</span></code></a>:</td><td> </td><td valign="top"><a href="#About-this-document">About this document</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Command-Index_fn_letter-I">I</a></th><td></td><td></td></tr>
@@ -23754,6 +24021,7 @@
<tr><td></td><td valign="top"><a href="#index-indent_005flength-_003cnumber_003e"><code>indent_length <number></code></a>:</td><td> </td><td valign="top"><a href="#makeindex">makeindex</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-indent_005fspace"><code>indent_space</code></a>:</td><td> </td><td valign="top"><a href="#makeindex">makeindex</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-index_002c-style-file"><code>index, style file</code></a>:</td><td> </td><td valign="top"><a href="#makeindex">makeindex</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-interaction_003d_005bbatchmode_007cnonstopmode_007cscrollmode_007cerrorstopmode_005d"><code>interaction=[batchmode|nonstopmode|scrollmode|errorstopmode]</code></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-itemize-environment"><code><code>itemize</code> <span class="roman">environment</span></code></a>:</td><td> </td><td valign="top"><a href="#itemize">itemize</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-item_005f0"><code>item_0</code></a>:</td><td> </td><td valign="top"><a href="#makeindex">makeindex</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-item_005f01"><code>item_01</code></a>:</td><td> </td><td valign="top"><a href="#makeindex">makeindex</a></td></tr>
@@ -23763,6 +24031,9 @@
<tr><td></td><td valign="top"><a href="#index-item_005fx1"><code>item_x1</code></a>:</td><td> </td><td valign="top"><a href="#makeindex">makeindex</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-item_005fx2-_003cstring_003e"><code>item_x2 <string></code></a>:</td><td> </td><td valign="top"><a href="#makeindex">makeindex</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
+<tr><th><a name="Command-Index_fn_letter-J">J</a></th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-jobname_003dstring"><code>jobname=<var>string</var></code></a>:</td><td> </td><td valign="top"><a href="#Command-line-options">Command line options</a></td></tr>
+<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Command-Index_fn_letter-L">L</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-landscape-option"><code>landscape <span class="roman">option</span></code></a>:</td><td> </td><td valign="top"><a href="#Document-class-options">Document class options</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-latex-command"><code>latex <span class="roman">command</span></code></a>:</td><td> </td><td valign="top"><a href="#Output-files">Output files</a></td></tr>
@@ -23794,6 +24065,8 @@
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Command-Index_fn_letter-N">N</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-name"><code>name</code></a>:</td><td> </td><td valign="top"><a href="#g_t_005cnewglossaryentry">\newglossaryentry</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-no_002dfile_002dline_002derror"><code>no-file-line-error</code></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-no_002dshell_002descape"><code>no-shell-escape</code></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-notitlepage-option"><code>notitlepage <span class="roman">option</span></code></a>:</td><td> </td><td valign="top"><a href="#Document-class-options">Document class options</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Command-Index_fn_letter-O">O</a></th><td></td><td></td></tr>
@@ -23802,6 +24075,7 @@
<tr><td></td><td valign="top"><a href="#index-openany-option"><code>openany <span class="roman">option</span></code></a>:</td><td> </td><td valign="top"><a href="#Document-class-options">Document class options</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-openbib-option"><code>openbib <span class="roman">option</span></code></a>:</td><td> </td><td valign="top"><a href="#Document-class-options">Document class options</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-openright-option"><code>openright <span class="roman">option</span></code></a>:</td><td> </td><td valign="top"><a href="#Document-class-options">Document class options</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-output_002ddirectory_003ddirectory"><code>output-directory=<var>directory</var></code></a>:</td><td> </td><td valign="top"><a href="#Command-line-options">Command line options</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Command-Index_fn_letter-P">P</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-page_005fprecedence"><code>page_precedence</code></a>:</td><td> </td><td valign="top"><a href="#makeindex">makeindex</a></td></tr>
@@ -23823,6 +24097,7 @@
<tr><th><a name="Command-Index_fn_letter-S">S</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-secnumdepth"><code>secnumdepth</code></a>:</td><td> </td><td valign="top"><a href="#Sectioning">Sectioning</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-secnumdepth-counter"><code>secnumdepth <span class="roman">counter</span></code></a>:</td><td> </td><td valign="top"><a href="#Sectioning">Sectioning</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-shell_002descape"><code>shell-escape</code></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-slides-class"><code>slides <span class="roman">class</span></code></a>:</td><td> </td><td valign="top"><a href="#Document-classes">Document classes</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-sloppypar"><code>sloppypar</code></a>:</td><td> </td><td valign="top"><a href="#sloppypar">sloppypar</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-sort"><code>sort</code></a>:</td><td> </td><td valign="top"><a href="#g_t_005cnewglossaryentry">\newglossaryentry</a></td></tr>
@@ -23854,6 +24129,7 @@
<tr><th><a name="Command-Index_fn_letter-V">V</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-verbatim-environment"><code><code>verbatim</code> <span class="roman">environment</span></code></a>:</td><td> </td><td valign="top"><a href="#verbatim">verbatim</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-verse-environment"><code><code>verse</code> <span class="roman">environment</span></code></a>:</td><td> </td><td valign="top"><a href="#verse">verse</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-version"><code>version</code></a>:</td><td> </td><td valign="top"><a href="#Command-line-options">Command line options</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Command-Index_fn_letter-X">X</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-xdvi-command"><code>xdvi <span class="roman">command</span></code></a>:</td><td> </td><td valign="top"><a href="#Output-files">Output files</a></td></tr>
@@ -23903,6 +24179,8 @@
<a class="summary-letter" href="#Command-Index_fn_letter-I"><b>I</b></a>
+<a class="summary-letter" href="#Command-Index_fn_letter-J"><b>J</b></a>
+
<a class="summary-letter" href="#Command-Index_fn_letter-L"><b>L</b></a>
<a class="summary-letter" href="#Command-Index_fn_letter-M"><b>M</b></a>
Modified: trunk/latex2e.info
===================================================================
--- trunk/latex2e.info 2018-06-27 15:05:18 UTC (rev 663)
+++ trunk/latex2e.info 2018-06-27 19:42:18 UTC (rev 664)
@@ -9783,11 +9783,11 @@
Caution: the '\ensuremath' command is useful but not a panacea.
- \newcommand{\alf2}{\ensuremath{\alpha2}}
+ \newcommand{\alf}{\ensuremath{\alpha}}
You get an alpha in text mode: \alf.
But compare the correct spacing in $\alf+\alf$ with the spacing in \alf+\alf.
- Best is to typeset math things in a math mode.
+Best is to typeset math things in a math mode.
File: latex2e.info, Node: Page styles, Next: Spaces, Prev: Modes, Up: Top
@@ -13366,11 +13366,8 @@
25.2 Indexes
============
-The command '\makeindex' enables creating indexes. Put this in the
-preamble.
+This document has an index.
- This shows a document that has an index.
-
\documentclass{article}
\usepackage{makeidx} \makeindex
...
@@ -13386,14 +13383,14 @@
The '\usepackage{makeidx}' and '\makeindex' in the preamble bring in the
relevant commands.
- Producing an index is a three stage process. First you declare index
-entries with the '\index' command (*note \index::). When you run LaTeX,
-the '\index' writes its information to an auxiliary file
-'ROOT-NAME.idx'. Next, to alphabetize and to do other manipulations you
-run an external command, typically 'makeindex' or 'xindy' (*note
-makeindex::). These output a file 'ROOT-NAME.ind'. Finally, you bring
-the information back into your document and typeset it with the
-'\printindex' command (*note \printindex::).
+ Producing an index is a three stage process. First, in the document
+body you declare index entries with the '\index' command (*note
+\index::). When you run LaTeX, the '\index' writes its information to
+an auxiliary file 'ROOT-NAME.idx'. Next, to alphabetize and to do other
+manipulations you run an external command, typically 'makeindex' or
+'xindy' (*note makeindex::). These output a file 'ROOT-NAME.ind'.
+Finally, you bring the information back into your document and typeset
+it with the '\printindex' command (*note \printindex::).
There are many packages that apply to indexing commands. The
'showidx' package causes each index entries to be shown in the margin on
@@ -14208,6 +14205,18 @@
you to type a line of input. This line of input ends when you hit the
return key.
+ For example, this
+
+ As long as I live I shall never forget \typein{Enter student name:}
+
+ coupled with this command line interaction
+
+ Enter student name:
+
+ \@typein=Aphra Behn
+
+ gives the output '... never forget Aphra Behn'.
+
The first command version, '\typein{PROMPT-MSG}', causes the input
you typed to be processed as if it had been included in the input file
in place of the '\typein' command.
@@ -14215,8 +14224,20 @@
In the second command version the optional argument 'CMD' argument
must be a command name -- it must begin with a backslash, \. This
command name is then defined or redefined to be the input that you
-typed.
+typed. For example, this
+ \typein[\student]{Enter student name:}
+ \typeout{Recommendation for \student .}
+
+gives this output on the command line,
+
+ Enter student name:
+
+ \student=John Dee
+ Recommendation for John Dee.
+
+where the user has entered 'John Dee.'
+
File: latex2e.info, Node: \typeout, Prev: \typein, Up: Terminal input/output
@@ -14229,40 +14250,201 @@
Print 'msg' on the terminal and in the 'log' file.
- Commands in 'msg' that are defined with '\newcommand' or
+ This
+
+ \newcommand{\student}{John Dee}
+ \typeout{Recommendation for \student .}
+
+outputs 'Recommendation for John Dee'. Like what happens here with
+'\student', commands that are defined with '\newcommand' or
'\renewcommand' (among others) are replaced by their definitions before
being printed.
LaTeX's usual rules for treating multiple spaces as a single space
-and ignoring spaces after a command name apply to 'msg'. To get a
-single space independent of surrounding spaces, use the '\space' command
-in 'msg'. A '^^J' in 'msg' prints a newline.
+and ignoring spaces after a command name apply to 'msg'. As above, use
+the command '\space' to get a single space, independent of surrounding
+spaces. Use '^^J' to get a newline. Get a percent character with
+'\csname @percentchar\endcsname'.
+ This command can be useful for simple debugging, as here:
+
+ \newlength{\jhlength}
+ \setlength{\jhlength}{5pt}
+ \typeout{The length is \the\jhlength.}
+
+ produces on the command line 'The length is 5.0pt'.
+
File: latex2e.info, Node: Command line, Next: Document templates, Prev: Terminal input/output, Up: Top
28 Command line
***************
-The input file specification indicates the file to be formatted; TeX
-uses '.tex' as a default file extension. If you omit the input file
-entirely, TeX accepts input from the terminal. You can also specify
-arbitrary LaTeX input by starting with a backslash. For example, this
-processes 'foo.tex' without pausing after every error:
+Synopsis, one of:
- latex '\nonstopmode\input foo.tex'
+ pdflatex
+ pdflatex OPTION ... LATEX-FILENAME COMMANDS
+ pdflatex OPTION ... LATEX-FILENAME.tex COMMANDS
+ pdflatex OPTION ... FIRST-LINE-WITH-BACKSLASH
- With many, but not all, implementations, command-line options can
-also be specified in the usual Unix way, starting with '-' or '--'. For
-a list of those options, try 'latex --help'.
+ or, less often, one of:
- If LaTeX stops in the middle of the document and gives you a '*'
-prompt, it is waiting for input. You can type '\stop' (and return) and
-it will prematurely end the document.
+ latex
+ latex OPTION ... LATEX-FILENAME COMMANDS
+ latex OPTION ... LATEX-FILENAME.tex COMMANDS
+ latex OPTION ... FIRST-LINE-WITH-BACKSLASH
- *Note TeX engines::, for other system commands invoking LaTeX.
+ Run LaTeX on the input file 'LATEX-FILENAME.tex'.
+ This will run LaTeX on the file 'thesis.tex', creating the output
+'thesis.pdf'.
+
+ pdflatex thesis
+
+As in that example, '.tex' is the default file extension.
+
+ The synopsis shows two commands, 'pdflatex' and 'latex'. The
+original TeX program output a custom format, DVI. pdfTeX is a
+modification of that program. It is completely backward compatible.
+But it can output directly to PDF and so can take advantage of PDF's
+extra features such as hyperlinks, support for modern image formats such
+as JPG and PNG, and ubiquitous viewing programs. In short, if you run
+'pdflatex' then you will by default get PDF and have access to all its
+modern features, while if you run 'latex' then you will get DVI. The
+description here assumes pdfLaTeX.
+
+ If your command line invocation has no arguments or options at all
+then 'pdflatex' prompts the user for input from the terminal (escape
+from this by entering '<control>-D').
+
+ *Note Command line options:: for a selection of the most useful
+command line options.
+
+ If the first non-option argument begins with a backslash then all
+such arguments are interpreted as a line of LaTeX input (*note Command
+line input::). If it does not begin with a backslash then 'pdflatex'
+assumes it is the name of a file, which will be the job file. In this
+case, any remaining COMMANDS are processed as 'pdflatex' commands.
+
+ If LaTeX finds an error in your document then by default it stops and
+asks you about it. *Note Recovering from errors:: for an outline of
+what to do.
+
+ *Note TeX engines:: for other system commands invoking LaTeX.
+
+* Menu:
+
+* Command line options:: Read text from the terminal.
+* Command line input:: Write text to the terminal.
+* Recovering from errors:: When something goes wrong.
+
+File: latex2e.info, Node: Command line options, Next: Command line input, Up: Command line
+
+28.1 Command line options
+=========================
+
+With many implementations you can specify command line options by
+prefixing them with '-' or '--'. For instance, use '-' for TeX Live on
+GNU/Linux or MacTeX on Apple, and use '--' for MikTeX on Windows. These
+are the options relevant to ordinary document authoring. For a full
+list, try the command line command 'latex --help'.
+
+'version'
+ Show the current version, like 'pdfTeX 3.14159265-2.6-1.40.16 (TeX
+ Live 2015/Debian)', along with a small amount of additional
+ information, and exit.
+
+'help'
+ Give a brief usage message that is useful as a prompt, and exit.
+
+'interaction=[batchmode|nonstopmode|scrollmode|errorstopmode]'
+ When TeX is compiling a document it does so in one of four modes.
+ In "errorstop mode" (the default), TeX stops at each error and asks
+ for user intervention. In "batch mode" it prints nothing on the
+ terminal, errors are scrolled as if the user hit '<return>' at
+ every error, and missing files cause the job to abort. In "nonstop
+ mode" diagnostic message appear on the terminal but as in batch
+ mode there is no user interaction. In "scroll mode" TeX only stops
+ for missing files or keyboard input.
+
+ For instance, starting LaTeX with the command line 'pdflatex
+ -interaction=batchmode FILENAME' eliminates most command line
+ output.https://tex.stackexchange.com/a/128190/121234
+
+'jobname=STRING'
+ Set the value of TeX's 'jobname' to the string. The most obvious
+ effect of this is that the output file will then be 'STRING.pdf'.
+
+ When you run 'pdflatex OPTIONS ARGUMENT', if ARGUMENT does not
+ start with a backslash then TeX considers it the name of a tile
+ inputs that file. Otherwise 'pdflatex' waits for the first
+ '\input' instruction and the name of the input file will be the job
+ name, used for name of the log file and the output file. This
+ option short-circuits that process and directly specifies the name.
+ *Note Command line input:: for an example of its use.
+
+'output-directory=DIRECTORY'
+ Use the existing directory DIRECTORY to write files in.
+
+'shell-escape'
+'no-shell-escape'
+'enable-write18'
+'disable-write18'
+ Enable or disable '\write18{SHELL COMMAND}'. The first two are
+ available with TeX Live or MacTeX while the second two come with
+ MikTeX.
+
+ Sometimes you want to run external system commands from inside a
+ LaTeX file. For instance the package 'sagetex' allows you to have
+ the mathematics software system Sage do calculations or draw graphs
+ and then incorporate that output in your document. For this TeX
+ provides the '\write18' command.
+
+ But with this functionality enabled, security issues could happen
+ if you compiled a LaTeX file from the Internet. By default
+ '\write18' is disabled. (More precisely, by default TeX Live,
+ MacTeX, and MikTeX allow the execution of a limited number of
+ TeX-related programs, which they distribute.)
+
+ If you call '\write18{ls -l}' with the option 'no-shell-escape'
+ then you do not get an error, but the log file says 'runsystem(ls
+ -l)...disabled'.
+
+'halt-on-error'
+ Stop processing at the first error.
+
+'file-line-error'
+'no-file-line-error'
+ Enable or disable 'FILENAME:LINENO:ERROR'-style error messages.
+ These are only available with TeX Live or MacTeX.
+
+
+File: latex2e.info, Node: Command line input, Next: Recovering from errors, Prev: Command line options, Up: Command line
+
+28.2 Command line input
+=======================
+
+As part of the command line invocation of LaTeX you can also specify
+arbitrary input by starting with a backslash. For example, this loads
+the package 'graphicx' with the option 'draft'.
+
+ pdflatex -jobname=myfile "\RequirePackage[draft]{graphicx} \input{myfile.tex}"
+
+The graphic files are read for their size information, but not
+incorporated into the PDF.
+
+
+File: latex2e.info, Node: Recovering from errors, Prev: Command line input, Up: Command line
+
+28.3 Recovering from errors
+===========================
+
+If LaTeX stops in the middle of the document and gives you a '*' prompt,
+it is waiting for input. You can type '\stop' (and return) and it will
+prematurely end the document.
+
+
File: latex2e.info, Node: Document templates, Next: Concept Index, Prev: Command line, Up: Top
Appendix A Document templates
@@ -14514,14 +14696,15 @@
* Menu:
-* * prompt: Command line. (line 18)
+* * prompt: Recovering from errors.
+ (line 6)
* *-form of environment commands: \newenvironment & \renewenvironment.
(line 27)
* *-form of sectioning commands: Sectioning. (line 31)
* *-form, defining new commands: \newcommand & \renewcommand.
(line 25)
* .glo file: Glossaries. (line 43)
-* .idx file: Indexes. (line 9)
+* .idx file: Indexes. (line 6)
* .idx file <1>: makeindex. (line 6)
* .ind file: makeindex. (line 6)
* .isty file: makeindex. (line 18)
@@ -15131,7 +15314,7 @@
* mu, math unit: Units of length. (line 49)
* multicolumn text: \twocolumn. (line 6)
* multilingual support: Accents. (line 6)
-* multind package: Indexes. (line 35)
+* multind package: Indexes. (line 32)
* multiplication, discretionary: \*. (line 6)
* NBSP: ~. (line 6)
* nested \include, not allowed: \include & \includeonly.
@@ -15264,16 +15447,18 @@
(line 60)
* package, minted: tabbing. (line 145)
* package, minted <1>: verbatim. (line 31)
-* package, multind: Indexes. (line 35)
+* package, multind: Indexes. (line 32)
* package, pict2e: \line. (line 35)
* package, polyglossia: Accents. (line 6)
* package, polyglossia <1>: \today. (line 13)
* package, polyglossia <2>: Table of contents etc..
(line 80)
* package, polyglossia <3>: \index. (line 56)
+* package, sagetex: Command line options.
+ (line 57)
* package, setspace: Low-level font commands.
(line 118)
-* package, showidx: Indexes. (line 35)
+* package, showidx: Indexes. (line 32)
* package, siunitx: ~. (line 32)
* package, symbols: Math symbols. (line 10)
* package, textcase: Upper and lower case.
@@ -15365,7 +15550,8 @@
* pounds symbol: Text symbols. (line 49)
* preamble, defined: Starting and ending. (line 19)
* predefined lengths: Predefined lengths. (line 6)
-* prompt, *: Command line. (line 18)
+* prompt, *: Recovering from errors.
+ (line 6)
* pronunciation: Overview. (line 24)
* quad: Spacing in math mode.
(line 50)
@@ -15417,6 +15603,8 @@
* running header and footer: Page layout parameters.
(line 6)
* running header and footer style: \pagestyle. (line 6)
+* sagetex package: Command line options.
+ (line 57)
* sans serif font: Font styles. (line 86)
* Scaled point: Units of length. (line 36)
* scaling: \scalebox. (line 6)
@@ -15440,7 +15628,7 @@
(line 88)
* sharp S letters: Additional Latin letters.
(line 52)
-* showidx package: Indexes. (line 35)
+* showidx package: Indexes. (line 32)
* simulating typed text: verbatim. (line 6)
* single angle quotation marks: Text symbols. (line 31)
* single guillemets: Text symbols. (line 31)
@@ -15645,7 +15833,8 @@
* Menu:
* &: tabular. (line 32)
-* --help command-line option: Command line. (line 14)
+* --help command-line option: Command line options.
+ (line 6)
* .aux file: Output files. (line 33)
* .dvi file: Output files. (line 10)
* .lof file: Output files. (line 43)
@@ -15656,7 +15845,7 @@
* .lot file <1>: Table of contents etc..
(line 6)
* .pdf file: Output files. (line 20)
-* .tex, default extension: Command line. (line 6)
+* .tex, default extension: Command line. (line 27)
* .toc file: Output files. (line 43)
* .toc file <1>: Table of contents etc..
(line 6)
@@ -16080,7 +16269,7 @@
* \includeonly: \include & \includeonly.
(line 6)
* \indent: \indent & \noindent. (line 6)
-* \index: Indexes. (line 9)
+* \index: Indexes. (line 6)
* \index <1>: \index. (line 6)
* \indexentry: \index. (line 101)
* \indexspace: makeindex. (line 58)
@@ -16536,7 +16725,8 @@
* \stackrel: \stackrel. (line 6)
* \star: Math symbols. (line 695)
* \stepcounter: \stepcounter. (line 6)
-* \stop: Command line. (line 18)
+* \stop: Recovering from errors.
+ (line 6)
* \strut: \strut. (line 6)
* \subparagraph: Sectioning. (line 6)
* \subparagraph <1>: \subsubsection & \paragraph & \subparagraph.
@@ -16795,6 +16985,8 @@
* delim_r: makeindex. (line 126)
* description: \newglossaryentry. (line 46)
* description environment: description. (line 6)
+* disable-write18: Command line options.
+ (line 52)
* displaymath environment: displaymath. (line 6)
* displaymath environment <1>: Math formulas. (line 6)
* document environment: document. (line 6)
@@ -16804,6 +16996,8 @@
* dvips command: Output files. (line 10)
* dvitype command: Output files. (line 10)
* em: Units of length. (line 38)
+* enable-write18: Command line options.
+ (line 51)
* enumerate environment: enumerate. (line 6)
* environment, abstract: abstract. (line 6)
* environment, array: array. (line 6)
@@ -16846,6 +17040,8 @@
* executivepaper option: Document class options.
(line 19)
* figure environment: figure. (line 6)
+* file-line-error: Command line options.
+ (line 76)
* filecontents environment: filecontents. (line 6)
* filecontents* environment: filecontents. (line 6)
* final option: Document class options.
@@ -16859,6 +17055,10 @@
* frame, line width: \fbox & \framebox. (line 38)
* frame, separation from contents: \fbox & \framebox. (line 43)
* group_skip: makeindex. (line 57)
+* halt-on-error: Command line options.
+ (line 73)
+* help: Command line options.
+ (line 17)
* <http://puszcza.gnu.org.ua/software/latexrefman/> home page: About this document.
(line 6)
* in: Units of length. (line 17)
@@ -16866,6 +17066,8 @@
* indent_length <number>: makeindex. (line 138)
* indent_space: makeindex. (line 134)
* index, style file: makeindex. (line 18)
+* interaction=[batchmode|nonstopmode|scrollmode|errorstopmode]: Command line options.
+ (line 20)
* itemize environment: itemize. (line 6)
* item_0: makeindex. (line 81)
* item_01: makeindex. (line 90)
@@ -16874,6 +17076,8 @@
* item_2: makeindex. (line 87)
* item_x1: makeindex. (line 94)
* item_x2 <string>: makeindex. (line 104)
+* jobname=STRING: Command line options.
+ (line 34)
* landscape option: Document class options.
(line 49)
* latex command: Output files. (line 10)
@@ -16904,6 +17108,10 @@
* mm: Units of length. (line 27)
* mu: Units of length. (line 49)
* name: \newglossaryentry. (line 43)
+* no-file-line-error: Command line options.
+ (line 77)
+* no-shell-escape: Command line options.
+ (line 50)
* notitlepage option: Document class options.
(line 49)
* onecolumn option: Document class options.
@@ -16916,6 +17124,8 @@
(line 49)
* openright option: Document class options.
(line 78)
+* output-directory=DIRECTORY: Command line options.
+ (line 46)
* page_precedence: makeindex. (line 143)
* pc: Units of length. (line 14)
* pdflatex command: Output files. (line 20)
@@ -16929,6 +17139,8 @@
* report class: Document classes. (line 11)
* secnumdepth: Sectioning. (line 61)
* secnumdepth counter: Sectioning. (line 62)
+* shell-escape: Command line options.
+ (line 49)
* slides class: Document classes. (line 11)
* sloppypar: sloppypar. (line 6)
* sort: \newglossaryentry. (line 55)
@@ -16958,6 +17170,8 @@
* usrguide official documentation: About this document. (line 36)
* verbatim environment: verbatim. (line 6)
* verse environment: verse. (line 6)
+* version: Command line options.
+ (line 12)
* xdvi command: Output files. (line 10)
* xdvipdfmx: TeX engines. (line 38)
* xelatex command: TeX engines. (line 38)
@@ -17159,108 +17373,111 @@
Node: \stackrel355265
Node: Modes355538
Node: \ensuremath358152
-Node: Page styles358869
-Node: \maketitle359632
-Node: \pagenumbering362642
-Node: \pagestyle364579
-Node: \thispagestyle368084
-Node: Spaces368471
-Node: \enspace & \quad & \qquad369912
-Node: \hspace370859
-Node: \hfill372673
-Node: \hss373729
-Node: \spacefactor374426
-Node: \@377815
-Ref: \AT377915
-Node: \frenchspacing379858
-Node: \normalsfcodes380693
-Node: \(SPACE)380940
-Node: ~382575
-Node: \thinspace & \negthinspace385054
-Node: \/385997
-Node: \hrulefill & \dotfill387303
-Node: \bigskip & \medskip & \smallskip388639
-Node: \bigbreak & \medbreak & \smallbreak390531
-Node: \strut391516
-Node: \vspace394702
-Node: \vfill396259
-Node: \addvspace397137
-Node: Boxes399134
-Node: \mbox & \makebox399970
-Node: \fbox & \framebox403145
-Node: \parbox405669
-Node: \raisebox407949
-Node: \sbox & \savebox409607
-Node: lrbox412569
-Node: \usebox413391
-Node: Color413741
-Node: Color package options414585
-Node: Color models416231
-Node: Commands for color418540
-Node: Define colors418955
-Node: Colored text419670
-Node: Colored boxes422042
-Node: Colored pages423476
-Node: Graphics424169
-Node: Graphics package options426296
-Node: Graphics package configuration429049
-Node: \graphicspath429851
-Node: \DeclareGraphicsExtensions432774
-Node: \DeclareGraphicsRule434571
-Node: Commands for graphics437760
-Node: \includegraphics438265
-Node: \rotatebox451234
-Node: \scalebox454029
-Node: \resizebox455081
-Node: Special insertions456273
-Node: Reserved characters457075
-Node: Upper and lower case458276
-Node: Symbols by font position460191
-Node: Text symbols460811
-Node: Accents464659
-Node: Additional Latin letters466674
-Ref: Non-English characters466845
-Node: \rule467862
-Node: \today468979
-Node: Splitting the input469915
-Node: \endinput471467
-Node: \include & \includeonly472734
-Node: \input476958
-Node: Front/back matter477666
-Node: Table of contents etc.477999
-Node: \addcontentsline481691
-Node: \addtocontents484407
-Node: \nofiles485967
-Node: Indexes486699
-Node: \index488401
-Node: makeindex493470
-Node: \printindex499203
-Node: Glossaries499675
-Node: \newglossaryentry501649
-Node: \gls503118
-Node: Letters503915
-Node: \address507581
-Node: \cc508392
-Node: \closing508810
-Node: \encl509087
-Node: \location509502
-Node: \makelabels509766
-Node: \name511918
-Node: \opening512159
-Node: \ps512440
-Node: \signature512729
-Node: \telephone513946
-Node: Terminal input/output514311
-Node: \typein514576
-Node: \typeout515311
-Node: Command line515918
-Node: Document templates516870
-Node: beamer template517323
-Node: article template517977
-Node: book template518404
-Node: Larger book template518885
-Node: tugboat template520371
-Node: Concept Index522742
-Node: Command Index603813
+Node: Page styles358864
+Node: \maketitle359627
+Node: \pagenumbering362637
+Node: \pagestyle364574
+Node: \thispagestyle368079
+Node: Spaces368466
+Node: \enspace & \quad & \qquad369907
+Node: \hspace370854
+Node: \hfill372668
+Node: \hss373724
+Node: \spacefactor374421
+Node: \@377810
+Ref: \AT377910
+Node: \frenchspacing379853
+Node: \normalsfcodes380688
+Node: \(SPACE)380935
+Node: ~382570
+Node: \thinspace & \negthinspace385049
+Node: \/385992
+Node: \hrulefill & \dotfill387298
+Node: \bigskip & \medskip & \smallskip388634
+Node: \bigbreak & \medbreak & \smallbreak390526
+Node: \strut391511
+Node: \vspace394697
+Node: \vfill396254
+Node: \addvspace397132
+Node: Boxes399129
+Node: \mbox & \makebox399965
+Node: \fbox & \framebox403140
+Node: \parbox405664
+Node: \raisebox407944
+Node: \sbox & \savebox409602
+Node: lrbox412564
+Node: \usebox413386
+Node: Color413736
+Node: Color package options414580
+Node: Color models416226
+Node: Commands for color418535
+Node: Define colors418950
+Node: Colored text419665
+Node: Colored boxes422037
+Node: Colored pages423471
+Node: Graphics424164
+Node: Graphics package options426291
+Node: Graphics package configuration429044
+Node: \graphicspath429846
+Node: \DeclareGraphicsExtensions432769
+Node: \DeclareGraphicsRule434566
+Node: Commands for graphics437755
+Node: \includegraphics438260
+Node: \rotatebox451229
+Node: \scalebox454024
+Node: \resizebox455076
+Node: Special insertions456268
+Node: Reserved characters457070
+Node: Upper and lower case458271
+Node: Symbols by font position460186
+Node: Text symbols460806
+Node: Accents464654
+Node: Additional Latin letters466669
+Ref: Non-English characters466840
+Node: \rule467857
+Node: \today468974
+Node: Splitting the input469910
+Node: \endinput471462
+Node: \include & \includeonly472729
+Node: \input476953
+Node: Front/back matter477661
+Node: Table of contents etc.477994
+Node: \addcontentsline481686
+Node: \addtocontents484402
+Node: \nofiles485962
+Node: Indexes486694
+Node: \index488322
+Node: makeindex493391
+Node: \printindex499124
+Node: Glossaries499596
+Node: \newglossaryentry501570
+Node: \gls503039
+Node: Letters503836
+Node: \address507502
+Node: \cc508313
+Node: \closing508731
+Node: \encl509008
+Node: \location509423
+Node: \makelabels509687
+Node: \name511839
+Node: \opening512080
+Node: \ps512361
+Node: \signature512650
+Node: \telephone513867
+Node: Terminal input/output514232
+Node: \typein514497
+Node: \typeout515752
+Node: Command line516799
+Node: Command line options519136
+Node: Command line input522647
+Node: Recovering from errors523189
+Node: Document templates523521
+Node: beamer template523974
+Node: article template524628
+Node: book template525055
+Node: Larger book template525536
+Node: tugboat template527022
+Node: Concept Index529393
+Node: Command Index610866
End Tag Table
Modified: trunk/latex2e.pdf
===================================================================
(Binary files differ)
Modified: trunk/latex2e.texi
===================================================================
--- trunk/latex2e.texi 2018-06-27 15:05:18 UTC (rev 663)
+++ trunk/latex2e.texi 2018-06-27 19:42:18 UTC (rev 664)
@@ -20,7 +20,6 @@
@c xx merge permuted-index
@c xx merge latex-manual from savannah
@c xx merge display style math
- at c xx JH Discuss restricted execution
@c xx JH explain nfss somewhere
@c xx JH expand BiBTeX
@c xx JH expand theorem, AMS math
@@ -12015,11 +12014,12 @@
Caution: the @code{\ensuremath} command is useful but not a panacea.
@example
-\newcommand@{\alf2@}@{\ensuremath@{\alpha2@}@}
+\newcommand@{\alf@}@{\ensuremath@{\alpha@}@}
You get an alpha in text mode: \alf.
But compare the correct spacing in $\alf+\alf$ with the spacing in \alf+\alf.
@end example
+ at noindent
Best is to typeset math things in a math mode.
@@ -16455,13 +16455,10 @@
@cindex indexes
@findex \makeindex
-The command @code{\makeindex} enables creating indexes. Put this in
-the preamble.
-
@findex \index
@cindex @file{.idx} file
-This shows a document that has an index.
+This document has an index.
@example
\documentclass@{article@}
@@ -16481,15 +16478,15 @@
The @code{\usepackage@{makeidx@}} and @code{\makeindex} in the preamble
bring in the relevant commands.
-Producing an index is a three stage process. First you declare index
-entries with the @code{\index} command (@pxref{\index}). When you run
- at LaTeX{}, the @code{\index} writes its information to an auxiliary file
- at file{@var{root-name}.idx}. Next, to alphabetize and to do other
-manipulations you run an external command, typically @command{makeindex}
-or @command{xindy} (@pxref{makeindex}). These output a file
- at file{@var{root-name}.ind}. Finally, you bring the information back
-into your document and typeset it with the @code{\printindex} command
-(@pxref{\printindex}).
+Producing an index is a three stage process. First, in the document
+body you declare index entries with the @code{\index} command
+(@pxref{\index}). When you run @LaTeX{}, the @code{\index} writes its
+information to an auxiliary file @file{@var{root-name}.idx}. Next, to
+alphabetize and to do other manipulations you run an external command,
+typically @command{makeindex} or @command{xindy} (@pxref{makeindex}).
+These output a file @file{@var{root-name}.ind}. Finally, you bring the
+information back into your document and typeset it with the
+ at code{\printindex} command (@pxref{\printindex}).
@PkgIndex{showidx}
@PkgIndex{multind}
@@ -17465,6 +17462,22 @@
wait for you to type a line of input. This line of input ends when you
hit the return key.
+For example, this
+
+ at example
+As long as I live I shall never forget \typein@{Enter student name:@}
+ at end example
+
+coupled with this command line interaction
+
+ at example
+Enter student name:
+
+\@@typein=Aphra Behn
+ at end example
+
+gives the output @samp{... never forget Aphra Behn}.
+
The first command version, @code{\typein@{@var{prompt-msg}@}}, causes
the input you typed to be processed as if it had been included in the
input file in place of the @code{\typein} command.
@@ -17472,9 +17485,27 @@
In the second command version the optional argument @code{@var{cmd}}
argument must be a command name --- it must begin with a backslash, \.
This command name is then defined or redefined to be the input that you
-typed.
+typed. For example, this
+ at example
+\typein[\student]@{Enter student name:@}
+\typeout@{Recommendation for \student .@}
+ at end example
+ at noindent
+gives this output on the command line,
+
+ at example
+Enter student name:
+
+\student=John Dee
+Recommendation for John Dee.
+ at end example
+
+ at noindent
+where the user has entered @samp{John Dee.}
+
+
@node \typeout
@section @code{\typeout}
@@ -17488,39 +17519,218 @@
Print @code{msg} on the terminal and in the @code{log} file.
-Commands in @code{msg} that are defined with @code{\newcommand} or
+This
+
+ at example
+\newcommand@{\student@}@{John Dee@}
+\typeout@{Recommendation for \student .@}
+ at end example
+
+ at noindent
+outputs @samp{Recommendation for John Dee}. Like what happens here with
+ at code{\student}, commands that are defined with @code{\newcommand} or
@code{\renewcommand} (among others) are replaced by their definitions
before being printed.
@LaTeX{}'s usual rules for treating multiple spaces as a single space
-and ignoring spaces after a command name apply to @code{msg}. To get
-a single space independent of surrounding spaces, use the
- at code{\space} command in @code{msg}. A @code{^^J} in
- at code{msg} prints a newline.
+and ignoring spaces after a command name apply to @code{msg}. As above,
+use the command @code{\space} to get a single space, independent of
+surrounding spaces. Use @code{^^J} to get a newline. Get a percent
+character with @code{\csname @@percentchar\endcsname}.
+This command can be useful for simple debugging, as here:
+ at example
+\newlength@{\jhlength@}
+\setlength@{\jhlength@}@{5pt@}
+\typeout@{The length is \the\jhlength.@}
+ at end example
+
+produces on the command line @samp{The length is 5.0pt}.
+
+
@node Command line
@chapter Command line
+ at c https://tex.stackexchange.com/q/220091/121234
+ at c backslashes on Windows https://tex.stackexchange.com/q/86707/121234
+ at c texdoc https://tex.stackexchange.com/a/22967/121234
+ at c example of passing options to a package https://tex.stackexchange.com/a/17236/121234
+ at c etoolbox WR https://tex.stackexchange.com/a/5896/121234
@cindex command line
- at findex .tex, @r{default extension}
-The input file specification indicates the file to be formatted;
- at TeX{} uses @file{.tex} as a default file extension. If you omit the
-input file entirely, @TeX{} accepts input from the terminal. You can
-also specify arbitrary @LaTeX{} input by starting with a backslash.
-For example, this processes @file{foo.tex} without pausing after every
-error:
+Synopsis, one of:
@example
-latex '\nonstopmode\input foo.tex'
+pdflatex
+pdflatex @var{option} ... @var{latex-filename} @var{commands}
+pdflatex @var{option} ... @var{latex-filename}.tex @var{commands}
+pdflatex @var{option} ... @var{first-line-with-backslash}
@end example
+or, less often, one of:
+
+ at example
+latex
+latex @var{option} ... @var{latex-filename} @var{commands}
+latex @var{option} ... @var{latex-filename}.tex @var{commands}
+latex @var{option} ... @var{first-line-with-backslash}
+ at end example
+
+Run @LaTeX{} on the input file @file{@var{latex-filename}.tex}.
+
+This will run @LaTeX{} on the file @file{thesis.tex}, creating the
+output @file{thesis.pdf}.
+
+ at example
+ at command{pdflatex} thesis
+ at end example
+
+ at noindent
+ at findex .tex, @r{default extension}
+As in that example, @file{.tex} is the default file extension.
+
+The synopsis shows two commands, @command{pdflatex} and @code{latex}.
+The original @TeX{} program output a custom format, DVI. pdf at TeX{} is a
+modification of that program. It is completely backward compatible.
+But it can output directly to PDF and so can take advantage of PDF's
+extra features such as hyperlinks, support for modern image formats such
+as JPG and PNG, and ubiquitous viewing programs. In short, if you run
+ at command{pdflatex} then you will by default get PDF and have access to
+all its modern features, while if you run @command{latex} then you will
+get DVI. The description here assumes pdf at LaTeX{}.
+
+If your command line invocation has no arguments or options at all then
+ at command{pdflatex} prompts the user for input from the terminal (escape
+from this by entering @code{<control>-D}).
+
+ at xref{Command line options} for a selection of the most useful command
+line options.
+
+If the first non-option argument begins with a backslash then all such
+arguments are interpreted as a line of @LaTeX{} input (@pxref{Command
+line input}). If it does not begin with a backslash then
+ at command{pdflatex} assumes it is the name of a file, which will be the
+job file. In this case, any remaining @var{commands} are processed as
+ at command{pdflatex} commands.
+
+If @LaTeX{} finds an error in your document then by default it stops and
+asks you about it. @xref{Recovering from errors} for an outline of what
+to do.
+
+ at xref{@TeX{} engines} for other system commands invoking @LaTeX{}.
+
+ at menu
+* Command line options:: Read text from the terminal.
+* Command line input:: Write text to the terminal.
+* Recovering from errors:: When something goes wrong.
+ at end menu
+
+
+ at node Command line options
+ at section Command line options
+
@findex --help @r{command-line option}
-With many, but not all, implementations, command-line options can also
-be specified in the usual Unix way, starting with @samp{-} or
- at samp{--}. For a list of those options, try @samp{latex --help}.
+With many implementations you can specify command line options
+by prefixing them with @samp{-} or @samp{--}.
+For instance, use @samp{-} for TeX Live on GNU/Linux or MacTeX on Apple,
+and use @samp{--} for MikTeX on Windows.
+These are the options relevant to ordinary document authoring. For a
+full list, try the command line command @samp{latex --help}.
+ at ftable @code
+ at item version
+Show the current version, like @samp{pdfTeX 3.14159265-2.6-1.40.16 (TeX
+Live 2015/Debian)}, along with a small amount of additional information,
+and exit.
+
+ at item help
+Give a brief usage message that is useful as a prompt, and exit.
+
+ at item interaction=[batchmode|nonstopmode|scrollmode|errorstopmode]
+When @TeX{} is compiling a document it does so in one of four modes. In
+ at dfn{errorstop mode} (the default), @TeX{} stops at each error and asks
+for user intervention. In @dfn{batch mode} it prints nothing on the
+terminal, errors are scrolled as if the user hit @code{<return>} at
+every error, and missing files cause the job to abort. In @dfn{nonstop
+mode} diagnostic message appear on the terminal but as in batch mode
+there is no user interaction. In @dfn{scroll mode} @TeX{} only stops
+for missing files or keyboard input.
+
+For instance, starting @LaTeX{} with the command line @code{pdflatex
+-interaction=batchmode @var{filename}} eliminates most command line
+output.https://tex.stackexchange.com/a/128190/121234
+
+ at item jobname=@var{string}
+Set the value of @TeX{}'s @code{jobname} to the string. The most
+obvious effect of this is that the output file will then be
+ at file{@var{string}.pdf}.
+
+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 tile inputs that file. Otherwise @command{pdflatex} waits
+for the first @code{\input} instruction and the name of the input file
+will be the job name, used for name of the log file and the output file.
+This option short-circuits that process and directly specifies the name.
+ at xref{Command line input} for an example of its use.
+
+ at item output-directory=@var{directory}
+Use the existing directory @var{directory} to write files in.
+
+ at item shell-escape
+ at itemx no-shell-escape
+ at itemx enable-write18
+ at itemx disable-write18
+Enable or disable @code{\write18@{@var{shell command}@}}. The first two
+are available with @TeX{} Live or Mac at TeX{} while the second two come
+with Mik at TeX{}.
+
+ at PkgIndex{sagetex}
+Sometimes you want to run external system commands from inside a
+ at LaTeX{} file. For instance the package @file{sagetex} allows you to
+have the mathematics software system @i{Sage} do calculations or draw
+graphs and then incorporate that output in your document. For this
+ at TeX{} provides the @code{\write18} command.
+
+But with this functionality enabled, security issues could happen if you
+compiled a @LaTeX{} file from the Internet. By default @code{\write18}
+is disabled. (More precisely, by default @TeX{} Live, Mac at TeX{}, and
+Mik at TeX{} allow the execution of a limited number of @TeX{}-related
+programs, which they distribute.)
+
+If you call @code{\write18@{ls -l@}} with the option
+ at code{no-shell-escape} then you do not get an error, but the log file
+says @samp{runsystem(ls -l)...disabled}.
+
+ at item halt-on-error
+Stop processing at the first error.
+
+ at item file-line-error
+ at item no-file-line-error
+Enable or disable @code{@var{filename}:@var{lineno}:@var{error}}-style
+error messages. These are only available with @TeX{} Live or Mac at TeX{}.
+ at end ftable
+
+
+ at node Command line input
+ at section Command line input
+
+As part of the command line invocation of @LaTeX{} you can also specify
+arbitrary input by starting with a backslash. For example,
+this loads the package @file{graphicx} with the option @code{draft}.
+
+ at example
+pdflatex -jobname=myfile "\RequirePackage[draft]@{graphicx@} \input@{myfile.tex@}"
+ at end example
+
+ at noindent
+The graphic files are read for their size information, but not incorporated
+into the PDF.
+
+
+ at node Recovering from errors
+ at section Recovering from errors
+
@cindex @samp{*} prompt
@cindex prompt, @samp{*}
@findex \stop
@@ -17528,7 +17738,6 @@
@samp{*} prompt, it is waiting for input. You can type @code{\stop}
(and return) and it will prematurely end the document.
- at xref{@TeX{} engines}, for other system commands invoking @LaTeX{}.
@node Document templates
More information about the latexrefman-commits
mailing list