texlive[71114] trunk: latexindent (28apr24)

commits+karl at tug.org commits+karl at tug.org
Sun Apr 28 22:06:54 CEST 2024


Revision: 71114
          https://tug.org/svn/texlive?view=revision&revision=71114
Author:   karl
Date:     2024-04-28 22:06:53 +0200 (Sun, 28 Apr 2024)
Log Message:
-----------
latexindent (28apr24)

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/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/BackUpFileProcedure.pm
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Document.pm
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/UTF8CmdLineArgsFileOperation.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	2024-04-28 20:06:33 UTC (rev 71113)
+++ trunk/Master/texmf-dist/doc/support/latexindent/README	2024-04-28 20:06:53 UTC (rev 71114)
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-    latexindent.pl, version 3.23.9, 2024-04-06
+    latexindent.pl, version 3.24, 2024-04-28
 
     PERL script to indent code within environments, and align delimited 
     environments in .tex files.

Modified: trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json	2024-04-28 20:06:33 UTC (rev 71113)
+++ trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json	2024-04-28 20:06:53 UTC (rev 71114)
@@ -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.23.9 2024-04-06",
+  "description": "latexindent.pl YAML schema helper, V3.24 2024-04-28",
   "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	2024-04-28 20:06:33 UTC (rev 71113)
+++ trunk/Master/texmf-dist/doc/support/latexindent/latexindent.tex	2024-04-28 20:06:53 UTC (rev 71114)
@@ -415,121 +415,121 @@
 
 \lstdefinestyle{indentAfterItems}{
  style=yaml-LST,
- firstnumber=241,linerange={241-248},
+ firstnumber=242,linerange={242-249},
  numbers=left,
 }
 
 \lstdefinestyle{itemNames}{
  style=yaml-LST,
- firstnumber=254,linerange={254-256},
+ firstnumber=255,linerange={255-257},
  numbers=left,
 }
 
 \lstdefinestyle{specialBeginEnd}{
  style=yaml-LST,
- firstnumber=260,linerange={260-274},
+ firstnumber=261,linerange={261-275},
  numbers=left,
 }
 
 \lstdefinestyle{indentAfterHeadings}{
  style=yaml-LST,
- firstnumber=284,linerange={284-293},
+ firstnumber=285,linerange={285-294},
  numbers=left,
 }
 
 \lstdefinestyle{noAdditionalIndentGlobalEnv}{
  style=yaml-LST,
- firstnumber=342,linerange={342-343},
+ firstnumber=343,linerange={343-344},
  numbers=left,
 }
 
 \lstdefinestyle{noAdditionalIndentGlobal}{
  style=yaml-LST,
- firstnumber=342,linerange={342-354},
+ firstnumber=343,linerange={343-355},
  numbers=left,
 }
 
 \lstdefinestyle{indentRulesGlobalEnv}{
  style=yaml-LST,
- firstnumber=358,linerange={358-359},
+ firstnumber=359,linerange={359-360},
  numbers=left,
 }
 
 \lstdefinestyle{indentRulesGlobal}{
  style=yaml-LST,
- firstnumber=358,linerange={358-370},
+ firstnumber=359,linerange={359-371},
  numbers=left,
 }
 
 \lstdefinestyle{commandCodeBlocks}{
  style=yaml-LST,
- firstnumber=373,linerange={373-388},
+ firstnumber=374,linerange={374-389},
  numbers=left,
 }
 
 \lstdefinestyle{modifylinebreaks}{
  style=yaml-LST,
- firstnumber=501,linerange={501-503},
+ firstnumber=502,linerange={502-504},
  numbers=left,
 }
 
 \lstdefinestyle{textWrapOptions}{
  style=yaml-LST,
- firstnumber=531,linerange={531-532},
+ firstnumber=532,linerange={532-533},
  numbers=left,
 }
 
 \lstdefinestyle{textWrapOptionsAll}{
  style=yaml-LST,
- firstnumber=531,linerange={531-558},
+ firstnumber=532,linerange={532-559},
  numbers=left,
 }
 
 \lstdefinestyle{oneSentencePerLine}{
  style=yaml-LST,
- firstnumber=504,linerange={504-530},
+ firstnumber=505,linerange={505-531},
  numbers=left,
 }
 
 \lstdefinestyle{sentencesFollow}{
  style=yaml-LST,
- firstnumber=510,linerange={510-518},
+ firstnumber=511,linerange={511-519},
  numbers=left,
 }
 
 \lstdefinestyle{sentencesBeginWith}{
  style=yaml-LST,
- firstnumber=519,linerange={519-522},
+ firstnumber=520,linerange={520-523},
  numbers=left,
 }
 
 \lstdefinestyle{sentencesEndWith}{
  style=yaml-LST,
- firstnumber=523,linerange={523-528},
+ firstnumber=524,linerange={524-529},
  numbers=left,
 }
 
 \lstdefinestyle{sentencesDoNOTcontain}{
  style=yaml-LST,
- firstnumber=529,linerange={529-530},
+ firstnumber=530,linerange={530-531},
  numbers=left,
 }
 
 \lstdefinestyle{modifylinebreaksEnv}{
  style=yaml-LST,
- firstnumber=560,linerange={560-569},
+ firstnumber=561,linerange={561-570},
  numbers=left,
 }
 
 \lstdefinestyle{replacements}{
  style=yaml-LST,
- firstnumber=621,linerange={621-626},
+ firstnumber=622,linerange={622-627},
  numbers=left,
 }
 
 \lstdefinestyle{fineTuning}{
  style=yaml-LST,
- firstnumber=630,linerange={630-685},
+ firstnumber=631,linerange={631-686},
  numbers=left,
 }
 
