texlive[44726] trunk: latexindent (29jun17)

commits+karl at tug.org commits+karl at tug.org
Thu Jun 29 23:34:30 CEST 2017


Revision: 44726
          http://tug.org/svn/texlive?view=revision&revision=44726
Author:   karl
Date:     2017-06-29 23:34:30 +0200 (Thu, 29 Jun 2017)
Log Message:
-----------
latexindent (29jun17)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl
    trunk/Master/bin/win32/latexindent.exe
    trunk/Master/texmf-dist/doc/support/latexindent/README
    trunk/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
    trunk/Master/texmf-dist/doc/support/latexindent/latexindent.tex
    trunk/Master/texmf-dist/doc/support/latexindent/sec-default-user-local.tex
    trunk/Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
    trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
    trunk/Master/texmf-dist/scripts/latexindent/latexindent.pl

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/support/latexindent/title.tex

Modified: trunk/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl
===================================================================
(Binary files differ)

Modified: trunk/Master/bin/win32/latexindent.exe
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/support/latexindent/README
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/README	2017-06-29 21:34:03 UTC (rev 44725)
+++ trunk/Master/texmf-dist/doc/support/latexindent/README	2017-06-29 21:34:30 UTC (rev 44726)
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-    latexindent.pl, version 3.2.1, 2017-06-25
+    latexindent.pl, version 3.2.2, 2017-06-28
 
     PERL script to indent code within environments, and align delimited 
     environments in .tex files.

Modified: trunk/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/support/latexindent/latexindent.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/latexindent.tex	2017-06-29 21:34:03 UTC (rev 44725)
+++ trunk/Master/texmf-dist/doc/support/latexindent/latexindent.tex	2017-06-29 21:34:30 UTC (rev 44726)
@@ -541,38 +541,7 @@
 
 \begin{document}
 \renewcommand*{\thefootnote}{\arabic{footnote}}
-\title{%
-	\begin{tcolorbox}[
-			width=5.2cm,
-			boxrule=0pt,
-			colframe=white!40!black,
-			colback=white,
-			rightrule=2pt,
-			sharp corners,
-			enhanced,
-			overlay={\node[anchor=north east,outer sep=2pt] at ([xshift=3cm,yshift=4mm]frame.north east) {\includegraphics[width=3cm]{logo}}; }]
-		\centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.2.1
-	\end{tcolorbox}
-}
-\author{Chris Hughes \thanks{and contributors! See \vref{sec:contributors}. For
-		all communication, please visit \cite{latexindent-home}.}}
-\maketitle
-\begin{adjustwidth}{1cm}{1cm}
-	\small
-	\texttt{latexindent.pl} is a \texttt{Perl} script that indents \texttt{.tex} (and other)
-	files according to an indentation scheme that the user can modify to suit their
-	taste. Environments, including those with alignment delimiters (such as \texttt{tabular}),
-	and commands, including those that can split braces and brackets across lines,
-	are \emph{usually} handled correctly by the script. Options for \texttt{verbatim}-like
-	environments and commands, together with indentation after headings (such as \lstinline!chapter!, \lstinline!section!, etc)
-	are also available. The script also has the ability to modifiy line breaks, and add
-	comment symbols. All user options are customisable via the switches in the YAML interface.
-\end{adjustwidth}
-\tableofcontents
-{\small
-	\lstlistoflistings
-}
-
+\input{title.tex}
 \input{sec-introduction}
 \input{sec-demonstration}
 \input{sec-how-to-use}
@@ -621,22 +590,22 @@
 https://www.ctan.org/ctan-ann/id/mailman.198.1477655196.4574.ctan-ann@ctan.org
 
 Version 3.0
-latexindent.pl version 3.0: this represents a complete re-build of the script; full details are given here: 
+latexindent.pl version 3.0: this represents a complete re-build of the script; full details are given here:
 https://github.com/cmhughes/la­texin­dent.pl/pull/56
 
-V3.0.1 
-pro­vides sup­port for the align­ment at am­per­sands rou­tine for code that con­tains uni­code char­ac­ters; see 
+V3.0.1
+pro­vides sup­port for the align­ment at am­per­sands rou­tine for code that con­tains uni­code char­ac­ters; see
 https://github.com/cmhughes/la­texin­dent.pl/pull/61
 
 V3.0.2
