From 0efaa39c6d0b17b58df9a68ae1319ea20aaabc28 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 15 Dec 2021 03:01:18 +0000 Subject: CTAN sync 202112150301 --- support/arara/README.md | 2 +- support/arara/doc/arara-manual.pdf | Bin 1971304 -> 1971074 bytes support/arara/doc/arara-quickstart.pdf | Bin 252986 -> 252983 bytes support/arara/doc/arara.1 | 2 +- support/arara/doc/version.tex | 2 +- support/latexindent/LatexIndent/Document.pm | 6 +-- support/latexindent/LatexIndent/Environment.pm | 8 +++ support/latexindent/LatexIndent/GetYamlSettings.pm | 1 + support/latexindent/LatexIndent/Item.pm | 8 +-- .../latexindent/LatexIndent/MandatoryArgument.pm | 8 +++ .../latexindent/LatexIndent/OptionalArgument.pm | 8 +++ support/latexindent/LatexIndent/Special.pm | 8 +++ support/latexindent/LatexIndent/Version.pm | 4 +- support/latexindent/README | 2 +- support/latexindent/defaultSettings.yaml | 5 +- support/latexindent/documentation/latexindent.pdf | Bin 1053582 -> 1056865 bytes support/latexindent/documentation/latexindent.tex | 2 +- .../documentation/sec-default-user-local.tex | 54 +++++++++++++++++---- .../latexindent/documentation/sec-fine-tuning.tex | 2 +- support/latexindent/documentation/title.tex | 4 +- support/latexindent/latexindent.pl | 2 +- 21 files changed, 100 insertions(+), 28 deletions(-) (limited to 'support') diff --git a/support/arara/README.md b/support/arara/README.md index e8d50dbfb7..00921af751 100644 --- a/support/arara/README.md +++ b/support/arara/README.md @@ -1,6 +1,6 @@ ![arara](https://i.stack.imgur.com/hjUsN.png) -# arara v6.1.3 +# arara v6.1.4 ![Language: Kotlin](https://img.shields.io/badge/Language-Kotlin-blue.svg?style=flat-square) ![Minimum JRE: 8.0](https://img.shields.io/badge/Minimum_JRE-8-blue.svg?style=flat-square) diff --git a/support/arara/doc/arara-manual.pdf b/support/arara/doc/arara-manual.pdf index 510e8a9112..dbc42716fb 100644 Binary files a/support/arara/doc/arara-manual.pdf and b/support/arara/doc/arara-manual.pdf differ diff --git a/support/arara/doc/arara-quickstart.pdf b/support/arara/doc/arara-quickstart.pdf index 3de83b2900..9749525f95 100644 Binary files a/support/arara/doc/arara-quickstart.pdf and b/support/arara/doc/arara-quickstart.pdf differ diff --git a/support/arara/doc/arara.1 b/support/arara/doc/arara.1 index 34562e1c75..979e36e68c 100644 --- a/support/arara/doc/arara.1 +++ b/support/arara/doc/arara.1 @@ -1,4 +1,4 @@ -.TH ARARA 1 "17 November 2021" "v6.1.3" +.TH ARARA 1 "14 December 2021" "v6.1.4" .SH NAME arara \- a TeX automation tool based on rules and directives. .SH SYNOPSIS diff --git a/support/arara/doc/version.tex b/support/arara/doc/version.tex index d7ff925cff..1879c1be07 100644 --- a/support/arara/doc/version.tex +++ b/support/arara/doc/version.tex @@ -1 +1 @@ -6.1.3 \ No newline at end of file +6.1.4 \ No newline at end of file diff --git a/support/latexindent/LatexIndent/Document.pm b/support/latexindent/LatexIndent/Document.pm index c989b20152..5be5084729 100644 --- a/support/latexindent/LatexIndent/Document.pm +++ b/support/latexindent/LatexIndent/Document.pm @@ -247,15 +247,15 @@ sub find_objects{ } # search for environments - $logger->trace('looking for ENVIRONMENTS') if $is_t_switch_active; + $logger->trace('*looking for ENVIRONMENTS') if $is_t_switch_active; $self->find_environments if ${$self}{body} =~ m/$environmentBasicRegExp/s; # search for ifElseFi blocks - $logger->trace('looking for IFELSEFI') if $is_t_switch_active; + $logger->trace('*looking for IFELSEFI') if $is_t_switch_active; $self->find_ifelsefi if ${$self}{body} =~ m/$ifElseFiBasicRegExp/s; # search for headings (part, chapter, section, setc) - $logger->trace('looking for HEADINGS (chapter, section, part, etc)') if $is_t_switch_active; + $logger->trace('*looking for HEADINGS (chapter, section, part, etc)') if $is_t_switch_active; $self->find_heading if ${$self}{body} =~ m/$allHeadingsRegexp/s; # the ordering of finding commands and special code blocks can change diff --git a/support/latexindent/LatexIndent/Environment.pm b/support/latexindent/LatexIndent/Environment.pm index 12c8d6e191..0f51dfec56 100644 --- a/support/latexindent/LatexIndent/Environment.pm +++ b/support/latexindent/LatexIndent/Environment.pm @@ -109,6 +109,14 @@ sub tasks_particular_to_each_object{ ${${$self}{linebreaksAtEnd}}{body} = 1; } + # lookForAlignDelims: lookForChildCodeBlocks set to 0 means no child objects searched for + # see: test-cases/alignment/issue-308.tex + # + if( defined ${$self}{lookForChildCodeBlocks} and !${$self}{lookForChildCodeBlocks} ){ + $logger->trace("lookForAlignDelims: lookForChildCodeBlocks set to 0, so child objects will *NOT* be searched for") if($is_t_switch_active); + return; + } + # search for items as the first order of business $self->find_items if ${$mainSettings{indentAfterItems}}{${$self}{name}}; diff --git a/support/latexindent/LatexIndent/GetYamlSettings.pm b/support/latexindent/LatexIndent/GetYamlSettings.pm index 113106e88e..bb88a5a8b1 100644 --- a/support/latexindent/LatexIndent/GetYamlSettings.pm +++ b/support/latexindent/LatexIndent/GetYamlSettings.pm @@ -49,6 +49,7 @@ our @alignAtAmpersandInformation = ( {name=>"lookForAlignDelims",yamlname=>"de {name=>"delimiterRegEx",default=>"(?"delimiterJustification",default=>"left"}, {name=>"leadingBlankColumn",default=>-1}, + {name=>"lookForChildCodeBlocks",default=>1}, ); sub yaml_read_settings{ diff --git a/support/latexindent/LatexIndent/Item.pm b/support/latexindent/LatexIndent/Item.pm index 4e10401ae1..d9b191d62f 100644 --- a/support/latexindent/LatexIndent/Item.pm +++ b/support/latexindent/LatexIndent/Item.pm @@ -43,17 +43,19 @@ sub construct_list_of_items{ # detail items in the log $logger->trace("*List of items: $listOfItems (see itemNames)") if $is_t_switch_active; + my $itemCanBeFollowedBy = qr/${${$mainSettings{fineTuning}}{items}}{canBeFollowedBy}/; + $itemRegExp = qr/ ( - \\((?:$listOfItems)(?:\[[^]]*?\])?(?!\S)) + \\((?:$listOfItems)(?:$itemCanBeFollowedBy)?(?!\S)) \h* (\R*)? ) ( (?: # cluster-only (), don't capture (?! - (?:\\(?:(?:$listOfItems)(?:\[[^]]*?\])?(?!\S))) # cluster-only (), don't capture - ). # any character, but not \\$item + (?:\\(?:(?:$listOfItems)(?:$itemCanBeFollowedBy)?(?!\S))) # cluster-only (), don't capture + ). # any character, but not \\$item )* ) (\R)? diff --git a/support/latexindent/LatexIndent/MandatoryArgument.pm b/support/latexindent/LatexIndent/MandatoryArgument.pm index b5b3ac8de6..a7b4e2088a 100644 --- a/support/latexindent/LatexIndent/MandatoryArgument.pm +++ b/support/latexindent/LatexIndent/MandatoryArgument.pm @@ -122,6 +122,14 @@ sub yaml_get_object_attribute_for_indentation_settings{ sub tasks_particular_to_each_object{ my $self = shift; + # lookForAlignDelims: lookForChildCodeBlocks set to 0 means no child objects searched for + # see: test-cases/alignment/issue-308-command.tex + # + if( defined ${$self}{lookForChildCodeBlocks} and !${$self}{lookForChildCodeBlocks} ){ + $logger->trace("lookForAlignDelims: lookForChildCodeBlocks set to 0, so child objects will *NOT* be searched for") if($is_t_switch_active); + return; + } + # search for ifElseFi blocks $self->find_ifelsefi if ${$self}{body} =~ m/$ifElseFiBasicRegExp/s; diff --git a/support/latexindent/LatexIndent/OptionalArgument.pm b/support/latexindent/LatexIndent/OptionalArgument.pm index fdaa549a7a..31e7b8f51e 100644 --- a/support/latexindent/LatexIndent/OptionalArgument.pm +++ b/support/latexindent/LatexIndent/OptionalArgument.pm @@ -107,6 +107,14 @@ sub create_unique_id{ sub tasks_particular_to_each_object{ my $self = shift; + # lookForAlignDelims: lookForChildCodeBlocks set to 0 means no child objects searched for + # see: test-cases/alignment/issue-308-command.tex + # + if( defined ${$self}{lookForChildCodeBlocks} and !${$self}{lookForChildCodeBlocks} ){ + $logger->trace("lookForAlignDelims: lookForChildCodeBlocks set to 0, so child objects will *NOT* be searched for") if($is_t_switch_active); + return; + } + # search for ifElseFi blocks $self->find_ifelsefi if ${$self}{body} =~ m/$ifElseFiBasicRegExp/s; diff --git a/support/latexindent/LatexIndent/Special.pm b/support/latexindent/LatexIndent/Special.pm index 4b585f42ae..8d7346324d 100644 --- a/support/latexindent/LatexIndent/Special.pm +++ b/support/latexindent/LatexIndent/Special.pm @@ -238,6 +238,14 @@ sub tasks_particular_to_each_object{ return unless(${$mainSettings{specialBeginEnd}}{specialBeforeCommand}); + # lookForAlignDelims: lookForChildCodeBlocks set to 0 means no child objects searched for + # see: test-cases/alignment/issue-308-special.tex + # + if( defined ${$self}{lookForChildCodeBlocks} and !${$self}{lookForChildCodeBlocks} ){ + $logger->trace("lookForAlignDelims: lookForChildCodeBlocks set to 0, so child objects will *NOT* be searched for") if($is_t_switch_active); + return; + } + # search for commands with arguments $self->find_commands_or_key_equals_values_braces; diff --git a/support/latexindent/LatexIndent/Version.pm b/support/latexindent/LatexIndent/Version.pm index 4d320379f9..8d774311c6 100644 --- a/support/latexindent/LatexIndent/Version.pm +++ b/support/latexindent/LatexIndent/Version.pm @@ -19,6 +19,6 @@ use warnings; use Exporter qw/import/; our @EXPORT_OK = qw/$versionNumber $versionDate/; -our $versionNumber = '3.13.2'; -our $versionDate = '2021-11-15'; +our $versionNumber = '3.13.3'; +our $versionDate = '2021-12-13'; 1 diff --git a/support/latexindent/README b/support/latexindent/README index 822d2edce1..c23ec17d7d 100644 --- a/support/latexindent/README +++ b/support/latexindent/README @@ -1,5 +1,5 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - latexindent.pl, version 3.13.2, 2021-11-15 + latexindent.pl, version 3.13.3, 2021-12-13 PERL script to indent code within environments, and align delimited environments in .tex files. diff --git a/support/latexindent/defaultSettings.yaml b/support/latexindent/defaultSettings.yaml index e8d3858084..da8cb898f2 100644 --- a/support/latexindent/defaultSettings.yaml +++ b/support/latexindent/defaultSettings.yaml @@ -1,4 +1,4 @@ -# defaultSettings.yaml for latexindent.pl, version 3.13.2, 2021-11-15 +# defaultSettings.yaml for latexindent.pl, version 3.13.3, 2021-12-13 # a script that aims to # beautify .tex, .sty, .cls files # @@ -166,6 +166,7 @@ lookForAlignDelims: dontMeasure: 0 delimiterRegEx: '(?]*?>)' keyEqualsValuesBracesBrackets: name: '[a-zA-Z@\*0-9_\/.:\#-]+[a-zA-Z@\*0-9_\/.\h\{\}:\#-]*?' follow: '(?:(?