@@ -1805,7 +1805,7 @@
  are detailed in \cref{app:indentconfig:options}. \announce{2023-01-01}{indentconfig
  location options}
 
-\subsection{indentconfig.yaml and .indentconfig.yaml}
+\subsection{indentconfig.yaml and .indentconfig.yaml}\label{subsec:indentconfig}
  \texttt{latexindent.pl} will always check your home directory for
  \texttt{indentconfig.yaml}
  and \texttt{.indentconfig.yaml} (unless it is called with the \texttt{-d} switch), which
@@ -1860,6 +1860,11 @@
   \texttt{indent.log}.
  \end{warning}
 
+ As of \announce*{2024-04-28}{paths within local YAML settings} you can specify the
+ \texttt{paths} field from \cref{lst:indentconfig} within any of your
+ \texttt{latexindent.yaml} and friends settings files. This can lead to creative nesting
+ of configuration files; a demonstration is given in \vref{sec:appendix:paths}.
+
  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 occur for
@@ -1968,6 +1973,9 @@
 latexindent.pl -m --yaml='modifyLineBreaks:oneSentencePerLine:sentencesEndWith:other:\;'
 \end{commandshell}
 
+ Note that the \texttt{paths} settings (see \vref{sec:appendix:paths}) can \emph{not} be
+ specified using the \texttt{-y} switch.
+
 \subsection{Settings load order}\label{sec:loadorder}
  \texttt{latexindent.pl} loads the settings files in the following order:
  \index{switches!-l in relation to other settings}
@@ -3265,7 +3273,7 @@
  For example, let’s consider the \texttt{.tex} file in \cref{lst:specialAlgo}.
  \index{specialBeginEnd!middle} \index{specialBeginEnd!Algorithms example}
 
- \cmhlistingsfromfile*[basicstyle=\tiny]{demonstrations/specialAlgo.tex}[enhanced jigsaw,breakable]{\texttt{specialAlgo.tex}}{lst:specialAlgo}
+ \cmhlistingsfromfile[basicstyle=\tiny]{demonstrations/specialAlgo.tex}[enhanced jigsaw,breakable]{\texttt{specialAlgo.tex}}{lst:specialAlgo}
 
  Upon saving the YAML settings in \cref{lst:algo-yaml} and running the command
  \index{switches!-l demonstration}
@@ -3277,8 +3285,8 @@
  then we obtain the output given in \cref{lst:specialAlgo-mod1}.
 
  \begin{cmhtcbraster}
