texlive[61535] trunk: latexindent (8jan22)

commits+karl at tug.org commits+karl at tug.org
Sat Jan 8 22:34:40 CET 2022


Revision: 61535
          http://tug.org/svn/texlive?view=revision&revision=61535
Author:   karl
Date:     2022-01-08 22:34:40 +0100 (Sat, 08 Jan 2022)
Log Message:
-----------
latexindent (8jan22)

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/appendices.tex
    trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
    trunk/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
    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/doc/support/latexindent/title.tex
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Switches.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

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/support/latexindent/settings-alt.json
    trunk/Master/texmf-dist/doc/support/latexindent/settings-alt1.json
    trunk/Master/texmf-dist/doc/support/latexindent/settings.json

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	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/doc/support/latexindent/README	2022-01-08 21:34:40 UTC (rev 61535)
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-    latexindent.pl, version 3.13.5, 2022-01-02
+    latexindent.pl, version 3.14, 2022-01-08
 
     PERL script to indent code within environments, and align delimited 
     environments in .tex files.

Modified: trunk/Master/texmf-dist/doc/support/latexindent/appendices.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/appendices.tex	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/doc/support/latexindent/appendices.tex	2022-01-08 21:34:40 UTC (rev 61535)
@@ -210,13 +210,16 @@
 	\section{latexindent-yaml-schema.json}
 
 	 \texttt{latexindent.pl}
-	 \announce*{2022-01-02}{latexindent-yaml-schema.json} ships with
+	 \announce{2022-01-02}{latexindent-yaml-schema.json} ships with
 	 \texttt{latexindent-yaml-schema.json}
 	 which might help you when constructing your YAML files.
+	 \index{json!schema for YAML files}
 
 	\subsection{VSCode demonstration}
 		To use \texttt{latexindent-yaml-schema.json} with \texttt{VSCode}, you can use the
 		following steps:
+		\index{VSCode}
+		\index{json!VSCode}
 		\begin{enumerate}
 			\item download \texttt{latexindent-yaml-schema.json} from the \texttt{documentation} folder of
 			      \cite{latexindent-home}, save it in whichever directory you would like, noting it for
@@ -229,7 +232,7 @@
 		\end{enumerate}
 
 		\begin{widepage}
-			\cmhlistingsfromfile*{settings.json}[yaml-TCB]{\texttt{settings.json}}{lst:settings.json}
+			\cmhlistingsfromfile*{demonstrations/settings.json}[yaml-TCB]{\texttt{settings.json}}{lst:settings.json}
 		\end{widepage}
 
 		Alternatively, if you would prefer not to download the json file, you might be able to
@@ -236,7 +239,7 @@
 		use an adapted version of \cref{lst:settings-alt.json}.
 
 		\begin{widepage}
-			\cmhlistingsfromfile*{settings-alt.json}[yaml-TCB]{\texttt{settings-alt.json}}{lst:settings-alt.json}
+			\cmhlistingsfromfile*{demonstrations/settings-alt.json}[yaml-TCB]{\texttt{settings-alt.json}}{lst:settings-alt.json}
 		\end{widepage}
 
 		Finally, if your TeX distribution is up to date, then
@@ -244,7 +247,7 @@
 		your installation, so an adapted version of \cref{lst:settings-alt1.json} may work.
 
 		\begin{widepage}
-			\cmhlistingsfromfile*{settings-alt1.json}[yaml-TCB]{\texttt{settings-alt1.json}}{lst:settings-alt1.json}
+			\cmhlistingsfromfile*{demonstrations/settings-alt1.json}[yaml-TCB]{\texttt{settings-alt1.json}}{lst:settings-alt1.json}
 		\end{widepage}
 
 		If you have details of how to implement this schema in other editors, please feel
@@ -252,7 +255,6 @@
 
 	\section{Using conda}
 	 If you use conda you'll only need
-
 	 \begin{commandshell}
 conda install latexindent.pl -c conda-forge
 \end{commandshell}
@@ -259,6 +261,7 @@
 	 this will install the executable and all its dependencies (including perl) in the
 	 activate environment. You don't even have to worry about \texttt{defaultSettings.yaml} as
 	 it included too, you can thus skip \cref{sec:requiredmodules,sec:updating-path}.
+	 \index{conda}
 
 	 You can get a conda installation for example from \cite{conda} or from \cite{anacoda}.
 

Modified: trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json	2022-01-08 21:34:40 UTC (rev 61535)
@@ -2,7 +2,7 @@
     "$schema": "http://json-schema.org/schema",
     "$id": "latexindent-yaml-schema.json",
     "title": "latexindent.pl YAML schema",
