summaryrefslogtreecommitdiff
path: root/support/latexindent/documentation
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-04-29 03:01:23 +0000
committerNorbert Preining <norbert@preining.info>2024-04-29 03:01:23 +0000
commit9ffa8712668c5055c54742499d06caeb5cc9c87b (patch)
treed8b15c754d8d510751d6734b5f6028a2ba3cec89 /support/latexindent/documentation
parent6ed42a56797a9b75307dcebfd82f2d69767e1b97 (diff)
CTAN sync 202404290301
Diffstat (limited to 'support/latexindent/documentation')
-rw-r--r--support/latexindent/documentation/latexindent-yaml-schema.json2
-rw-r--r--support/latexindent/documentation/latexindent.pdfbin1285520 -> 1297746 bytes
-rw-r--r--support/latexindent/documentation/latexindent.tex132
3 files changed, 105 insertions, 29 deletions
diff --git a/support/latexindent/documentation/latexindent-yaml-schema.json b/support/latexindent/documentation/latexindent-yaml-schema.json
index 56ffbc2409..397d577e92 100644
--- a/support/latexindent/documentation/latexindent-yaml-schema.json
+++ b/support/latexindent/documentation/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.23.9 2024-04-06",
+ "description": "latexindent.pl YAML schema helper, V3.24 2024-04-28",
"type": "object",
"properties": {
"fileExtensionPreference": {
diff --git a/support/latexindent/documentation/latexindent.pdf b/support/latexindent/documentation/latexindent.pdf
index 03fb4d7bd1..9555a30a14 100644
--- a/support/latexindent/documentation/latexindent.pdf
+++ b/support/latexindent/documentation/latexindent.pdf
Binary files differ
diff --git a/support/latexindent/documentation/latexindent.tex b/support/latexindent/documentation/latexindent.tex
index da46a04f09..fc96a1db9a 100644
--- a/support/latexindent/documentation/latexindent.tex
+++ b/support/latexindent/documentation/latexindent.tex
@@ -415,121 +415,121 @@
\lstdefinestyle{indentAfterItems}{
style=yaml-LST,
- firstnumber=241,linerange={241-248},
+ firstnumber=242,linerange={242-249},
numbers=left,
}
\lstdefinestyle{itemNames}{
style=yaml-LST,
- firstnumber=254,linerange={254-256},
+ firstnumber=255,linerange={255-257},
numbers=left,
}
\lstdefinestyle{specialBeginEnd}{
style=yaml-LST,
- firstnumber=260,linerange={260-274},
+ firstnumber=261,linerange={261-275},
numbers=left,
}
\lstdefinestyle{indentAfterHeadings}{
style=yaml-LST,
- firstnumber=284,linerange={284-293},
+ firstnumber=285,linerange={285-294},
numbers=left,
}
\lstdefinestyle{noAdditionalIndentGlobalEnv}{
style=yaml-LST,
- firstnumber=342,linerange={342-343},
+ firstnumber=343,linerange={343-344},
numbers=left,
}
\lstdefinestyle{noAdditionalIndentGlobal}{
style=yaml-LST,
- firstnumber=342,linerange={342-354},
+ firstnumber=343,linerange={343-355},
numbers=left,
}
\lstdefinestyle{indentRulesGlobalEnv}{
style=yaml-LST,
- firstnumber=358,linerange={358-359},
+ firstnumber=359,linerange={359-360},
numbers=left,
}
\lstdefinestyle{indentRulesGlobal}{
style=yaml-LST,
- firstnumber=358,linerange={358-370},
+ firstnumber=359,linerange={359-371},
numbers=left,
}
\lstdefinestyle{commandCodeBlocks}{
style=yaml-LST,
- firstnumber=373,linerange={373-388},
+ firstnumber=374,linerange={374-389},
numbers=left,
}
\lstdefinestyle{modifylinebreaks}{
style=yaml-LST,
- firstnumber=501,linerange={501-503},
+ firstnumber=502,linerange={502-504},
numbers=left,
}
\lstdefinestyle{textWrapOptions}{
style=yaml-LST,
- firstnumber=531,linerange={531-532},
+ firstnumber=532,linerange={532-533},
numbers=left,
}
\lstdefinestyle{textWrapOptionsAll}{
style=yaml-LST,
- firstnumber=531,linerange={531-558},
+ firstnumber=532,linerange={532-559},
numbers=left,
}
\lstdefinestyle{oneSentencePerLine}{
style=yaml-LST,
- firstnumber=504,linerange={504-530},
+ firstnumber=505,linerange={505-531},
numbers=left,
}
\lstdefinestyle{sentencesFollow}{
style=yaml-LST,
- firstnumber=510,linerange={510-518},
+ firstnumber=511,linerange={511-519},
numbers=left,
}
\lstdefinestyle{sentencesBeginWith}{
style=yaml-LST,
- firstnumber=519,linerange={519-522},
+ firstnumber=520,linerange={520-523},
numbers=left,
}
\lstdefinestyle{sentencesEndWith}{
style=yaml-LST,
- firstnumber=523,linerange={523-528},
+ firstnumber=524,linerange={524-529},
numbers=left,
}
\lstdefinestyle{sentencesDoNOTcontain}{
style=yaml-LST,
- firstnumber=529,linerange={529-530},
+ firstnumber=530,linerange={530-531},
numbers=left,
}
\lstdefinestyle{modifylinebreaksEnv}{
style=yaml-LST,
- firstnumber=560,linerange={560-569},
+ firstnumber=561,linerange={561-570},
numbers=left,
}
\lstdefinestyle{replacements}{
style=yaml-LST,
- firstnumber=621,linerange={621-626},
+ firstnumber=622,linerange={622-627},
numbers=left,
}
\lstdefinestyle{fineTuning}{
style=yaml-LST,
- firstnumber=630,linerange={630-685},
+ firstnumber=631,linerange={631-686},
numbers=left,
}
@@ -1805,7 +1805,7 @@ latexindent.pl myfile.tex
are detailed in \cref{app:indentconfig:options}. \announce{2023-01-01}{indentconfig
location options}
-\subsection{indentconfig.yaml and .indentconfig.yaml}
+\subsection{indentconfig.yaml and .indentconfig.yaml}\label{subsec:indentconfig}
\texttt{latexindent.pl} will always check your home directory for
\texttt{indentconfig.yaml}
and \texttt{.indentconfig.yaml} (unless it is called with the \texttt{-d} switch), which
@@ -1860,6 +1860,11 @@ latexindent.pl myfile.tex
\texttt{indent.log}.
\end{warning}
+ As of \announce*{2024-04-28}{paths within local YAML settings} you can specify the
+ \texttt{paths} field from \cref{lst:indentconfig} within any of your
+ \texttt{latexindent.yaml} and friends settings files. This can lead to creative nesting
+ of configuration files; a demonstration is given in \vref{sec:appendix:paths}.
+
If you find that \announce{2021-06-19}{encoding option for indentconfig.yaml}
\texttt{latexindent.pl} does not read your YAML file, then it might be as a result of
the default commandline encoding not being UTF-8; normally this will only occur for
@@ -1968,6 +1973,9 @@ latexindent.pl -l=mysettings.yaml -y="verbatimEnvironments:cmhenvironment:0;myen
latexindent.pl -m --yaml='modifyLineBreaks:oneSentencePerLine:sentencesEndWith:other:\;'
\end{commandshell}
+ Note that the \texttt{paths} settings (see \vref{sec:appendix:paths}) can \emph{not} be
+ specified using the \texttt{-y} switch.
+
\subsection{Settings load order}\label{sec:loadorder}
\texttt{latexindent.pl} loads the settings files in the following order:
\index{switches!-l in relation to other settings}
@@ -3265,7 +3273,7 @@ latexindent.pl special2.tex -l=middle1
For example, let’s consider the \texttt{.tex} file in \cref{lst:specialAlgo}.
\index{specialBeginEnd!middle} \index{specialBeginEnd!Algorithms example}
- \cmhlistingsfromfile*[basicstyle=\tiny]{demonstrations/specialAlgo.tex}[enhanced jigsaw,breakable]{\texttt{specialAlgo.tex}}{lst:specialAlgo}
+ \cmhlistingsfromfile[basicstyle=\tiny]{demonstrations/specialAlgo.tex}[enhanced jigsaw,breakable]{\texttt{specialAlgo.tex}}{lst:specialAlgo}
Upon saving the YAML settings in \cref{lst:algo-yaml} and running the command
\index{switches!-l demonstration}
@@ -3277,8 +3285,8 @@ latexindent.pl -l=algo.yaml specialAlgo.tex
then we obtain the output given in \cref{lst:specialAlgo-mod1}.
\begin{cmhtcbraster}
- \cmhlistingsfromfile*[basicstyle=\tiny]{demonstrations/specialAlgo-mod1.tex}{\texttt{specialAlgo.tex} using \cref{lst:algo-yaml}}{lst:specialAlgo-mod1}
- \cmhlistingsfromfile*[style=yaml-LST,basicstyle=\tiny,commentstyle=\color{blue}\ttfamily\tiny]{demonstrations/algo.yaml}[yaml-TCB]{\texttt{algo.yaml}}{lst:algo-yaml}
+ \cmhlistingsfromfile[basicstyle=\tiny]{demonstrations/specialAlgo-mod1.tex}{\texttt{specialAlgo.tex} using \cref{lst:algo-yaml}}{lst:specialAlgo-mod1}
+ \cmhlistingsfromfile[style=yaml-LST,basicstyle=\tiny,commentstyle=\color{blue}\ttfamily\tiny]{demonstrations/algo.yaml}[yaml-TCB]{\texttt{algo.yaml}}{lst:algo-yaml}
\end{cmhtcbraster}
\end{example}
@@ -8414,10 +8422,10 @@ latexindent.pl finetuning5.tex -l=fine-tuning3.yaml
We can use the \texttt{fineTuning} settings to tweak how \texttt{latexindent.pl} finds
environments.
- We begin with the file in \cref{lst:finetuning6}.\announce*{2023-10-13}{fineTuning
+ We begin with the file in \cref{lst:finetuning6}.\announce{2023-10-13}{fineTuning
environments}
- \cmhlistingsfromfile*{demonstrations/finetuning6.tex}{\texttt{finetuning6.tex}}{lst:finetuning6}
+ \cmhlistingsfromfile{demonstrations/finetuning6.tex}{\texttt{finetuning6.tex}}{lst:finetuning6}
Using the settings in \cref{lst:fine-tuning4} and running the command
@@ -8433,8 +8441,8 @@ latexindent.pl finetuning6.tex -m -l=fine-tuning4.yaml
raster column 1/.style={add to width=-.1\textwidth},
raster column 2/.style={add to width=-.3\textwidth},
]
- \cmhlistingsfromfile*{demonstrations/finetuning6-mod1.tex}{\texttt{finetuning6-mod1.tex}}{lst:finetuning6-mod1}
- \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/fine-tuning4.yaml}[MLB-TCB]{\texttt{fine-tuning4.yaml}}{lst:fine-tuning4}
+ \cmhlistingsfromfile{demonstrations/finetuning6-mod1.tex}{\texttt{finetuning6-mod1.tex}}{lst:finetuning6-mod1}
+ \cmhlistingsfromfile[style=yaml-LST]{demonstrations/fine-tuning4.yaml}[MLB-TCB]{\texttt{fine-tuning4.yaml}}{lst:fine-tuning4}
\end{cmhtcbraster}
By using the settings in \cref{lst:fine-tuning4} it means that the default poly-switch
@@ -9307,6 +9315,74 @@ echo 'export LATEXINDENT_CONFIG="/your/config/path"' >> ~/.profile
stored in \texttt{\$HOME/.profile}). All commands in this file a run after login, so
the environment variable will be set after your next login.
+ \section{paths demonstration}\label{sec:appendix:paths}
+
+ As detailed in \vref{subsec:indentconfig} \announce*{2024-04-28}{nested paths
+ demonstration}, the \texttt{paths} field can be specified in any of your \texttt{YAML}
+ files.
+
+ We will use the file in \cref{lst:paths-demo} for demonstration in what follows.
+
+ \cmhlistingsfromfile*{demonstrations/paths-demo.tex}{\texttt{paths-demo.tex}}{lst:paths-demo}
+
+ \begin{example}
+ Consider the settings given in \cref{lst:path1-yaml} and \cref{lst:path2-yaml}.
+
+ \begin{cmhtcbraster}[raster column skip=.1\linewidth]
+ \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/path1.yaml}[yaml-TCB]{\texttt{path1.yaml}}{lst:path1-yaml}
+ \cmhlistingsfromfile*[style=yaml-LST,showspaces=true]{demonstrations/path2.yaml}[yaml-TCB]{\texttt{path2.yaml}}{lst:path2-yaml}
+ \end{cmhtcbraster}
+
+ Upon calling
+
+ \begin{commandshell}
+latexindent.pl -l=path1.yaml paths-demo.tex
+\end{commandshell}
+
+ then we will receive the output given in \cref{lst:paths-demo-mod1}.
+
+ \cmhlistingsfromfile*[showspaces=true]{demonstrations/paths-demo-mod1.tex}{\texttt{paths-demo-mod1.tex}}{lst:paths-demo-mod1}
+
+ We note that the settings from \cref{lst:path2-yaml} have been called from
+ \cref{lst:path1-yaml}.
+
+ On inspection of \texttt{indent.log} from the above call, we see the details of this
+ part of the process given in \cref{lst:path-test1:txt}.
+
+ \cmhlistingsfromfile*{demonstrations/path-test1.txt}{\texttt{path-test1.txt}}{lst:path-test1:txt}
+ \end{example}
+
+ \begin{example}
+ Consider the settings given in \cref{lst:path3-yaml} to \cref{lst:path5-yaml}.
+
+ \begin{cmhtcbraster}[raster columns=3,
+ raster left skip=-3.5cm,
+ raster right skip=-2cm,
+ raster column skip=.03\linewidth]
+ \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/path3.yaml}[yaml-TCB]{\texttt{path3.yaml}}{lst:path3-yaml}
+ \cmhlistingsfromfile*[style=yaml-LST,showspaces=true]{demonstrations/path4.yaml}[yaml-TCB]{\texttt{path4.yaml}}{lst:path4-yaml}
+ \cmhlistingsfromfile*[style=yaml-LST,showspaces=true]{demonstrations/path5.yaml}[yaml-TCB]{\texttt{path5.yaml}}{lst:path5-yaml}
+ \end{cmhtcbraster}
+
+ Upon calling
+
+ \begin{commandshell}
+latexindent.pl -l=path3.yaml paths-demo.tex
+\end{commandshell}
+
+ then we will receive the output given in \cref{lst:paths-demo-mod3}.
+
+ \cmhlistingsfromfile*[showspaces=true]{demonstrations/paths-demo-mod3.tex}{\texttt{paths-demo-mod3.tex}}{lst:paths-demo-mod3}
+
+ We see that \texttt{path3.yaml} calls \texttt{path4.yaml} which in turn calls
+ \texttt{path5.yaml}.
+
+ On inspection of \texttt{indent.log} from the above call, we see the details of this
+ part of the process given in \cref{lst:path-test3:txt}.
+
+ \cmhlistingsfromfile*{demonstrations/path-test3.txt}{\texttt{path-test3.txt}}{lst:path-test3:txt}
+ \end{example}
+
\section{logFilePreferences}\label{app:logfile-demo}
\Vref{lst:logFilePreferences} describes the options for customising the information given
to the log file, and we provide a few demonstrations here.