diff options
author | Norbert Preining <norbert@preining.info> | 2023-09-24 03:01:51 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-09-24 03:01:51 +0000 |
commit | 6a8be81f76f23b75e687a52057720ec29090c63a (patch) | |
tree | 5e46cd3ebf3e653ef5a3bce94235a06cdc10cbe1 /support/latexindent/documentation | |
parent | 509aebc2c9b57ecd1a75118639d135b8251fb313 (diff) |
CTAN sync 202309240301
Diffstat (limited to 'support/latexindent/documentation')
-rw-r--r-- | support/latexindent/documentation/latexindent-yaml-schema.json | 2 | ||||
-rw-r--r-- | support/latexindent/documentation/latexindent.pdf | bin | 1259013 -> 1265479 bytes | |||
-rw-r--r-- | support/latexindent/documentation/latexindent.tex | 108 |
3 files changed, 78 insertions, 32 deletions
diff --git a/support/latexindent/documentation/latexindent-yaml-schema.json b/support/latexindent/documentation/latexindent-yaml-schema.json index 8cf416a1c7..9d44f190af 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.1 2023-09-13", + "description": "latexindent.pl YAML schema helper, V3.23.2 2023-09-23", "type": "object", "properties": { "fileExtensionPreference": { diff --git a/support/latexindent/documentation/latexindent.pdf b/support/latexindent/documentation/latexindent.pdf Binary files differindex 55689ec493..85ac80ed9d 100644 --- a/support/latexindent/documentation/latexindent.pdf +++ b/support/latexindent/documentation/latexindent.pdf diff --git a/support/latexindent/documentation/latexindent.tex b/support/latexindent/documentation/latexindent.tex index df6041f3eb..ceb3675d90 100644 --- a/support/latexindent/documentation/latexindent.tex +++ b/support/latexindent/documentation/latexindent.tex @@ -427,109 +427,109 @@ \lstdefinestyle{specialBeginEnd}{ style=yaml-LST, - firstnumber=258,linerange={258-271}, + firstnumber=258,linerange={258-272}, numbers=left, } \lstdefinestyle{indentAfterHeadings}{ style=yaml-LST, - firstnumber=281,linerange={281-290}, + firstnumber=282,linerange={282-291}, numbers=left, } \lstdefinestyle{noAdditionalIndentGlobalEnv}{ style=yaml-LST, - firstnumber=339,linerange={339-340}, + firstnumber=340,linerange={340-341}, numbers=left, } \lstdefinestyle{noAdditionalIndentGlobal}{ style=yaml-LST, - firstnumber=339,linerange={339-351}, + firstnumber=340,linerange={340-352}, numbers=left, } \lstdefinestyle{indentRulesGlobalEnv}{ style=yaml-LST, - firstnumber=355,linerange={355-356}, + firstnumber=356,linerange={356-357}, numbers=left, } \lstdefinestyle{indentRulesGlobal}{ style=yaml-LST, - firstnumber=355,linerange={355-367}, + firstnumber=356,linerange={356-368}, numbers=left, } \lstdefinestyle{commandCodeBlocks}{ style=yaml-LST, - firstnumber=370,linerange={370-385}, + firstnumber=371,linerange={371-386}, numbers=left, } \lstdefinestyle{modifylinebreaks}{ style=yaml-LST, - firstnumber=500,linerange={500-502}, + firstnumber=501,linerange={501-503}, numbers=left, } \lstdefinestyle{textWrapOptions}{ style=yaml-LST, - firstnumber=530,linerange={530-531}, + firstnumber=531,linerange={531-532}, numbers=left, } \lstdefinestyle{textWrapOptionsAll}{ style=yaml-LST, - firstnumber=530,linerange={530-557}, + firstnumber=531,linerange={531-558}, numbers=left, } \lstdefinestyle{oneSentencePerLine}{ style=yaml-LST, - firstnumber=503,linerange={503-529}, + firstnumber=504,linerange={504-530}, numbers=left, } \lstdefinestyle{sentencesFollow}{ style=yaml-LST, - firstnumber=509,linerange={509-517}, + firstnumber=510,linerange={510-518}, numbers=left, } \lstdefinestyle{sentencesBeginWith}{ style=yaml-LST, - firstnumber=518,linerange={518-521}, + firstnumber=519,linerange={519-522}, numbers=left, } \lstdefinestyle{sentencesEndWith}{ style=yaml-LST, - firstnumber=522,linerange={522-527}, + firstnumber=523,linerange={523-528}, numbers=left, } \lstdefinestyle{sentencesDoNOTcontain}{ style=yaml-LST, - firstnumber=528,linerange={528-530}, + firstnumber=529,linerange={529-530}, numbers=left, } \lstdefinestyle{modifylinebreaksEnv}{ style=yaml-LST, - firstnumber=559,linerange={559-568}, + firstnumber=560,linerange={560-569}, numbers=left, } \lstdefinestyle{replacements}{ style=yaml-LST, - firstnumber=620,linerange={620-628}, + firstnumber=621,linerange={621-629}, numbers=left, } \lstdefinestyle{fineTuning}{ style=yaml-LST, - firstnumber=631,linerange={631-686}, + firstnumber=632,linerange={632-687}, numbers=left, } @@ -3330,6 +3330,45 @@ latexindent.pl special-align.tex -l edge-node2.yaml -o=+-mod2 \announce{2021-06-19}*{lookForThis optional for specialBeginEnd} by default, it is assumed to be 1, which is demonstrated in \cref{lst:edge-node2}.% + Referencing \vref{lst:specialBeginEnd} we see that + \announce*{2023-09-23}{specialBeginEnd body field} each of the \texttt{specialBeginEnd} + fields can \emph{optionally} accept the \texttt{body} field. If the \texttt{body} field + is omitted, then \texttt{latexindent.pl} uses a value that means + \begin{quote} + anything except one of the begin statements from \texttt{specialBeginEnd}. + \end{quote} + + In general, it is usually \emph{not} necessary to specify the \texttt{body} field, but + let's detail an example just for reference. + + \begin{example} + We begin with the example in \cref{lst:special-body} + + \cmhlistingsfromfile*{demonstrations/special-body.tex}{\texttt{special-body.tex}}{lst:special-body} + + Using the settings in \cref{lst:special-body1} and running the command + + \begin{commandshell} +latexindent.pl special-body.tex -l=special-body1.yaml +\end{commandshell} + + gives the output in \cref{lst:special-body-mod1}. + + \begin{cmhtcbraster}[ raster left skip=-3.5cm,] + \cmhlistingsfromfile*{demonstrations/special-body-mod1.tex}{\texttt{special-body.tex} using \cref{lst:special-body1}}{lst:special-body-mod1} + \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/special-body1.yaml}[yaml-TCB]{\texttt{special-body1.yaml}}{lst:special-body1} + \end{cmhtcbraster} + We note that the output in \cref{lst:special-body-mod1} is as we would expect, even + \emph{without} the \texttt{body} field specified. + + Another option (purely for reference) that leaves the output in + \cref{lst:special-body-mod1} unchanged is shown in \cref{lst:special-body2}. + + \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/special-body2.yaml}[yaml-TCB]{\texttt{special-body2.yaml}}{lst:special-body2} + + The \texttt{body} field in \cref{lst:special-body2} means \emph{anything except ( or )}. + \end{example} + \yamltitle{indentAfterHeadings}*{fields} This field enables the user to specify indentation rules that take effect after heading commands such as \lstinline!\part!, \lstinline!\chapter!, \lstinline!\section!, @@ -5488,7 +5527,7 @@ latexindent.pl textwrap10.tex -o=+-mod2.tex -l=wrap-comments2.yaml -m \index{regular expressions!lowercase alph a-z} \index{regular expressions!uppercase alph A-Z}% - \cmhlistingsfromfile*[style=oneSentencePerLine]{../defaultSettings.yaml}[MLB-TCB,width=.85\linewidth,before=\centering]{\texttt{oneSentencePerLine}}{lst:oneSentencePerLine} + \cmhlistingsfromfile[style=oneSentencePerLine]{../defaultSettings.yaml}[MLB-TCB,width=.85\linewidth,before=\centering]{\texttt{oneSentencePerLine}}{lst:oneSentencePerLine} \subsubsection{oneSentencePerLine: overview} An overview of how the oneSentencePerLine routine feature works: @@ -5804,18 +5843,18 @@ latexindent.pl url -m -l=alt-full-stop1.yaml \subsubsection{oneSentencePerLine: sentencesDoNOTcontain} You can specify patterns that sentences do \emph{not} contain using the field - \announce*{2023-09-09}{oneSentencePerLine: sentencesDoNOTcontain} in + \announce{2023-09-09}{oneSentencePerLine: sentencesDoNOTcontain} in \cref{lst:sentencesDoNOTcontain}. - \cmhlistingsfromfile*[style=sentencesDoNOTcontain]{../defaultSettings.yaml}[MLB-TCB,width=.9\linewidth,before=\centering]{\texttt{sentencesDoNOTcontain}}{lst:sentencesDoNOTcontain} + \cmhlistingsfromfile[style=sentencesDoNOTcontain]{../defaultSettings.yaml}[MLB-TCB,width=.9\linewidth,before=\centering]{\texttt{sentencesDoNOTcontain}}{lst:sentencesDoNOTcontain} If sentences run across environments then, by default, they will \emph{not} be - considered a sentence by \texttt{latexindent.pl}. \announce*{2023-09-09}*{updated - example of oneSentencePerLine} + considered a sentence by \texttt{latexindent.pl}. \announce{2023-09-09}*{updated example + of oneSentencePerLine} \begin{example} For example, if we use the \texttt{.tex} file in \cref{lst:multiple-sentences4} - \cmhlistingsfromfile*{demonstrations/multiple-sentences4.tex}{\texttt{multiple-sentences4.tex}}{lst:multiple-sentences4} + \cmhlistingsfromfile{demonstrations/multiple-sentences4.tex}{\texttt{multiple-sentences4.tex}}{lst:multiple-sentences4} and run the command \index{switches!-l demonstration} \index{switches!-m demonstration} @@ -5836,7 +5875,7 @@ latexindent.pl multiple-sentences4 -m -l=manipulate-sentences.yaml We begin with the file in \cref{lst:sentence-dnc1}. - \cmhlistingsfromfile*{demonstrations/sentence-dnc1.tex}{\texttt{sentence-dnc1.tex}}{lst:sentence-dnc1} + \cmhlistingsfromfile{demonstrations/sentence-dnc1.tex}{\texttt{sentence-dnc1.tex}}{lst:sentence-dnc1} Upon running the following commands @@ -5851,8 +5890,8 @@ latexindent.pl sentence-dnc1.tex -m -l=dnc1.yaml raster force size=false, raster column 1/.style={add to width=3cm}, ] - \cmhlistingsfromfile*{demonstrations/sentence-dnc1-mod1.tex}{\texttt{sentence-dnc1-mod1.tex}}{lst:sentence-dnc1-mod1} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/dnc1.yaml}[MLB-TCB,width=.45\textwidth]{\texttt{dnc1.yaml}}{lst:dnc1-yaml} + \cmhlistingsfromfile{demonstrations/sentence-dnc1-mod1.tex}{\texttt{sentence-dnc1-mod1.tex}}{lst:sentence-dnc1-mod1} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/dnc1.yaml}[MLB-TCB,width=.45\textwidth]{\texttt{dnc1.yaml}}{lst:dnc1-yaml} \end{cmhtcbraster} The settings in \cref{lst:dnc1-yaml} say that sentences do \emph{not} contain @@ -5864,7 +5903,7 @@ latexindent.pl sentence-dnc1.tex -m -l=dnc1.yaml We begin with the file in \cref{lst:sentence-dnc2}. - \cmhlistingsfromfile*{demonstrations/sentence-dnc2.tex}{\texttt{sentence-dnc2.tex}}{lst:sentence-dnc2} + \cmhlistingsfromfile{demonstrations/sentence-dnc2.tex}{\texttt{sentence-dnc2.tex}}{lst:sentence-dnc2} Upon running the following commands @@ -5879,8 +5918,8 @@ latexindent.pl sentence-dnc2.tex -m -l=dnc2.yaml raster force size=false, raster column 1/.style={add to width=3cm}, ] - \cmhlistingsfromfile*{demonstrations/sentence-dnc2-mod2.tex}{\texttt{sentence-dnc2-mod2.tex}}{lst:sentence-dnc2-mod2} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/dnc2.yaml}[MLB-TCB,width=.45\textwidth]{\texttt{dnc2.yaml}}{lst:dnc2-yaml} + \cmhlistingsfromfile{demonstrations/sentence-dnc2-mod2.tex}{\texttt{sentence-dnc2-mod2.tex}}{lst:sentence-dnc2-mod2} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/dnc2.yaml}[MLB-TCB,width=.45\textwidth]{\texttt{dnc2.yaml}}{lst:dnc2-yaml} \end{cmhtcbraster} The settings in \cref{lst:dnc2-yaml} say that sentences do \emph{not} contain @@ -5891,7 +5930,7 @@ latexindent.pl sentence-dnc2.tex -m -l=dnc2.yaml We can turn off \texttt{sentenceDoNOTcontain} by setting it to \texttt{0} as in \cref{lst:dnc-off-yaml}. - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/dnc-off.yaml}[MLB-TCB,width=.45\textwidth]{\texttt{dnc-off.yaml}}{lst:dnc-off-yaml} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/dnc-off.yaml}[MLB-TCB,width=.45\textwidth]{\texttt{dnc-off.yaml}}{lst:dnc-off-yaml} The settings in \cref{lst:dnc-off-yaml} mean that sentences can contain any character. \end{example} @@ -8877,6 +8916,7 @@ if ! command -v docker &> /dev/null; then sudo groupadd docker sudo gpasswd -a "$USER" docker sudo systemctl restart docker + newgrp docker fi # download image and execute @@ -8884,6 +8924,12 @@ docker pull ghcr.io/cmhughes/latexindent.pl docker run ghcr.io/cmhughes/latexindent.pl -h \end{cmhlistings} + Once I have run the above, on subsequent logins I run + \begin{cmhlistings}[style=tcblatex,language=Bash]{\texttt{docker-install.sh}}{lst:docker-install} +newgrp docker +docker run ghcr.io/cmhughes/latexindent.pl -h +\end{cmhlistings} + \subsection{How to format on Docker} When you use \texttt{latexindent} with the docker image, you have to mount target \texttt{tex} file like this: |