-  \cmhlistingsfromfile*[basicstyle=\tiny]{demonstrations/specialAlgo-mod1.tex}{\texttt{specialAlgo.tex} using \cref{lst:algo-yaml}}{lst:specialAlgo-mod1}
-  \cmhlistingsfromfile*[style=yaml-LST,basicstyle=\tiny,commentstyle=\color{blue}\ttfamily\tiny]{demonstrations/algo.yaml}[yaml-TCB]{\texttt{algo.yaml}}{lst:algo-yaml}
+  \cmhlistingsfromfile[basicstyle=\tiny]{demonstrations/specialAlgo-mod1.tex}{\texttt{specialAlgo.tex} using \cref{lst:algo-yaml}}{lst:specialAlgo-mod1}
+  \cmhlistingsfromfile[style=yaml-LST,basicstyle=\tiny,commentstyle=\color{blue}\ttfamily\tiny]{demonstrations/algo.yaml}[yaml-TCB]{\texttt{algo.yaml}}{lst:algo-yaml}
  \end{cmhtcbraster}
  \end{example}
 
@@ -8414,10 +8422,10 @@
  We can use the \texttt{fineTuning} settings to tweak how \texttt{latexindent.pl} finds
  environments.
 
- We begin with the file in \cref{lst:finetuning6}.\announce*{2023-10-13}{fineTuning
+ We begin with the file in \cref{lst:finetuning6}.\announce{2023-10-13}{fineTuning
  environments}
 
- \cmhlistingsfromfile*{demonstrations/finetuning6.tex}{\texttt{finetuning6.tex}}{lst:finetuning6}
+ \cmhlistingsfromfile{demonstrations/finetuning6.tex}{\texttt{finetuning6.tex}}{lst:finetuning6}
 
  Using the settings in \cref{lst:fine-tuning4} and running the command
 
@@ -8433,8 +8441,8 @@
    raster column 1/.style={add to width=-.1\textwidth},
    raster column 2/.style={add to width=-.3\textwidth},
   ]
-  \cmhlistingsfromfile*{demonstrations/finetuning6-mod1.tex}{\texttt{finetuning6-mod1.tex}}{lst:finetuning6-mod1}
-  \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/fine-tuning4.yaml}[MLB-TCB]{\texttt{fine-tuning4.yaml}}{lst:fine-tuning4}
+  \cmhlistingsfromfile{demonstrations/finetuning6-mod1.tex}{\texttt{finetuning6-mod1.tex}}{lst:finetuning6-mod1}
+  \cmhlistingsfromfile[style=yaml-LST]{demonstrations/fine-tuning4.yaml}[MLB-TCB]{\texttt{fine-tuning4.yaml}}{lst:fine-tuning4}
  \end{cmhtcbraster}
 
  By using the settings in \cref{lst:fine-tuning4} it means that the default poly-switch
@@ -9307,6 +9315,74 @@
   stored in \texttt{\$HOME/.profile}). All commands in this file a run after login, so
   the environment variable will be set after your next login.
 