-    "description": "latexindent.pl YAML schema helper, V3.13.5 2022-01-02",
+    "description": "latexindent.pl YAML schema helper, V3.14 2022-01-08",
     "type": "object",
     "properties": {
       "fileExtensionPreference": {

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

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	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/doc/support/latexindent/sec-default-user-local.tex	2022-01-08 21:34:40 UTC (rev 61535)
@@ -453,11 +453,9 @@
 		      specifies the justification for the alignment delimeters (default: left); note that this
 		      feature is only useful if you have delimiters of different lengths in the same column,
 		      discussed in \cref{sec:delimiter-reg-ex};
-		\item \announce*{2021-12-13}{lookForChildCodeBlocks feature}{lookForChildCodeBlocks} optionally
-		      instructs
-		      \texttt{latexindent.pl}
-		      to search for child code blocks or not (default: 1), discussed in
-		      \cref{sec:lookForChildCodeBlocks}.
+		\item \announce{2021-12-13}{lookForChildCodeBlocks feature}{lookForChildCodeBlocks} optionally
+		      instructs \texttt{latexindent.pl} to search for child code blocks or not (default: 1),
+		      discussed in \cref{sec:lookForChildCodeBlocks}.
 	\end{itemize}
 
 	We will explore most of these features using the file \texttt{tabular2.tex} in
@@ -946,7 +944,7 @@
 
 \subsubsection{lookForAlignDelims: lookForChildCodeBlocks}\label{sec:lookForChildCodeBlocks}
 	There
-	\announce*{2021-12-13}{lookForChildCodeBlocks demonstration} may be scenarios in
+	\announce{2021-12-13}{lookForChildCodeBlocks demonstration} may be scenarios in
 	which you would prefer to instruct \texttt{latexindent.pl} \emph{not} to search for child
 	blocks; in which case setting \texttt{lookForChildCodeBlocks} to 0 may be a good way to
 	proceed.
@@ -958,8 +956,8 @@
 \end{commandshell}
 	gives the output in \cref{lst:tabular-DM-1-mod1}.
 	\begin{cmhtcbraster}
-		\cmhlistingsfromfile*{demonstrations/tabular-DM-1.tex}{\texttt{tabular-DM-1.tex}}{lst:tabular-DM-1}
-		\cmhlistingsfromfile*{demonstrations/tabular-DM-1-mod1.tex}{\texttt{tabular-DM-1-mod1.tex}}{lst:tabular-DM-1-mod1}
+		\cmhlistingsfromfile{demonstrations/tabular-DM-1.tex}{\texttt{tabular-DM-1.tex}}{lst:tabular-DM-1}
+		\cmhlistingsfromfile{demonstrations/tabular-DM-1-mod1.tex}{\texttt{tabular-DM-1-mod1.tex}}{lst:tabular-DM-1-mod1}
 	\end{cmhtcbraster}
 
 	We can improve the output from \cref{lst:tabular-DM-1-mod1} by employing the settings in
@@ -970,8 +968,8 @@
 	which gives the output in \cref{lst:dontMeasure1a}.
 
 	\begin{cmhtcbraster}
-		\cmhlistingsfromfile*{demonstrations/tabular-DM-1-mod1a.tex}{\texttt{tabular-DM-1-mod1a.tex}}{lst:tabular-DM-1-mod1a}
-		\cmhlistingsfromfile*{demonstrations/dontMeasure1a.yaml}[yaml-TCB]{\texttt{dontMeasure1a.yaml}}{lst:dontMeasure1a}
+		\cmhlistingsfromfile{demonstrations/tabular-DM-1-mod1a.tex}{\texttt{tabular-DM-1-mod1a.tex}}{lst:tabular-DM-1-mod1a}
+		\cmhlistingsfromfile{demonstrations/dontMeasure1a.yaml}[yaml-TCB]{\texttt{dontMeasure1a.yaml}}{lst:dontMeasure1a}
 	\end{cmhtcbraster}
 
 \subsection{Indent after items, specials and headings}

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	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/doc/support/latexindent/sec-how-to-use.tex	2022-01-08 21:34:40 UTC (rev 61535)
@@ -1,11 +1,11 @@
 % arara: pdflatex: { files: [latexindent]}
 \section{How to use the script}
  \texttt{latexindent.pl} ships as part of the \TeX Live distribution for
- Linux and Mac users; \texttt{latexindent.exe} ships as part of the \TeX Live and
- MiK\TeX{} distributions for Windows users. These files are also available from github
- \cite{latexindent-home} should you wish to use them without a \TeX{} distribution; in
- this case, you may like to read \vref{sec:updating-path} which details how the
- \texttt{path} variable can be updated.
+ Linux and Mac users; \texttt{latexindent.exe} ships as part of the \TeX Live for Windows
+ users. These files are also available from github \cite{latexindent-home} should you wish
+ to use them without a \TeX{} distribution; in this case, you may like to read
+ \vref{sec:updating-path} which details how the \texttt{path} variable can be updated.
+ \index{TeXLive}
 
  In what follows, we will always refer to \texttt{latexindent.pl}, but depending on your
  operating system and preference, you might substitute \texttt{latexindent.exe} or simply
@@ -24,6 +24,11 @@
  \announce{2018-01-13}{perl module installer helper script} in particular, note that a module installer helper script is shipped with
  \texttt{latexindent.pl}.
 
+ MiKTeX users on Windows may like to see \cite{miktex-guide} for details of how to use
+ \texttt{latexindent.exe} without a Perl installation.
+ \index{MiKTeX}
+ \index{latexindent.exe}
+
 \subsection{From the command line}\label{sec:commandline}
 	\texttt{latexindent.pl} has a number of different switches/flags/options, which
 	can be combined in any way that you like, either in short or long form as detailed below.
@@ -38,14 +43,26 @@
 	\announce{2017-06-25}{version}
 	\begin{commandshell}
 latexindent.pl -v
+latexindent.pl --version
 \end{commandshell}
 	This will output only the version number to the terminal.
 
+\flagbox{-vv, --vversion}
+	\index{switches!-vv, --vversion definition and details}
+	\announce*{2022-01-08}{vversion switch}
+	\begin{commandshell}
+latexindent.pl -vv
+latexindent.pl --vversion
+\end{commandshell}
+	This will output \emph{verbose} version details to the terminal, including the location
+	of \texttt{latexindent.pl} and \texttt{defaultSettings.yaml}.
+
 \flagbox{-h, --help}
 	\index{switches!-h, --help definition and details}
 
 	\begin{commandshell}
 latexindent.pl -h
+latexindent.pl --help
 \end{commandshell}
 
 	As above this will output a welcome message to the terminal, including the version number
@@ -485,7 +502,7 @@
 			exit code & indentation & status                                                                                        \\
 			\midrule
 			0         & \faCheck    & success; if \texttt{-k} or \texttt{-kv} active, indented text matches original                \\
-			0         & \faClose    & success; if \texttt{-version} or \texttt{-help}, no indentation performed                     \\
+			0         & \faClose    & success; if \texttt{-version}, \texttt{-vversion} or \texttt{-help}, no indentation performed \\
 			1         & \faCheck    & success, and \texttt{-k} or \texttt{-kv} active; indented text \emph{different} from original \\
 			\midrule
 			2         & \faClose    & failure, \texttt{defaultSettings.yaml} could not be read                                      \\

Deleted: trunk/Master/texmf-dist/doc/support/latexindent/settings-alt.json
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/settings-alt.json	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/doc/support/latexindent/settings-alt.json	2022-01-08 21:34:40 UTC (rev 61535)
@@ -1,5 +0,0 @@
-{
-  "yaml.schemas": {
-    "https://raw.githubusercontent.com/cmhughes/latexindent.pl/main/documentation/latexindent-yaml-schema.json": "/home/cmhughes/projects/latexindent/defaultSettings.yaml"
-  }
-}

Deleted: trunk/Master/texmf-dist/doc/support/latexindent/settings-alt1.json
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/settings-alt1.json	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/doc/support/latexindent/settings-alt1.json	2022-01-08 21:34:40 UTC (rev 61535)
@@ -1,5 +0,0 @@
-{
-  "yaml.schemas": {
-    "/usr/local/texlive/2021/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json": "/home/cmhughes/projects/latexindent/defaultSettings.yaml"
-  }
-}

Deleted: trunk/Master/texmf-dist/doc/support/latexindent/settings.json
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/settings.json	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/doc/support/latexindent/settings.json	2022-01-08 21:34:40 UTC (rev 61535)
@@ -1,6 +0,0 @@
-{
-  "yaml.schemas": {
-    "/home/cmhughes/projects/latexindent/documentation/latexindent-yaml-schema.json": "/home/cmhughes/projects/latexindent/defaultSettings.yaml"
-  },
-  "redhat.telemetry.enabled": true
-}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/support/latexindent/title.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/title.tex	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/doc/support/latexindent/title.tex	2022-01-08 21:34:40 UTC (rev 61535)
@@ -8,7 +8,7 @@
 			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.13.5
+		\centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.14
 	\end{tcolorbox}
 }
 \author{Chris Hughes \thanks{and contributors!
@@ -15,7 +15,7 @@
 		See \vref{sec:contributors}.
 		For
 		all communication, please visit \cite{latexindent-home}.}}
-\date{2022-01-02}
+\date{2022-01-08}
 \maketitle
 \begin{adjustwidth}{1cm}{1cm}
 	\small

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm	2022-01-08 21:34:40 UTC (rev 61535)
@@ -899,7 +899,7 @@
         $j++;
         
         # multicolumn entry
-        if(${$cell}{type} =~ m/(\d)/) {
+        if(${$cell}{type} =~ m/(\d+)/) {
 
            my $multiColumnSpan = $1;
 
@@ -1005,7 +1005,7 @@
           $j++;
           
           # multicolumn entry
-          next unless (${$cell}{type} =~ m/(\d)/);
+          next unless (${$cell}{type} =~ m/(\d+)/);
 
           my $multiColumnSpan = $1;
 

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm	2022-01-08 21:34:40 UTC (rev 61535)
@@ -28,6 +28,17 @@
     # -v switch is just to show the version number
     if($switches{version}) {
         print $versionNumber,", ",$versionDate,"\n";
+        if ($switches{vversion}) {
+            print "$FindBin::Script lives here: $FindBin::RealBin/$FindBin::Script\n";
+            if ( -e "$FindBin::RealBin/defaultSettings.yaml" ){
+                print "defaultSettings.yaml lives here $FindBin::RealBin/defaultSettings.yaml\n";
+            } elsif ( -e "$FindBin::RealBin/../../texmf-dist/scripts/latexindent/defaultSettings.yaml" ){
+                print "defaultSettings.yaml lives here $FindBin::RealBin/../../texmf-dist/scripts/latexindent/defaultSettings.yaml\n";
+            } elsif ( -e "$FindBin::RealBin/LatexIndent/defaultSettings.yaml" ) {
+                print "defaultSettings.yaml lives here $FindBin::RealBin/LatexIndent/defaultSettings.yaml\n";
+            }
+            print "project home: https://github.com/cmhughes/latexindent.pl\n";
+        }
         exit(0);
     }
 
@@ -37,6 +48,9 @@
 usage: latexindent.pl [options] [file]
       -v, --version
           displays the version number and date of release
+      -vv, --vversion
+          displays verbose version details: the version number, date of release, 
+          and location details of latexindent.pl and defaultSettings.yaml
       -h, --help
           help (see the documentation for detailed instructions and examples)
       -sl, --screenlog

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Switches.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Switches.pm	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Switches.pm	2022-01-08 21:34:40 UTC (rev 61535)
@@ -33,6 +33,7 @@
 
     # copy document switches into hash local to this module
 	%switches = %{${$self}{switches}};
+    $switches{version} = defined $switches{vversion} ? 1 : $switches{version}; 
     $is_m_switch_active = defined $switches{modifyLineBreaks}?$switches{modifyLineBreaks}: 0;
     $is_t_switch_active = defined $switches{trace}?$switches{trace}: 0;
     $is_tt_switch_active = defined $switches{ttrace}?$switches{ttrace}: 0;

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2022-01-08 21:34:40 UTC (rev 61535)
@@ -19,6 +19,6 @@
 use Exporter qw/import/;
 our @EXPORT_OK = qw/$versionNumber $versionDate/;
 
-our $versionNumber = '3.13.5';
-our $versionDate = '2022-01-02';
+our $versionNumber = '3.14';
+our $versionDate = '2022-01-08';
 1

Modified: trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2022-01-08 21:34:14 UTC (rev 61534)
+++ trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2022-01-08 21:34:40 UTC (rev 61535)
@@ -1,4 +1,4 @@
-# defaultSettings.yaml for latexindent.pl, version 3.13.5, 2022-01-02
+# defaultSettings.yaml for latexindent.pl, version 3.14, 2022-01-08
 #                      a script that aims to
 #                      beautify .tex, .sty, .cls files
 #
@@ -650,6 +650,6 @@
     trailingComments:
       notPreceededBy: '(?<!\\)'
     modifyLineBreaks:
-      betterFullStop: '(?:\.\)(?!\h*[a-z]))|(?:(?<!(?:(?:e\.g)|(?:i\.e)|(?:etc))))\.(?!(?:[a-z]|[A-Z]|\-|~|\,|[0-9]))'
+      betterFullStop: '(?:\.\)(?!\h*[a-z]))|(?:(?<!(?:(?:e\.g)|(?:E\.g)|(?:i\.e)|(?:I\.e)|(?:etc))))\.(?!(?:[a-z]|[A-Z]|\-|~|\,|[0-9]))'
       doubleBackSlash: '\\\\(?:\h*\[\h*\d+\h*[a-zA-Z]+\h*\])?'
       comma: ','

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



More information about the tex-live-commits mailing list.