summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-25 21:50:47 +0000
committerKarl Berry <karl@freefriends.org>2017-06-25 21:50:47 +0000
commita3d3b206eb2e58da4e00d07576e32c5bd9acbf69 (patch)
tree313d64a4fdbe9c168e5e210aedfd13312e6a1f44 /Master/texmf-dist/doc/support
parent00305c9e9703b6a03efb295fc20c04be6a65d447 (diff)
latexindent (25jun17)
git-svn-id: svn://tug.org/texlive/trunk@44695 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support')
-rw-r--r--Master/texmf-dist/doc/support/latexindent/README2
-rw-r--r--Master/texmf-dist/doc/support/latexindent/latexindent.pdfbin570961 -> 580064 bytes
-rw-r--r--Master/texmf-dist/doc/support/latexindent/latexindent.tex77
-rw-r--r--Master/texmf-dist/doc/support/latexindent/sec-default-user-local.tex18
-rw-r--r--Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex93
-rw-r--r--Master/texmf-dist/doc/support/latexindent/sec-introduction.tex4
-rw-r--r--Master/texmf-dist/doc/support/latexindent/sec-the-m-switch.tex3
7 files changed, 175 insertions, 22 deletions
diff --git a/Master/texmf-dist/doc/support/latexindent/README b/Master/texmf-dist/doc/support/latexindent/README
index a55d4c72804..fd6048669ed 100644
--- a/Master/texmf-dist/doc/support/latexindent/README
+++ b/Master/texmf-dist/doc/support/latexindent/README
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- latexindent.pl, version 3.2, 2017-06-19
+ latexindent.pl, version 3.2.1, 2017-06-25
PERL script to indent code within environments, and align delimited
environments in .tex files.
diff --git a/Master/texmf-dist/doc/support/latexindent/latexindent.pdf b/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
index 1df40469213..33903c4df03 100644
--- a/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
+++ b/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/latexindent/latexindent.tex b/Master/texmf-dist/doc/support/latexindent/latexindent.tex
index 8dffa3fa4e6..ceedc72719b 100644
--- a/Master/texmf-dist/doc/support/latexindent/latexindent.tex
+++ b/Master/texmf-dist/doc/support/latexindent/latexindent.tex
@@ -16,7 +16,7 @@
%
% See <http://www.gnu.org/licenses/>.
\usepackage[left=4.5cm,right=2.5cm,showframe=false,
- top=2cm,bottom=1.5cm]{geometry} % page setup
+ top=2cm,bottom=1.5cm,marginparsep=2cm]{geometry} % page setup
\usepackage{lmodern}
\usepackage{parskip} % paragraph skips
\usepackage{booktabs} % beautiful tables
@@ -31,6 +31,7 @@
\usepackage[sc,format=hang,font=small]{caption} % captions
\usepackage[backend=bibtex]{biblatex} % bibliography
\usepackage{tcolorbox} % framed environments
+\usepackage{tikz}
\usepackage{xparse}
\usepackage[charter]{mathdesign} % changes font
\usepackage[expansion=false,kerning=true]{microtype} % better kerning
@@ -39,16 +40,12 @@
\usepackage{array}
% setup gitinfo2, as in the manual, details just above begin{document}
\usepackage[mark,grumpy]{gitinfo2}
-% tcolorbox libraries
-\tcbuselibrary{breakable,skins,listings,minted,xparse}
-%\usepackage{varioref} % clever referencing
-%\tcbuselibrary{documentation,breakable,skins,minted}
-% tikz libraries
+% tikz, tcolorbox libraries
\usetikzlibrary{positioning}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations,shapes}
-\usepackage{varioref} % clever referencing
-\usepackage{hyperref}
+\usepackage{varioref} % the documentation library from tcolorbox loads hyperref
+\tcbuselibrary{breakable,minted,xparse,documentation}
\hypersetup{
pdfauthor={Chris Hughes},
pdftitle={latexindent.pl package},
@@ -62,6 +59,21 @@
}
\usepackage{cleveref}
+% customise the \tcbdocnew command
+\tcbset{doclang/new={{\bfseries\color{green!50!black}N\normalfont\color{black}}}}
+\tcbset{doc marginnote={width=1.6cm}}
+%\newcommand{\announce}[1]{\tcbdocmarginnote{\tcbdocnew{#1}}}
+\NewDocumentCommand{\announce}{ s m }{%
+ \IfBooleanTF{#1}
+ {% \announce*
+ \tcbdocmarginnote[overlay={\node[anchor=north east,text=cmhgold] at ([yshift=3mm,xshift=4mm]frame.north east) {$\bigstar$}; }]{\tcbdocnew{#2}}
+ }
+ {% \announce
+ \tcbdocmarginnote{\tcbdocnew{#2}}
+ }}
+
+\reversemarginpar
+% bibliographies
\addbibresource{latex-indent}
\addbibresource{contributors}
@@ -404,7 +416,7 @@
\newcommand{\flagbox}[1]{%
\par
\makebox[30pt][l]{%
- \hspace{-2cm}%
+ \hspace{-1cm}%
\ttfamily\fontseries{b}\selectfont #1
}%
}
@@ -539,7 +551,7 @@
sharp corners,
enhanced,
overlay={\node[anchor=north east,outer sep=2pt] at ([xshift=3cm,yshift=4mm]frame.north east) {\includegraphics[width=3cm]{logo}}; }]
- \centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.2
+ \centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.2.1
\end{tcolorbox}
}
\author{Chris Hughes \thanks{and contributors! See \vref{sec:contributors}. For
@@ -583,3 +595,48 @@
\input{references}
\input{appendices}
\end{document}
+
+version history:
+
+1.0: first release
+https://www.ctan.org/ctan-ann/id/mailman.278.1369470527.5851.ctan-ann@dante.de
+
+1.1R
+Changed Bin to RealBin so that I hope the script can get bun­dled into TeXLive 2013. Some other up­dates, too, detailed in the documentation.
+https://www.ctan.org/ctan-ann/id/mailman.3048.1384345731.2385.ctan-ann@dante.de
+
+1.11R
+This release updates the script to use $FindBin::RealBin which should help in the TeXLive implementation.
+
+Version 2.0R
+Ver­sion 2.0R of la­texin­dent.pl adds a num­ber of new fea­tures, in­clud­ing: - in­den­ta­tion af­ter \item com­mands - align­ment of de­lim­itered en­vi­ron­ments in com­mands, such as \ma­trix - in­den­ta­tion of \if...\else...\fi state­ments - max­i­mum num­ber of back­ups can cy­cle through back­ups - bet­ter sup­port for .cls and .sty files - and a few other bug fixes
+https://www.ctan.org/ctan-ann/id/mailman.3090.1417864461.4370.ctan-ann@dante.de
+
+Version 2.1R
+in­dent­con­fig.yaml can now be a 'hid­den' file, .in­dent­con­fig.yaml The Win­dows ex­e­cutable file, la­texin­dent.exe, should now work much bet­ter with Win­dows TeXLive.
+https://www.ctan.org/ctan-ann/id/mailman.343.1429509943.4405.ctan-ann@dante.de
+
+Version 2.2
+v2.2 addresses a reg­exp issue, and adds a few enhancements; full details are here: https://github.com/cmhughes/latexindent.pl/pull/49
+https://www.ctan.org/ctan-ann/id/mailman.198.1477655196.4574.ctan-ann@ctan.org
+
+Version 3.0
+latexindent.pl version 3.0: this represents a complete re-build of the script; full details are given here:
+https://github.com/cmhughes/la­texin­dent.pl/pull/56
+
+V3.0.1
+pro­vides sup­port for the align­ment at am­per­sands rou­tine for code that con­tains uni­code char­ac­ters; see
+https://github.com/cmhughes/la­texin­dent.pl/pull/61
+
+V3.0.2
+A mi­nor re­lease to fix a small bug re­lated to in­den­tPream­ble; de­tails given here:
+https://github.com/cmhughes/la­texin­dent.pl/pull/62
+
+Ver­sion 3.1 of la­texin­dent.pl,
+in­clud­ing op­tions for text wrap­ping and para­graph line break re­moval. Full de­tails here:
+https://github.com/cmhughes/la­texin­dent.pl/pull/64
+
+Ver­sion 3.2
+im­ple­ments a new fea­ture called 'mul­ti­Colum­nGroup­ing' which gives a new op­tion for the align­ment-at-am­per­sands rou­tine.
+More de­tails are given at
+https://github.com/cmhughes/la­texin­dent.pl/pull/67
diff --git a/Master/texmf-dist/doc/support/latexindent/sec-default-user-local.tex b/Master/texmf-dist/doc/support/latexindent/sec-default-user-local.tex
index ff99480cc80..70496f1bc35 100644
--- a/Master/texmf-dist/doc/support/latexindent/sec-default-user-local.tex
+++ b/Master/texmf-dist/doc/support/latexindent/sec-default-user-local.tex
@@ -32,7 +32,7 @@ latexindent.pl myfile
Calling \texttt{latexindent.pl myfile} with the (default) settings specified in \cref{lst:fileExtensionPreference}
means that the script will first look for \texttt{myfile.tex}, then \texttt{myfile.sty}, \texttt{myfile.cls},
- and finally \texttt{myfile.bib} in order\footnote{Throughout this manual, listings with line numbers represent code
+ and finally \texttt{myfile.bib} in order\footnote{Throughout this manual, listings shown with line numbers represent code
taken directly from \texttt{defaultSettings.yaml}.}.
\yamltitle{backupExtension}*{extension name}
@@ -219,14 +219,14 @@ lookForAlignDelims:
If you find that \texttt{latexindent.pl} does not perform satisfactorily on such
environments then you can set the relevant key to \texttt{0}, for example \texttt{tabular: 0}; alternatively, if you just want to ignore \emph{specific}
- instances of the environment, you could wrap them in something from \texttt{noIndentBlock} (see \cref{lst:noIndentBlock}).
+ instances of the environment, you could wrap them in something from \texttt{noIndentBlock} (see \vref{lst:noIndentBlock}).
\begin{minipage}{.45\textwidth}
- \cmhlistingsfromfile[columns=fixed]{demonstrations/tabular1.tex}{\texttt{tabular1.tex}}{lst:tabularbefore:basic}
+ \cmhlistingsfromfile*[showspaces=false,showtabs=false]{demonstrations/tabular1.tex}{\texttt{tabular1.tex}}{lst:tabularbefore:basic}
\end{minipage}%
\hfill
\begin{minipage}{.45\textwidth}
- \cmhlistingsfromfile[columns=fixed]{demonstrations/tabular1-default.tex}{\texttt{tabular1.tex} default output}{lst:tabularafter:basic}
+ \cmhlistingsfromfile*[showspaces=false,showtabs=false]{demonstrations/tabular1-default.tex}{\texttt{tabular1.tex} default output}{lst:tabularafter:basic}
\end{minipage}%
If you wish to remove the alignment of the \lstinline!\\! within a delimiter-aligned block, then the
@@ -244,9 +244,9 @@ lookForAlignDelims:
\item \texttt{spacesBeforeDoubleBackSlash}: optionally, specifies the number of spaces to be inserted
before (non-aligned) \lstinline!\\!. In order to use this field, \texttt{alignDoubleBackSlash} needs
to be set to 0 (default: 0).
- \item \texttt{multiColumnGrouping}: details if \texttt{latexindent.pl} should group columns
+ \item \announce{2017-06-19} \texttt{multiColumnGrouping}: details if \texttt{latexindent.pl} should group columns
underneath a \lstinline!\multicolumn! command (default: 0);
- \item \texttt{alignRowsWithoutMaxDelims}: details if rows that do not contain the
+ \item \announce{2017-06-19} \texttt{alignRowsWithoutMaxDelims}: details if rows that do not contain the
maximum number of delimeters should be formatted so as to have the ampersands aligned (default: 1).
\end{itemize}
@@ -260,11 +260,11 @@ latexindent.pl -l tabular.yaml tabular1.tex
the \lstinline!\\! have not (compare the alignment of \lstinline!\\! in \cref{lst:tabularafter:basic,lst:tabularafter:advanced}).
\begin{minipage}{.45\textwidth}
- \cmhlistingsfromfile[columns=fixed]{demonstrations/tabular1.tex}{\texttt{tabular1.tex}}{lst:tabularbefore:advanced}
+ \cmhlistingsfromfile*[showspaces=false,showtabs=false]{demonstrations/tabular1.tex}{\texttt{tabular1.tex}}{lst:tabularbefore:advanced}
\end{minipage}%
\hfill
\begin{minipage}{.45\textwidth}
- \cmhlistingsfromfile[columns=fixed]{demonstrations/tabular1-advanced.tex}{\texttt{tabular1.tex} using \cref{lst:aligndelims:advanced}}{lst:tabularafter:advanced}
+ \cmhlistingsfromfile*[showspaces=false,showtabs=false]{demonstrations/tabular1-advanced.tex}{\texttt{tabular1.tex} using \cref{lst:aligndelims:advanced}}{lst:tabularafter:advanced}
\end{minipage}%
Saving \cref{lst:aligndelims:advanced} into \texttt{tabular1.yaml} as in \cref{lst:tabular1YAML}, and running the command
@@ -274,7 +274,7 @@ latexindent.pl -l tabular1.yaml tabular1.tex
gives \cref{lst:tabularafter:spacing}; note the spacing before the \lstinline!\\!.
\begin{minipage}{.45\textwidth}
- \cmhlistingsfromfile[columns=fixed]{demonstrations/tabular1-advanced-3spaces.tex}{\texttt{tabular1.tex} using \cref{lst:tabular1YAML}}{lst:tabularafter:spacing}
+ \cmhlistingsfromfile*[showspaces=false,showtabs=false]{demonstrations/tabular1-advanced-3spaces.tex}{\texttt{tabular1.tex} using \cref{lst:tabular1YAML}}{lst:tabularafter:spacing}
\end{minipage}%
\hfill
\begin{minipage}{.54\textwidth}
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 35c0d1fe1a3..3f6921793ea 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
@@ -21,6 +21,12 @@
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.
+ As you read through this documentation, you'll occasionally see dates shown in the margin
+ (for example, next to this paragraph!)
+ \announce*{2017-06-25} which detail the date of the version in which the feature was implemented;
+ the `N' stands for `new as of the date shown'. If you see a $\color{cmhgold}\bigstar$, it
+ means that the feature is new as of the release of the current version.
+
\subsection{From the command line}\label{sec:commandline}
\texttt{latexindent.pl} has a number of different switches/flags/options, which
can be combined in any way that you like, either in short or long form as detailed below.
@@ -38,6 +44,13 @@ latexindent.pl
This will output a welcome message to the terminal, including the version number
and available options.
+\flagbox{-v, --version}
+ \announce*{2017-06-25}
+ \begin{commandshell}
+latexindent.pl -v
+ \end{commandshell}
+ This will output only the version number to the terminal.
+
\flagbox{-h, --help}
\begin{commandshell}
@@ -84,10 +97,60 @@ latexindent.pl --outputfile output.tex myfile.tex
be ignored and \texttt{-o} will take priority (this seems safer than the
other way round).
- Note that using \texttt{-o} is equivalent to using
+ Note that using \texttt{-o} as above is equivalent to using
\begin{commandshell}
latexindent.pl myfile.tex > output.tex
\end{commandshell}
+
+ You can call the \texttt{-o} switch with the name of the output file \emph{without} an extension; in
+ \announce*{2017-06-25}
+ this case, \texttt{latexindent.pl} will use the extension from the original file. For example,
+ the following two calls to \texttt{latexindent.pl} are equivalent:
+ \begin{commandshell}
+latexindent.pl myfile.tex -o=output
+latexindent.pl myfile.tex -o=output.tex
+\end{commandshell}
+
+ You can call the \texttt{-o} switch using a \texttt{+} symbol at the beginning; this will
+ \announce*{2017-06-25}
+ concatenate the name of the input file and the text given to the \texttt{-o} switch.
+ For example, the following two calls to \texttt{latexindent.pl} are equivalent:
+ \begin{commandshell}
+latexindent.pl myfile.tex -o=+new
+latexindent.pl myfile.tex -o=myfilenew.tex
+\end{commandshell}
+
+ You can call the \texttt{-o} switch using a \texttt{++} symbol at the end of the name
+ \announce*{2017-06-25}
+ of your output file; this tells \texttt{latexindent.pl} to search successively for
+ the name of your output file concatenated with $0, 1, \ldots$ while the name of the
+ output file exists. For example,
+ \begin{commandshell}
+latexindent.pl myfile.tex -o=output++
+\end{commandshell}
+ tells \texttt{latexindent.pl} to output to \texttt{output0.tex}, but if it exists then
+ output to \texttt{output1.tex}, and so on.
+
+ Calling \texttt{latexindent.pl} with simply
+ \begin{commandshell}
+latexindent.pl myfile.tex -o=++
+\end{commandshell}
+ tells it to output to \texttt{myfile0.tex}, but if it exists then output to \texttt{myfile1.tex}
+ and so on.
+
+ The \texttt{+} and \texttt{++} feature of the \texttt{-o} switch can be combined; for example, calling
+ \begin{commandshell}
+latexindent.pl myfile.tex -o=+out++
+\end{commandshell}
+ tells \texttt{latexindent.pl} to output to \texttt{myfileout0.tex}, but if it exists, then
+ try \texttt{myfileout1.tex}, and so on.
+
+ There is no need to specify a file extension when using the \texttt{++} feature, but if you wish to,
+ then you should include it \emph{after} the \texttt{++} symbols, for example
+ \begin{commandshell}
+latexindent.pl myfile.tex -o=+out++.tex
+\end{commandshell}
+
See \vref{app:differences} for details of how the interface has changed
from Version 2.2 to Version 3.0 for this flag.
\flagbox{-s, --silent}
@@ -146,6 +209,34 @@ latexindent.pl myfile.tex -l=first.yaml,second.yaml,third.yaml
absolute paths -- for absolute paths, see \vref{sec:indentconfig}.
Explicit demonstrations of how to use the \texttt{-l} switch are given throughout this documentation.
+ You can call the \texttt{-l} switch with a `+' symbol either before or after
+ \announce*{2017-06-25}
+ another YAML file; for example:
+ \begin{commandshell}
+latexindent.pl -l=+myyaml.yaml myfile.tex
+latexindent.pl -l "+ myyaml.yaml" myfile.tex
+latexindent.pl -l=myyaml.yaml+ myfile.tex
+ \end{commandshell}
+ which translate, respectively, to
+ \begin{commandshell}
+latexindent.pl -l=localSettings.yaml,myyaml.yaml myfile.tex
+latexindent.pl -l=localSettings.yaml,myyaml.yaml myfile.tex
+latexindent.pl -l=myyaml.yaml,localSettings.yaml myfile.tex
+ \end{commandshell}
+ Note that the following is \emph{not} allowed:
+ \begin{commandshell}
+latexindent.pl -l+myyaml.yaml myfile.tex
+ \end{commandshell}
+ and
+ \begin{commandshell}
+latexindent.pl -l + myyaml.yaml myfile.tex
+ \end{commandshell}
+ will \emph{only} load \texttt{localSettings.yaml}, and \texttt{myyaml.yaml} will be ignored.
+
+ You may also choose to omit the \texttt{yaml} extension, such as
+ \begin{commandshell}
+latexindent.pl -l=localSettings,myyaml myfile.tex
+ \end{commandshell}
\flagbox{-d, --onlydefault}
\begin{commandshell}
latexindent.pl -d myfile.tex
diff --git a/Master/texmf-dist/doc/support/latexindent/sec-introduction.tex b/Master/texmf-dist/doc/support/latexindent/sec-introduction.tex
index ffe81105a01..67826d37c24 100644
--- a/Master/texmf-dist/doc/support/latexindent/sec-introduction.tex
+++ b/Master/texmf-dist/doc/support/latexindent/sec-introduction.tex
@@ -19,7 +19,9 @@
at \cite{latexindent-home}.
\subsection{License}
- \texttt{latexindent.pl} is free and open source, and it always will be.
+ \texttt{latexindent.pl} is free and open source, and it always will be; it
+ is released under the GNU General Public License v3.0.
+
Before you start using it on any important files, bear in mind that \texttt{latexindent.pl} has the option to overwrite your \texttt{.tex} files.
It will always make at least one backup (you can choose how many it makes, see \cpageref{page:onlyonebackup})
but you should still be careful when using it. The script has been tested on many
diff --git a/Master/texmf-dist/doc/support/latexindent/sec-the-m-switch.tex b/Master/texmf-dist/doc/support/latexindent/sec-the-m-switch.tex
index 091f9154203..8f645177c0b 100644
--- a/Master/texmf-dist/doc/support/latexindent/sec-the-m-switch.tex
+++ b/Master/texmf-dist/doc/support/latexindent/sec-the-m-switch.tex
@@ -58,6 +58,7 @@ latexindent.pl myfile.tex -m
\yamltitle{textWrapOptions}*{fields}
When the \texttt{-m} switch is active \texttt{latexindent.pl} has the ability to wrap text using the options
+ \announce{2017-05-27}
specified in the \texttt{textWrapOptions} field, see \cref{lst:textWrapOptions}. The value of
\texttt{columns} specifies the column at which the text should be wrapped.
By default, the value of \texttt{columns} is \texttt{0}, so \texttt{latexindent.pl}
@@ -148,6 +149,7 @@ latexindent.pl -m textwrap4.tex -o textwrap4-mod2.tex -l textwrap2.yaml
\yamltitle{removeParagraphLineBreaks}*{fields}
When the \texttt{-m} switch is active \texttt{latexindent.pl} has the ability to remove line breaks
+ \announce{2017-05-27}
from within paragraphs; the behaviour is controlled by the \texttt{removeParagraphLineBreaks} field, detailed in
\cref{lst:removeParagraphLineBreaks}. Thank you to \cite{jowens} for shaping and assisting with the testing of this feature.
@@ -277,6 +279,7 @@ latexindent.pl -m shortlines-md.tex -o shortlines-md4.tex -l remove-para4.yaml
\yamltitle{paragraphsStopAt}*{fields}
The paragraph line break routine considers blank lines and the \lstinline|\par| command to be the end of a paragraph;
+ \announce{2017-05-27}
you can fine tune the behaviour of the routine further by using the \texttt{paragraphsStopAt} fields, shown in \cref{lst:paragraphsStopAt}.
\cmhlistingsfromfile[style=paragraphsStopAt]{../defaultSettings.yaml}[MLB-TCB,width=.85\linewidth,before=\centering]{\texttt{paragraphsStopAt}}{lst:paragraphsStopAt}