-A mi­nor re­lease to fix a small bug re­lated to in­den­tPream­ble; de­tails given here: 
+A mi­nor re­lease to fix a small bug re­lated to in­den­tPream­ble; de­tails given here:
 https://github.com/cmhughes/la­texin­dent.pl/pull/62
 
-Ver­sion 3.1 of la­texin­dent.pl, 
-in­clud­ing op­tions for text wrap­ping and para­graph line break re­moval. Full de­tails here: 
+Ver­sion 3.1 of la­texin­dent.pl,
+in­clud­ing op­tions for text wrap­ping and para­graph line break re­moval. Full de­tails here:
 https://github.com/cmhughes/la­texin­dent.pl/pull/64
 
-Ver­sion 3.2 
-im­ple­ments a new fea­ture called 'mul­ti­Colum­nGroup­ing' which gives a new op­tion for the align­ment-at-am­per­sands rou­tine. 
-More de­tails are given at 
+Ver­sion 3.2
+im­ple­ments a new fea­ture called 'mul­ti­Colum­nGroup­ing' which gives a new op­tion for the align­ment-at-am­per­sands rou­tine.
+More de­tails are given at
 https://github.com/cmhughes/la­texin­dent.pl/pull/67

Modified: trunk/Master/texmf-dist/doc/support/latexindent/sec-default-user-local.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/sec-default-user-local.tex	2017-06-29 21:34:03 UTC (rev 44725)
+++ trunk/Master/texmf-dist/doc/support/latexindent/sec-default-user-local.tex	2017-06-29 21:34:30 UTC (rev 44726)
@@ -140,11 +140,13 @@
 
 \yamltitle{removeTrailingWhitespace}*{fields}\label{yaml:removeTrailingWhitespace}
 
-	\begin{wrapfigure}[12]{r}[0pt]{6cm}
+	\begin{wrapfigure}[10]{r}[0pt]{7cm}
 		\cmhlistingsfromfile[style=removeTrailingWhitespace]{../defaultSettings.yaml}[width=.8\linewidth,before=\centering,yaml-TCB]{removeTrailingWhitespace}{lst:removeTrailingWhitespace}
 
-		\vspace{.2cm}
-		\cmhlistingsfromfile[style=fileContentsEnvironments]{../defaultSettings.yaml}[width=.8\linewidth,before=\centering,yaml-TCB]{\texttt{fileContentsEnvironments}}{lst:fileContentsEnvironments}
+		\vspace{.1cm}
+		\begin{yaml}[numbers=none]{removeTrailingWhitespace (alt)}[width=.8\linewidth,before=\centering]{lst:removeTrailingWhitespace-alt}
+removeTrailingWhitespace: 1
+\end{yaml}
 	\end{wrapfigure}
 	Trailing white space can be removed both \emph{before} and \emph{after} processing
 	the document, as detailed in \cref{lst:removeTrailingWhitespace}; each of the fields
@@ -151,8 +153,15 @@
 	can take the values \texttt{0} or \texttt{1}. See \vref{lst:removeTWS-before,lst:env-mlb5-modAll,lst:env-mlb5-modAll-remove-WS}
 	for before and after results.  Thanks to \cite{vosskuhle} for providing this feature.
 
+	You can specify \texttt{removeTrailingWhitespace} simply as \texttt{0} or \texttt{1}, if you wish; in this case,
+	\announce*{2017-06-28}
+	\texttt{latexindent.pl} will set both \texttt{beforeProcessing} and \texttt{afterProcessing} to the value you specify;
+	see \cref{lst:removeTrailingWhitespace-alt}.
 \yamltitle{fileContentsEnvironments}*{field}
 
+	\begin{wrapfigure}[6]{r}[0pt]{6cm}
+		\cmhlistingsfromfile[style=fileContentsEnvironments]{../defaultSettings.yaml}[width=.8\linewidth,before=\centering,yaml-TCB]{\texttt{fileContentsEnvironments}}{lst:fileContentsEnvironments}
+	\end{wrapfigure}
 	Before \texttt{latexindent.pl} determines the difference between preamble (if any) and the main document,
 	it first searches for any of the environments specified in \texttt{fileContentsEnvironments}, see
 	\cref{lst:fileContentsEnvironments}.

