summaryrefslogtreecommitdiff
path: root/support/latexindent
diff options
context:
space:
mode:
Diffstat (limited to 'support/latexindent')
-rw-r--r--support/latexindent/LatexIndent/GetYamlSettings.pm35
-rw-r--r--support/latexindent/LatexIndent/Logger.pm2
-rw-r--r--support/latexindent/LatexIndent/Special.pm4
-rw-r--r--support/latexindent/LatexIndent/TrailingComments.pm32
-rw-r--r--support/latexindent/LatexIndent/UTF8CmdLineArgsFileOperation.pm40
-rw-r--r--support/latexindent/LatexIndent/Version.pm4
-rw-r--r--support/latexindent/LatexIndent/Wrap.pm7
-rw-r--r--support/latexindent/README2
-rw-r--r--support/latexindent/bin/linux/latexindentbin7847681 -> 7875489 bytes
-rw-r--r--support/latexindent/bin/macos/latexindentbin7564693 -> 7569299 bytes
-rw-r--r--support/latexindent/defaultSettings.yaml4
-rw-r--r--support/latexindent/documentation/contributors.bib11
-rw-r--r--support/latexindent/documentation/latexindent-yaml-schema.json9
-rw-r--r--support/latexindent/documentation/latexindent.pdfbin1298414 -> 1274961 bytes
-rw-r--r--support/latexindent/documentation/latexindent.tex77
-rwxr-xr-xsupport/latexindent/latexindent.pl2
16 files changed, 130 insertions, 99 deletions
diff --git a/support/latexindent/LatexIndent/GetYamlSettings.pm b/support/latexindent/LatexIndent/GetYamlSettings.pm
index 4d4940371d..cbea5437c6 100644
--- a/support/latexindent/LatexIndent/GetYamlSettings.pm
+++ b/support/latexindent/LatexIndent/GetYamlSettings.pm
@@ -389,36 +389,8 @@ sub yaml_read_settings {
# output the contents of indentconfig to the log file
$logger->info( Dump \%{ $userSettings->[0] } );
- # change the encoding of the paths according to the field `encoding`
- if ( $userSettings and ( ref( $userSettings->[0] ) eq 'HASH' ) and $userSettings->[0]->{encoding} ) {
- use Encode;
- my $encoding = $userSettings->[0]->{encoding};
- my $encodingObject = find_encoding($encoding);
-
- # Check if the encoding is valid.
- if ( ref($encodingObject) ) {
- $logger->info("*Encoding of the paths is $encoding");
- foreach ( @{ $userSettings->[0]->{paths} } ) {
- my $temp = $encodingObject->encode("$_");
- $logger->info("Transform file encoding: $_ -> $temp");
- push( @absPaths, $temp );
- }
- }
- else {
- $logger->warn("*encoding \"$encoding\" not found");
- $logger->warn("Ignore this setting and will take the default encoding.");
- @absPaths = @{ $userSettings->[0]->{paths} };
- foreach ( @{ $userSettings->[0]->{paths} } ) {
- push( @absPaths, $_ );
- }
- }
- }
- else # No such setting, and will take the default
- {
- # $logger->info("*Encoding of the paths takes the default.");
- foreach ( @{ $userSettings->[0]->{paths} } ) {
- push( @absPaths, $_ );
- }
+ foreach ( @{ $userSettings->[0]->{paths} } ) {
+ push( @absPaths, $_ );
}
}
@@ -777,6 +749,9 @@ sub yaml_read_settings {
my $parent = $keysValues[0];
my $child = $keysValues[1];
my $grandchild = $keysValues[2];
+
+ delete $mainSettings{$parent}{$child} if (defined $mainSettings{$parent}{$child} and ref $mainSettings{$parent}{$child} ne "HASH" );
+
$logger->info("Updating mainSettings with $parent: $child: $grandchild: $value");
$mainSettings{$parent}{$child}{$grandchild} = $value;
}
diff --git a/support/latexindent/LatexIndent/Logger.pm b/support/latexindent/LatexIndent/Logger.pm
index 425c8eae07..7c4352a95f 100644
--- a/support/latexindent/LatexIndent/Logger.pm
+++ b/support/latexindent/LatexIndent/Logger.pm
@@ -18,7 +18,7 @@ package LatexIndent::Logger;
use strict;
use warnings;
-use Exporter;
+use Exporter qw/import/;
use LatexIndent::Switches qw/%switches/;
our @ISA = "LatexIndent::Document"; # class inheritance, Programming Perl, pg 321
our @EXPORT_OK = qw/@logFileLines/;
diff --git a/support/latexindent/LatexIndent/Special.pm b/support/latexindent/LatexIndent/Special.pm
index 096d2935c9..8dac47bfc0 100644
--- a/support/latexindent/LatexIndent/Special.pm
+++ b/support/latexindent/LatexIndent/Special.pm
@@ -17,14 +17,14 @@ package LatexIndent::Special;
# For all communication, please visit: https://github.com/cmhughes/latexindent.pl
use strict;
use warnings;
+use Exporter qw/import/;
use LatexIndent::Tokens qw/%tokens/;
use LatexIndent::TrailingComments qw/$trailingCommentRegExp/;
use LatexIndent::GetYamlSettings qw/%mainSettings/;
use LatexIndent::Switches qw/$is_t_switch_active $is_tt_switch_active/;
use LatexIndent::LogFile qw/$logger/;
-use LatexIndent::IfElseFi qw/$ifElseFiBasicRegExp/;
+use LatexIndent::IfElseFi;
use Data::Dumper;
-use Exporter qw/import/;
our @ISA = "LatexIndent::Document"; # class inheritance, Programming Perl, pg 321
our @EXPORT_OK
= qw/find_special construct_special_begin $specialBeginAndBracesBracketsBasicRegExp $specialBeginBasicRegExp/;
diff --git a/support/latexindent/LatexIndent/TrailingComments.pm b/support/latexindent/LatexIndent/TrailingComments.pm
index 9d6532500a..5e47ae3f3f 100644
--- a/support/latexindent/LatexIndent/TrailingComments.pm
+++ b/support/latexindent/LatexIndent/TrailingComments.pm
@@ -27,12 +27,20 @@ our @EXPORT_OK
= qw/remove_trailing_comments put_trailing_comments_back_in $trailingCommentRegExp add_comment_symbol construct_trailing_comment_regexp @trailingComments/;
our @trailingComments;
our $commentCounter = 0;
+our $notPrecededByRegExp;
our $trailingCommentRegExp;
sub construct_trailing_comment_regexp {
- my $notPreceededBy = qr/${${$mainSettings{fineTuning}}{trailingComments}}{notPreceededBy}/;
+ $notPrecededByRegExp = qr/${${$mainSettings{fineTuning}}{trailingComments}}{notPrecededBy}/;
+ my $notPreceededBy = ${${mainSettings{fineTuning}}{trailingComments}}{notPreceededBy};
- $trailingCommentRegExp = qr/$notPreceededBy%$tokens{trailingComment}\d+$tokens{endOfToken}/;
+ if ( $notPreceededBy ) {
+ $logger->warn(
+ "*fineTuning:trailingComments:notPreceededBy is ok for now, but in future versions, fineTuning:trailingComments:notPrecededBy will be used" );
+ $notPrecededByRegExp = qr/$notPreceededBy/;
+ }
+
+ $trailingCommentRegExp = qr/$notPrecededByRegExp%$tokens{trailingComment}\d+$tokens{endOfToken}/;
}
sub add_comment_symbol {
@@ -66,17 +74,16 @@ sub remove_trailing_comments {
$logger->trace("*Storing trailing comments") if $is_t_switch_active;
- my $notPreceededBy = qr/${${$mainSettings{fineTuning}}{trailingComments}}{notPreceededBy}/;
- my $afterComment = qr/${${$mainSettings{fineTuning}}{trailingComments}}{afterComment}/;
+ my $afterComment = qr/${${$mainSettings{fineTuning}}{trailingComments}}{afterComment}/;
# perform the substitution
${$self}{body} =~ s/
- $notPreceededBy # not preceded by a \
- % # %
+ $notPrecededByRegExp # not preceded by a \
+ % # %
(
- $afterComment # anything else
+ $afterComment # anything else
)
- $ # up to the end of a line
+ $ # up to the end of a line
/
# increment comment counter and store comment
$commentCounter++;
@@ -134,14 +141,13 @@ sub put_trailing_comments_back_in {
# replace the line-broken trailing comment ID with a non-broken trailing comment ID
${$self}{body} =~ s/%\R?$trailingcommentIDwithLineBreaksRegExp/%$trailingcommentID/s;
}
- my $notPreceededBy = qr/${${$mainSettings{fineTuning}}{trailingComments}}{notPreceededBy}/;
if (${$self}{body} =~ m/%$trailingcommentID
(
- (?! # not immediately preceded by
- $notPreceededBy # \
- % # %
+ (?! # not immediately preceded by
+ $notPrecededByRegExp # \
+ % # %
).*?
- ) # captured into $1
+ ) # captured into $1
(\h*)?$
/mx and $1 ne ''
)
diff --git a/support/latexindent/LatexIndent/UTF8CmdLineArgsFileOperation.pm b/support/latexindent/LatexIndent/UTF8CmdLineArgsFileOperation.pm
index 45a2b6f538..d6d8b595c0 100644
--- a/support/latexindent/LatexIndent/UTF8CmdLineArgsFileOperation.pm
+++ b/support/latexindent/LatexIndent/UTF8CmdLineArgsFileOperation.pm
@@ -5,22 +5,39 @@ use warnings;
use feature qw( say state );
use utf8;
use Config qw( %Config );
-use Encode qw( decode encode );
+use Encode qw(find_encoding decode encode );
use Exporter qw/import/;
our @EXPORT_OK
= qw/commandlineargs_with_encode @new_args copy_with_encode exist_with_encode open_with_encode zero_with_encode read_yaml_with_encode isdir_with_encode mkdir_with_encode/;
+our $encodingObject;
+
+if ($^O eq 'MSWin32') {
+ my $encoding_sys = 'cp' . Win32::GetACP();
+ $encodingObject = find_encoding( $encoding_sys );
+
+ # Check if the encoding is valid.
+ unless ( ref($encodingObject) ) {
+ $encodingObject = find_encoding( 'utf-8' );
+ }
+}
+else {
+ $encodingObject = find_encoding( 'utf-8' );
+}
+
sub copy_with_encode {
use File::Copy;
my ( $source, $destination ) = @_;
- if ( $FindBin::Script eq 'latexindent.exe' ) {
+ if ( $FindBin::Script =~ /\.exe$/ ) {
require Win32::Unicode::File;
Win32::Unicode::File->import(qw(copyW));
copyW( $source, $destination, 1 );
}
else {
+ $source = $encodingObject->encode($source);
+ $destination = $encodingObject->encode($destination);
copy( $source, $destination );
}
}
@@ -28,12 +45,13 @@ sub copy_with_encode {
sub exist_with_encode {
my ($filename) = @_;
- if ( $FindBin::Script eq 'latexindent.exe' ) {
+ if ( $FindBin::Script =~ /\.exe$/ ) {
require Win32::Unicode::File;
Win32::Unicode::File->import(qw(statW));
return statW($filename);
}
else {
+ $filename = $encodingObject->encode($filename);
return -e $filename;
}
}
@@ -41,7 +59,7 @@ sub exist_with_encode {
sub zero_with_encode {
my ($filename) = @_;
- if ( $FindBin::Script eq 'latexindent.exe' ) {
+ if ( $FindBin::Script =~ /\.exe$/ ) {
require Win32::Unicode::File;
Win32::Unicode::File->import(qw(file_size));
my $size = file_size($filename);
@@ -53,6 +71,7 @@ sub zero_with_encode {
}
}
else {
+ $filename = $encodingObject->encode($filename);
return -z $filename;
}
}
@@ -62,7 +81,7 @@ sub open_with_encode {
my $filename = shift;
my $fh;
- if ( $FindBin::Script eq 'latexindent.exe' ) {
+ if ( $FindBin::Script =~ /\.exe$/ ) {
require Win32::Unicode::File;
Win32::Unicode::File->import;
$fh = Win32::Unicode::File->new;
@@ -74,6 +93,7 @@ sub open_with_encode {
}
}
else {
+ $filename = $encodingObject->encode($filename);
if ( open( $fh, $mode, $filename ) ) {
return $fh;
}
@@ -95,13 +115,14 @@ sub read_yaml_with_encode {
sub isdir_with_encode {
my $path = shift;
- if ( $FindBin::Script eq 'latexindent.exe' ) {
+ if ( $FindBin::Script =~ /\.exe$/ ) {
require Win32::Unicode::File;
Win32::Unicode::File->import(qw(file_type));
return file_type( 'd', $path );
}
else {
+ $path = $encodingObject->encode($path);
return -d $path;
}
}
@@ -109,7 +130,7 @@ sub isdir_with_encode {
sub mkdir_with_encode {
my $path = shift;
- if ( $FindBin::Script eq 'latexindent.exe' ) {
+ if ( $FindBin::Script =~ /\.exe$/ ) {
require Win32::Unicode::Dir;
Win32::Unicode::Dir->import(qw(mkdirW));
@@ -118,7 +139,7 @@ sub mkdir_with_encode {
else {
require File::Path;
File::Path->import(qw(make_path));
-
+ $path = $encodingObject->encode($path);
make_path($path);
}
}
@@ -126,7 +147,7 @@ sub mkdir_with_encode {
#https://stackoverflow.com/a/63868721
#https://stackoverflow.com/a/44489228
sub commandlineargs_with_encode {
- if ( $FindBin::Script eq 'latexindent.exe' ) {
+ if ( $FindBin::Script =~ /\.exe$/ ) {
require Win32::API;
import Win32::API qw( ReadMemory );
@@ -207,7 +228,6 @@ sub commandlineargs_with_encode {
@ARGV = @{$args};
}
else {
- my $encodingObject = "utf-8";
@ARGV = map { decode( $encodingObject, $_ ) } @ARGV;
our @new_args = @ARGV;
}
diff --git a/support/latexindent/LatexIndent/Version.pm b/support/latexindent/LatexIndent/Version.pm
index 0198585f92..039d492356 100644
--- a/support/latexindent/LatexIndent/Version.pm
+++ b/support/latexindent/LatexIndent/Version.pm
@@ -20,6 +20,6 @@ use warnings;
use Exporter qw/import/;
our @EXPORT_OK = qw/$versionNumber $versionDate/;
-our $versionNumber = '3.24.1';
-our $versionDate = '2024-05-12';
+our $versionNumber = '3.24.4';
+our $versionDate = '2024-07-18';
1
diff --git a/support/latexindent/LatexIndent/Wrap.pm b/support/latexindent/LatexIndent/Wrap.pm
index 334902dc66..1116b05fa8 100644
--- a/support/latexindent/LatexIndent/Wrap.pm
+++ b/support/latexindent/LatexIndent/Wrap.pm
@@ -659,6 +659,13 @@ sub text_wrap_comment_blocks {
# call the text wrapping routine
my $columns = ${ $mainSettings{modifyLineBreaks}{textWrapOptions} }{columns};
+ # fail gracefully if columns == 0
+ if ($columns==0){
+ $logger->warn("* textWrapOptions: columns is set to 0, can't text wrap with this");
+ ${ ${ $mainSettings{modifyLineBreaks}{textWrapOptions} }{comments} }{wrap} = 0;
+ return;
+ }
+
#
# text wrap comment blocks
#
diff --git a/support/latexindent/README b/support/latexindent/README
index ec2f300c52..3bd2dbfe98 100644
--- a/support/latexindent/README
+++ b/support/latexindent/README
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- latexindent.pl, version 3.24.1, 2024-05-12
+ latexindent.pl, version 3.24.4, 2024-07-18
PERL script to indent code within environments, and align delimited
environments in .tex files.
diff --git a/support/latexindent/bin/linux/latexindent b/support/latexindent/bin/linux/latexindent
index f2077b8920..f6337243cb 100644
--- a/support/latexindent/bin/linux/latexindent
+++ b/support/latexindent/bin/linux/latexindent
Binary files differ
diff --git a/support/latexindent/bin/macos/latexindent b/support/latexindent/bin/macos/latexindent
index 884fcefe84..63421aa529 100644
--- a/support/latexindent/bin/macos/latexindent
+++ b/support/latexindent/bin/macos/latexindent
Binary files differ
diff --git a/support/latexindent/defaultSettings.yaml b/support/latexindent/defaultSettings.yaml
index 80120978ed..7ad03f254b 100644
--- a/support/latexindent/defaultSettings.yaml
+++ b/support/latexindent/defaultSettings.yaml
@@ -1,5 +1,5 @@
#
-# latexindent.pl, version 3.24.1, 2024-05-12
+# latexindent.pl, version 3.24.4, 2024-07-18
#
# defaultSettings.yaml, the default settings for latexindent.pl
#
@@ -649,7 +649,7 @@ fineTuning:
before: (?:#\d\h*;?,?\/?)+|\<.*?\>
between: _|\^|\*
trailingComments:
- notPreceededBy: (?<!\\)
+ notPrecededBy: (?<!\\)
afterComment: .*?
modifyLineBreaks:
doubleBackSlash: \\\\(?:\h*\[\h*\d+\h*[a-zA-Z]+\h*\])?
diff --git a/support/latexindent/documentation/contributors.bib b/support/latexindent/documentation/contributors.bib
index 2da6ea818d..49fc2debe7 100644
--- a/support/latexindent/documentation/contributors.bib
+++ b/support/latexindent/documentation/contributors.bib
@@ -224,3 +224,14 @@
author = "Jesse Stricker",
urldate = {2023-07-12},
keywords = {contributor},}
+
+%
+% 2024
+%
+@online{fengzyf,
+ title = "Encoding work",
+ url = "https://github.com/cmhughes/latexindent.pl/pull/548",
+ date = {2024-06-15},
+ author = "fengzyf",
+ urldate = {2024-06-15},
+ keywords = {contributor},}
diff --git a/support/latexindent/documentation/latexindent-yaml-schema.json b/support/latexindent/documentation/latexindent-yaml-schema.json
index 65c9fd1d9c..8f0cf208e2 100644
--- a/support/latexindent/documentation/latexindent-yaml-schema.json
+++ b/support/latexindent/documentation/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.24.1 2024-05-12",
+ "description": "latexindent.pl YAML schema helper, V3.24.4 2024-07-18",
"type": "object",
"properties": {
"fileExtensionPreference": {
@@ -1496,10 +1496,15 @@
"description": "fine tuning, for trailing comments",
"type": "object",
"properties": {
- "notPreceededBy": {
+ "notPrecededBy": {
"description": "regular expression for what can NOT come before %, for example \\%",
"type": "string"
},
+ "notPreceededBy": {
+ "description": "please use notPrecededBy instead",
+ "type": "string",
+ "deprecated": true
+ },
"afterComment": {
"description": "regular expression for what can come after %",
"type": "string"
diff --git a/support/latexindent/documentation/latexindent.pdf b/support/latexindent/documentation/latexindent.pdf
index 770e9c5498..19361f5268 100644
--- a/support/latexindent/documentation/latexindent.pdf
+++ b/support/latexindent/documentation/latexindent.pdf
Binary files differ
diff --git a/support/latexindent/documentation/latexindent.tex b/support/latexindent/documentation/latexindent.tex
index fc96a1db9a..fefde34ec2 100644
--- a/support/latexindent/documentation/latexindent.tex
+++ b/support/latexindent/documentation/latexindent.tex
@@ -131,6 +131,7 @@
% bibliographies
\addbibresource{latex-indent}
\addbibresource{contributors}
+\BiblatexSplitbibDefernumbersWarningOff
% http://tex.stackexchange.com/questions/122135/how-to-add-a-png-icon-on-the-right-side-of-a-tcolorbox-title
\newtcolorbox{warning}{parbox=false,
@@ -585,14 +586,14 @@
title={example~\thetcbcounter},
fonttitle=\bfseries\sffamily,
detach title,
- before upper={\llap{\tcbtitle\hspace{5mm}}},
coltitle=black,
colback=white,
grow to left by=6mm,
%
% circles and line by the side
%
- overlay unbroken={%
+ overlay unbroken and first={%
+ \node at ([xshift=-8mm,yshift=-4.5mm]interior.north west) {\bfseries example \thetcbcounter};
\path [fill=black] ([xshift=1mm,yshift=3mm]interior.south east) node{\hbox{\rule{1ex}{1ex}}};
},
overlay last={%
@@ -859,6 +860,9 @@
throughout this document for details}.
\subsection{Quick start}\label{sec:quickstart}
+ When \texttt{latexindent.pl} reads and writes files, the files are read and written in UTF-8 format by default.
+ That is to say, the encoding format for tex and yaml files needs to be in UTF-8 format.
+
If you'd like to get started with \texttt{latexindent.pl} then simply type
\begin{commandshell}
@@ -1224,6 +1228,10 @@ perl latexindent-module-installer.pl
written to \texttt{indent.log}, but other additional information will be written
depending on which of the following options are used.
+ When using \texttt{latexindent.pl} in different ways on different systems, the range of
+ characters supported by its switches/flags/options may vary. We discuss these in Section
+ \cref{app:encoding}.
+
\flagbox{-v, --version}
\index{switches!-v, --version definition and details}
\announce{2017-06-25}{version}
@@ -1865,17 +1873,6 @@ latexindent.pl myfile.tex
\texttt{latexindent.yaml} and friends settings files. This can lead to creative nesting
of configuration files; a demonstration is given in \vref{sec:appendix:paths}.
- If you find that \announce{2021-06-19}{encoding option for indentconfig.yaml}
- \texttt{latexindent.pl} does not read your YAML file, then it might be as a result of
- the default commandline encoding not being UTF-8; normally this will only occur for
- Windows users. In this case, you might like to explore the \texttt{encoding} option for
- \texttt{indentconfig.yaml} as demonstrated in \cref{lst:indentconfig-encoding}.%
-
- \cmhlistingsfromfile[style=yaml-LST]{demonstrations/encoding.yaml}[yaml-TCB]{The \texttt{encoding} option for \texttt{indentconfig.yaml}}{lst:indentconfig-encoding}
-
- Thank you to \cite{qiancy98} for this contribution; please see \vref{app:encoding} and
- details within \cite{encoding} for further information.
-
\subsection{localSettings.yaml and friends}\label{sec:localsettings}
The \texttt{-l} switch tells \texttt{latexindent.pl} to look for
\texttt{localSettings.yaml} and/or friends in the \emph{same directory} as
@@ -8567,8 +8564,8 @@ perl latexindent-module-installer.pl
\begin{commandshell}
sudo apt-get install perlbrew
perlbrew init
-perlbrew install perl-5.34.0
-perlbrew switch perl-5.34.0
+perlbrew install perl-5.40.0
+perlbrew switch perl-5.40.0
sudo apt-get install curl
curl -L http://cpanmin.us | perl - App::cpanminus
cpanm YAML::Tiny
@@ -8614,21 +8611,19 @@ sudo apt install texlive-extra-utils
\index{latexindent-linux} \index{linux} \index{TeXLive}
\paragraph{Arch-based distributions}
- First install the dependencies
+ \texttt{latexindent} is included in Arch-packaged TeX Live, and can be installed by:
\begin{commandshell}
-sudo pacman -S perl cpanminus
+sudo pacman -S texlive-binextra perl-yaml-tiny perl-file-homedir
\end{commandshell}
- In addition, install \texttt{perl-file-homedir} from AUR, using your AUR helper of
- choice,
+ To enable optional \texttt{--GCString} switch, install
+ \texttt{perl-unicode-linebreak}:
\begin{commandshell}
-sudo paru -S perl-file-homedir
+sudo pacman -S perl-unicode-linebreak
\end{commandshell}
- then run the latexindent-module-installer.pl file located at helper-scripts/
-
\paragraph{Alpine}
If you are using Alpine, some \texttt{Perl} modules are not build-compatible with
Alpine, but replacements are available through \texttt{apk}. For example, you might
@@ -9427,21 +9422,33 @@ TRACE: Searching myenv for optional and mandatory arguments
and \lstinline!-----! respectively.
\end{example}
- \section{Encoding indentconfig.yaml}\label{app:encoding}
- In relation to \vref{sec:indentconfig}, Windows users that encounter encoding issues
- with \texttt{indentconfig.yaml}, may wish to run the following command in either
- \texttt{cmd.exe} or \texttt{powershell.exe}:
+ \section{Encoding}\label{app:encoding}
+
+ When using latexindent in different ways on different systems, the range of characters
+ supported by its switches/flags/options (see \vref{sec:commandline}) may vary.
+
+ For the Windows executable file \texttt{latexindent.exe}, its options support UTF-8
+ characters.
+
+ For the Windows Perl script \texttt{latexindent.pl}, its option switch supports the
+ characters supported by the encoding corresponding to the system code page. You can
+ check the system code page by running the following command in either \texttt{cmd.exe}
+ or \texttt{powershell.exe}:
\begin{dosprompt}
-chcp
- \end{dosprompt}
- They may receive the following result
+ chcp
+ \end{dosprompt}
+ which may receive the following result
\begin{dosprompt}
-Active code page: 936
- \end{dosprompt}
- and can then use the settings given in \cref{lst:indentconfig-encoding1} within their
- \texttt{indentconfig.yaml}, where 936 is the result of the \texttt{chcp} command.
-
- \cmhlistingsfromfile[style=yaml-LST]{demonstrations/encoding1.yaml}[yaml-TCB]{\texttt{encoding} demonstration for \texttt{indentconfig.yaml}}{lst:indentconfig-encoding1}
+ Active code page: 936
+ \end{dosprompt}
+ and then the characters supported by the code page can be found in \href{Microsoft's
+ code page identifier
+ table}{https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers}. For
+ example, the characters supported by the encoding corresponding to code page 936 are:
+ ANSI/OEM Simplified Chinese (PRC, Singapore); Chinese Simplified (GB2312).
+
+ For Ubuntu Linux and macOS users, whether using the Perl script or the executable file,
+ the options support UTF-8 characters.
\section{dos2unix linebreak adjustment}
diff --git a/support/latexindent/latexindent.pl b/support/latexindent/latexindent.pl
index 36855f46e3..a467fb420e 100755
--- a/support/latexindent/latexindent.pl
+++ b/support/latexindent/latexindent.pl
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
#
-# latexindent.pl, version 3.24.1, 2024-05-12
+# latexindent.pl, version 3.24.4, 2024-07-18
#
# 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