+ \section{paths demonstration}\label{sec:appendix:paths}
+
+  As detailed in \vref{subsec:indentconfig} \announce*{2024-04-28}{nested paths
+  demonstration}, the \texttt{paths} field can be specified in any of your \texttt{YAML}
+  files.
+
+  We will use the file in \cref{lst:paths-demo} for demonstration in what follows.
+
+  \cmhlistingsfromfile*{demonstrations/paths-demo.tex}{\texttt{paths-demo.tex}}{lst:paths-demo}
+
+  \begin{example}
+  Consider the settings given in \cref{lst:path1-yaml} and \cref{lst:path2-yaml}.
+
+  \begin{cmhtcbraster}[raster column skip=.1\linewidth]
+   \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/path1.yaml}[yaml-TCB]{\texttt{path1.yaml}}{lst:path1-yaml}
+   \cmhlistingsfromfile*[style=yaml-LST,showspaces=true]{demonstrations/path2.yaml}[yaml-TCB]{\texttt{path2.yaml}}{lst:path2-yaml}
+  \end{cmhtcbraster}
+
+  Upon calling
+
+  \begin{commandshell}
+latexindent.pl -l=path1.yaml paths-demo.tex
+\end{commandshell}
+
+  then we will receive the output given in \cref{lst:paths-demo-mod1}.
+
+  \cmhlistingsfromfile*[showspaces=true]{demonstrations/paths-demo-mod1.tex}{\texttt{paths-demo-mod1.tex}}{lst:paths-demo-mod1}
+
+  We note that the settings from \cref{lst:path2-yaml} have been called from
+  \cref{lst:path1-yaml}.
+
+  On inspection of \texttt{indent.log} from the above call, we see the details of this
+  part of the process given in \cref{lst:path-test1:txt}.
+
+  \cmhlistingsfromfile*{demonstrations/path-test1.txt}{\texttt{path-test1.txt}}{lst:path-test1:txt}
+  \end{example}
+
+  \begin{example}
+  Consider the settings given in \cref{lst:path3-yaml} to \cref{lst:path5-yaml}.
+
+  \begin{cmhtcbraster}[raster columns=3,
+    raster left skip=-3.5cm,
+    raster right skip=-2cm,
+    raster column skip=.03\linewidth]
+   \cmhlistingsfromfile*[style=yaml-LST]{demonstrations/path3.yaml}[yaml-TCB]{\texttt{path3.yaml}}{lst:path3-yaml}
+   \cmhlistingsfromfile*[style=yaml-LST,showspaces=true]{demonstrations/path4.yaml}[yaml-TCB]{\texttt{path4.yaml}}{lst:path4-yaml}
+   \cmhlistingsfromfile*[style=yaml-LST,showspaces=true]{demonstrations/path5.yaml}[yaml-TCB]{\texttt{path5.yaml}}{lst:path5-yaml}
+  \end{cmhtcbraster}
+
+  Upon calling
+
+  \begin{commandshell}
+latexindent.pl -l=path3.yaml paths-demo.tex
+\end{commandshell}
+
+  then we will receive the output given in \cref{lst:paths-demo-mod3}.
+
+  \cmhlistingsfromfile*[showspaces=true]{demonstrations/paths-demo-mod3.tex}{\texttt{paths-demo-mod3.tex}}{lst:paths-demo-mod3}
+
+  We see that \texttt{path3.yaml} calls \texttt{path4.yaml} which in turn calls
+  \texttt{path5.yaml}.
+
+  On inspection of \texttt{indent.log} from the above call, we see the details of this
+  part of the process given in \cref{lst:path-test3:txt}.
+
+  \cmhlistingsfromfile*{demonstrations/path-test3.txt}{\texttt{path-test3.txt}}{lst:path-test3:txt}
+  \end{example}
+
  \section{logFilePreferences}\label{app:logfile-demo}
   \Vref{lst:logFilePreferences} describes the options for customising the information given
   to the log file, and we provide a few demonstrations here.

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/BackUpFileProcedure.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/BackUpFileProcedure.pm	2024-04-28 20:06:33 UTC (rev 71113)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/BackUpFileProcedure.pm	2024-04-28 20:06:53 UTC (rev 71114)
@@ -54,6 +54,11 @@
 
     # add the user's backup directory to the backup path
     $backupFileNoExt = "${$self}{cruftDirectory}/$backupFileNoExt";
+    $backupFileNoExt =~ s/\\/\//g;
+    $backupFileNoExt =~ s/\/{2,}/\//g;
+    if ( $^O eq 'MSWin32' ) {
+        $backupFileNoExt =~ s/\//\\/g;
+    }
 
     # local variables, determined from the YAML settings
     my $onlyOneBackUp       = $mainSettings{onlyOneBackUp};

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Document.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Document.pm	2024-04-28 20:06:33 UTC (rev 71113)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Document.pm	2024-04-28 20:06:53 UTC (rev 71114)
@@ -272,12 +272,19 @@
         if ${ $mainSettings{logFilePreferences} }{showGitHubInfoFooter};
 
     # open log file
-    my $logfileName     = $switches{logFileName} || "indent.log";
-    my $logfilePossible = 1;
-    my $logfile         = open_with_encode( '>:encoding(UTF-8)', "${$self}{cruftDirectory}/$logfileName" )
-        or $logfilePossible = 0;
+    my $logfileName = $switches{logFileName} || "indent.log";
 
