summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/latexindent
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-01-08 21:34:40 +0000
committerKarl Berry <karl@freefriends.org>2022-01-08 21:34:40 +0000
commita47a7cdd5e97b3173506c30afad63d5c1c7a92b5 (patch)
treec12a9df5a9a0853c7bb9c11b389e1895d35232d6 /Master/texmf-dist/scripts/latexindent
parent4674b6b4c73f8fc8cbbcf07ddf24956d2eb16d80 (diff)
latexindent (8jan22)
git-svn-id: svn://tug.org/texlive/trunk@61535 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/latexindent')
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm4
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm14
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/Switches.pm1
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm4
-rwxr-xr-xMaster/texmf-dist/scripts/latexindent/defaultSettings.yaml4
-rwxr-xr-xMaster/texmf-dist/scripts/latexindent/latexindent.pl3
6 files changed, 23 insertions, 7 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm
index 22de133bf13..8f67d62c586 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm
@@ -899,7 +899,7 @@ sub multicolumn_pre_check {
$j++;
# multicolumn entry
- if(${$cell}{type} =~ m/(\d)/) {
+ if(${$cell}{type} =~ m/(\d+)/) {
my $multiColumnSpan = $1;
@@ -1005,7 +1005,7 @@ sub multicolumn_padding{
$j++;
# multicolumn entry
- next unless (${$cell}{type} =~ m/(\d)/);
+ next unless (${$cell}{type} =~ m/(\d+)/);
my $multiColumnSpan = $1;
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
index e01792c6fb5..692bfddbdbe 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
@@ -28,6 +28,17 @@ sub process_switches{
# -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 @@ latexindent.pl version $versionNumber, $versionDate
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
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Switches.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Switches.pm
index 360ac415043..a57722782b2 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Switches.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Switches.pm
@@ -33,6 +33,7 @@ sub store_switches{
# 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;
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
index 9b4198e6bf9..8b3aadca2dd 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
@@ -19,6 +19,6 @@ use warnings;
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
diff --git a/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml b/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
index d0cadb1226d..32bab97e976 100755
--- a/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
+++ b/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
@@ -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 @@ fineTuning:
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: ','
diff --git a/Master/texmf-dist/scripts/latexindent/latexindent.pl b/Master/texmf-dist/scripts/latexindent/latexindent.pl
index 37c99d6f0b9..eedd30b286a 100755
--- a/Master/texmf-dist/scripts/latexindent/latexindent.pl
+++ b/Master/texmf-dist/scripts/latexindent/latexindent.pl
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-# latexindent.pl, version 3.13.5, 2022-01-02
+# latexindent.pl, version 3.14, 2022-01-08
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,6 +31,7 @@ my %switches = (readLocalSettings=>0);
GetOptions (
"version|v"=>\$switches{version},
+ "vversion|vv"=>\$switches{vversion},
"silent|s"=>\$switches{silentMode},
"trace|t"=>\$switches{trace},
"ttrace|tt"=>\$switches{ttrace},