summaryrefslogtreecommitdiff
path: root/support/latexindent/documentation/sec-introduction.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/latexindent/documentation/sec-introduction.tex')
-rw-r--r--support/latexindent/documentation/sec-introduction.tex153
1 files changed, 133 insertions, 20 deletions
diff --git a/support/latexindent/documentation/sec-introduction.tex b/support/latexindent/documentation/sec-introduction.tex
index d0b0e2012f..5920a176b4 100644
--- a/support/latexindent/documentation/sec-introduction.tex
+++ b/support/latexindent/documentation/sec-introduction.tex
@@ -51,6 +51,139 @@
are a few changes to the interface; see \vref{app:differences} and the comments
throughout this document for details}.
+\subsection{Quick start}\label{sec:quickstart}
+ If you'd like to get started with \texttt{latexindent.pl} then simply type
+ \begin{commandshell}
+latexindent.pl myfile.tex
+\end{commandshell}
+ from the command line.
+
+ We give an introduction to \texttt{latexindent.pl} using \cref{lst:quick-start}; there is
+ no explanation in this section, which is deliberate for a quick start. The rest of the
+ manual is more verbose.
+
+ \cmhlistingsfromfile*{demonstrations/quick-start.tex}{\texttt{quick-start.tex}}{lst:quick-start}
+
+ Running
+ \begin{commandshell}
+latexindent.pl quick-start.tex
+\end{commandshell}
+ gives \cref{lst:quick-start-default}.
+
+ \cmhlistingsfromfile*{demonstrations/quick-start-default.tex}{\texttt{quick-start-default.tex}}{lst:quick-start-default}
+
+ \begin{example}
+ Running
+ \begin{commandshell}
+latexindent.pl -l quick-start1.yaml quick-start.tex
+\end{commandshell}
+ gives \cref{lst:quick-start-mod1}.
+
+ \begin{cmhtcbraster}
+ \cmhlistingsfromfile*{demonstrations/quick-start1.yaml}[yaml-TCB]{\texttt{quick-start1.yaml}}{lst:quick-start1yaml}
+ \cmhlistingsfromfile*[showspaces=true]{demonstrations/quick-start-mod1.tex}{\texttt{quick-start-mod1.tex}}{lst:quick-start-mod1}
+ \end{cmhtcbraster}
+ \end{example}
+
+ \begin{example}
+ Running
+ \begin{commandshell}
+latexindent.pl -l quick-start2.yaml quick-start.tex
+\end{commandshell}
+ gives \cref{lst:quick-start-mod2}.
+
+ \begin{cmhtcbraster}
+ \cmhlistingsfromfile*{demonstrations/quick-start2.yaml}[yaml-TCB]{\texttt{quick-start2.yaml}}{lst:quick-start2yaml}
+ \cmhlistingsfromfile*[showspaces=true]{demonstrations/quick-start-mod2.tex}{\texttt{quick-start-mod2.tex}}{lst:quick-start-mod2}
+ \end{cmhtcbraster}
+ \end{example}
+
+ \begin{example}
+ Running
+ \begin{commandshell}
+latexindent.pl -l quick-start3.yaml quick-start.tex
+\end{commandshell}
+ gives \cref{lst:quick-start-mod3}.
+
+ \begin{cmhtcbraster}
+ \cmhlistingsfromfile*{demonstrations/quick-start3.yaml}[yaml-TCB]{\texttt{quick-start3.yaml}}{lst:quick-start3yaml}
+ \cmhlistingsfromfile*{demonstrations/quick-start-mod3.tex}{\texttt{quick-start-mod3.tex}}{lst:quick-start-mod3}
+ \end{cmhtcbraster}
+ \end{example}
+
+ \begin{example}
+ Running
+ \begin{commandshell}
+latexindent.pl -m -l quick-start4.yaml quick-start.tex
+\end{commandshell}
+ gives \cref{lst:quick-start-mod4}.
+
+ \begin{cmhtcbraster}
+ \cmhlistingsfromfile*{demonstrations/quick-start4.yaml}[MLB-TCB]{\texttt{quick-start4.yaml}}{lst:quick-start4yaml}
+ \cmhlistingsfromfile*{demonstrations/quick-start-mod4.tex}{\texttt{quick-start-mod4.tex}}{lst:quick-start-mod4}
+ \end{cmhtcbraster}
+ Full details of text wrapping in \cref{subsec:textwrapping}.
+ \end{example}
+
+ \begin{example}
+ Running
+ \begin{commandshell}
+latexindent.pl -m -l quick-start5.yaml quick-start.tex
+\end{commandshell}
+ gives \cref{lst:quick-start-mod5}.
+
+ \begin{cmhtcbraster}
+ \cmhlistingsfromfile*{demonstrations/quick-start5.yaml}[MLB-TCB]{\texttt{quick-start5.yaml}}{lst:quick-start5yaml}
+ \cmhlistingsfromfile*{demonstrations/quick-start-mod5.tex}{\texttt{quick-start-mod5.tex}}{lst:quick-start-mod5}
+ \end{cmhtcbraster}
+ Full details of text wrapping in \cref{subsec:textwrapping}.
+ \end{example}
+
+ \begin{example}
+ Running
+ \begin{commandshell}
+latexindent.pl -m -l quick-start6.yaml quick-start.tex
+\end{commandshell}
+ gives \cref{lst:quick-start-mod6}.
+
+ \begin{cmhtcbraster}
+ \cmhlistingsfromfile*{demonstrations/quick-start6.yaml}[MLB-TCB]{\texttt{quick-start6.yaml}}{lst:quick-start6yaml}
+ \cmhlistingsfromfile*{demonstrations/quick-start-mod6.tex}{\texttt{quick-start-mod6.tex}}{lst:quick-start-mod6}
+ \end{cmhtcbraster}
+ This is an example of a \emph{poly-switch}; full details of \emph{poly-switches} are
+ covered in \cref{sec:poly-switches}.
+ \end{example}
+
+ \begin{example}
+ Running
+ \begin{commandshell}
+latexindent.pl -m -l quick-start7.yaml quick-start.tex
+\end{commandshell}
+ gives \cref{lst:quick-start-mod7}.
+
+ \begin{cmhtcbraster}
+ \cmhlistingsfromfile*{demonstrations/quick-start7.yaml}[MLB-TCB]{\texttt{quick-start7.yaml}}{lst:quick-start7yaml}
+ \cmhlistingsfromfile*{demonstrations/quick-start-mod7.tex}{\texttt{quick-start-mod7.tex}}{lst:quick-start-mod7}
+ \end{cmhtcbraster}
+ Full details of \emph{poly-switches} are covered in \cref{sec:poly-switches}.
+ \end{example}
+
+\subsection{Required perl modules}
+ If you receive an error message such as that given in
+ \cref{lst:poss-errors}, then you need to install the missing perl modules.
+ \begin{cmhlistings}[style=tcblatex,language=Perl]{Possible error messages}{lst:poss-errors}
+Can't locate File/HomeDir.pm in @INC (@INC contains: /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.4/darwin-thread-multi-2level /Library/Perl/Updates/5.12.4 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at helloworld.pl line 10.
+BEGIN failed--compilation aborted at helloworld.pl line 10.
+\end{cmhlistings}
+ \texttt{latexindent.pl} ships with a script to help with this process; if you run the
+ following script, you should be prompted to install the appropriate modules.
+ \begin{commandshell}
+perl latexindent-module-installer.pl
+\end{commandshell}
+ You might also like to see
+ \href{https://stackoverflow.com/questions/19590042/error-cant-locate-file-homedir-pm-in-inc}{https://stackoverflow.com/questions/19590042/error-cant-locate-file-homedir-pm-in-inc},
+ for example, as well as \vref{sec:requiredmodules}.
+
\subsection{About this documentation}
As you read through this documentation, you will see many listings; in this version of
the documentation, there are a total of \totallstlistings. This may seem a lot, but I
@@ -109,26 +242,6 @@
highlight new and updated features. The new and updated features in this documentation
(\gitRel) are on the following pages: \listOfNewFeatures% % \end{latexonly}
-\subsection{Quick start}\label{sec:quickstart}
- If you'd like to get started with \texttt{latexindent.pl} then simply type
- \begin{commandshell}
-latexindent.pl myfile.tex
-\end{commandshell}
- from the command line. If you receive an error message such as that given in
- \cref{lst:poss-errors}, then you need to install the missing perl modules.
- \begin{cmhlistings}[style=tcblatex,language=Perl]{Possible error messages}{lst:poss-errors}
-Can't locate File/HomeDir.pm in @INC (@INC contains: /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.4/darwin-thread-multi-2level /Library/Perl/Updates/5.12.4 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at helloworld.pl line 10.
-BEGIN failed--compilation aborted at helloworld.pl line 10.
-\end{cmhlistings}
- \texttt{latexindent.pl} ships with a script to help with this process; if you run the
- following script, you should be prompted to install the appropriate modules.
- \begin{commandshell}
-perl latexindent-module-installer.pl
-\end{commandshell}
- You might also like to see
- \href{https://stackoverflow.com/questions/19590042/error-cant-locate-file-homedir-pm-in-inc}{https://stackoverflow.com/questions/19590042/error-cant-locate-file-homedir-pm-in-inc},
- for example, as well as \vref{sec:requiredmodules}.
-
\subsection{A word about regular expressions}
\index{regular expressions!a word about}
As you read this documentation, you may encounter the term \emph{regular expressions}.