texlive[67296] trunk: latexindent (6jun23)

commits+karl at tug.org commits+karl at tug.org
Tue Jun 6 22:06:49 CEST 2023


Revision: 67296
          http://tug.org/svn/texlive?view=revision&revision=67296
Author:   karl
Date:     2023-06-06 22:06:48 +0200 (Tue, 06 Jun 2023)
Log Message:
-----------
latexindent (6jun23)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl
    trunk/Master/bin/windows/latexindent.exe
    trunk/Master/texmf-dist/doc/support/latexindent/README
    trunk/Master/texmf-dist/doc/support/latexindent/contributors.bib
    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/latexindent.tex
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.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

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

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

Modified: trunk/Master/texmf-dist/doc/support/latexindent/README
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/README	2023-06-06 20:06:34 UTC (rev 67295)
+++ trunk/Master/texmf-dist/doc/support/latexindent/README	2023-06-06 20:06:48 UTC (rev 67296)
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-    latexindent.pl, version 3.21.1, 2023-05-20
+    latexindent.pl, version 3.22, 2023-06-01
 
     PERL script to indent code within environments, and align delimited 
     environments in .tex files.

Modified: trunk/Master/texmf-dist/doc/support/latexindent/contributors.bib
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/contributors.bib	2023-06-06 20:06:34 UTC (rev 67295)
+++ trunk/Master/texmf-dist/doc/support/latexindent/contributors.bib	2023-06-06 20:06:48 UTC (rev 67296)
@@ -200,3 +200,20 @@
 	author   = "valtterikantanen",
 	urldate  = {2023-04-07},
 	keywords = {contributor},}
+
+ at online{hslootgithubspaces,
+	title    = "feat: add devcontainer configuration",
+	url      = "https://github.com/cmhughes/latexindent.pl/pull/443",
+	date     = {2023-05-20},
+	author   = "Henrik Sloot",
+	urldate  = {2023-05-20},
+	keywords = {contributor},}
+
+ at online{qiaojunfeng,
+	title    = "Add w.r.t to betterFullStop",
+	url      = "https://github.com/cmhughes/latexindent.pl/pull/447",
+	date     = {2023-05-25},
+	author   = "Junfeng Qiao",
+	urldate  = {2023-05-25},
+	keywords = {contributor},}
+

Modified: trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json	2023-06-06 20:06:34 UTC (rev 67295)
+++ trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json	2023-06-06 20:06:48 UTC (rev 67296)
@@ -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.21.1 2023-05-20",
+    "description": "latexindent.pl YAML schema helper, V3.22 2023-06-01",
     "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/latexindent.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/latexindent.tex	2023-06-06 20:06:34 UTC (rev 67295)
+++ trunk/Master/texmf-dist/doc/support/latexindent/latexindent.tex	2023-06-06 20:06:48 UTC (rev 67296)
@@ -523,7 +523,7 @@
 
 \lstdefinestyle{fineTuning}{
  style=yaml-LST,
- firstnumber=629,linerange={629-681},
+ firstnumber=629,linerange={629-684},
  numbers=left,
 }
 
@@ -2461,11 +2461,11 @@
   \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*{2023-05-01}{alignContentAfterDoubleBackSlash feature}
+  \item \announce{2023-05-01}{alignContentAfterDoubleBackSlash feature}
         alignContentAfterDoubleBackSlash optionally instructs \texttt{latexindent.pl} to
         align content \emph{after} double back slash (default: 0), discussed in
         \cref{sec:alignContentAfterDoubleBackSlash};
-  \item \announce*{2023-05-01}{spacesAfterDoubleBackSlash feature}
+  \item \announce{2023-05-01}{spacesAfterDoubleBackSlash feature}
         spacesAfterDoubleBackSlash optionally specifies the number (integer $\geq$ 0) of
         spaces to be placed \emph{after} the double back slash \emph{when
         alignContentAfterDoubleBackSlash is active}; demonstrated in
@@ -3047,9 +3047,8 @@
  \end{example}
 
 \subsubsection{lookForAlignDelims: alignContentAfterDoubleBackSlash}\label{sec:alignContentAfterDoubleBackSlash}
- You can instruct \texttt{latexindent} to align \announce*{2023-05-01}{align content
- after double back slash} content after the double back slash. See also
- \vref{subsec:dbs}.
+ You can instruct \texttt{latexindent} to align \announce{2023-05-01}{align content after
+ double back slash} content after the double back slash. See also \vref{subsec:dbs}.
 
  \begin{example}
  We consider the file in \cref{lst:tabular5}, and the default output given in
