diff options
author | Karl Berry <karl@freefriends.org> | 2023-01-08 21:00:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-01-08 21:00:08 +0000 |
commit | e4621b29db9e3e1eb149a279787e0a1a00621c25 (patch) | |
tree | 0c645b94cc50202172df471d954b6fd40667cf61 | |
parent | 1145a6875066d3fab5e3bed3817c2ce5213a31c4 (diff) |
latexindent (7jan23)
git-svn-id: svn://tug.org/texlive/trunk@65494 c570f23f-e606-0410-a88d-b1316a301751
27 files changed, 70 insertions, 66 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl b/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl index e4a9dc2092f..56b7ab2733f 100755 --- a/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl +++ b/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# latexindent.pl, version 3.20, 2023-01-01 +# latexindent.pl, version 3.20.1, 2023-01-07 # # 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 @@ -58,7 +58,7 @@ GetOptions( # conditionally load the GCString module eval "use Unicode::GCString" if $switches{GCString}; -# check local settings doesn't interfer with reading the file; +# check local settings doesn't interfere with reading the file; # this can happen if the script is called as follows: # # latexindent.pl -l myfile.tex diff --git a/Master/bin/win32/latexindent.exe b/Master/bin/win32/latexindent.exe Binary files differindex bb936db2570..21af46291ff 100755 --- a/Master/bin/win32/latexindent.exe +++ b/Master/bin/win32/latexindent.exe diff --git a/Master/texmf-dist/doc/support/latexindent/README b/Master/texmf-dist/doc/support/latexindent/README index ed1737c8ef4..c279ed729c3 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.20, 2023-01-01 + latexindent.pl, version 3.20.1, 2023-01-07 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 5d490c800c1..6e4d1c3c754 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.20 2023-01-01", + "description": "latexindent.pl YAML schema helper, V3.20.1 2023-01-07", "type": "object", "properties": { "fileExtensionPreference": { diff --git a/Master/texmf-dist/doc/support/latexindent/latexindent.pdf b/Master/texmf-dist/doc/support/latexindent/latexindent.pdf Binary files differindex 2717823a164..5ee510be601 100644 --- a/Master/texmf-dist/doc/support/latexindent/latexindent.pdf +++ b/Master/texmf-dist/doc/support/latexindent/latexindent.pdf diff --git a/Master/texmf-dist/doc/support/latexindent/latexindent.tex b/Master/texmf-dist/doc/support/latexindent/latexindent.tex index a1fa404dda0..2f03cb712aa 100644 --- a/Master/texmf-dist/doc/support/latexindent/latexindent.tex +++ b/Master/texmf-dist/doc/support/latexindent/latexindent.tex @@ -778,7 +778,7 @@ % toc settings \titleclass{\cmhtitle}{straight}[\subsection] \titleformat{\cmhtitle}{}{}{}{} -\titlecontents{cmhtitle}% <paragaph> +\titlecontents{cmhtitle}% <paragraph> [2cm]% <left> {\small\itshape}% <above-code> {}% <numbered-entry-format>; you could also use {\thecontentslabel. } to show the numbers @@ -1853,7 +1853,7 @@ latexindent.pl myfile.tex 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 occcur for + 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}.% @@ -2434,7 +2434,7 @@ latexindent.pl tabular1.tex above and below a \lstinline!\multicolumn! command (default: 0); \item \announce{2017-06-19}{alignRowsWithoutMaxDelims} \texttt{alignRowsWithoutMaxDelims}: binary switch (0 or 1) that details if rows - that do not contain the maximum number of delimeters should be formatted so as to + that do not contain the maximum number of delimiters should be formatted so as to have the ampersands aligned (default: 1); \item \announce{2018-01-13}{spacesBeforeAmpersand in ampersand alignment}\texttt{spacesBeforeAmpersand}: optionally specifies the number @@ -2452,10 +2452,10 @@ latexindent.pl tabular1.tex user-specified cells, rows or the largest entries should \emph{not} be measured (default: 0); \item \announce{2020-03-21}{delimiter RegEx feature}{delimiterRegEx} optionally - specifies the pattern matching to be used for the alignment delimeter (default: + specifies the pattern matching to be used for the alignment delimiter (default: \lstinline* '(?<!\\)(&)'*); \item \announce{2020-03-21}{delimiter justification}{delimiterJustification} optionally - specifies the justification for the alignment delimeters (default: left); note + specifies the justification for the alignment delimiters (default: left); note that this feature is only useful if you have delimiters of different lengths in the same column, discussed in \cref{sec:delimiter-reg-ex}; \item \announce{2021-12-13}{lookForChildCodeBlocks feature}{lookForChildCodeBlocks} @@ -2873,7 +2873,7 @@ latexindent.pl tabular-DM.tex -l=dontMeasure6.yaml align code blocks at the ampersand character. The behaviour is controlled by the \texttt{delimiterRegEx} field within \texttt{lookForAlignDelims}; the default value is \lstinline*'(?<!\\)(&)'*, which can be read as: \emph{an ampersand, as long as it is not - immediately preceeded by a backslash}. \index{warning!capturing parenthesis for + immediately preceded by a backslash}. \index{warning!capturing parenthesis for lookForAlignDelims} \index{capturing parenthesis (regex)} \index{regular expressions!capturing parenthesis} \index{delimiters!delimiterRegEx} \index{delimiters!delimiter justification (left or right)}% @@ -4935,8 +4935,8 @@ latexindent.pl -m -l textwrap1.yaml,bf-no-disp-math.yaml tw-disp-math1.tex The \texttt{blocksFollow} field \emph{deliberately} does not default to allowing text wrapping to occur after \texttt{begin environment} statements. You are encouraged to - customize the \texttt{other} field to accomodate the environments that you would like to - text wrap individually, as in the next example. + customize the \texttt{other} field to accommodate the environments that you would like + to text wrap individually, as in the next example. \begin{example} Let's use the sample text given in \cref{lst:tw-bf-myenv1}. \index{text @@ -4993,7 +4993,7 @@ latexindent.pl -m -l textwrap1.yaml tw-0-9.tex \end{commandshell} then we receive the output given in \cref{lst:tw-0-9-mod1} in which text wrapping has - \emph{not} occured. + \emph{not} occurred. \cmhlistingsfromfile{demonstrations/tw-0-9-mod1.tex}{\texttt{tw-0-9-mod1.tex}}{lst:tw-0-9-mod1} We can allow paragraphs to begin with \texttt{0-9} characters by using the settings in @@ -5020,7 +5020,7 @@ latexindent.pl -m -l textwrap1.yaml tw-bb-announce1.tex \end{commandshell} then we receive the output given in \cref{lst:tw-bb-announce1-mod1} in which text - wrapping has \emph{not} occured. + wrapping has \emph{not} occurred. \cmhlistingsfromfile{demonstrations/tw-bb-announce1-mod1.tex}{\texttt{tw-bb-announce1-mod1.tex}}{lst:tw-bb-announce1-mod1} @@ -8043,7 +8043,7 @@ latexindent.pl -m finetuning4.tex -o=+-mod2 -l=href2 the end of the line; this is undesirable, clearly! \item \cref{lst:finetuning4-mod2} has fine-tuned the trailing comment matching, and says that \% cannot - be immediately preceeded by the words `Handbook', `for' or `Spoken', which means that + be immediately preceded by the words `Handbook', `for' or `Spoken', which means that none of the \% symbols have been treated as trailing comments, and the output is desirable. \end{itemize} @@ -8156,7 +8156,7 @@ latexindent.pl bib2.bib -l bibsettings1.yaml,bibsettings2.yaml -o=+-mod2 With reference to \cref{lst:bibsettings2} we note that the \texttt{delimiterRegEx} has been adjusted so that \texttt{=} symbols are used as the delimiter, but only when they - are \emph{not preceeded} by either \texttt{v} or \texttt{spfreload}. + are \emph{not preceded} by either \texttt{v} or \texttt{spfreload}. \end{example} % arara: pdflatex: { files: [latexindent]} \section{Conclusions and known limitations}\label{sec:knownlimitations} @@ -8890,8 +8890,8 @@ latexindent.pl -l -m -s -w myfile.tex discussed in \cref{sec:indentconfig}. Thank you to \cite{nehctargl} for this contribution. \announce*{2023-01-01}{indentconfig location options} - The possible locations of \texttt{indentconfig.yaml} are evaluated one after the other, - and evaluation stops when a valid file is found in one of the paths. + The possible locations of \texttt{indentconfig.yaml} are read one after the other, and + reading stops when a valid file is found in one of the paths. Before stating the list, we give summarise in \cref{tab:environment:summary}. \begin{table}[!htb] @@ -8939,8 +8939,8 @@ latexindent.pl -l -m -s -w myfile.tex \texttt{\$homeDir/Library/Preferences/latexindent/indentconfig.yaml} \end{enumerate} \end{itemize} - \item The file at \texttt{\$homeDir/.indentconfig.yaml} \item The file at \texttt{\$homeDir/indentconfig.yaml} + \item The file at \texttt{\$homeDir/.indentconfig.yaml} \end{enumerate} \subsection{Why to change the configuration location} This is mostly a question about what you prefer, some like to put all their configuration files in their home directory (see \texttt{\$homeDir} above), diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm index 746041893d7..0cdfad7dd8f 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm @@ -1692,7 +1692,7 @@ sub get_column_width { return $count; } - # if GCString actice, then use Unicode::GCString + # if GCString active, then use Unicode::GCString return Unicode::GCString->new($stringToBeMeasured)->columns(); } 1; diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/BackUpFileProcedure.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/BackUpFileProcedure.pm index 369f06d0754..82d1a816539 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/BackUpFileProcedure.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/BackUpFileProcedure.pm @@ -119,7 +119,7 @@ sub create_back_up_file { if ( $backUpFilePossible == 0 ) { $logger->fatal( "*Could not write to backup file $backupFile. Please check permissions. Exiting."); - $logger->fatal("Exiting, no indendation done."); + $logger->fatal("Exiting, no indentation done."); $self->output_logfile(); exit(5); } @@ -150,7 +150,7 @@ sub create_back_up_file { copy( $fileName, $backupFile ) or ( $backUpFilePossible = 0 ); if ( $backUpFilePossible == 0 ) { $logger->fatal("*Could not write to backup file $backupFile. Please check permissions."); - $logger->fatal("Exiting, no indendation done."); + $logger->fatal("Exiting, no indentation done."); $self->output_logfile(); exit(5); } diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Command.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Command.pm index e919f33d11e..9e2a677a1b8 100755 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Command.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Command.pm @@ -33,7 +33,7 @@ our $commandRegExpTrailingComment; our $optAndMandAndRoundBracketsRegExp; our $optAndMandAndRoundBracketsRegExpLineBreaks; -# store the regular expresssion for matching and replacing +# store the regular expression for matching and replacing sub construct_command_regexp { my $self = shift; @@ -205,7 +205,7 @@ sub tasks_particular_to_each_object { and ${$self}{replacementText} !~ m/\R$/ ) { $logger->trace( - "${$self}{name}: trailling horizontal space found in arguments -- removing it from arguments, adding to replacement text" + "${$self}{name}: trailing horizontal space found in arguments -- removing it from arguments, adding to replacement text" ) if $is_t_switch_active; ${ ${ ${$self}{children} }[0] }{body} =~ s/(\h*)$//s; ${$self}{replacementText} .= "$1"; diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Else.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Else.pm index 54de7808c45..da6005e7a6a 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Else.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Else.pm @@ -35,7 +35,7 @@ sub check_for_else_statement { # we call the else routine from different places; see IfElseFi.pm and Special.pm my %input = @_; - # store the regular expresssion for matching and replacing the \else statements + # store the regular expression for matching and replacing the \else statements my $elseRegExp = qr/ ( $input{elseNameRegExp} diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Environment.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Environment.pm index 9cb9850d2b4..9d2c34d1bd6 100755 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Environment.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Environment.pm @@ -33,7 +33,7 @@ our $environmentCounter; our $environmentBasicRegExp = qr/\\begin\{/; our $environmentRegExp; -# store the regular expresssion for matching and replacing the \begin{}...\end{} statements +# store the regular expression for matching and replacing the \begin{}...\end{} statements sub construct_environments_regexp { # read from fine tuning diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/FileExtension.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/FileExtension.pm index 8b01fa9e299..b0f49f246db 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/FileExtension.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/FileExtension.pm @@ -72,7 +72,7 @@ sub file_extension_check { if ( defined ${$self}{multipleFiles} ) { $logger->warn( "*I couldn't find a match for $fileName in fileExtensionPreference (see defaultSettings.yaml)"); - $logger->warn("moving on, no indendation done for ${$self}{fileName}."); + $logger->warn("moving on, no indentation done for ${$self}{fileName}."); return 3; } else { @@ -82,7 +82,7 @@ sub file_extension_check { $logger->fatal("I searched for $fileName$_"); } $logger->fatal("but couldn't find any of them.\nConsider updating fileExtensionPreference."); - $logger->fatal("*Exiting, no indendation done."); + $logger->fatal("*Exiting, no indentation done."); $self->output_logfile(); exit(3); } @@ -93,12 +93,12 @@ sub file_extension_check { unless ( -e $fileName ) { if ( defined ${$self}{multipleFiles} ) { $logger->warn("*I couldn't find $fileName, are you sure it exists?"); - $logger->warn("moving on, no indendation done for ${$self}{fileName}."); + $logger->warn("moving on, no indentation done for ${$self}{fileName}."); return 3; } else { $logger->fatal("*I couldn't find $fileName, are you sure it exists?"); - $logger->fatal("Exiting, no indendation done."); + $logger->fatal("Exiting, no indentation done."); $self->output_logfile(); exit(3); } @@ -171,12 +171,12 @@ sub file_extension_check { if ( $openFilePossible == 0 ) { if ( defined ${$self}{multipleFiles} ) { $logger->warn("*$fileName exists, but could not open it"); - $logger->warn("moving on, no indendation done for $fileName"); + $logger->warn("moving on, no indentation done for $fileName"); return 4; } else { $logger->fatal("*$fileName exists, but could not open it"); - $logger->fatal("Exiting, no indendation done."); + $logger->fatal("Exiting, no indentation done."); $self->output_logfile(); exit(4); } diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm index a5931d17f71..11a18c171f0 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm @@ -145,7 +145,7 @@ sub yaml_read_settings { elsif ( -f "$homeDir/.config/latexindent/indentconfig.yaml" ) { $indentconfig = "$homeDir/.config/latexindent/indentconfig.yaml"; $logger->info( - 'The config file in "' . "$homeDir/.config/latexindent/indentconfig.yaml" . '" was recognized' ); + 'The config file in "' . "$homeDir/.config/latexindent/indentconfig.yaml" . '" will be read' ); } } elsif ( $^O eq "darwin" ) { @@ -153,7 +153,7 @@ sub yaml_read_settings { $indentconfig = "$homeDir/Library/Preferences/latexindent/indentconfig.yaml"; $logger->info( 'The config file in "' . "$homeDir/Library/Preferences/latexindent/indentconfig.yaml" - . '" was recognized' ); + . '" will be read' ); } } elsif ( $^O eq "MSWin32" || $^O eq "cygwin" ) { @@ -168,7 +168,7 @@ sub yaml_read_settings { $indentconfig = "$homeDir/AppData/Local/latexindent/indentconfig.yaml"; $logger->info( 'The config file in "' . "$homeDir" - . '\AppData\Local\latexindent\indentconfig.yaml" was recognized' ); + . '\AppData\Local\latexindent\indentconfig.yaml" will be read' ); } } @@ -179,13 +179,15 @@ sub yaml_read_settings { $indentconfig = ( -f "$homeDir/indentconfig.yaml" ) ? "$homeDir/indentconfig.yaml" : undef; # if indentconfig.yaml doesn't exist, check for the hidden file, .indentconfig.yaml - $indentconfig = ( -f "$homeDir/.indentconfig.yaml" ) ? "$homeDir/.indentconfig.yaml" : undef; - $logger->info( 'The config file in "' . "$indentconfig" . '" was recognized' ) if defined $indentconfig; + if ( !defined $indentconfig ) { + $indentconfig = ( -f "$homeDir/.indentconfig.yaml" ) ? "$homeDir/.indentconfig.yaml" : undef; + } + $logger->info( 'The config file in "' . "$indentconfig" . '" will be read' ) if defined $indentconfig; } } # messages for indentconfig.yaml and/or .indentconfig.yaml - if ( defined $indentconfig && -f $indentconfig && !$switches{onlyDefault} ) { + if ( defined $indentconfig and -f $indentconfig and !$switches{onlyDefault} ) { # read the absolute paths from indentconfig.yaml $userSettings = YAML::Tiny->read("$indentconfig"); @@ -246,8 +248,10 @@ sub yaml_read_settings { } else { # give the user instructions on where to put the config file + $logger->info("Home directory is $homeDir"); + $logger->info("latexindent.pl didn't find indentconfig.yaml or .indentconfig.yaml"); $logger->info( - "Home directory is $homeDir (didn't find a config file, see all posible locations here: https://latexindentpl.readthedocs.io/en/latest/sec-appendices.html#indentconfig-options)" + "see all possible locations: https://latexindentpl.readthedocs.io/en/latest/sec-appendices.html#indentconfig-options)" ); } } @@ -371,7 +375,7 @@ sub yaml_read_settings { # if we can read userSettings if ($userSettings) { - # update the MASTER setttings to include updates from the userSettings + # update the MASTER settings to include updates from the userSettings while ( my ( $firstLevelKey, $firstLevelValue ) = each %{ $userSettings->[0] } ) { # the update approach is slightly different for hashes vs scalars/arrays diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/HiddenChildren.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/HiddenChildren.pm index 9c01d9b65bf..aec7cd365ef 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/HiddenChildren.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/HiddenChildren.pm @@ -48,7 +48,7 @@ our %allChildren; # \end{one} # # From the visual perspective, we might say that <one> and <two> are *nested* children; -# from the persepective of latexindent.pl, however, they actually have *the same level*. +# from the perspective of latexindent.pl, however, they actually have *the same level*. # # Graphically, you might represent it as follows # diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm index 3ca67433a84..9582eeb6c53 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm @@ -48,7 +48,7 @@ sub remove_trailing_whitespace { $logger->trace("removeTrailingWhitespace: afterProcessing is now $removeTWS") if $is_t_switch_active; } - # this method can be called before the indendation, and after, depending upon the input + # this method can be called before the indentation, and after, depending upon the input if ( $input{when} eq "before" ) { return unless ( ${ $mainSettings{removeTrailingWhitespace} }{beforeProcessing} ); $logger->trace( diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/IfElseFi.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/IfElseFi.pm index 22b3d2eb0fe..ad7237240b4 100755 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/IfElseFi.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/IfElseFi.pm @@ -30,8 +30,8 @@ our $ifElseFiCounter; our $ifElseFiRegExp; our $ifElseFiBasicRegExp = qr/\\if/; -# store the regular expresssion for matching and replacing the \if...\else...\fi statements -# note: we search for \else separately in an attempt to keep this regexp a little more managable +# store the regular expression for matching and replacing the \if...\else...\fi statements +# note: we search for \else separately in an attempt to keep this regexp a little more manageable sub construct_ifelsefi_regexp { my $ifElseFiNameRegExp = qr/${${$mainSettings{fineTuning}}{ifElseFi}}{name}/; diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Indent.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Indent.pm index 404b4bca5b5..51f5906cb3b 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Indent.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Indent.pm @@ -137,7 +137,7 @@ sub indent_body { and ${$self}{removeParagraphLineBreaks} and !${ $mainSettings{modifyLineBreaks}{removeParagraphLineBreaks} }{beforeTextWrap} ); - # body indendation + # body indentation if ( ${$self}{linebreaksAtEnd}{begin} == 1 ) { if ( ${$self}{body} =~ m/^\h*$/s ) { $logger->trace("Body of ${$self}{name} is empty, not applying indentation") if $is_t_switch_active; diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/KeyEqualsValuesBraces.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/KeyEqualsValuesBraces.pm index 684146e2f45..873a04adbe6 100755 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/KeyEqualsValuesBraces.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/KeyEqualsValuesBraces.pm @@ -44,7 +44,7 @@ sub construct_key_equals_values_regexp { my $keyEqualsValuesBracesBracketsFollow = qr/${${$mainSettings{fineTuning}}{keyEqualsValuesBracesBrackets}}{follow}/; - # store the regular expresssion for matching and replacing + # store the regular expression for matching and replacing $key_equals_values_bracesRegExp = qr/ ( (?:$keyEqualsValuesBracesBracketsFollow) @@ -122,7 +122,7 @@ sub create_unique_id { sub get_replacement_text { my $self = shift; - # the replacement text for a key = {value} needes to accomodate the leading [ OR { OR % OR , OR any combination thereof +# the replacement text for a key = {value} needes to accommodate the leading [ OR { OR % OR , OR any combination thereof $logger->trace("Custom replacement text routine for ${$self}{name}") if $is_t_switch_active; ${$self}{replacementText} = ${$self}{beginningbit} . ${$self}{id}; delete ${$self}{beginningbit}; diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Lines.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Lines.pm index e2085b735df..f0510cac1f5 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Lines.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Lines.pm @@ -36,7 +36,7 @@ sub lines_body_selected_lines { $logger->info("*-n,--lines switch is active, operating on lines $switches{lines}"); $logger->info( "number of lines in file: " . ( $#lines + 1 ) ); - $logger->info("*interpretting $switches{lines}"); + $logger->info("*interpreting $switches{lines}"); my @lineRanges = split( /,/, $switches{lines} ); my @indentLineRange; @@ -187,7 +187,7 @@ sub lines_sort_and_combine_line_range { # # --lines 8-10,4-5,1-2 # - # needs to be interpretted as + # needs to be interpreted as # # --lines 1-2,4-5,8-10, # @@ -212,7 +212,7 @@ sub lines_sort_and_combine_line_range { # # --lines 3-5,4-10 # - # needs to be interpretted as + # needs to be interpreted as # # --lines 3-10 # @@ -230,7 +230,7 @@ sub lines_sort_and_combine_line_range { # # --lines 3-7,4-6 # - # needs to be interpretted as + # needs to be interpreted as # # --lines 3-7 # diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm index cd6ec912c3b..809aa71d2d5 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm @@ -131,7 +131,7 @@ ENDQUOTE # if cruft directory does not exist if ( !( -d ${$self}{cruftDirectory} ) ) { $logger->fatal("*Could not find directory ${$self}{cruftDirectory}"); - $logger->fatal("Exiting, no indendation done."); + $logger->fatal("Exiting, no indentation done."); $self->output_logfile(); exit(6); } @@ -238,7 +238,7 @@ ENDQUOTE if ( ( scalar @fileNames > 1 ) and $switches{outputToFile} and ( $switches{outputToFile} !~ m/^h*\+/ ) ) { $logger->warn("*-o switch specified as single file, but multiple files given as input"); $logger->warn("ignoring your specification -o $switches{outputToFile}"); - $logger->warn("perhaps you migh specify it using, for example, -o=++ or -o=+myoutput"); + $logger->warn("perhaps you might specify it using, for example, -o=++ or -o=+myoutput"); $switches{outputToFile} = 0; } diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm index f9839e09aaf..3d6dd70af69 100755 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm @@ -65,7 +65,7 @@ sub construct_grouping_braces_brackets_regexp { $NamedGroupingFollowRegExp = qr/${${$mainSettings{fineTuning}}{NamedGroupingBracesBrackets}}{follow}/; } - # store the regular expresssion for matching and replacing + # store the regular expression for matching and replacing $grouping_braces_regexp = qr/ ( $NamedGroupingFollowRegExp @@ -95,7 +95,7 @@ sub create_unique_id { sub get_replacement_text { my $self = shift; - # the replacement text for a key = {value} needes to accomodate the leading [ OR { OR % OR , OR any combination thereof +# the replacement text for a key = {value} needes to accommodate the leading [ OR { OR % OR , OR any combination thereof $logger->trace("Custom replacement text routine for ${$self}{name}") if $is_t_switch_active; ${$self}{replacementText} = ${$self}{beginningbit} . ${$self}{id}; delete ${$self}{beginningbit}; diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm index 71b1027a1b8..bbae745d940 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm @@ -70,7 +70,7 @@ sub remove_trailing_comments { # perform the substitution ${$self}{body} =~ s/ - $notPreceededBy # not preceeded by a \ + $notPreceededBy # not preceded by a \ % # % ( \h*? # followed by possible horizontal space @@ -137,7 +137,7 @@ sub put_trailing_comments_back_in { my $notPreceededBy = qr/${${$mainSettings{fineTuning}}{trailingComments}}{notPreceededBy}/; if (${$self}{body} =~ m/%$trailingcommentID ( - (?! # not immediately preceeded by + (?! # not immediately preceded by $notPreceededBy # \ % # % ).*? diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/UnNamedGroupingBracesBrackets.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/UnNamedGroupingBracesBrackets.pm index b1d619fad63..bf7008a6b41 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/UnNamedGroupingBracesBrackets.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/UnNamedGroupingBracesBrackets.pm @@ -43,7 +43,7 @@ sub construct_unnamed_grouping_braces_brackets_regexp { my $argumentsBefore = qr/${${$mainSettings{fineTuning}}{arguments}}{before}/; my $UnNamedGroupingFollowRegExp = qr/${${$mainSettings{fineTuning}}{UnNamedGroupingBracesBrackets}}{follow}/; - # store the regular expresssion for matching and replacing + # store the regular expression for matching and replacing $un_named_grouping_braces_RegExp = qr/ # NOT (?! @@ -81,7 +81,7 @@ sub create_unique_id { sub get_replacement_text { my $self = shift; - # the replacement text for a key = {value} needes to accomodate the leading [ OR { OR % OR , OR any combination thereof +# the replacement text for a key = {value} needes to accommodate the leading [ OR { OR % OR , OR any combination thereof $logger->trace("Custom replacement text routine for ${$self}{name}") if $is_t_switch_active; # the un-named object is a little special, as it doesn't have a name; as such, if there are blank lines before diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm index 090879ef0d6..ba83dc8f66a 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.20'; -our $versionDate = '2023-01-01'; +our $versionNumber = '3.20.1'; +our $versionDate = '2023-01-07'; 1 diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm index 8af51ed176c..b7327f824a6 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm @@ -356,7 +356,7 @@ sub text_wrap { @textWrapBeforeEndWith = (); } - # if we have an occurence of blocksEndBefore, then grab the stuff before it + # if we have an occurrence of blocksEndBefore, then grab the stuff before it if ( scalar @textWrapBeforeEndWith > 1 ) { $textWrapBlockStorageValue = $textWrapBeforeEndWith[0]; } diff --git a/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml b/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml index 032735e6fd3..a706ab96774 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.20, 2023-01-01 +# defaultSettings.yaml for latexindent.pl, version 3.20.1, 2023-01-07 # a script that aims to # beautify .tex, .sty, .cls files # @@ -654,7 +654,7 @@ fineTuning: ) # | # OR (?: # - (?<! # not *preceeded by* + (?<! # not *preceded by* (?: # (?:[eE]\.[gG]) # e.g OR E.g OR e.G OR E.G | # diff --git a/Master/texmf-dist/scripts/latexindent/latexindent.pl b/Master/texmf-dist/scripts/latexindent/latexindent.pl index e4a9dc2092f..56b7ab2733f 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.20, 2023-01-01 +# latexindent.pl, version 3.20.1, 2023-01-07 # # 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 @@ -58,7 +58,7 @@ GetOptions( # conditionally load the GCString module eval "use Unicode::GCString" if $switches{GCString}; -# check local settings doesn't interfer with reading the file; +# check local settings doesn't interfere with reading the file; # this can happen if the script is called as follows: # # latexindent.pl -l myfile.tex |