summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/latexindent
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-06-05 21:03:30 +0000
committerKarl Berry <karl@freefriends.org>2022-06-05 21:03:30 +0000
commit6508d94a133775c00a40256e3b31a49ece9abeec (patch)
treec6ec0f928c855f23bcbab513aaa34e424c832d51 /Master/texmf-dist/doc/support/latexindent
parent80aa3b5de37b11d9f895cf844adcd9bb8fc127d2 (diff)
latexindent (5jun22)
git-svn-id: svn://tug.org/texlive/trunk@63492 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support/latexindent')
-rw-r--r--Master/texmf-dist/doc/support/latexindent/README2
-rw-r--r--Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json2
-rw-r--r--Master/texmf-dist/doc/support/latexindent/latexindent.pdfbin1088780 -> 1104377 bytes
-rw-r--r--Master/texmf-dist/doc/support/latexindent/sec-appendices.tex22
-rw-r--r--Master/texmf-dist/doc/support/latexindent/sec-conclusions-know-limitations.tex2
-rw-r--r--Master/texmf-dist/doc/support/latexindent/sec-fine-tuning.tex2
-rw-r--r--Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex22
-rw-r--r--Master/texmf-dist/doc/support/latexindent/subsec-text-wrap.tex107
-rw-r--r--Master/texmf-dist/doc/support/latexindent/title.tex6
9 files changed, 144 insertions, 21 deletions
diff --git a/Master/texmf-dist/doc/support/latexindent/README b/Master/texmf-dist/doc/support/latexindent/README
index 6ea4b951d14..9a6c7d27185 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.17.2, 2022-04-14
+ latexindent.pl, version 3.17.3, 2022-06-05
PERL script to indent code within environments, and align delimited
environments in .tex files.
diff --git a/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json b/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
index 8b5378679c0..47b70ecf994 100644
--- a/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
+++ b/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
@@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/schema",
"$id": "latexindent-yaml-schema.json",
"title": "latexindent.pl YAML schema",
- "description": "latexindent.pl YAML schema helper, V3.17.2 2022-04-14",
+ "description": "latexindent.pl YAML schema helper, V3.17.3 2022-06-05",
"type": "object",
"properties": {
"fileExtensionPreference": {
diff --git a/Master/texmf-dist/doc/support/latexindent/latexindent.pdf b/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
index 86b5f93d0b4..323e4716d27 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/sec-appendices.tex b/Master/texmf-dist/doc/support/latexindent/sec-appendices.tex
index ca4608a2592..03a2961cc6f 100644
--- a/Master/texmf-dist/doc/support/latexindent/sec-appendices.tex
+++ b/Master/texmf-dist/doc/support/latexindent/sec-appendices.tex
@@ -2,10 +2,16 @@
\appendix
\section{Required Perl modules}\label{sec:requiredmodules}
If you intend to use \texttt{latexindent.pl} and \emph{not} one of the supplied
- standalone executable files, then you will need a few standard Perl modules -- if you can
- run the minimum code in \cref{lst:helloworld} (\texttt{perl helloworld.pl}) then you will
- be able to run \texttt{latexindent.pl}, otherwise you may need to install the missing
- modules -- see \cref{sec:module-installer,sec:manual-module-instal}.
+ standalone executable files (\texttt{latexindent.exe} is available for Windows users
+ without Perl, see \cref{subsubsec:latexindent:exe}), then you will need a few standard
+ Perl modules.
+
+ If you can run the minimum code in \cref{lst:helloworld} as in
+ \begin{commandshell}
+perl helloworld.pl
+ \end{commandshell}
+ then you will be able to run \texttt{latexindent.pl}, otherwise you may need to install
+ the missing modules; see \cref{sec:module-installer,sec:manual-module-instal}.
\begin{cmhlistings}[style=tcblatex,language=Perl]{\texttt{helloworld.pl}}{lst:helloworld}
#!/usr/bin/perl
@@ -137,6 +143,10 @@ brew install cpanm
cpanm YAML::Tiny
cpanm File::HomeDir
\end{commandshell}
+ Alternatively,
+ \begin{commandshell}
+brew install latexindent
+\end{commandshell}
\subsubsection{Windows}
Strawberry Perl users on Windows might use \texttt{CPAN client}. All of the modules are
@@ -595,8 +605,8 @@ latexindent.pl -y="dos2unixlinebreaks:1" myfile.tex
\section{Differences from Version 2.2 to 3.0}\label{app:differences}
There are a few (small) changes to the interface when comparing Version 2.2 to Version
- 3.0. Explicitly, in previous versions you might have run, for example,
- \index{switches!-o demonstration}
+ 3.0. Explicitly, in previous versions you might have run, for example, \index{switches!-o
+ demonstration}
\begin{commandshell}
latexindent.pl -o myfile.tex outputfile.tex
\end{commandshell}
diff --git a/Master/texmf-dist/doc/support/latexindent/sec-conclusions-know-limitations.tex b/Master/texmf-dist/doc/support/latexindent/sec-conclusions-know-limitations.tex
index 82fe6264284..7a45e463823 100644
--- a/Master/texmf-dist/doc/support/latexindent/sec-conclusions-know-limitations.tex
+++ b/Master/texmf-dist/doc/support/latexindent/sec-conclusions-know-limitations.tex
@@ -1,7 +1,7 @@
% arara: pdflatex: { files: [latexindent]}
\section{Conclusions and known limitations}\label{sec:knownlimitations}
There are a number of known limitations of the script, and almost certainly quite a few
- that are \emph{unknown}! The known issues include:
+ that are \emph{unknown}! The known issues include:
\begin{description}
\item[multicolumn alignment] when working with code blocks in which multicolumn commands
overlap, the algorithm can fail; see \vref{lst:tabular2-mod2}.
diff --git a/Master/texmf-dist/doc/support/latexindent/sec-fine-tuning.tex b/Master/texmf-dist/doc/support/latexindent/sec-fine-tuning.tex
index ed0039a8057..8798b276ab7 100644
--- a/Master/texmf-dist/doc/support/latexindent/sec-fine-tuning.tex
+++ b/Master/texmf-dist/doc/support/latexindent/sec-fine-tuning.tex
@@ -24,7 +24,7 @@
\end{warning}
\begin{widepage}
- \cmhlistingsfromfile[style=fineTuning]{../defaultSettings.yaml}[width=.95\linewidth,before=\centering,yaml-TCB]{\texttt{fineTuning}}{lst:fineTuning}
+ \cmhlistingsfromfile[style=fineTuning]{../defaultSettings.yaml}[width=.95\linewidth,before=\centering,enhanced jigsaw,breakable,yaml-TCB]{\texttt{fineTuning}}{lst:fineTuning}
\end{widepage}
The fields given in \cref{lst:fineTuning} are all \emph{regular expressions}. This manual
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 9faa4112654..c8db5d20d1c 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
@@ -16,17 +16,25 @@
respectively. We will discuss how to change the settings and behaviour of the script in
\vref{sec:defuseloc}.
+\subsection{Requirements}
+\subsubsection{Perl users}
+ Perl users will 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}.%
+
+\subsubsection{Windows users without perl}\label{subsubsec:latexindent:exe}
\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;%
- \announce{2018-01-13}{perl module installer helper script} in particular, note that a module installer helper script is shipped with
- \texttt{latexindent.pl}.
+ users, so that you can use the script with or without a Perl distribution.
+
+ Users of \texttt{latexindent.exe} need only two files: \texttt{latexindent.exe} and
+ \texttt{defaultSettings.yaml}, both of which are available from \cite{latexindent-home}.
MiKTeX users on Windows may like to see \cite{miktex-guide} for details of how to use
\texttt{latexindent.exe} without a Perl installation. \index{MiKTeX}
- \index{latexindent.exe}
+ \index{latexindent.exe} \index{Windows}
+
+\subsubsection{conda users}
+ Users of \texttt{conda} should see the details given in \cref{sec:app:conda}.
\subsection{From the command line}\label{sec:commandline}
\texttt{latexindent.pl} has a number of different switches/flags/options, which
diff --git a/Master/texmf-dist/doc/support/latexindent/subsec-text-wrap.tex b/Master/texmf-dist/doc/support/latexindent/subsec-text-wrap.tex
index e03eb66395f..fddbffd98b8 100644
--- a/Master/texmf-dist/doc/support/latexindent/subsec-text-wrap.tex
+++ b/Master/texmf-dist/doc/support/latexindent/subsec-text-wrap.tex
@@ -30,7 +30,17 @@
\item setting \texttt{columns} to $-1$ will \emph{only} remove line breaks within the text wrap
block;
\item by default, the text wrapping routine will remove line breaks within text blocks because
- \texttt{removeBlockLineBreaks} is set to 1; switch it to 0 if you wish to change this.
+ \texttt{removeBlockLineBreaks} is set to 1; switch it to 0 if you wish to change this;
+ \item about trailing comments within text wrap blocks:
+ \begin{enumerate}
+ \item trailing comments that do \emph{not} have leading space instruct the text wrap routine to
+ connect the lines \emph{without} space (see \cref{lst:tw-tc2});
+ \item multiple trailing comments will be connected at the end of the text wrap block (see
+ \cref{lst:tw-tc4});
+ \item the number of spaces between the end of the text wrap block and the (possibly combined)
+ trailing comments is determined by the spaces (if any) at the end of the text wrap block
+ (see \cref{lst:tw-tc5}).
+ \end{enumerate}
\end{enumerate}
We demonstrate this feature using a series of examples.
@@ -349,6 +359,101 @@ latexindent.pl -m -l textwrap1A.yaml,tw-be-equation.yaml tw-be-equation.tex
Naturally, you should feel encouraged to customise this as you see fit.
\end{example}
+\subsubsection{Text wrap: trailing comments and spaces}
+ We explore the behaviour of the text wrap routine in relation to trailing comments using
+ the following examples.
+
+ \begin{example}
+ The file in \cref{lst:tw-tc1} contains a trailing comment which \emph{does} have a space
+ infront of it.
+
+ Running the command
+ \begin{commandshell}
+latexindent.pl -m tw-tc1.tex -l textwrap1A.yaml -o=+-mod1
+\end{commandshell}
+ gives the output given in \cref{lst:tw-tc1-mod1}.
+
+ \begin{cmhtcbraster}[raster column skip=.1\linewidth]
+ \cmhlistingsfromfile*[showspaces=true]{demonstrations/tw-tc1.tex}{\texttt{tw-tc1.tex}}{lst:tw-tc1}
+ \cmhlistingsfromfile*{demonstrations/tw-tc1-mod1.tex}{\texttt{tw-tc1-mod1.tex}}{lst:tw-tc1-mod1}
+ \end{cmhtcbraster}
+ \end{example}
+
+ \begin{example}
+ The file in \cref{lst:tw-tc2} contains a trailing comment which does \emph{not} have a
+ space infront of it.
+
+ Running the command
+ \begin{commandshell}
+latexindent.pl -m tw-tc2.tex -l textwrap1A.yaml -o=+-mod1
+\end{commandshell}
+ gives the output in \cref{lst:tw-tc2-mod1}.
+ \begin{cmhtcbraster}[raster column skip=.1\linewidth]
+ \cmhlistingsfromfile*{demonstrations/tw-tc2.tex}{\texttt{tw-tc2.tex}}{lst:tw-tc2}
+ \cmhlistingsfromfile*{demonstrations/tw-tc2-mod1.tex}{\texttt{tw-tc2-mod1.tex}}{lst:tw-tc2-mod1}
+ \end{cmhtcbraster}
+ We note that, because there is \emph{not} a space before the trailing comment, that the
+ lines have been joined \emph{without} a space.
+ \end{example}
+
+ \begin{example}
+ The file in \cref{lst:tw-tc3} contains multiple trailing comments.
+
+ Running the command
+ \begin{commandshell}
+latexindent.pl -m tw-tc3.tex -l textwrap1A.yaml -o=+-mod1
+\end{commandshell}
+ gives the output in \cref{lst:tw-tc3-mod1}.
+ \begin{cmhtcbraster}[raster column skip=.1\linewidth]
+ \cmhlistingsfromfile*{demonstrations/tw-tc3.tex}{\texttt{tw-tc3.tex}}{lst:tw-tc3}
+ \cmhlistingsfromfile*{demonstrations/tw-tc3-mod1.tex}{\texttt{tw-tc3-mod1.tex}}{lst:tw-tc3-mod1}
+ \end{cmhtcbraster}
+ \end{example}
+
+ \begin{example}
+ The file in \cref{lst:tw-tc4} contains multiple trailing comments.
+
+ Running the command
+ \begin{commandshell}
+latexindent.pl -m tw-tc4.tex -l textwrap1A.yaml -o=+-mod1
+\end{commandshell}
+ gives the output in \cref{lst:tw-tc4-mod1}.
+ \begin{cmhtcbraster}[raster column skip=.1\linewidth]
+ \cmhlistingsfromfile*{demonstrations/tw-tc4.tex}{\texttt{tw-tc4.tex}}{lst:tw-tc4}
+ \cmhlistingsfromfile*{demonstrations/tw-tc4-mod1.tex}{\texttt{tw-tc4-mod1.tex}}{lst:tw-tc4-mod1}
+ \end{cmhtcbraster}
+ \end{example}
+
+ \begin{example}
+ The file in \cref{lst:tw-tc5} contains multiple trailing comments.
+
+ Running the command
+ \begin{commandshell}
+latexindent.pl -m tw-tc5.tex -l textwrap1A.yaml -o=+-mod1
+\end{commandshell}
+ gives the output in \cref{lst:tw-tc5-mod1}.
+ \begin{cmhtcbraster}[raster column skip=.1\linewidth]
+ \cmhlistingsfromfile*[showspaces=true]{demonstrations/tw-tc5.tex}{\texttt{tw-tc5.tex}}{lst:tw-tc5}
+ \cmhlistingsfromfile*[showspaces=true]{demonstrations/tw-tc5-mod1.tex}{\texttt{tw-tc5-mod1.tex}}{lst:tw-tc5-mod1}
+ \end{cmhtcbraster}
+ The space at the end of the text block has been preserved.
+ \end{example}
+
+ \begin{example}
+ The file in \cref{lst:tw-tc6} contains multiple trailing comments.
+
+ Running the command
+ \begin{commandshell}
+latexindent.pl -m tw-tc6.tex -l textwrap1A.yaml -o=+-mod1
+\end{commandshell}
+ gives the output in \cref{lst:tw-tc6-mod1}.
+ \begin{cmhtcbraster}[raster column skip=.1\linewidth]
+ \cmhlistingsfromfile*[showspaces=true]{demonstrations/tw-tc6.tex}{\texttt{tw-tc6.tex}}{lst:tw-tc6}
+ \cmhlistingsfromfile*[showspaces=true]{demonstrations/tw-tc6-mod1.tex}{\texttt{tw-tc6-mod1.tex}}{lst:tw-tc6-mod1}
+ \end{cmhtcbraster}
+ The space at the end of the text block has been preserved.
+ \end{example}
+
\subsubsection{Text wrap: huge, tabstop and separator}
The \announce{2021-07-23}*{huge:overflow is now default} default value of \texttt{huge}
is \texttt{overflow}, which means that words will \emph{not} be broken by the text
diff --git a/Master/texmf-dist/doc/support/latexindent/title.tex b/Master/texmf-dist/doc/support/latexindent/title.tex
index ef2c39d1c29..bf6b1ec03d0 100644
--- a/Master/texmf-dist/doc/support/latexindent/title.tex
+++ b/Master/texmf-dist/doc/support/latexindent/title.tex
@@ -8,14 +8,14 @@
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.17.2
+ \centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.17.3
\end{tcolorbox}
}
\author{Chris Hughes \thanks{and contributors!
See \vref{sec:contributors}.
For
all communication, please visit \cite{latexindent-home}.}}
-\date{2022-04-14}
+\date{2022-06-05}
\maketitle
\begin{adjustwidth}{1cm}{1cm}
\small
@@ -26,5 +26,5 @@
regex-based substitutions.
All user options are customisable via the switches and the YAML interface.
- A quick start guide is given in \vref{sec:quickstart}.
+ tl;dr, a quick start guide is given in \vref{sec:quickstart}.
\end{adjustwidth}