diff options
Diffstat (limited to 'Master/texmf-dist/doc/support/latexindent/subsubsec-headings.tex')
-rw-r--r-- | Master/texmf-dist/doc/support/latexindent/subsubsec-headings.tex | 56 |
1 files changed, 19 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/support/latexindent/subsubsec-headings.tex b/Master/texmf-dist/doc/support/latexindent/subsubsec-headings.tex index a8a344e41c1..088ece973dd 100644 --- a/Master/texmf-dist/doc/support/latexindent/subsubsec-headings.tex +++ b/Master/texmf-dist/doc/support/latexindent/subsubsec-headings.tex @@ -9,35 +9,29 @@ On using the YAML file in \cref{lst:headings3yaml} by running the command \begin{commandshell} latexindent.pl headings2.tex -l headings3.yaml - \end{commandshell} +\end{commandshell} we obtain the output in \cref{lst:headings2-mod3}. Note that the argument of \texttt{paragraph} has received (default) indentation, and that the body after the heading statement has received (default) indentation. - \begin{minipage}{.45\textwidth} + \begin{cmhtcbraster}[raster column skip=.1\linewidth] \cmhlistingsfromfile{demonstrations/headings2-mod3.tex}{\texttt{headings2.tex} using \cref{lst:headings3yaml}}{lst:headings2-mod3} - \end{minipage}% - \hfill - \begin{minipage}{.45\textwidth} \cmhlistingsfromfile[style=yaml-LST]*{demonstrations/headings3.yaml}[yaml-TCB]{\texttt{headings3.yaml}}{lst:headings3yaml} - \end{minipage} + \end{cmhtcbraster} If we specify \texttt{noAdditionalIndent} as in \cref{lst:headings4yaml} and run the command \begin{commandshell} latexindent.pl headings2.tex -l headings4.yaml - \end{commandshell} +\end{commandshell} then we receive the output in \cref{lst:headings2-mod4}. Note that the arguments \emph{and} the body after the heading of \texttt{paragraph} has received no additional indentation, because we have specified \texttt{noAdditionalIndent} in scalar form. - \begin{minipage}{.45\textwidth} + \begin{cmhtcbraster}[raster column skip=.1\linewidth] \cmhlistingsfromfile{demonstrations/headings2-mod4.tex}{\texttt{headings2.tex} using \cref{lst:headings4yaml}}{lst:headings2-mod4} - \end{minipage}% - \hfill - \begin{minipage}{.45\textwidth} \cmhlistingsfromfile[style=yaml-LST]*{demonstrations/headings4.yaml}[yaml-TCB]{\texttt{headings4.yaml}}{lst:headings4yaml} - \end{minipage} + \end{cmhtcbraster} Similarly, if we specify \texttt{indentRules} as in \cref{lst:headings5yaml} and run analogous commands to those above, we receive the output in \cref{lst:headings2-mod5}; note @@ -45,37 +39,31 @@ latexindent.pl headings2.tex -l headings4.yaml \emph{after the heading} of \texttt{paragraph} have \emph{all} received three tabs worth of indentation. - \begin{minipage}{.55\textwidth} + \begin{cmhtcbraster}[raster force size=false, + raster column 1/.style={add to width=1cm}, + raster column 2/.style={add to width=-1cm}, + ] \cmhlistingsfromfile[showtabs=true]{demonstrations/headings2-mod5.tex}{\texttt{headings2.tex} using \cref{lst:headings5yaml}}{lst:headings2-mod5} - \end{minipage}% - \hfill - \begin{minipage}{.42\textwidth} \cmhlistingsfromfile[style=yaml-LST]*{demonstrations/headings5.yaml}[yaml-TCB]{\texttt{headings5.yaml}}{lst:headings5yaml} - \end{minipage} + \end{cmhtcbraster} We may, instead, specify \texttt{noAdditionalIndent} in `field' form, as in \cref{lst:headings6yaml} which gives the output in \cref{lst:headings2-mod6}. - \begin{minipage}{.45\textwidth} + \begin{cmhtcbraster} \cmhlistingsfromfile{demonstrations/headings2-mod6.tex}{\texttt{headings2.tex} using \cref{lst:headings6yaml}}{lst:headings2-mod6} - \end{minipage}% - \hfill - \begin{minipage}{.45\textwidth} \cmhlistingsfromfile[style=yaml-LST]*{demonstrations/headings6.yaml}[yaml-TCB]{\texttt{headings6.yaml}}{lst:headings6yaml} - \end{minipage} + \end{cmhtcbraster} Analogously, we may specify \texttt{indentRules} as in \cref{lst:headings7yaml} which gives the output in \cref{lst:headings2-mod7}; note that mandatory argument text has only received a single space of indentation, while the body after the heading has received three tabs worth of indentation. - \begin{minipage}{.45\textwidth} + \begin{cmhtcbraster} \cmhlistingsfromfile[showtabs=true]{demonstrations/headings2-mod7.tex}{\texttt{headings2.tex} using \cref{lst:headings7yaml}}{lst:headings2-mod7} - \end{minipage}% - \hfill - \begin{minipage}{.45\textwidth} \cmhlistingsfromfile[style=yaml-LST]*{demonstrations/headings7.yaml}[yaml-TCB]{\texttt{headings7.yaml}}{lst:headings7yaml} - \end{minipage} + \end{cmhtcbraster} Finally, let's consider \texttt{noAdditionalIndentGlobal} and \texttt{indentRulesGlobal} shown in \cref{lst:headings8yaml,lst:headings9yaml} respectively, with respective output in \cref{lst:headings2-mod8,lst:headings2-mod9}. @@ -86,18 +74,12 @@ latexindent.pl headings2.tex -l headings4.yaml (from the global rule specified in \cref{lst:headings9yaml}), and the remaining body after \texttt{paragraph} has received just two spaces of indentation. - \begin{minipage}{.45\textwidth} + \begin{cmhtcbraster} \cmhlistingsfromfile{demonstrations/headings2-mod8.tex}{\texttt{headings2.tex} using \cref{lst:headings8yaml}}{lst:headings2-mod8} - \end{minipage}% - \hfill - \begin{minipage}{.45\textwidth} \cmhlistingsfromfile[style=yaml-LST]*{demonstrations/headings8.yaml}[yaml-TCB]{\texttt{headings8.yaml}}{lst:headings8yaml} - \end{minipage} + \end{cmhtcbraster} - \begin{minipage}{.45\textwidth} + \begin{cmhtcbraster} \cmhlistingsfromfile[showspaces=true,showtabs=true]{demonstrations/headings2-mod9.tex}{\texttt{headings2.tex} using \cref{lst:headings9yaml}}{lst:headings2-mod9} - \end{minipage}% - \hfill - \begin{minipage}{.45\textwidth} \cmhlistingsfromfile[style=yaml-LST]*{demonstrations/headings9.yaml}[yaml-TCB]{\texttt{headings9.yaml}}{lst:headings9yaml} - \end{minipage} + \end{cmhtcbraster} |