diff options
author | Karl Berry <karl@freefriends.org> | 2023-05-01 20:28:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-05-01 20:28:03 +0000 |
commit | 659053701931390e42db760fd7831b91ae9f4638 (patch) | |
tree | 3b23458f21f33a1a844ba003ab343998147967fb /Master/texmf-dist/doc/support/latexindent | |
parent | 7765ec96d6b06b71d36d94607dbeecd5261f2453 (diff) |
latexindent (1may23)
git-svn-id: svn://tug.org/texlive/trunk@66981 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support/latexindent')
-rw-r--r-- | Master/texmf-dist/doc/support/latexindent/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/latexindent/latexindent.pdf | bin | 1244704 -> 1246412 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/support/latexindent/latexindent.tex | 203 |
4 files changed, 151 insertions, 56 deletions
diff --git a/Master/texmf-dist/doc/support/latexindent/README b/Master/texmf-dist/doc/support/latexindent/README index 95461bf24f6..c799fc2b290 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.20.6, 2023-04-11 + latexindent.pl, version 3.21, 2023-05-01 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 ec760e70acf..b29664e2c05 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.20.6 2023-04-11", + "description": "latexindent.pl YAML schema helper, V3.21 2023-05-01", "type": "object", "properties": { "fileExtensionPreference": { diff --git a/Master/texmf-dist/doc/support/latexindent/latexindent.pdf b/Master/texmf-dist/doc/support/latexindent/latexindent.pdf Binary files differindex deaf1a130fe..dfdeea52ccf 100644 --- a/Master/texmf-dist/doc/support/latexindent/latexindent.pdf +++ b/Master/texmf-dist/doc/support/latexindent/latexindent.pdf diff --git a/Master/texmf-dist/doc/support/latexindent/latexindent.tex b/Master/texmf-dist/doc/support/latexindent/latexindent.tex index 50fa1a45e7e..a85bdfafaef 100644 --- a/Master/texmf-dist/doc/support/latexindent/latexindent.tex +++ b/Master/texmf-dist/doc/support/latexindent/latexindent.tex @@ -409,121 +409,121 @@ \lstdefinestyle{lookForAlignDelims}{ style=yaml-LST, - firstnumber=158,linerange={158-174}, + firstnumber=158,linerange={158-176}, numbers=left, } \lstdefinestyle{indentAfterItems}{ style=yaml-LST, - firstnumber=237,linerange={237-244}, + firstnumber=239,linerange={239-246}, numbers=left, } \lstdefinestyle{itemNames}{ style=yaml-LST, - firstnumber=250,linerange={250-252}, + firstnumber=252,linerange={252-254}, numbers=left, } \lstdefinestyle{specialBeginEnd}{ style=yaml-LST, - firstnumber=256,linerange={256-269}, + firstnumber=258,linerange={258-271}, numbers=left, } \lstdefinestyle{indentAfterHeadings}{ style=yaml-LST, - firstnumber=279,linerange={279-288}, + firstnumber=281,linerange={281-290}, numbers=left, } \lstdefinestyle{noAdditionalIndentGlobalEnv}{ style=yaml-LST, - firstnumber=337,linerange={337-338}, + firstnumber=339,linerange={339-340}, numbers=left, } \lstdefinestyle{noAdditionalIndentGlobal}{ style=yaml-LST, - firstnumber=337,linerange={337-349}, + firstnumber=339,linerange={339-351}, numbers=left, } \lstdefinestyle{indentRulesGlobalEnv}{ style=yaml-LST, - firstnumber=353,linerange={353-354}, + firstnumber=355,linerange={355-356}, numbers=left, } \lstdefinestyle{indentRulesGlobal}{ style=yaml-LST, - firstnumber=353,linerange={353-365}, + firstnumber=355,linerange={355-367}, numbers=left, } \lstdefinestyle{commandCodeBlocks}{ style=yaml-LST, - firstnumber=368,linerange={368-383}, + firstnumber=370,linerange={370-385}, numbers=left, } \lstdefinestyle{modifylinebreaks}{ style=yaml-LST, - firstnumber=498,linerange={498-500}, + firstnumber=500,linerange={500-502}, numbers=left, } \lstdefinestyle{textWrapOptions}{ style=yaml-LST, - firstnumber=526,linerange={526-527}, + firstnumber=528,linerange={528-529}, numbers=left, } \lstdefinestyle{textWrapOptionsAll}{ style=yaml-LST, - firstnumber=526,linerange={526-553}, + firstnumber=528,linerange={528-555}, numbers=left, } \lstdefinestyle{oneSentencePerLine}{ style=yaml-LST, - firstnumber=501,linerange={501-525}, + firstnumber=503,linerange={503-527}, numbers=left, } \lstdefinestyle{sentencesFollow}{ style=yaml-LST, - firstnumber=507,linerange={507-515}, + firstnumber=509,linerange={509-517}, numbers=left, } \lstdefinestyle{sentencesBeginWith}{ style=yaml-LST, - firstnumber=516,linerange={516-519}, + firstnumber=518,linerange={518-521}, numbers=left, } \lstdefinestyle{sentencesEndWith}{ style=yaml-LST, - firstnumber=520,linerange={520-525}, + firstnumber=522,linerange={522-527}, numbers=left, } \lstdefinestyle{modifylinebreaksEnv}{ style=yaml-LST, - firstnumber=555,linerange={555-564}, + firstnumber=557,linerange={557-566}, numbers=left, } \lstdefinestyle{replacements}{ style=yaml-LST, - firstnumber=616,linerange={616-624}, + firstnumber=618,linerange={618-626}, numbers=left, } \lstdefinestyle{fineTuning}{ style=yaml-LST, - firstnumber=627,linerange={627-679}, + firstnumber=629,linerange={629-681}, numbers=left, } @@ -1000,8 +1000,8 @@ latexindent.pl -l quick-start8.yaml quick-start.tex gives \cref{lst:quick-start-mod8}; note that the \emph{preamble} has been indented. \begin{cmhtcbraster} - \cmhlistingsfromfile*{demonstrations/quick-start-mod8.tex}{\texttt{quick-start-mod8.tex}}{lst:quick-start-mod8} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/quick-start8.yaml}[yaml-TCB]{\texttt{quick-start8.yaml}}{lst:quick-start8yaml} + \cmhlistingsfromfile{demonstrations/quick-start-mod8.tex}{\texttt{quick-start-mod8.tex}}{lst:quick-start-mod8} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/quick-start8.yaml}[yaml-TCB]{\texttt{quick-start8.yaml}}{lst:quick-start8yaml} \end{cmhtcbraster} See \cref{subsec:filecontents:preamble}. @@ -1018,8 +1018,8 @@ latexindent.pl -l quick-start9.yaml quick-start.tex gives \cref{lst:quick-start-mod9}. \begin{cmhtcbraster} - \cmhlistingsfromfile*{demonstrations/quick-start-mod9.tex}{\texttt{quick-start-mod9.tex}}{lst:quick-start-mod9} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/quick-start9.yaml}[yaml-TCB]{\texttt{quick-start9.yaml}}{lst:quick-start9yaml} + \cmhlistingsfromfile{demonstrations/quick-start-mod9.tex}{\texttt{quick-start-mod9.tex}}{lst:quick-start-mod9} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/quick-start9.yaml}[yaml-TCB]{\texttt{quick-start9.yaml}}{lst:quick-start9yaml} \end{cmhtcbraster} See \cref{sec:noadd-indent-rules}. @@ -1793,7 +1793,7 @@ latexindent.pl myfile.tex to load your own settings files. We focus our discussion on \texttt{indentconfig.yaml}, but there are other options which - are detailed in \cref{app:indentconfig:options}. \announce*{2023-01-01}{indentconfig + are detailed in \cref{app:indentconfig:options}. \announce{2023-01-01}{indentconfig location options} \subsection{indentconfig.yaml and .indentconfig.yaml} @@ -2460,7 +2460,16 @@ latexindent.pl tabular1.tex the same column, discussed in \cref{sec:delimiter-reg-ex}; \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}. + not (default: 1), discussed in \cref{sec:lookForChildCodeBlocks}; + \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} + 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 + \cref{sec:alignContentAfterDoubleBackSlash}. \end{itemize} \begin{example} @@ -3037,6 +3046,59 @@ latexindent.pl tabular-DM-1.tex -l=dontMeasure1a.yaml -o=+-mod1a \end{cmhtcbraster} \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}. + + \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} + \end{cmhtcbraster} + + Using the settings given in \cref{lst:alignContentAfterDBS1} and running + + \begin{commandshell} +latexindent.pl -s tabular5.tex -l alignContentAfterDBS1 -o=+-mod1 +\end{commandshell} + + gives the output in \cref{lst:tabular5-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} + \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 + content after double back slash} + + Starting from \cref{lst:tabular5} and using the the settings given in + \cref{lst:alignContentAfterDBS2} + + \begin{commandshell} +latexindent.pl -s tabular5.tex -l alignContentAfterDBS2 -o=+-mod2 +\end{commandshell} + + gives the output in \cref{lst:tabular5-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} + \end{cmhtcbraster} + \end{example} + \subsection{Indent after items, specials and headings} \yamltitle{indentAfterItems}*{fields} The environment names specified in \texttt{indentAfterItems} tell @@ -4699,7 +4761,7 @@ latexindent.pl myfile.tex -m -o=+-mod1 \item it happens \emph{after} verbatim blocks have been found; \item it happens \emph{after} the oneSentencePerLine routine (see \cref{sec:onesentenceperline}); - \item it can happen \emph{before} or \emph{after} \announce*{2023-01-01}{text wrap: + \item it can happen \emph{before} or \emph{after} \announce{2023-01-01}{text wrap: before/after} all of the other code blocks are found and does \emph{not} operate on a per-code-block basis; when using \texttt{before} this means that, including indentation, you may receive a column width wider than that which you specify in @@ -4730,7 +4792,7 @@ latexindent.pl myfile.tex -m -o=+-mod1 (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} - \item trailing comments can receive text wrapping \announce*{2023-01-01}{text wrap + \item trailing comments can receive text wrapping \announce{2023-01-01}{text wrap trailing comments}; examples are shown in \cref{subsubsec:tw:comments} and \cref{subsubsec:ospl:tw:comments}. \end{enumerate} @@ -5196,7 +5258,7 @@ latexindent.pl -m tw-tc6.tex -l textwrap1A.yaml -o=+-mod1 \subsubsection{Text wrap: when before/after}\label{subsubsec:tw:before:after} The text wrapping routine operates, by default, \texttt{before} the - \announce*{2023-01-01}{text wrap: before/after details} code blocks have been found, but + \announce{2023-01-01}{text wrap: before/after details} code blocks have been found, but this can be changed to \texttt{after}: \begin{itemize} \item \texttt{before} means it is likely that the columns of wrapped text may \emph{exceed} the @@ -5210,7 +5272,7 @@ latexindent.pl -m tw-tc6.tex -l textwrap1A.yaml -o=+-mod1 \begin{example} Let's begin with the file in \cref{lst:textwrap8}. - \cmhlistingsfromfile*{demonstrations/textwrap8.tex}{\texttt{textwrap8.tex}}{lst:textwrap8} + \cmhlistingsfromfile{demonstrations/textwrap8.tex}{\texttt{textwrap8.tex}}{lst:textwrap8} Using the settings given in \cref{lst:tw-before1} and running the command @@ -5224,8 +5286,8 @@ latexindent.pl textwrap8.tex -o=+-mod1.tex -l=tw-before1.yaml -m raster left skip=-1.5cm, raster right skip=-0cm, raster column skip=.06\linewidth] - \cmhlistingsfromfile*{demonstrations/textwrap8-mod1.tex}{\texttt{textwrap8-mod1.tex}}{lst:textwrap8-mod1} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/tw-before1.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{tw-before1.yaml}}{lst:tw-before1} + \cmhlistingsfromfile{demonstrations/textwrap8-mod1.tex}{\texttt{textwrap8-mod1.tex}}{lst:textwrap8-mod1} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/tw-before1.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{tw-before1.yaml}}{lst:tw-before1} \end{cmhtcbraster} We note that, in \cref{lst:textwrap8-mod1}, that the wrapped text has \emph{exceeded} @@ -5248,8 +5310,8 @@ latexindent.pl textwrap8.tex -o=+-mod2.tex -l=tw-after1.yaml -m raster left skip=-1.5cm, raster right skip=-0cm, raster column skip=.06\linewidth] - \cmhlistingsfromfile*{demonstrations/textwrap8-mod2.tex}{\texttt{textwrap8-mod2.tex}}{lst:textwrap8-mod2} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/tw-after1.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{tw-after1.yaml}}{lst:tw-after1} + \cmhlistingsfromfile{demonstrations/textwrap8-mod2.tex}{\texttt{textwrap8-mod2.tex}}{lst:textwrap8-mod2} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/tw-after1.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{tw-after1.yaml}}{lst:tw-after1} \end{cmhtcbraster} We note that, in \cref{lst:textwrap8-mod2}, that the wrapped text has \emph{obeyed} the @@ -5258,14 +5320,14 @@ latexindent.pl textwrap8.tex -o=+-mod2.tex -l=tw-after1.yaml -m \subsubsection{Text wrap: wrapping comments}\label{subsubsec:tw:comments} You can instruct \texttt{latexindent.pl} to apply text wrapping to comments - \announce*{2023-01-01}{text wrap trailing comments}; we demonstrate this with examples, + \announce{2023-01-01}{text wrap trailing comments}; we demonstrate this with examples, see also \cref{subsubsec:ospl:tw:comments}. \index{comments!text wrap} \index{text wrap!comments} \begin{example} We use the file in \cref{lst:textwrap9} which contains a trailing comment block. - \cmhlistingsfromfile*{demonstrations/textwrap9.tex}{\texttt{textwrap9.tex}}{lst:textwrap9} + \cmhlistingsfromfile{demonstrations/textwrap9.tex}{\texttt{textwrap9.tex}}{lst:textwrap9} Using the settings given in \cref{lst:wrap-comments1} and running the command @@ -5279,8 +5341,8 @@ latexindent.pl textwrap9.tex -o=+-mod1.tex -l=wrap-comments1.yaml -m raster left skip=-1.5cm, raster right skip=-0cm, raster column skip=.06\linewidth] - \cmhlistingsfromfile*{demonstrations/textwrap9-mod1.tex}{\texttt{textwrap9-mod1.tex}}{lst:textwrap9-mod1} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/wrap-comments1.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{wrap-comments1.yaml}}{lst:wrap-comments1} + \cmhlistingsfromfile{demonstrations/textwrap9-mod1.tex}{\texttt{textwrap9-mod1.tex}}{lst:textwrap9-mod1} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/wrap-comments1.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{wrap-comments1.yaml}}{lst:wrap-comments1} \end{cmhtcbraster} We note that, in \cref{lst:textwrap9-mod1}, that the comments have been \emph{combined @@ -5290,7 +5352,7 @@ latexindent.pl textwrap9.tex -o=+-mod1.tex -l=wrap-comments1.yaml -m \begin{example} We use the file in \cref{lst:textwrap10} which contains a trailing comment block. - \cmhlistingsfromfile*{demonstrations/textwrap10.tex}{\texttt{textwrap10.tex}}{lst:textwrap10} + \cmhlistingsfromfile{demonstrations/textwrap10.tex}{\texttt{textwrap10.tex}}{lst:textwrap10} Using the settings given in \cref{lst:wrap-comments1:repeat} and running the command @@ -5304,8 +5366,8 @@ latexindent.pl textwrap10.tex -o=+-mod1.tex -l=wrap-comments1.yaml -m raster left skip=-1.5cm, raster right skip=-0cm, raster column skip=.06\linewidth] - \cmhlistingsfromfile*{demonstrations/textwrap10-mod1.tex}{\texttt{textwrap10-mod1.tex}}{lst:textwrap10-mod1} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/wrap-comments1.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{wrap-comments1.yaml}}{lst:wrap-comments1:repeat} + \cmhlistingsfromfile{demonstrations/textwrap10-mod1.tex}{\texttt{textwrap10-mod1.tex}}{lst:textwrap10-mod1} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/wrap-comments1.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{wrap-comments1.yaml}}{lst:wrap-comments1:repeat} \end{cmhtcbraster} We note that, in \cref{lst:textwrap10-mod1}, that the comments have been \emph{combined @@ -5329,8 +5391,8 @@ latexindent.pl textwrap10.tex -o=+-mod2.tex -l=wrap-comments2.yaml -m raster left skip=-1.5cm, raster right skip=-0cm, raster column skip=.06\linewidth] - \cmhlistingsfromfile*{demonstrations/textwrap10-mod2.tex}{\texttt{textwrap10-mod2.tex}}{lst:textwrap10-mod2} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/wrap-comments2.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{wrap-comments2.yaml}}{lst:wrap-comments2} + \cmhlistingsfromfile{demonstrations/textwrap10-mod2.tex}{\texttt{textwrap10-mod2.tex}}{lst:textwrap10-mod2} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/wrap-comments2.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{wrap-comments2.yaml}}{lst:wrap-comments2} \end{cmhtcbraster} We note that, in \cref{lst:textwrap10-mod2}, that the comments have been \emph{combined @@ -5881,7 +5943,7 @@ latexindent.pl multiple-sentences6 -m -l=sentence-wrap1.yaml,itemize.yaml \subsubsection{oneSentencePerLine: text wrapping and indenting sentences, when before/after}\label{subsubsec:ospl:before:after} The text wrapping routine operates, by default, \texttt{before} the - \announce*{2023-01-01}{text wrap: before/after details} code blocks have been found, but + \announce{2023-01-01}{text wrap: before/after details} code blocks have been found, but this can be changed to \texttt{after}: \begin{itemize} \item \texttt{before} means it is likely that the columns of wrapped text may \emph{exceed} the @@ -5895,7 +5957,7 @@ latexindent.pl multiple-sentences6 -m -l=sentence-wrap1.yaml,itemize.yaml \begin{example} Let's begin with the file in \cref{lst:multiple-sentences8}. - \cmhlistingsfromfile*{demonstrations/multiple-sentences8.tex}{\texttt{multiple-sentences8.tex}}{lst:multiple-sentences8} + \cmhlistingsfromfile{demonstrations/multiple-sentences8.tex}{\texttt{multiple-sentences8.tex}}{lst:multiple-sentences8} Using the settings given in \cref{lst:sentence-wrap2} and running the command @@ -5909,8 +5971,8 @@ latexindent.pl multiple-sentences8 -o=+-mod1.tex -l=sentence-wrap2 -m raster left skip=-1.5cm, raster right skip=-0cm, raster column skip=.06\linewidth] - \cmhlistingsfromfile*{demonstrations/multiple-sentences8-mod1.tex}{\texttt{multiple-sentences8-mod1.tex}}{lst:multiple-sentences8-mod1} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/sentence-wrap2.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{sentence-wrap2.yaml}}{lst:sentence-wrap2} + \cmhlistingsfromfile{demonstrations/multiple-sentences8-mod1.tex}{\texttt{multiple-sentences8-mod1.tex}}{lst:multiple-sentences8-mod1} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/sentence-wrap2.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{sentence-wrap2.yaml}}{lst:sentence-wrap2} \end{cmhtcbraster} We note that, in \cref{lst:multiple-sentences8-mod1}, that the wrapped text has @@ -5934,8 +5996,8 @@ latexindent.pl multiple-sentences8.tex -o=+-mod2.tex -l=sentence-wrap3 -m raster left skip=-1.5cm, raster right skip=-0cm, raster column skip=.06\linewidth] - \cmhlistingsfromfile*{demonstrations/multiple-sentences8-mod2.tex}{\texttt{multiple-sentences8-mod2.tex}}{lst:multiple-sentences8-mod2} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/sentence-wrap3.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{sentence-wrap3.yaml}}{lst:sentence-wrap3} + \cmhlistingsfromfile{demonstrations/multiple-sentences8-mod2.tex}{\texttt{multiple-sentences8-mod2.tex}}{lst:multiple-sentences8-mod2} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/sentence-wrap3.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{sentence-wrap3.yaml}}{lst:sentence-wrap3} \end{cmhtcbraster} We note that, in \cref{lst:multiple-sentences8-mod2}, that the wrapped text has @@ -5951,7 +6013,7 @@ latexindent.pl multiple-sentences8.tex -o=+-mod2.tex -l=sentence-wrap3 -m \begin{example} Let's begin with the file in \cref{lst:multiple-sentences9}. - \cmhlistingsfromfile*{demonstrations/multiple-sentences9.tex}{\texttt{multiple-sentences9.tex}}{lst:multiple-sentences9} + \cmhlistingsfromfile{demonstrations/multiple-sentences9.tex}{\texttt{multiple-sentences9.tex}}{lst:multiple-sentences9} Using the settings given in \cref{lst:sentence-wrap4} and running the command @@ -5965,8 +6027,8 @@ latexindent.pl multiple-sentences9 -o=+-mod1.tex -l=sentence-wrap4 -m raster left skip=-1.5cm, raster right skip=-0cm, raster column skip=.06\linewidth] - \cmhlistingsfromfile*{demonstrations/multiple-sentences9-mod1.tex}{\texttt{multiple-sentences9-mod1.tex}}{lst:multiple-sentences9-mod1} - \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/sentence-wrap4.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{sentence-wrap4.yaml}}{lst:sentence-wrap4} + \cmhlistingsfromfile{demonstrations/multiple-sentences9-mod1.tex}{\texttt{multiple-sentences9-mod1.tex}}{lst:multiple-sentences9-mod1} + \cmhlistingsfromfile[style=yaml-LST]{demonstrations/sentence-wrap4.yaml}[MLB-TCB,width=0.4\linewidth]{\texttt{sentence-wrap4.yaml}}{lst:sentence-wrap4} \end{cmhtcbraster} We note that, in \cref{lst:multiple-sentences9-mod1}, that the sentences have been @@ -6591,7 +6653,7 @@ latexindent.pl -m env-mlb7.tex -l env-mlb13,env-mlb14,UnpreserveBlankLines (\vref{lst:tabularafter:basic}), commands (\vref{lst:matrixafter}), or special code blocks (\vref{lst:specialafter}). \footnote{There is no longer any need for the code block to be specified within \texttt{lookForAlignDelims} for DBS poly-switches to - activate. \announce*{2023-01-01}*{DBS poly-switches no need to specify + activate. \announce{2023-01-01}*{DBS poly-switches no need to specify lookForAlignDelims}} \index{delimiters!poly-switches for double backslash} \index{modifying linebreaks! surrounding double backslash} \index{poly-switches!for double back slash (delimiters)}% @@ -6654,6 +6716,39 @@ latexindent.pl -m tabular3.tex -l DBS2.yaml \end{itemize} \end{example} + \begin{example} + We can combine DBS poly-switches with, for example, the + \texttt{alignContentAfterDoubleBackSlash} in + \vref{sec:alignContentAfterDoubleBackSlash}. + + For example, starting with the file \cref{lst:tabular6}, and using the settings in + \vref{lst:alignContentAfterDBS1,lst:alignContentAfterDBS2} and running + \begin{widepage} + + \begin{commandshell} +latexindent.pl -s -m -l alignContentAfterDBS1.yaml,DBS1.yaml tabular6.tex -o=+-mod1 +latexindent.pl -s -m -l alignContentAfterDBS2.yaml,DBS1.yaml tabular6.tex -o=+-mod2 +\end{commandshell} + + \end{widepage} + gives the respective outputs shown in \cref{lst:tabular6-mod1,lst:tabular6-mod2}. + \begin{cmhtcbraster}[raster columns=3, + 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} + \end{cmhtcbraster} + We note that: + \begin{itemize} + \item in \cref{lst:tabular6-mod1} the content \emph{after} the double back slash has + been aligned; + \item in \cref{lst:tabular6-mod2} we see that 3 spaces have been added after the + double back slash. + \end{itemize} + \end{example} + \paragraph{Double backslash finishes with line break} \begin{example} Let's now explore \texttt{DBSFinishesWithLineBreak} ($\ElseFinishesWithLineBreak$ in @@ -8888,7 +8983,7 @@ latexindent.pl -l -m -s -w myfile.tex \section{indentconfig options}\label{app:indentconfig:options} This section describes the possible locations for the main configuration file, discussed in \cref{sec:indentconfig}. Thank you to \cite{nehctargl} for this - contribution. \announce*{2023-01-01}{indentconfig location options} + contribution. \announce{2023-01-01}{indentconfig location options} The possible locations of \texttt{indentconfig.yaml} are read one after the other, and reading stops when a valid file is found in one of the paths. |