-    if ($logfilePossible) {
+    my $logfilePath;
+    $logfilePath = "${$self}{cruftDirectory}/$logfileName";
+    $logfilePath =~ s/\\/\//g;
+    $logfilePath =~ s/\/{2,}/\//g;
+    if ( $^O eq 'MSWin32' ) {
+        $logfilePath =~ s/\//\\/g;
+    }
+
+    my $logfile = open_with_encode( '>:encoding(UTF-8)', $logfilePath );
+
+    if ($logfile) {
         foreach my $line ( @{LatexIndent::Logger::logFileLines} ) {
             print $logfile $line, "\n";
         }
@@ -285,7 +292,12 @@
         # close log file
         close($logfile);
     }
-
+    else {
+        if ( $switches{screenlog} ) {
+            print "WARN:  Could not open the logfile $logfilePath \n";
+            print "       No logfile will be produced.\n";
+        }
+    }
 }
 
 sub process_body_of_text {

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm	2024-04-28 20:06:33 UTC (rev 71113)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm	2024-04-28 20:06:53 UTC (rev 71114)
@@ -382,6 +382,46 @@
             $logger->info("Reading USER settings from $settings");
             $userSettings = read_yaml_with_encode("$settings");
 
+            # update the absolute paths
+            if ( $userSettings and ( ref( $userSettings->[0] ) eq 'HASH' ) and $userSettings->[0]->{paths} ) {
+                $logger->info("Reading path information from $settings");
+
+                # output the contents of indentconfig to the log file
+                $logger->info( Dump \%{ $userSettings->[0] } );
+
+                # change the encoding of the paths according to the field `encoding`
+                if ( $userSettings and ( ref( $userSettings->[0] ) eq 'HASH' ) and $userSettings->[0]->{encoding} ) {
+                    use Encode;
+                    my $encoding       = $userSettings->[0]->{encoding};
+                    my $encodingObject = find_encoding($encoding);
+
+                    # Check if the encoding is valid.
+                    if ( ref($encodingObject) ) {
+                        $logger->info("*Encoding of the paths is $encoding");
+                        foreach ( @{ $userSettings->[0]->{paths} } ) {
+                            my $temp = $encodingObject->encode("$_");
+                            $logger->info("Transform file encoding: $_ -> $temp");
+                            push( @absPaths, $temp );
+                        }
+                    }
+                    else {
+                        $logger->warn("*encoding \"$encoding\" not found");
+                        $logger->warn("Ignore this setting and will take the default encoding.");
+                        @absPaths = @{ $userSettings->[0]->{paths} };
+                        foreach ( @{ $userSettings->[0]->{paths} } ) {
+                            push( @absPaths, $_ );
+                        }
+                    }
+                }
+                else    # No such setting, and will take the default
+                {
+                    # $logger->info("*Encoding of the paths takes the default.");
+                    foreach ( @{ $userSettings->[0]->{paths} } ) {
+                        push( @absPaths, $_ );
+                    }
+                }
+            }
+
             # if we can read userSettings
             if ($userSettings) {
 
@@ -477,7 +517,9 @@
                         }
 
                         # if amalgamate is set to 1, then append
-                        if ( ${ $mainSettings{$firstLevelKey}[0] }{amalgamate} ) {
+                        if ( ref( $mainSettings{$firstLevelKey}[0] ) eq "HASH"
+                            and ${ $mainSettings{$firstLevelKey}[0] }{amalgamate} )
+                        {
 
                             # loop through the other settings
                             foreach ( @{$firstLevelValue} ) {

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm	2024-04-28 20:06:33 UTC (rev 71113)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm	2024-04-28 20:06:53 UTC (rev 71114)
@@ -135,6 +135,11 @@
 
     # cruft directory
     ${$self}{cruftDirectory} = $switches{cruftDirectory} || ( dirname ${$self}{fileName} );
+    ${$self}{cruftDirectory} =~ s/\\/\//g;
+    ${$self}{cruftDirectory} =~ s/\/{2,}/\//g;
+    if ( $^O eq 'MSWin32' ) {
+        ${$self}{cruftDirectory} =~ s/\//\\/g;
+    }
 
     my $cruftDirectoryCreation = 0;
 
@@ -149,12 +154,14 @@
         }
         $cruftDirectoryCreation = 1;
     }
-
     my $logfileName = ( $switches{cruftDirectory} ? ${$self}{cruftDirectory} . "/" : '' )
         . ( $switches{logFileName} || "indent.log" );
+    $logfileName =~ s/\\/\//g;
+    $logfileName =~ s/\/{2,}/\//g;
+    if ( $^O eq 'MSWin32' ) {
+        $logfileName =~ s/\//\\/g;
+    }
 
-    $logfileName = $logfileName;
-
     # details of the script to log file
     $logger->info("*$FindBin::Script version $versionNumber, $versionDate, a script to indent .tex files");
     $logger->info("$FindBin::Script lives here: $FindBin::RealBin/");
@@ -260,7 +267,7 @@
         $switches{outputToFile} = 0;
     }
 
-    $logger->info("*Directory for backup files and $logfileName:");
+    $logger->info("*Directory for backup files and log file $logfileName:");
     $logger->info( $switches{cruftDirectory} ? ${$self}{cruftDirectory} : ${$self}{cruftDirectory} );
     $logger->info("cruft directory creation: ${$self}{cruftDirectory}") if $cruftDirectoryCreation;
 

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/UTF8CmdLineArgsFileOperation.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/UTF8CmdLineArgsFileOperation.pm	2024-04-28 20:06:33 UTC (rev 71113)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/UTF8CmdLineArgsFileOperation.pm	2024-04-28 20:06:53 UTC (rev 71114)
@@ -66,12 +66,20 @@
         require Win32::Unicode::File;
         Win32::Unicode::File->import;
         $fh = Win32::Unicode::File->new;
-        open $fh, $mode, $filename or die "Can't open file: $!";
-        return $fh;
+        if ( open $fh, $mode, $filename ) {
+            return $fh;
+        }
+        else {
+            return undef;
+        }
     }
     else {
-        open( $fh, $mode, $filename ) or die "Can't open file: $!";
-        return $fh;
+        if ( open( $fh, $mode, $filename ) ) {
+            return $fh;
+        }
+        else {
+            return undef;
+        }
     }
 }
 