Modified: trunk/Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex	2017-06-29 21:34:03 UTC (rev 44725)
+++ trunk/Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex	2017-06-29 21:34:30 UTC (rev 44726)
@@ -23,7 +23,7 @@
 
  As you read through this documentation, you'll occasionally see dates shown in the margin
  (for example, next to this paragraph!)
- \announce*{2017-06-25} which detail the date of the version in which the feature was implemented;
+ \announce{2017-06-25} which detail the date of the version in which the feature was implemented;
  the `N' stands for `new as of the date shown'. If you see a $\color{cmhgold}\bigstar$, it
  means that the feature is new as of the release of the current version.
 
@@ -45,7 +45,7 @@
 	and available options.
 
 \flagbox{-v, --version}
-	\announce*{2017-06-25}
+	\announce{2017-06-25}
 	\begin{commandshell}
 latexindent.pl -v
       \end{commandshell}
@@ -103,7 +103,7 @@
 \end{commandshell}
 
 	You can call the \texttt{-o} switch with the name of the output file \emph{without} an extension; in
-	\announce*{2017-06-25}
+	\announce{2017-06-25}
 	this case, \texttt{latexindent.pl} will use the extension from the original file. For example,
 	the following two calls to \texttt{latexindent.pl} are equivalent:
 	\begin{commandshell}
@@ -112,7 +112,7 @@
 \end{commandshell}
 
 	You can call the \texttt{-o} switch using a \texttt{+} symbol at the beginning; this will
-	\announce*{2017-06-25}
+	\announce{2017-06-25}
 	concatenate the name of the input file and the text given to the \texttt{-o} switch.
 	For example, the following two calls to \texttt{latexindent.pl} are equivalent:
 	\begin{commandshell}
@@ -121,7 +121,7 @@
 \end{commandshell}
 
 	You can call the \texttt{-o} switch using a \texttt{++} symbol at the end of the name
-	\announce*{2017-06-25}
+	\announce{2017-06-25}
 	of your output file; this tells \texttt{latexindent.pl} to search successively for
 	the name of your output file concatenated with $0, 1, \ldots$ while the name of the
 	output file exists.  For example,
