summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/latexindent/subsubsec-ifelsefi.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-08-14 22:01:47 +0000
committerKarl Berry <karl@freefriends.org>2018-08-14 22:01:47 +0000
commita54d196b0fc4715e3d2dbcfe62cfccea6aae57fe (patch)
tree40ebe5b6f9da50b68cd6ae2546a9e32124cb46ed /Master/texmf-dist/doc/support/latexindent/subsubsec-ifelsefi.tex
parent2feb602ca10b928ee4cba97b3ae95a8ef6b853d4 (diff)
latexindent (15aug18)
git-svn-id: svn://tug.org/texlive/trunk@48402 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support/latexindent/subsubsec-ifelsefi.tex')
-rw-r--r--Master/texmf-dist/doc/support/latexindent/subsubsec-ifelsefi.tex42
1 files changed, 23 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/support/latexindent/subsubsec-ifelsefi.tex b/Master/texmf-dist/doc/support/latexindent/subsubsec-ifelsefi.tex
index f105498ca24..8be17304247 100644
--- a/Master/texmf-dist/doc/support/latexindent/subsubsec-ifelsefi.tex
+++ b/Master/texmf-dist/doc/support/latexindent/subsubsec-ifelsefi.tex
@@ -1,9 +1,9 @@
% arara: pdflatex: {shell: yes, files: [latexindent]}
\subsubsection{ifelsefi code blocks}
- Let's use the simple example shown in \cref{lst:ifelsefi1}; when
- \texttt{latexindent.pl} operates on this file, the output as in \cref{lst:ifelsefi1-default};
- note that the body of each of the \lstinline!\if! statements have been indented,
- and that the \lstinline!\else! statement has been accounted for correctly.
+ Let's use the simple example shown in \cref{lst:ifelsefi1}; when \texttt{latexindent.pl}
+ operates on this file, the output as in \cref{lst:ifelsefi1-default}; note that the body of
+ each of the \lstinline!\if! statements have been indented, and that the
+ \lstinline!\else! statement has been accounted for correctly.
\begin{minipage}{.45\textwidth}
\cmhlistingsfromfile{demonstrations/ifelsefi1.tex}{\texttt{ifelsefi1.tex}}{lst:ifelsefi1}
@@ -13,9 +13,10 @@
\cmhlistingsfromfile{demonstrations/ifelsefi1-default.tex}{\texttt{ifelsefi1.tex} default output}{lst:ifelsefi1-default}
\end{minipage}
- It is recommended to specify \texttt{noAdditionalIndent} and \texttt{indentRules} in the `scalar' form only
- for these type of code blocks, although the `field' form would work, assuming that \texttt{body} was specified.
- Examples are shown in \cref{lst:ifnum-noAdd,lst:ifnum-indent-rules}.
+ It is recommended to specify \texttt{noAdditionalIndent} and \texttt{indentRules} in the
+ `scalar' form only for these type of code blocks, although the `field' form would work,
+ assuming that \texttt{body} was specified. Examples are shown in
+ \cref{lst:ifnum-noAdd,lst:ifnum-indent-rules}.
\begin{minipage}{.45\textwidth}
\cmhlistingsfromfile[style=yaml-LST]*{demonstrations/ifnum-noAdd.yaml}[width=.8\linewidth,before=\centering,yaml-TCB]{\texttt{ifnum-noAdd.yaml}}{lst:ifnum-noAdd}
@@ -30,9 +31,10 @@
latexindent.pl ifelsefi1.tex -local ifnum-noAdd.yaml
latexindent.pl ifelsefi1.tex -l ifnum-indent-rules.yaml
\end{commandshell}
- we receive the respective output given in \cref{lst:ifelsefi1-output-noAdd,lst:ifelsefi1-output-indent-rules}; note that
- in \cref{lst:ifelsefi1-output-noAdd}, the \texttt{ifnum} code block has \emph{not} received any additional indentation,
- while in \cref{lst:ifelsefi1-output-indent-rules}, the \texttt{ifnum} code block has received one tab and two spaces of indentation.
+ we receive the respective output given in \cref{lst:ifelsefi1-output-noAdd,lst:ifelsefi1-output-indent-rules}; note that in
+ \cref{lst:ifelsefi1-output-noAdd}, the \texttt{ifnum} code block has \emph{not}
+ received any additional indentation, while in \cref{lst:ifelsefi1-output-indent-rules}, the
+ \texttt{ifnum} code block has received one tab and two spaces of indentation.
\begin{minipage}{.45\textwidth}
\cmhlistingsfromfile{demonstrations/ifelsefi1-noAdd.tex}{\texttt{ifelsefi1.tex} using \cref{lst:ifnum-noAdd}}{lst:ifelsefi1-output-noAdd}
@@ -42,7 +44,8 @@ latexindent.pl ifelsefi1.tex -l ifnum-indent-rules.yaml
\cmhlistingsfromfile[showspaces=true,showtabs=true]{demonstrations/ifelsefi1-indent-rules.tex}{\texttt{ifelsefi1.tex} using \cref{lst:ifnum-indent-rules}}{lst:ifelsefi1-output-indent-rules}
\end{minipage}
- We may specify \texttt{noAdditionalIndentGlobal} and \texttt{indentRulesGlobal} as in \cref{lst:ifelsefi-noAdd-glob,lst:ifelsefi-indent-rules-global}.
+ We may specify \texttt{noAdditionalIndentGlobal} and \texttt{indentRulesGlobal} as in
+ \cref{lst:ifelsefi-noAdd-glob,lst:ifelsefi-indent-rules-global}.
\begin{minipage}{.49\textwidth}
\cmhlistingsfromfile[style=yaml-LST]*{demonstrations/ifelsefi-noAdd-glob.yaml}[width=.9\linewidth,before=\centering,yaml-TCB]{\texttt{ifelsefi-noAdd-glob.yaml}}{lst:ifelsefi-noAdd-glob}
@@ -57,8 +60,8 @@ latexindent.pl ifelsefi1.tex -l ifnum-indent-rules.yaml
latexindent.pl ifelsefi1.tex -local ifelsefi-noAdd-glob.yaml
latexindent.pl ifelsefi1.tex -l ifelsefi-indent-rules-global.yaml
\end{commandshell}
- we receive the outputs in \cref{lst:ifelsefi1-output-noAdd-glob,lst:ifelsefi1-output-indent-rules-global}; notice that in
- \cref{lst:ifelsefi1-output-noAdd-glob} neither of the \texttt{ifelsefi} code blocks have received indentation, while in
+ we receive the outputs in \cref{lst:ifelsefi1-output-noAdd-glob,lst:ifelsefi1-output-indent-rules-global}; notice that in \cref{lst:ifelsefi1-output-noAdd-glob}
+ neither of the \texttt{ifelsefi} code blocks have received indentation, while in
\cref{lst:ifelsefi1-output-indent-rules-global} both code blocks have received a single space of indentation.
\begin{minipage}{.45\textwidth}
@@ -69,15 +72,16 @@ latexindent.pl ifelsefi1.tex -l ifelsefi-indent-rules-global.yaml
\cmhlistingsfromfile[showspaces=true]{demonstrations/ifelsefi1-indent-rules-global.tex}{\texttt{ifelsefi1.tex} using \cref{lst:ifelsefi-indent-rules-global}}{lst:ifelsefi1-output-indent-rules-global}
\end{minipage}
- We can further explore the treatment of \texttt{ifElseFi} code blocks%
- \announce*{2018-04-27}*{updates to ifElseFi code blocks} in \cref{lst:ifelsefi2},
- and the associated default output given in \cref{lst:ifelsefi2-default}; note, in particular, that the bodies of each of the `or statements'
- have been indented.
+ We can further explore the treatment of \texttt{ifElseFi} code
+ blocks%%%%
+ \announce{2018-04-27}*{updates to ifElseFi code blocks} in \cref{lst:ifelsefi2},
+ and the associated default output given in \cref{lst:ifelsefi2-default}; note, in particular,
+ that the bodies of each of the `or statements' have been indented.
\begin{minipage}{.45\textwidth}
- \cmhlistingsfromfile*{demonstrations/ifelsefi2.tex}{\texttt{ifelsefi2.tex}}{lst:ifelsefi2}
+ \cmhlistingsfromfile{demonstrations/ifelsefi2.tex}{\texttt{ifelsefi2.tex}}{lst:ifelsefi2}
\end{minipage}%
\hfill
\begin{minipage}{.54\textwidth}
- \cmhlistingsfromfile*{demonstrations/ifelsefi2-default.tex}{\texttt{ifelsefi2.tex} default output}{lst:ifelsefi2-default}
+ \cmhlistingsfromfile{demonstrations/ifelsefi2-default.tex}{\texttt{ifelsefi2.tex} default output}{lst:ifelsefi2-default}
\end{minipage}