summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/latexindent/LatexIndent
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/latexindent/LatexIndent')
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm29
-rwxr-xr-xMaster/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm25
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm4
3 files changed, 40 insertions, 18 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
index 8a35c3c2a27..ca8376daa9a 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
@@ -34,7 +34,7 @@ sub processSwitches{
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 @@ usage: latexindent.pl [options] [file][.tex|.sty|.cls|.bib|...]
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 @@ usage: latexindent.pl [options] [file][.tex|.sty|.cls|.bib|...]
-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 @@ usage: latexindent.pl [options] [file][.tex|.sty|.cls|.bib|...]
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
;
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm
index f20e23ca547..50b00ed556f 100755
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm
@@ -35,8 +35,29 @@ sub construct_grouping_braces_brackets_regexp{
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/
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
index 17c5ddd1fcf..170b08f58f9 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.9';
-our $versionDate = '2021-03-14';
+our $versionNumber = '3.9.1';
+our $versionDate = '2021-03-21';
1