texlive[48905] trunk: latexindent (13oct18)

commits+karl at tug.org commits+karl at tug.org
Sat Oct 13 23:03:48 CEST 2018


Revision: 48905
          http://tug.org/svn/texlive?view=revision&revision=48905
Author:   karl
Date:     2018-10-13 23:03:48 +0200 (Sat, 13 Oct 2018)
Log Message:
-----------
latexindent (13oct18)

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/title.tex
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.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/win32/latexindent.exe
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/support/latexindent/README
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/README	2018-10-13 21:03:22 UTC (rev 48904)
+++ trunk/Master/texmf-dist/doc/support/latexindent/README	2018-10-13 21:03:48 UTC (rev 48905)
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-    latexindent.pl, version 3.5.2, 2018-10-06
+    latexindent.pl, version 3.5.3, 2018-10-13
 
     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/title.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/title.tex	2018-10-13 21:03:22 UTC (rev 48904)
+++ trunk/Master/texmf-dist/doc/support/latexindent/title.tex	2018-10-13 21:03:48 UTC (rev 48905)
@@ -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.5.2
+		\centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.5.3
 	\end{tcolorbox}
 }
 \author{Chris Hughes \thanks{and contributors!

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm	2018-10-13 21:03:22 UTC (rev 48904)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm	2018-10-13 21:03:48 UTC (rev 48905)
@@ -85,24 +85,29 @@
 
   # messages for indentconfig.yaml and/or .indentconfig.yaml
   if ( -e $indentconfig and !$switches{onlyDefault}) {
-        $logger->info("Reading path information from $indentconfig");
-        # if both indentconfig.yaml and .indentconfig.yaml exist
-        if ( -e File::HomeDir->my_home . "/indentconfig.yaml" and  -e File::HomeDir->my_home . "/.indentconfig.yaml") {
-              $logger->info("$homeDir/.indentconfig.yaml has been found, but $indentconfig takes priority");
-        } elsif ( -e File::HomeDir->my_home . "/indentconfig.yaml" ) {
-              $logger->info("(Alternatively $homeDir/.indentconfig.yaml can be used)");
-        } elsif ( -e File::HomeDir->my_home . "/.indentconfig.yaml" ) {
-              $logger->info("(Alternatively $homeDir/indentconfig.yaml can be used)");
-        }
-        
         # read the absolute paths from indentconfig.yaml
         $userSettings = YAML::Tiny->read( "$indentconfig" );
 
-        # output the contents of indentconfig to the log file
-        $logger->info(Dump \%{$userSettings->[0]});
+        # update the absolute paths
+        if($userSettings and (ref($userSettings->[0]) eq 'HASH') and $userSettings->[0]->{paths}){
+            $logger->info("Reading path information from $indentconfig");
+            # if both indentconfig.yaml and .indentconfig.yaml exist
+            if ( -e File::HomeDir->my_home . "/indentconfig.yaml" and  -e File::HomeDir->my_home . "/.indentconfig.yaml") {
+                  $logger->info("$homeDir/.indentconfig.yaml has been found, but $indentconfig takes priority");
+            } elsif ( -e File::HomeDir->my_home . "/indentconfig.yaml" ) {
+                  $logger->info("(Alternatively $homeDir/.indentconfig.yaml can be used)");
+            } elsif ( -e File::HomeDir->my_home . "/.indentconfig.yaml" ) {
+                  $logger->info("(Alternatively $homeDir/indentconfig.yaml can be used)");
+            }
+            
+            # output the contents of indentconfig to the log file
+            $logger->info(Dump \%{$userSettings->[0]});
         
-        # update the absolute paths
-        @absPaths = @{$userSettings->[0]->{paths}};
+            @absPaths = @{$userSettings->[0]->{paths}};
+        } else {
+            $logger->warn("*The paths field cannot be read from $indentconfig; this means it is either empty or contains invalid YAML");
+            $logger->warn("See https://latexindentpl.readthedocs.io/en/latest/sec-indent-config-and-settings.html for an example");
+        }
   } else {
      if($switches{onlyDefault}) {
         $logger->info("*-d switch active: only default settings requested");

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2018-10-13 21:03:22 UTC (rev 48904)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2018-10-13 21:03:48 UTC (rev 48905)
@@ -19,6 +19,6 @@
 use Exporter qw/import/;
 our @EXPORT_OK = qw/$versionNumber $versionDate/;
 
-our $versionNumber = '3.5.2';
-our $versionDate = '2018-10-06';
+our $versionNumber = '3.5.3';
+our $versionDate = '2018-10-13';
 1

Modified: trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2018-10-13 21:03:22 UTC (rev 48904)
+++ trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2018-10-13 21:03:48 UTC (rev 48905)
@@ -1,4 +1,4 @@
-# defaultSettings.yaml for latexindent.pl, version 3.5.2, 2018-10-06
+# defaultSettings.yaml for latexindent.pl, version 3.5.3, 2018-10-13
 #                      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