[latexrefman-commits] [SCM] latexrefman updated: r768 - trunk

vincentb1 at gnu.org.ua vincentb1 at gnu.org.ua
Sun Mar 29 15:07:53 CEST 2020


Author: vincentb1
Date: 2020-03-29 16:07:53 +0300 (Sun, 29 Mar 2020)
New Revision: 768

Modified:
   trunk/latex2e-fr.texi
Log:
Insert w/o translation yet ?\194?\171?\194?\160Command line?\194?\160?\194?\187 subnodes.

* latex2e-fr.texi (Command line): Update translation (not yet complete though).
(Command line options, Command line input)
(Recovering from errors): Inserted w/o translation.


Modified: trunk/latex2e-fr.texi
===================================================================
--- trunk/latex2e-fr.texi	2020-03-29 13:00:16 UTC (rev 767)
+++ trunk/latex2e-fr.texi	2020-03-29 13:07:53 UTC (rev 768)
@@ -13603,6 +13603,26 @@
 @chapter Ligne de commande
 @cindex ligne de commande
 
+Synopsis (depuis la ligne de commande d'un terminal) :
+
+ at example
+pdflatex @var{options} @var{argument}
+ at end example
+
+Exéute @LaTeX{} sur @var{argument}. À la place de @command{pdflatex}
+vous pouvez aussi utiliser @command{xelatex}, ou @command{lualatex}, ou
+ at command{latex}.
+
+L'exemple suivant exécute @LaTeX{} sur le fichier @file{these.tex}
+produisant en sortie @file{these.pdf}.
+
+ at example
+pdflatex these
+ at end example
+
+
+ at ignore
+
 La spécification du fichier d'entrée indique le fichier à être formaté ;
 @TeX{} utilise @file{.tex} comme extension de fichier par défaut.  Si
 vous omettez complètment le fichier d'entrée, @TeX{} accèpte en entrée
@@ -13627,6 +13647,289 @@
 
 @xref{@TeX{} engines}, pour les autres commandes système invoquant @LaTeX{}.
 
+ at end ignore
+
+ at c xxx à traduire
+
+ at noindent
+ at findex .tex, @r{default extension}
+Note that @file{.tex} is the default file extension.
+
+pdf at TeX{} is a development of the original @TeX{} program, as are
+Xe at TeX{} and Lua at TeX{} (@pxref{@TeX{} engines}).  They are completely
+backward compatible.  But the original program had a custom output
+format, DVI, while the newer ones can output directly to PDF.  This
+allows them to take advantage of the extra features in PDF such as
+hyperlinks, support for modern image formats such as JPG and PNG, and
+ubiquitous viewing programs.  In short, if you run @command{pdflatex} or
+ at command{xelatex} or @command{lualatex} then you will by default get PDF
+and have access to all its modern features.  If you run @command{latex},
+or @code{dvilualatex}, then you will get DVI.  The description here
+assumes pdf at LaTeX{}.
+
+ at xref{Command line options}, for a selection of the most useful
+command line options. As to @var{argument}, the usual case is that it
+does not begin with a backslash, so the system takes it to be the name
+of a file and it compiles that file. If @var{argument} begins with a
+backslash then the system will interpret it as a line of @LaTeX{}
+input, which can be used for special effects (@pxref{Command line
+input}).
+
+If you gave no arguments or options then @command{pdflatex} prompts for
+input from the terminal. You can escape from this by entering
+ at code{<control>-D}.
+
+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 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 c xxx À traduire
+ at section Command line options
+
+ at cindex options, command line
+
+These are the command-line options relevant to ordinary document
+authoring. For a full list, try running @samp{latex --help} from the
+command line.
+
+With many implementations you can specify command line options by
+prefixing them with @samp{-} or @samp{--}.  This is the case for
+both @TeX{} Live (and Mac at TeX{}) and MiK at TeX{}.  We will use both
+conventions interchangeably.
+
+ at table @code
+ at findex --version @r{command-line option}
+ 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 findex --help @r{command-line option}
+ at item -help
+Give a brief usage message that is useful as a prompt and exit.
+
+ at findex --interaction @r{command-line option}
+ at item -interaction=@var{mode}
+ at TeX{} compiles a document in one of four interaction modes:
+ at code{batchmode}, @code{nonstopmode}, @code{scrollmode},
+ at code{errorstopmode}. In @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
+ at dfn{scroll mode}, @TeX{} only stops for missing files or keyboard
+input.
+
+For instance, starting @LaTeX{} with this command line
+
+ at example
+pdflatex -interaction=batchmode @var{filename}
+ at end example
+
+ at noindent
+eliminates most terminal output.
+
+ at cindex jobname
+ at cindex filename for current job
+ at findex --jobname @r{command-line option}
+ at item -jobname=@var{string}
+Set the value of @TeX{}'s @code{jobname} to the string.  The log file
+and output file will then be named @file{@var{string}.log} and
+ 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 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 anchor{output directory}
+ at cindex output directory for all external files
+ at findex --output-directory @r{command-line option}
+ at item -output-directory=@var{directory}
+Write files in the directory @var{directory}.  It must already exist.
+This applies to all external files created by @TeX{} or @LaTeX{}, such
+as the @file{.log} file for the run, the @file{.aux}, @file{.toc},
+etc., files created by @LaTeX{}, as well as the main @file{.pdf} or
+ at file{.dvi} output file itself.
+
+When specified, the output directory @var{directory} is also
+automatically checked first for any file that it is input, so that the
+external files can be read back in, if desired. The true current
+directory (in which @LaTeX{}) was run remains unchanged, and is also
+checked for input files.
+
+ at cindex shell escape
+ at findex --shell-escape @r{command-line option}
+ at findex --no-shell-escape @r{command-line option}
+ at findex --enable-write18 @r{command-line option}
+ at findex --disable-write18 @r{command-line option}
+ 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}@}}
+(@pxref{\write18}).  The first two options are for with @TeX{} Live or
+Mac at TeX{} while the second two are for 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,
+unrestricted @code{\write18} is not allowed.  (The default for @TeX{}
+Live, Mac at TeX{}, and MiK at TeX{} is to allow the execution of a limited
+number of @TeX{}-related programs, which they distribute.)
+
+For example, if you invoke @LaTeX{} with the option
+ at code{no-shell-escape}, and in your document you call
+ at code{\write18@{ls -l@}}, then you do not get an error but the log
+file says @samp{runsystem(ls -l)...disabled}.
+
+ at findex --halt-on-error @r{command-line option}
+ at item -halt-on-error
+Stop processing at the first error.
+
+ at findex --file-line-error @r{command-line option}
+ at findex --no-file-line-error @r{command-line option}
+ 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 table
+
+
+ at node Command line input
+ at c xxx À traduire
+ at section Command line input
+
+ at cindex input, on command line
+
+As part of the command line invocation @code{pdflatex @var{options}
+ at var{argument}} you can specify arbitrary @LaTeX{} input by starting
+ at var{argument} with a backslash. This allows you to do some special
+effects.
+
+ at PkgIndex{hyperref}
+For example, this file (which uses the @file{hyperref} package for
+hyperlinks) can produce two kinds of output, one for paper and one for a
+PDF.
+
+ at example
+\ifdefined\paperversion        % in preamble
+\newcommand@{\urlcolor@}@{black@}
+\else
+\newcommand@{\urlcolor@}@{blue@}
+\fi
+\usepackage[colorlinks=true,urlcolor=\urlcolor]@{hyperref@}
+  ...
+\href@{https://www.ctan.org@}@{CTAN@}  % in body
+  ...
+ at end example 
+
+ at noindent
+Compiling this document @file{book.tex} with the command line
+ at code{pdflatex book} will give the @samp{CTAN} link in blue.  But
+compiling it with @code{pdflatex "\def\paperversion@{@}\input book.tex"}
+has the link in black.  (Note the use of double quotes to prevent
+interpretation of the symbols by the command line shell; your system may
+do this differently.)
+
+In a similar way, from the single file @file{main.tex} you can compile
+two different versions.
+
+ at c credit Paul Gaborit: https://tex.stackexchange.com/a/220101/121234
+ at example
+pdflatex -jobname=students "\def\student@{@}\input@{main@}"
+pdflatex -jobname=teachers "\def\teachers@{@}\input@{main@}"
+ at end example
+
+ at noindent
+The @code{jobname} option is there because otherwise both files would be
+called @file{main.pdf} and the second would overwrite the first.
+
+A final example.  This loads the package @file{graphicx} with the option
+ at code{draft}
+
+ at c credit Herbert Voss: https://tex.stackexchange.com/a/17236/121234
+ at example
+pdflatex -jobname=aa "\RequirePackage[draft]@{graphicx@}\input@{aa.tex@}"
+ at end example
+
+ at noindent
+so the graphic files are read for their size information but not
+incorporated into the PDF.  (The @code{jobname} option is there because
+otherwise the output file would be @file{graphicx.pdf}, as
+ at code{\RequirePackage} does an @code{\input} of its own.)
+
+
+ at node Recovering from errors
+ at c xxx À traduire
+ at section Recovering from errors
+
+If @LaTeX{} finds an error in your document then it gives you an error
+message and prompts you with a question mark, @code{?}.  For instance,
+running @LaTeX{} on this file
+
+ at example
+\newcommand@{\NP@}@{\ensuremath@{\textbf@{NP@}@}@}
+The \PN@{@} problem is a million dollar one.
+ at end example
+
+ at noindent
+causes it show this, and wait for input.
+
+ at example
+! Undefined control sequence.
+l.5 The \PN
+           @{@} problem is a million dollar one.
+? 
+ at end example
+
+ at noindent
+The simplest thing is to enter @samp{x} and @code{<return>} and fix the
+typo.  You could instead enter @samp{?} and @code{<return>} to see other
+options.
+
+ at cindex @samp{*} prompt
+ at cindex prompt, @samp{*}
+ at findex \stop
+There are two other error scenarios.  The first is that you forgot to
+include the @code{\end@{document@}} or misspelled it.  In this case
+ at LaTeX{} gives you a @samp{*} prompt.  You can get back to the command
+line by typing @code{\stop} and @code{<return>}.
+
+The last scenario is that you mistyped the file name.  For instance,
+instead of @code{pdflatex test} you might type @code{pdflatex tste}.
+
+ at example
+! I can't find file `tste'.
+<*> tste
+        
+(Press Enter to retry, or Control-D to exit)
+Please type another input file name:
+ at end example
+
+ at noindent
+The simplest thing is to enter @code{<Control>} and @samp{d} (holding
+them down at the same time), and then retype the correct command line.
+
+
 @node Document templates
 @appendix Patrons de documents
 @cindex patron de document



More information about the latexrefman-commits mailing list.