summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/bin/windows/latexindent.exebin9939505 -> 9939470 bytes
-rw-r--r--Master/texmf-dist/doc/support/latexindent/README2
-rw-r--r--Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json2
-rw-r--r--Master/texmf-dist/doc/support/latexindent/latexindent.pdfbin1268973 -> 1280662 bytes
-rw-r--r--Master/texmf-dist/doc/support/latexindent/latexindent.tex26
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/Replacement.pm18
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm4
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm1
-rwxr-xr-xMaster/texmf-dist/scripts/latexindent/defaultSettings.yaml2
-rwxr-xr-xMaster/texmf-dist/scripts/latexindent/latexindent.pl2
10 files changed, 39 insertions, 18 deletions
diff --git a/Master/bin/windows/latexindent.exe b/Master/bin/windows/latexindent.exe
index 3cb17583c02..e9e11bda00a 100755
--- a/Master/bin/windows/latexindent.exe
+++ b/Master/bin/windows/latexindent.exe
Binary files differ
diff --git a/Master/texmf-dist/doc/support/latexindent/README b/Master/texmf-dist/doc/support/latexindent/README
index 1672bf12d70..019150fcab8 100644
--- a/Master/texmf-dist/doc/support/latexindent/README
+++ b/Master/texmf-dist/doc/support/latexindent/README
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- latexindent.pl, version 3.23.4, 2023-11-19
+ latexindent.pl, version 3.23.5, 2024-01-01
PERL script to indent code within environments, and align delimited
environments in .tex files.
diff --git a/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json b/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
index 630d9b87bf1..43739e7af63 100644
--- a/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
+++ b/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
@@ -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.4 2023-11-19",
+ "description": "latexindent.pl YAML schema helper, V3.23.5 2024-01-01",
"type": "object",
"properties": {
"fileExtensionPreference": {
diff --git a/Master/texmf-dist/doc/support/latexindent/latexindent.pdf b/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
index 8c1d88a8894..e698d5923f8 100644
--- a/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
+++ b/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/latexindent/latexindent.tex b/Master/texmf-dist/doc/support/latexindent/latexindent.tex
index cf495854664..cb4e81574fd 100644
--- a/Master/texmf-dist/doc/support/latexindent/latexindent.tex
+++ b/Master/texmf-dist/doc/support/latexindent/latexindent.tex
@@ -3216,7 +3216,7 @@ latexindent.pl specialLR.tex -l=specialsLeftRight.yaml,specialBeforeCommand.yaml
\end{itemize}
\end{example}
- You can,optionally, specify \announce{2018-04-27}{update to specialBeginEnd} the
+ You can, optionally, specify \announce{2018-04-27}{update to specialBeginEnd} the
\texttt{middle} field for anything that you specify in \texttt{specialBeginEnd}.
\begin{example}
@@ -3258,6 +3258,30 @@ latexindent.pl special2.tex -l=middle1
\end{itemize}
\end{example}
+ You may need these fields in your own YAML files (see \vref{sec:localsettings}), if you
+ use popular algorithm packages such as algorithms, algorithm2e or algpseudocode, etc.
+
+ \begin{example}
+ 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}
+
+ Upon saving the YAML settings in \cref{lst:algo-yaml} and running the command
+ \index{switches!-l demonstration}
+
+ \begin{commandshell}
+latexindent.pl -l=algo.yaml specialAlgo.tex
+ \end{commandshell}
+
+ 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}
+ \end{cmhtcbraster}
+ \end{example}
+
You may \announce{2018-08-13}{specialBeginEnd verbatim} specify fields in
\texttt{specialBeginEnd} to be treated as verbatim code blocks by changing
\texttt{lookForThis} to be \texttt{verbatim}. \index{verbatim!specialBeginEnd}%
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Replacement.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Replacement.pm
index e864a968952..c1df5db1310 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Replacement.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Replacement.pm
@@ -66,21 +66,17 @@ sub make_replacements {
if ( ${$_}{this} and ${$_}{substitution} );
if ( ${$_}{this} ) {
+ #
# *string* replacement
- # *string* replacement
- # *string* replacement
- my $this = qq{${$_}{this}};
- my $that = ( defined ${$_}{that} ) ? qq{${$_}{that}} : q();
- my $index_match = index( ${$self}{body}, $this );
- while ( $index_match != -1 ) {
- substr( ${$self}{body}, $index_match, length($this), $that );
- $index_match = index( ${$self}{body}, $this );
- }
+ #
+ my $this = quotemeta( ${$_}{this} );
+ my $that = ( defined ${$_}{that} ) ? qq{${$_}{that}} : q();
+ ${$self}{body} = join( $that, split( $this, ${$self}{body} ) );
}
else {
+ #
# *regex* replacement
- # *regex* replacement
- # *regex* replacement
+ #
# https://stackoverflow.com/questions/12423337/how-to-pass-a-replacing-regex-as-a-command-line-argument-to-a-perl-script
my $body = ${$self}{body};
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
index 24ff152679a..d5ea0dd2608 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
@@ -20,6 +20,6 @@ use warnings;
use Exporter qw/import/;
our @EXPORT_OK = qw/$versionNumber $versionDate/;
-our $versionNumber = '3.23.4';
-our $versionDate = '2023-11-19';
+our $versionNumber = '3.23.5';
+our $versionDate = '2024-01-01';
1
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm
index 5885675ec55..334902dc663 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm
@@ -340,6 +340,7 @@ sub text_wrap {
$thingToMeasure =~ s/$tokens{verbatim}\d+$tokens{endOfToken}//;
$thingToMeasure =~ s/$trailingCommentRegExp//;
$thingToMeasure =~ s/$headingsRegEx//;
+ $thingToMeasure =~ s/\\end\{[^}]+?\}//;
$subsequentSpace = (
$textWrapBlockCount == 0
diff --git a/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml b/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
index 56d4be4c3da..1943c272da7 100755
--- a/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
+++ b/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
@@ -1,5 +1,5 @@
#
-# latexindent.pl, version 3.23.4, 2023-11-19
+# latexindent.pl, version 3.23.5, 2024-01-01
#
# defaultSettings.yaml, the default settings for latexindent.pl
#
diff --git a/Master/texmf-dist/scripts/latexindent/latexindent.pl b/Master/texmf-dist/scripts/latexindent/latexindent.pl
index 42bc173040a..a8e82f2bd9a 100755
--- a/Master/texmf-dist/scripts/latexindent/latexindent.pl
+++ b/Master/texmf-dist/scripts/latexindent/latexindent.pl
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
#
-# latexindent.pl, version 3.23.4, 2023-11-19
+# latexindent.pl, version 3.23.5, 2024-01-01
#
# 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