texlive[58595] trunk: latexindent (21mar21)
commits+karl at tug.org
commits+karl at tug.org
Sun Mar 21 22:43:21 CET 2021
Revision: 58595
http://tug.org/svn/texlive?view=revision&revision=58595
Author: karl
Date: 2021-03-21 22:43:20 +0100 (Sun, 21 Mar 2021)
Log Message:
-----------
latexindent (21mar21)
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.pdf
trunk/Master/texmf-dist/doc/support/latexindent/title.tex
trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.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 2021-03-21 21:42:58 UTC (rev 58594)
+++ trunk/Master/texmf-dist/doc/support/latexindent/README 2021-03-21 21:43:20 UTC (rev 58595)
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- latexindent.pl, version 3.9, 2021-03-14
+ latexindent.pl, version 3.9.1, 2021-03-21
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 2021-03-21 21:42:58 UTC (rev 58594)
+++ trunk/Master/texmf-dist/doc/support/latexindent/appendices.tex 2021-03-21 21:43:20 UTC (rev 58595)
@@ -61,7 +61,6 @@
cpanm YAML::Tiny
cpanm File::HomeDir
cpanm Unicode::GCString
-cpanm Log::Dispatch
\end{commandshell}
For other distributions, the Ubuntu/Debian approach may work as follows
@@ -71,7 +70,6 @@
sudo cpanm YAML::Tiny
sudo cpanm File::HomeDir
sudo cpanm Unicode::GCString
-sudo cpanm Log::Dispatch::File
\end{commandshell}
or else by running, for example,
\begin{commandshell}
@@ -118,7 +116,6 @@
cpanm YAML::Tiny
cpanm File::HomeDir
cpanm Unicode::GCString
-cpanm Log::Dispatch
\end{commandshell}
\subsubsection{Windows}
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 2021-03-21 21:42:58 UTC (rev 58594)
+++ trunk/Master/texmf-dist/doc/support/latexindent/title.tex 2021-03-21 21:43:20 UTC (rev 58595)
@@ -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.9
+ \centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.9.1
\end{tcolorbox}
}
\author{Chris Hughes \thanks{and contributors!
Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm 2021-03-21 21:42:58 UTC (rev 58594)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm 2021-03-21 21:43:20 UTC (rev 58595)
@@ -34,7 +34,7 @@
if(scalar(@ARGV) < 1 or $switches{showhelp}) {
print <<ENDQUOTE
latexindent.pl version $versionNumber, $versionDate
-usage: latexindent.pl [options] [file][.tex|.sty|.cls|.bib|...]
+usage: latexindent.pl [options] [file]
-v, --version
displays the version number and date of release
-h, --help
@@ -43,8 +43,8 @@
log file will also be output to the screen
-o, --outputfile=<name-of-output-file>
output to another file; sample usage:
- latexindent.pl -o outputfile.tex myfile.tex
- latexindent.pl -o=outputfile.tex myfile.tex
+ latexindent.pl -o outputfile.tex myfile.tex
+ latexindent.pl -o=outputfile.tex myfile.tex
-w, --overwrite
overwrite the current file; a backup will be made, but still be careful
-s, --silent
@@ -52,12 +52,13 @@
-t, --trace
tracing mode: verbose information given to the log file
-l, --local[=myyaml.yaml]
- use localSettings.yaml (assuming it exists in the directory of your file,
- or in the current working directory); alternatively, use myyaml.yaml, if it exists;
+ use `localSettings.yaml`, `.localSettings.yaml`, `latexindent.yaml`,
+ or `.latexindent.yaml` (assuming one of them exists in the directory of your file or in
+ the current working directory); alternatively, use `myyaml.yaml`, if it exists;
sample usage:
- latexindent.pl -l some.yaml myfile.tex
- latexindent.pl -l=another.yaml myfile.tex
- latexindent.pl -l=some.yaml,another.yaml myfile.tex
+ latexindent.pl -l some.yaml myfile.tex
+ latexindent.pl -l=another.yaml myfile.tex
+ latexindent.pl -l=some.yaml,another.yaml myfile.tex
-y, --yaml=<yaml settings>
specify YAML settings; sample usage:
latexindent.pl -y="defaultIndent:' '" myfile.tex
@@ -66,19 +67,19 @@
ONLY use defaultSettings.yaml, ignore ALL (yaml) user files
-g, --logfile=<name of log file>
used to specify the name of logfile (default is indent.log)
- -c, --cruft=<cruft directory>
+ -c, --cruft=<cruft directory>
used to specify the location of backup files and indent.log
-m, --modifylinebreaks
- modify linebreaks before, during, and at the end of code blocks;
+ modify linebreaks before, during, and at the end of code blocks;
trailing comments and blank lines can also be added using this feature
- -r,--replacement
+ -r, --replacement
replacement mode, allows you to replace strings and regular expressions
verbatim blocks not respected
- -rv,--replacementrespectverb
+ -rv, --replacementrespectverb
replacement mode, allows you to replace strings and regular expressions
while respecting verbatim code blocks
- -rr,--onlyreplacement
- *only* replacement mode, no indentation
+ -rr, --onlyreplacement
+ *only* replacement mode, no indentation;
verbatim blocks not respected
ENDQUOTE
;
Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm 2021-03-21 21:42:58 UTC (rev 58594)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm 2021-03-21 21:43:20 UTC (rev 58595)
@@ -35,9 +35,30 @@
my $optAndMandRegExp = $self->get_arguments_regexp;
# read from fine tuning
- my $NamedGroupingBracesBracketsRegExp = qr/${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{name}/;
- my $NamedGroupingFollowRegExp = qr/${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{follow}/;
+ my $NamedGroupingBracesBracketsRegExp = qr/${${$masterSettings{fineTuning}}{namedGroupingBracesBrackets}}{name}/;
+ my $NamedGroupingFollowRegExp = qr/${${$masterSettings{fineTuning}}{namedGroupingBracesBrackets}}{follow}/;
+ # defaultSettings.yaml mistakenly had
+ #
+ # fineTuning:
+ # NamedGroupingBracesBrackets:
+ #
+ # when it should have been
+ #
+ # fineTuning:
+ # namedGroupingBracesBrackets:
+ #
+ # the mistake was mine, so I feel that the following is necessary; if we
+ # get to V4, then this will be removed and only namedGroupingBracesBrackets will be supported
+ if(${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{name}){
+ $logger->warn("*fineTuning:NamedGroupingBracesBrackets is ok for now, but in future versions, fineTuning:namedGroupingBracesBrackets will be used");
+ $NamedGroupingBracesBracketsRegExp = qr/${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{name}/;
+ }
+ if(${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{follow}){
+ $logger->warn("*fineTuning:NamedGroupingBracesBrackets is ok for now, but in future versions, fineTuning:namedGroupingBracesBrackets will be used");
+ $NamedGroupingFollowRegExp = qr/${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{follow}/;
+ }
+
# store the regular expresssion for matching and replacing
$grouping_braces_regexp = qr/
(
Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm 2021-03-21 21:42:58 UTC (rev 58594)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm 2021-03-21 21:43:20 UTC (rev 58595)
@@ -19,6 +19,6 @@
use Exporter qw/import/;
our @EXPORT_OK = qw/$versionNumber $versionDate/;
-our $versionNumber = '3.9';
-our $versionDate = '2021-03-14';
+our $versionNumber = '3.9.1';
+our $versionDate = '2021-03-21';
1
Modified: trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml 2021-03-21 21:42:58 UTC (rev 58594)
+++ trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml 2021-03-21 21:43:20 UTC (rev 58595)
@@ -1,4 +1,4 @@
-# defaultSettings.yaml for latexindent.pl, version 3.9, 2021-03-14
+# defaultSettings.yaml for latexindent.pl, version 3.9.1, 2021-03-21
# a script that aims to
# beautify .tex, .sty, .cls files
#
@@ -618,9 +618,9 @@
commands:
name: '[+a-zA-Z@\*0-9_\:]+?'
keyEqualsValuesBracesBrackets:
- name: '[a-zA-Z@\*0-9_\/.\h\{\}:\#-]+?'
+ name: '[a-zA-Z@\*0-9_\/.:\#-]+[a-zA-Z@\*0-9_\/.\h\{\}:\#-]*?'
follow: '(?:(?<!\\)\{)|,|(?:(?<!\\)\[)'
- NamedGroupingBracesBrackets:
+ namedGroupingBracesBrackets:
name: '[0-9\.a-zA-Z@\*><]+?'
follow: '\h|\R|\{|\[|\$|\)|\('
UnNamedGroupingBracesBrackets:
Modified: trunk/Master/texmf-dist/scripts/latexindent/latexindent.pl
===================================================================
(Binary files differ)
More information about the tex-live-commits
mailing list.