@@ -3056,8 +3055,8 @@
  \cref{lst:tabular5-default}.
 
  \begin{cmhtcbraster}
-  \cmhlistingsfromfile*{demonstrations/tabular5.tex}{\texttt{tabular5.tex}}{lst:tabular5}
-  \cmhlistingsfromfile*{demonstrations/tabular5-default.tex}{\texttt{tabular5-default.tex}}{lst:tabular5-default}
+  \cmhlistingsfromfile{demonstrations/tabular5.tex}{\texttt{tabular5.tex}}{lst:tabular5}
+  \cmhlistingsfromfile{demonstrations/tabular5-default.tex}{\texttt{tabular5-default.tex}}{lst:tabular5-default}
  \end{cmhtcbraster}
 
  Using the settings given in \cref{lst:alignContentAfterDBS1} and running
@@ -3071,8 +3070,8 @@
  \begin{cmhtcbraster}[raster columns=2,
    raster left skip=-2.5cm,
    raster column skip=.03\linewidth]
-  \cmhlistingsfromfile*{demonstrations/tabular5-mod1.tex}{\texttt{tabular5-mod1.tex}}{lst:tabular5-mod1}
-  \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/alignContentAfterDBS1.yaml}[yaml-TCB]{\texttt{alignContentAfterDBS1.yaml}}{lst:alignContentAfterDBS1}
+  \cmhlistingsfromfile{demonstrations/tabular5-mod1.tex}{\texttt{tabular5-mod1.tex}}{lst:tabular5-mod1}
+  \cmhlistingsfromfile[style=yaml-LST]{demonstrations/alignContentAfterDBS1.yaml}[yaml-TCB]{\texttt{alignContentAfterDBS1.yaml}}{lst:alignContentAfterDBS1}
  \end{cmhtcbraster}
  \end{example}
 
@@ -3079,7 +3078,7 @@
  \begin{example}
  When using the \texttt{alignContentAfterDoubleBackSlash} feature, then you can also
  specify how many spaces to insert after the double backslash; the default is 1.
- \announce*{2023-05-01}{specify number of spaces after double back slash when aligning
+ \announce{2023-05-01}{specify number of spaces after double back slash when aligning
  content after double back slash}
 
  Starting from \cref{lst:tabular5} and using the the settings given in
@@ -3094,8 +3093,8 @@
  \begin{cmhtcbraster}[raster columns=2,
    raster left skip=-2.5cm,
    raster column skip=.03\linewidth]
-  \cmhlistingsfromfile*{demonstrations/tabular5-mod2.tex}{\texttt{tabular5-mod2.tex}}{lst:tabular5-mod2}
-  \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/alignContentAfterDBS2.yaml}[yaml-TCB]{\texttt{alignContentAfterDBS2.yaml}}{lst:alignContentAfterDBS2}
+  \cmhlistingsfromfile{demonstrations/tabular5-mod2.tex}{\texttt{tabular5-mod2.tex}}{lst:tabular5-mod2}
+  \cmhlistingsfromfile[style=yaml-LST]{demonstrations/alignContentAfterDBS2.yaml}[yaml-TCB]{\texttt{alignContentAfterDBS2.yaml}}{lst:alignContentAfterDBS2}
  \end{cmhtcbraster}
  \end{example}
 
@@ -6737,9 +6736,9 @@
     raster left skip=-3.5cm,
     raster right skip=-2cm,
     raster column skip=.03\linewidth]
-   \cmhlistingsfromfile*{demonstrations/tabular6.tex}{\texttt{tabular6.tex}}{lst:tabular6}
-   \cmhlistingsfromfile*{demonstrations/tabular6-mod1.tex}{\texttt{tabular6-mod1.tex}}{lst:tabular6-mod1}
-   \cmhlistingsfromfile*{demonstrations/tabular6-mod2.tex}{\texttt{tabular6-mod2.tex}}{lst:tabular6-mod2}
+   \cmhlistingsfromfile{demonstrations/tabular6.tex}{\texttt{tabular6.tex}}{lst:tabular6}
+   \cmhlistingsfromfile{demonstrations/tabular6-mod1.tex}{\texttt{tabular6-mod1.tex}}{lst:tabular6-mod1}
+   \cmhlistingsfromfile{demonstrations/tabular6-mod2.tex}{\texttt{tabular6-mod2.tex}}{lst:tabular6-mod2}
   \end{cmhtcbraster}
   We note that:
   \begin{itemize}
