summaryrefslogtreecommitdiff
path: root/support/latexindent/documentation/latexindent.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/latexindent/documentation/latexindent.tex')
-rw-r--r--support/latexindent/documentation/latexindent.tex59
1 files changed, 43 insertions, 16 deletions
diff --git a/support/latexindent/documentation/latexindent.tex b/support/latexindent/documentation/latexindent.tex
index 618b49cad1..70c2be9805 100644
--- a/support/latexindent/documentation/latexindent.tex
+++ b/support/latexindent/documentation/latexindent.tex
@@ -523,7 +523,7 @@
\lstdefinestyle{fineTuning}{
style=yaml-LST,
- firstnumber=629,linerange={629-681},
+ firstnumber=629,linerange={629-684},
numbers=left,
}
@@ -2461,11 +2461,11 @@ latexindent.pl tabular1.tex
\item \announce{2021-12-13}{lookForChildCodeBlocks feature}{lookForChildCodeBlocks}
optionally instructs \texttt{latexindent.pl} to search for child code blocks or
not (default: 1), discussed in \cref{sec:lookForChildCodeBlocks};
- \item \announce*{2023-05-01}{alignContentAfterDoubleBackSlash feature}
+ \item \announce{2023-05-01}{alignContentAfterDoubleBackSlash feature}
alignContentAfterDoubleBackSlash optionally instructs \texttt{latexindent.pl} to
align content \emph{after} double back slash (default: 0), discussed in
\cref{sec:alignContentAfterDoubleBackSlash};
- \item \announce*{2023-05-01}{spacesAfterDoubleBackSlash feature}
+ \item \announce{2023-05-01}{spacesAfterDoubleBackSlash feature}
spacesAfterDoubleBackSlash optionally specifies the number (integer $\geq$ 0) of
spaces to be placed \emph{after} the double back slash \emph{when
alignContentAfterDoubleBackSlash is active}; demonstrated in
@@ -3047,17 +3047,16 @@ latexindent.pl tabular-DM-1.tex -l=dontMeasure1a.yaml -o=+-mod1a
\end{example}
\subsubsection{lookForAlignDelims: alignContentAfterDoubleBackSlash}\label{sec:alignContentAfterDoubleBackSlash}
- You can instruct \texttt{latexindent} to align \announce*{2023-05-01}{align content
- after double back slash} content after the double back slash. See also
- \vref{subsec:dbs}.
+ You can instruct \texttt{latexindent} to align \announce{2023-05-01}{align content after
+ double back slash} content after the double back slash. See also \vref{subsec:dbs}.
\begin{example}
We consider the file in \cref{lst:tabular5}, and the default output given in
\cref{lst:tabular5-default}.
\begin{cmhtcbraster}
- \cmhlistingsfromfile*{demonstrations/tabular5.tex}{\texttt{tabular5.tex}}{lst:tabular5}
- \cmhlistingsfromfile*{demonstrations/tabular5-default.tex}{\texttt{tabular5-default.tex}}{lst:tabular5-default}
+ \cmhlistingsfromfile{demonstrations/tabular5.tex}{\texttt{tabular5.tex}}{lst:tabular5}
+ \cmhlistingsfromfile{demonstrations/tabular5-default.tex}{\texttt{tabular5-default.tex}}{lst:tabular5-default}
\end{cmhtcbraster}
Using the settings given in \cref{lst:alignContentAfterDBS1} and running
@@ -3071,15 +3070,15 @@ latexindent.pl -s tabular5.tex -l alignContentAfterDBS1 -o=+-mod1
\begin{cmhtcbraster}[raster columns=2,
raster left skip=-2.5cm,
raster column skip=.03\linewidth]
- \cmhlistingsfromfile*{demonstrations/tabular5-mod1.tex}{\texttt{tabular5-mod1.tex}}{lst:tabular5-mod1}
- \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/alignContentAfterDBS1.yaml}[yaml-TCB]{\texttt{alignContentAfterDBS1.yaml}}{lst:alignContentAfterDBS1}
+ \cmhlistingsfromfile{demonstrations/tabular5-mod1.tex}{\texttt{tabular5-mod1.tex}}{lst:tabular5-mod1}
+ \cmhlistingsfromfile[style=yaml-LST]{demonstrations/alignContentAfterDBS1.yaml}[yaml-TCB]{\texttt{alignContentAfterDBS1.yaml}}{lst:alignContentAfterDBS1}
\end{cmhtcbraster}
\end{example}
\begin{example}
When using the \texttt{alignContentAfterDoubleBackSlash} feature, then you can also
specify how many spaces to insert after the double backslash; the default is 1.
- \announce*{2023-05-01}{specify number of spaces after double back slash when aligning
+ \announce{2023-05-01}{specify number of spaces after double back slash when aligning
content after double back slash}
Starting from \cref{lst:tabular5} and using the the settings given in
@@ -3094,8 +3093,8 @@ latexindent.pl -s tabular5.tex -l alignContentAfterDBS2 -o=+-mod2
\begin{cmhtcbraster}[raster columns=2,
raster left skip=-2.5cm,
raster column skip=.03\linewidth]
- \cmhlistingsfromfile*{demonstrations/tabular5-mod2.tex}{\texttt{tabular5-mod2.tex}}{lst:tabular5-mod2}
- \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/alignContentAfterDBS2.yaml}[yaml-TCB]{\texttt{alignContentAfterDBS2.yaml}}{lst:alignContentAfterDBS2}
+ \cmhlistingsfromfile{demonstrations/tabular5-mod2.tex}{\texttt{tabular5-mod2.tex}}{lst:tabular5-mod2}
+ \cmhlistingsfromfile[style=yaml-LST]{demonstrations/alignContentAfterDBS2.yaml}[yaml-TCB]{\texttt{alignContentAfterDBS2.yaml}}{lst:alignContentAfterDBS2}
\end{cmhtcbraster}
\end{example}
@@ -6737,9 +6736,9 @@ latexindent.pl -s -m -l alignContentAfterDBS2.yaml,DBS1.yaml tabular6.tex -o=+-m
raster left skip=-3.5cm,
raster right skip=-2cm,
raster column skip=.03\linewidth]
- \cmhlistingsfromfile*{demonstrations/tabular6.tex}{\texttt{tabular6.tex}}{lst:tabular6}
- \cmhlistingsfromfile*{demonstrations/tabular6-mod1.tex}{\texttt{tabular6-mod1.tex}}{lst:tabular6-mod1}
- \cmhlistingsfromfile*{demonstrations/tabular6-mod2.tex}{\texttt{tabular6-mod2.tex}}{lst:tabular6-mod2}
+ \cmhlistingsfromfile{demonstrations/tabular6.tex}{\texttt{tabular6.tex}}{lst:tabular6}
+ \cmhlistingsfromfile{demonstrations/tabular6-mod1.tex}{\texttt{tabular6-mod1.tex}}{lst:tabular6-mod1}
+ \cmhlistingsfromfile{demonstrations/tabular6-mod2.tex}{\texttt{tabular6-mod2.tex}}{lst:tabular6-mod2}
\end{cmhtcbraster}
We note that:
\begin{itemize}
@@ -8254,6 +8253,34 @@ latexindent.pl bib2.bib -l bibsettings1.yaml,bibsettings2.yaml -o=+-mod2
been adjusted so that \texttt{=} symbols are used as the delimiter, but only when they
are \emph{not preceded} by either \texttt{v} or \texttt{spfreload}.
\end{example}
+
+ \begin{example}
+ We can use the \texttt{fineTuning} settings to tweak how \texttt{latexindent.pl} finds
+ trailing comments. \announce*{2023-06-01}{fine tuning trailing comments demonstration}
+
+ We begin with the file in \cref{lst:finetuning5}
+
+ \cmhlistingsfromfile*{demonstrations/finetuning5.tex}{\texttt{finetuning5.tex}}{lst:finetuning5}
+
+ Using the settings in \cref{lst:fine-tuning3} and running the command
+
+ \begin{commandshell}
+latexindent.pl finetuning5.tex -l=fine-tuning3.yaml
+\end{commandshell}
+
+ gives the output in \cref{lst:finetuning5-mod1}.
+
+ \begin{cmhtcbraster}[raster column skip=.01\linewidth]
+ \cmhlistingsfromfile*{demonstrations/finetuning5-mod1.tex}{\texttt{finetuning5-mod1.tex}}{lst:finetuning5-mod1}
+ \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/fine-tuning3.yaml}[yaml-TCB]{\texttt{finetuning3.yaml}}{lst:fine-tuning3}
+ \end{cmhtcbraster}
+
+ The settings in \cref{lst:fine-tuning3} detail that trailing comments can \emph{not} be
+ followed by a single space, and then the text `end'. This means that the
+ \texttt{specialBeginEnd} routine will be able to find the pattern \lstinline!% end! as
+ the \texttt{end} part. The trailing comments \texttt{123} and \texttt{456} are still
+ treated as trailing comments.
+ \end{example}
% 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