@@ -79,7 +87,7 @@
     use YAML::Tiny;
     my $filename = shift;
 
-    my $fh          = open_with_encode( '<:encoding(UTF-8)', $filename ) or die $!;
+    my $fh          = open_with_encode( '<:encoding(UTF-8)', $filename ) or return undef;
     my $yaml_string = join( "", <$fh> );
     return YAML::Tiny->read_string($yaml_string);
 }
@@ -105,14 +113,13 @@
         require Win32::Unicode::Dir;
         Win32::Unicode::Dir->import(qw(mkdirW));
 
-        mkdirW($path) or die "Cannot create directory $path: $!";
+        mkdirW($path);
     }
     else {
         require File::Path;
         File::Path->import(qw(make_path));
 
-        my $created = make_path($path);
-        die "Cannot create directory $path" unless $created;
+        make_path($path);
     }
 }
 

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2024-04-28 20:06:33 UTC (rev 71113)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2024-04-28 20:06:53 UTC (rev 71114)
@@ -20,6 +20,6 @@
 use Exporter qw/import/;
 our @EXPORT_OK = qw/$versionNumber $versionDate/;
 
-our $versionNumber = '3.23.9';
-our $versionDate   = '2024-04-06';
+our $versionNumber = '3.24';
+our $versionDate   = '2024-04-28';
 1

Modified: trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2024-04-28 20:06:33 UTC (rev 71113)
+++ trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2024-04-28 20:06:53 UTC (rev 71114)
@@ -1,5 +1,5 @@
 #
-# latexindent.pl, version 3.23.9, 2024-04-06
+# latexindent.pl, version 3.24, 2024-04-28
 #
 # defaultSettings.yaml, the default settings for latexindent.pl
 #
@@ -228,6 +228,7 @@
   tblr: 1
   longtblr: 1
   talltblr: 1
+  spreadtab: 1
 
 # if you want the script to look for \item commands
 # and format it, as follows (for example),

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



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