diff options
Diffstat (limited to 'support/latexindent/documentation/sec-indent-config-and-settings.tex')
-rw-r--r-- | support/latexindent/documentation/sec-indent-config-and-settings.tex | 47 |
1 files changed, 21 insertions, 26 deletions
diff --git a/support/latexindent/documentation/sec-indent-config-and-settings.tex b/support/latexindent/documentation/sec-indent-config-and-settings.tex index 9c7eed4f95..b25cc70b7b 100644 --- a/support/latexindent/documentation/sec-indent-config-and-settings.tex +++ b/support/latexindent/documentation/sec-indent-config-and-settings.tex @@ -20,8 +20,8 @@ For Mac and Linux users, their home directory is \texttt{~/username} while Windows (Vista onwards) is \lstinline!C:\Users\username!\footnote{If you're not sure where to put - \texttt{indentconfig.yaml}, don't worry \texttt{latexindent.pl} will tell you in the log - file exactly where to put it assuming it doesn't exist already.} \Cref{lst:indentconfig} + \texttt{indentconfig.yaml}, don't worry \texttt{latexindent.pl} will tell you in the log + file exactly where to put it assuming it doesn't exist already.} \Cref{lst:indentconfig} shows a sample \texttt{indentconfig.yaml} file. \begin{yaml}{\texttt{indentconfig.yaml} (sample)}{lst:indentconfig} @@ -51,8 +51,8 @@ paths: at \cref{lst:mysettings} for an example that uses four tabs for the default indent, adds the \texttt{tabbing} environment/command to the list of environments that contains alignment delimiters; you might also like to refer to the many YAML files detailed - throughout the rest of this documentation. - \index{indentation!defaultIndent using YAML file} + throughout the rest of this documentation. \index{indentation!defaultIndent using YAML + file} \begin{yaml}{\texttt{mysettings.yaml} (example)}{lst:mysettings} # Default value of indentation @@ -68,8 +68,7 @@ lookForAlignDelims: details -- if you have specified a path that \texttt{latexindent.pl} doesn't recognise then you'll get a warning, otherwise you'll get confirmation that \texttt{latexindent.pl} has read your settings file \footnote{Windows users may find that they have to end - \texttt{.yaml} files with a blank line}. - \index{warning!editing YAML files} + \texttt{.yaml} files with a blank line}. \index{warning!editing YAML files} \begin{warning} When editing \texttt{.yaml} files it is \emph{extremely} important to remember how @@ -81,12 +80,11 @@ lookForAlignDelims: \texttt{indent.log}. \end{warning} - 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 occcur for Windows users. In this case, you might like to explore the - \texttt{encoding} option for \texttt{indentconfig.yaml} as demonstrated in - \cref{lst:indentconfig-encoding}. + 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 occcur for Windows + users. In this case, you might like to explore the \texttt{encoding} option for + \texttt{indentconfig.yaml} as demonstrated in \cref{lst:indentconfig-encoding}.% \cmhlistingsfromfile{demonstrations/encoding.yaml}[yaml-TCB]{The \texttt{encoding} option for \texttt{indentconfig.yaml}}{lst:indentconfig-encoding} @@ -98,7 +96,7 @@ lookForAlignDelims: \texttt{localSettings.yaml} and/or friends in the \emph{same directory} as \texttt{myfile.tex}. For% \announce{2021-03-14}*{-l - switch: localSettings and friends} example, if you use the following command + switch: localSettings and friends} example, if you use the following command \index{switches!-l demonstration} \begin{commandshell} latexindent.pl -l myfile.tex @@ -130,8 +128,7 @@ latexindent.pl -l=mysettings.yaml myfile.tex Your settings file can contain any switches that you'd like to change; a sample is shown in \cref{lst:localSettings}, and you'll find plenty of further examples throughout this - manual. - \index{verbatim!verbatimEnvironments demonstration (-l switch)} + manual. \index{verbatim!verbatimEnvironments demonstration (-l switch)} \begin{yaml}{\texttt{localSettings.yaml} (example)}{lst:localSettings} # verbatim environments - environments specified @@ -156,15 +153,14 @@ verbatimEnvironments: latexindent.pl -y="verbatimEnvironments:cmhenvironment:0;myenv:1" myfile.tex \end{commandshell} Note the use of \texttt{;} to specify another field within \texttt{verbatimEnvironments}. - This is shorthand, and equivalent, to using the following command: - \index{switches!-y demonstration} + This is shorthand, and equivalent, to using the following command: \index{switches!-y + demonstration} \begin{commandshell} latexindent.pl -y="verbatimEnvironments:cmhenvironment:0,verbatimEnvironments:myenv:1" myfile.tex \end{commandshell} You may, of course, specify settings using the \texttt{-y} switch as well as, for - example, settings loaded using the \texttt{-l} switch; for example, - \index{switches!-l demonstration} - \index{switches!-y demonstration} + example, settings loaded using the \texttt{-l} switch; for example, \index{switches!-l + demonstration} \index{switches!-y demonstration} \begin{commandshell} latexindent.pl -l=mysettings.yaml -y="verbatimEnvironments:cmhenvironment:0;myenv:1" myfile.tex \end{commandshell} @@ -195,9 +191,8 @@ latexindent.pl -m --yaml='modifyLineBreaks:oneSentencePerLine:sentencesEndWith:o specify both relative and absolute% \announce{2017-08-21}*{-l absolute paths} paths to other YAML files using the \texttt{-l} switch, separating multiple files using commas; - \item any settings% - \announce{2017-08-21}{-y switch load order} - specified in the \texttt{-y} switch. + \item any settings \announce{2017-08-21}{-y switch load order} specified in the \texttt{-y} + switch.% \end{enumerate} A visual representation of this is given in \cref{fig:loadorder}. @@ -205,8 +200,8 @@ latexindent.pl -m --yaml='modifyLineBreaks:oneSentencePerLine:sentencesEndWith:o \centering \input{figure-schematic} \caption{Schematic of the load order described in \cref{sec:loadorder}; solid lines represent - mandatory files, dotted lines represent optional files. \texttt{indentconfig.yaml} can - contain as many files as you like. The files will be loaded in order; if you specify - settings for the same field in more than one file, the most recent takes priority. } + mandatory files, dotted lines represent optional files. \texttt{indentconfig.yaml} can + contain as many files as you like. The files will be loaded in order; if you specify + settings for the same field in more than one file, the most recent takes priority. } \label{fig:loadorder} \end{figure} |