@@ -8254,6 +8253,34 @@
  been adjusted so that \texttt{=} symbols are used as the delimiter, but only when they
  are \emph{not preceded} by either \texttt{v} or \texttt{spfreload}.
  \end{example}
+
+ \begin{example}
+ We can use the \texttt{fineTuning} settings to tweak how \texttt{latexindent.pl} finds
+ trailing comments. \announce*{2023-06-01}{fine tuning trailing comments demonstration}
+
+ We begin with the file in \cref{lst:finetuning5}
+
+ \cmhlistingsfromfile*{demonstrations/finetuning5.tex}{\texttt{finetuning5.tex}}{lst:finetuning5}
+
+ Using the settings in \cref{lst:fine-tuning3} and running the command
+
+ \begin{commandshell}
+latexindent.pl finetuning5.tex -l=fine-tuning3.yaml
+\end{commandshell}
+
+ gives the output in \cref{lst:finetuning5-mod1}.
+
+ \begin{cmhtcbraster}[raster column skip=.01\linewidth]
+  \cmhlistingsfromfile*{demonstrations/finetuning5-mod1.tex}{\texttt{finetuning5-mod1.tex}}{lst:finetuning5-mod1}
+  \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/fine-tuning3.yaml}[yaml-TCB]{\texttt{finetuning3.yaml}}{lst:fine-tuning3}
+ \end{cmhtcbraster}
+
+ The settings in \cref{lst:fine-tuning3} detail that trailing comments can \emph{not} be
+ followed by a single space, and then the text `end'. This means that the
+ \texttt{specialBeginEnd} routine will be able to find the pattern \lstinline!% end! as
+ the \texttt{end} part. The trailing comments \texttt{123} and \texttt{456} are still
+ treated as trailing comments.
+ \end{example}
 % arara: pdflatex: { files: [latexindent]}
 \section{Conclusions and known limitations}\label{sec:knownlimitations}
  There are a number of known limitations of the script, and almost certainly quite a few

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm	2023-06-06 20:06:34 UTC (rev 67295)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm	2023-06-06 20:06:48 UTC (rev 67296)
@@ -67,16 +67,16 @@
     $logger->trace("*Storing trailing comments") if $is_t_switch_active;
 
     my $notPreceededBy = qr/${${$mainSettings{fineTuning}}{trailingComments}}{notPreceededBy}/;
+    my $afterComment   = qr/${${$mainSettings{fineTuning}}{trailingComments}}{afterComment}/;
 
     # perform the substitution
     ${$self}{body} =~ s/
-                            $notPreceededBy  # not preceded by a \
-                            %        # % 
+                            $notPreceededBy   # not preceded by a \
+                            %                 # % 
                             (
-                                \h*? # followed by possible horizontal space
-                                .*?  # and anything else
+                                $afterComment # anything else
                             )
-                            $        # up to the end of a line
+                            $                 # up to the end of a line
                         /   
                             # increment comment counter and store comment
                             $commentCounter++;

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2023-06-06 20:06:34 UTC (rev 67295)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2023-06-06 20:06:48 UTC (rev 67296)
@@ -20,6 +20,6 @@
 use Exporter qw/import/;
 our @EXPORT_OK = qw/$versionNumber $versionDate/;
 
-our $versionNumber = '3.21.1';
-our $versionDate   = '2023-05-20';
+our $versionNumber = '3.22';
+our $versionDate   = '2023-06-01';
 1

Modified: trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2023-06-06 20:06:34 UTC (rev 67295)
+++ trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2023-06-06 20:06:48 UTC (rev 67296)
@@ -1,5 +1,5 @@
 #
-# latexindent.pl, version 3.21.1, 2023-05-20
+# latexindent.pl, version 3.22, 2023-06-01
 #
 # defaultSettings.yaml, the default settings for latexindent.pl
 # 
@@ -648,6 +648,7 @@
       between: _|\^|\*
     trailingComments:
       notPreceededBy: (?<!\\)
+      afterComment: .*?
     modifyLineBreaks:
       doubleBackSlash: \\\\(?:\h*\[\h*\d+\h*[a-zA-Z]+\h*\])?
       comma: ','
@@ -666,6 +667,8 @@
               (?:[iI]\.[eE])                # i.e OR I.e OR i.E OR I.E
               |                             #
               (?:etc)                       # etc
+              |                             #
+              (?:[wW]\.[rR]\.[tT])          # w.r.t OR W.r.t OR w.R.t OR w.r.T OR W.R.t OR W.r.T OR w.R.T OR W.R.T
             )                               #
           )                                 #
         )                                   # 

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



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