@@ -210,7 +210,7 @@
 	Explicit demonstrations of how to use the \texttt{-l} switch are given throughout this documentation.
 
 	You can call the \texttt{-l} switch with a `+' symbol either before or after
-	\announce*{2017-06-25}
+	\announce{2017-06-25}
 	another YAML file; for example:
 	\begin{commandshell}
 latexindent.pl -l=+myyaml.yaml  myfile.tex
@@ -234,6 +234,7 @@
 	will \emph{only} load \texttt{localSettings.yaml}, and \texttt{myyaml.yaml} will be ignored.
 
 	You may also choose to omit the \texttt{yaml} extension, such as
+	\announce{2017-06-25}
 	\begin{commandshell}
 latexindent.pl -l=localSettings,myyaml myfile.tex
     \end{commandshell}
@@ -291,8 +292,7 @@
 
 \subsection{From \texttt{arara}}\label{sec:arara}
 	Using \texttt{latexindent.pl} from the command line is fine for some folks, but
-	others may find it easier to use from \texttt{arara}. \texttt{arara} ships with
-	a rule, \texttt{indent.yaml}, but in case you do not have this rule, you can find it at \cite{paulo}.
+	others may find it easier to use from \texttt{arara}; you can find the arara rule at \cite{paulo}.
 
 	You can use the rule in any of the ways described in \cref{lst:arara} (or combinations thereof).
 	In fact, \texttt{arara} allows yet greater flexibility -- you can use \texttt{yes/no}, \texttt{true/false}, or \texttt{on/off} to toggle the various options.
@@ -329,7 +329,7 @@
 			\texttt{localSettings}            & \texttt{-l} \\
 			\texttt{onlyDefault}              & \texttt{-d} \\
 			\texttt{cruft}                    & \texttt{-c} \\
-			\texttt{modifylinebreaks}         & \texttt{-m} \\
+			%\texttt{modifylinebreaks}         & \texttt{-m} \\
 			\bottomrule
 		\end{tabular}
 	\end{table}

Added: trunk/Master/texmf-dist/doc/support/latexindent/title.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/title.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/support/latexindent/title.tex	2017-06-29 21:34:30 UTC (rev 44726)
@@ -0,0 +1,31 @@
+\title{%
+	\begin{tcolorbox}[
+			width=5.2cm,
+			boxrule=0pt,
+			colframe=white!40!black,
+			colback=white,
+			rightrule=2pt,
+			sharp corners,
+			enhanced,
+			overlay={\node[anchor=north east,outer sep=2pt] at ([xshift=3cm,yshift=4mm]frame.north east) {\includegraphics[width=3cm]{logo}}; }]
+		\centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.2.2
+	\end{tcolorbox}
+}
+\author{Chris Hughes \thanks{and contributors! See \vref{sec:contributors}. For
+		all communication, please visit \cite{latexindent-home}.}}
+\maketitle
+\begin{adjustwidth}{1cm}{1cm}
+	\small
+	\texttt{latexindent.pl} is a \texttt{Perl} script that indents \texttt{.tex} (and other)
+	files according to an indentation scheme that the user can modify to suit their
+	taste. Environments, including those with alignment delimiters (such as \texttt{tabular}),
+	and commands, including those that can split braces and brackets across lines,
+	are \emph{usually} handled correctly by the script. Options for \texttt{verbatim}-like
+	environments and commands, together with indentation after headings (such as \lstinline!chapter!, \lstinline!section!, etc)
+	are also available. The script also has the ability to modifiy line breaks, and add
+	comment symbols. All user options are customisable via the switches in the YAML interface.
+\end{adjustwidth}
+\tableofcontents
+{\small
+	\lstlistoflistings
+}


Property changes on: trunk/Master/texmf-dist/doc/support/latexindent/title.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm	2017-06-29 21:34:03 UTC (rev 44725)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm	2017-06-29 21:34:30 UTC (rev 44726)
@@ -25,6 +25,23 @@
     my $self = shift;
     my %input = @_;
 
+    # removeTrailingWhitespace can be either a hash or a scalar, but if
+    # it's a scalar, we need to fix it
+    if(ref($masterSettings{removeTrailingWhitespace}) ne 'HASH'){
+        $self->logger("removeTrailingWhitespace specified as scalar, will update it to be a hash",'heading') if $is_t_switch_active;
+        # grab the value
+        my $removeTWS = $masterSettings{removeTrailingWhitespace};
+
+        # delete the scalar
+        delete $masterSettings{removeTrailingWhitespace};
+
+        # redefine it as a hash
+        ${$masterSettings{removeTrailingWhitespace}}{beforeProcessing} = $removeTWS; 
+        ${$masterSettings{removeTrailingWhitespace}}{afterProcessing} = $removeTWS; 
+        $self->logger("removeTrailingWhitespace: beforeProcessing is now $removeTWS") if $is_t_switch_active;
+        $self->logger("removeTrailingWhitespace: afterProcessing is now $removeTWS") if $is_t_switch_active;
+    }
+
     # this method can be called before the indendation, and after, depending upon the input
     if($input{when} eq "before"){
         return unless(${$masterSettings{removeTrailingWhitespace}}{beforeProcessing});

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2017-06-29 21:34:03 UTC (rev 44725)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2017-06-29 21:34:30 UTC (rev 44726)
@@ -19,6 +19,6 @@
 use Exporter qw/import/;
 our @EXPORT_OK = qw/$versionNumber $versionDate/;
 
-our $versionNumber = '3.2.1';
-our $versionDate = '2017-06-25';
+our $versionNumber = '3.2.2';
+our $versionDate = '2017-06-28';
 1

Modified: trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2017-06-29 21:34:03 UTC (rev 44725)
+++ trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2017-06-29 21:34:30 UTC (rev 44726)
@@ -1,4 +1,4 @@
-# defaultSettings.yaml for latexindent.pl, version 3.2.1, 2017-06-25
+# defaultSettings.yaml for latexindent.pl, version 3.2.2, 2017-06-28
 #                      a script that aims to
 #                      beautify .tex, .sty, .cls files
 #

Modified: trunk/Master/texmf-dist/scripts/latexindent/latexindent.pl
===================================================================
(Binary files differ)



More information about the tex-live-commits mailing list