summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex')
-rw-r--r--Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex50
1 files changed, 38 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex b/Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex
index 81364b18cf9..abb3b737f5f 100644
--- a/Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex
+++ b/Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex
@@ -19,7 +19,9 @@
\texttt{latexindent.pl} ships with \texttt{latexindent.exe} for Windows
users, so that you can use the script with or without a Perl distribution.
If you plan to use \texttt{latexindent.pl} (i.e, the original Perl script) then you will
- need a few standard Perl modules -- see \vref{sec:requiredmodules} for details.
+ need a few standard Perl modules -- see \vref{sec:requiredmodules} for details;
+ \announce*{2018-01-13}{perl module installer helper script} in particular, note
+ that a module installer helper script is shipped with \texttt{latexindent.pl}.
\subsection{From the command line}\label{sec:commandline}
\texttt{latexindent.pl} has a number of different switches/flags/options, which
@@ -31,13 +33,6 @@
but other additional information will be written depending
on which of the following options are used.
- \begin{commandshell}
-latexindent.pl
- \end{commandshell}
-
- This will output a welcome message to the terminal, including the version number
- and available options.
-
\flagbox{-v, --version}
\announce{2017-06-25}{version}
\begin{commandshell}
@@ -199,7 +194,7 @@ latexindent.pl myfile.tex -l=first.yaml,second.yaml,third.yaml
The \texttt{-l} flag can take an \emph{optional} parameter which details the name (or names separated by commas) of a YAML file(s)
that resides in the same directory as \texttt{myfile.tex}; you can use this option if you would
like to load a settings file in the current working directory that is \emph{not} called \texttt{localSettings.yaml}.
- \announce*{2017-08-21}*{-l switch absolute paths} In fact, you can specify both \emph{relative} and \emph{absolute paths} for your YAML files;
+ \announce{2017-08-21}*{-l switch absolute paths} In fact, you can specify both \emph{relative} and \emph{absolute paths} for your YAML files;
for example
\begin{commandshell}
latexindent.pl -l=../../myyaml.yaml myfile.tex
@@ -247,7 +242,7 @@ latexindent.pl myfile.tex -y='modifyLineBreaks:environments:EndStartsOnOwnLine:3
latexindent.pl myfile.tex -y='modifyLineBreaks:environments:one:EndStartsOnOwnLine:3' -m
\end{commandshell}
\label{page:yamlswitch}You%
- \announce*{2017-08-21}{the -y switch} can specify YAML settings from the command line using the \texttt{-y} or \texttt{--yaml} switch;
+ \announce{2017-08-21}{the -y switch} can specify YAML settings from the command line using the \texttt{-y} or \texttt{--yaml} switch;
sample demonstrations are given above. Note, in particular, that multiple settings can be specified by separating them
via commas. There is a further option to use a \texttt{;} to separate fields, which is demonstrated in \vref{sec:yamlswitch}.
@@ -265,7 +260,7 @@ latexindent.pl -d myfile.tex
call the script with the \texttt{-d} switch; note that this will also tell
the script to ignore \texttt{localSettings.yaml} even if it has been called with the
\texttt{-l} switch; \texttt{latexindent.pl}%
- \announce*{2017-08-21}*{updated -d switch} will also ignore any settings specified
+ \announce{2017-08-21}*{updated -d switch} will also ignore any settings specified
from the \texttt{-y} switch.
\flagbox{-c, --cruft=<directory>}
@@ -278,7 +273,7 @@ latexindent.pl -c=/path/to/directory/ myfile.tex
to another directory.
% this switch was made as a result of http://tex.stackexchange.com/questions/142652/output-latexindent-auxiliary-files-to-a-different-directory
-\flagbox{-g, --logfile}
+\flagbox{-g, --logfile=<name of log file>}
\begin{commandshell}
latexindent.pl -g=other.log myfile.tex
latexindent.pl -g other.log myfile.tex
@@ -289,6 +284,15 @@ latexindent.pl myfile.tex -g other.log
By default, \texttt{latexindent.pl} reports information to \texttt{indent.log}, but if you wish to change the
name of this file, simply call the script with your chosen name after the \texttt{-g} switch as demonstrated above.
+\flagbox{-sl, --screenlog}
+ \begin{commandshell}
+latexindent.pl -sl myfile.tex
+latexindent.pl -screenlog myfile.tex
+ \end{commandshell}
+ Using this%
+ \announce*{2018-01-13}{screenlog switch created} option tells \texttt{latexindent.pl} to output the log file to the screen, as well
+ as to your chosen log file.
+
\flagbox{-m, --modifylinebreaks}
\begin{commandshell}
latexindent.pl -m myfile.tex
@@ -306,6 +310,28 @@ latexindent.pl myfile
and in which case, you can specify
the order in which extensions are searched for; see \vref{lst:fileExtensionPreference}
for full details.
+\flagbox{STDIN}
+ \begin{commandshell}
+cat myfile.tex | latexindent.pl
+ \end{commandshell}
+ \texttt{latexindent.pl} will%
+ \announce*{2018-01-13}{STDIN allowed} allow input from STDIN, which means that you can pipe output from
+ other commands directly into the script. For example assuming that you have content in \texttt{myfile.tex}, then the above
+ command will output the results of operating upon \texttt{myfile.tex}
+
+ Similarly, if you%
+ \announce*{2018-01-13}*{no options/filename updated} simply type \texttt{latexindent.pl}
+ at the command line, then it will expect (STDIN) input from the command line.
+ \begin{commandshell}
+latexindent.pl
+ \end{commandshell}
+
+ Once you have finished typing your input, you can press
+ \begin{itemize}
+ \item \texttt{CTRL+D} on Linux
+ \item \texttt{CTRL+Z} followed by \texttt{ENTER} on Windows
+ \end{itemize}
+ to signify that your input has finished.
\subsection{From \texttt{arara}}\label{sec:arara}
Using \texttt{latexindent.pl} from the command line is fine for some folks, but