texlive[64746] trunk: sty2dtx (17oct22)
commits+karl at tug.org
commits+karl at tug.org
Tue Oct 18 22:56:07 CEST 2022
Revision: 64746
http://tug.org/svn/texlive?view=revision&revision=64746
Author: karl
Date: 2022-10-18 22:56:06 +0200 (Tue, 18 Oct 2022)
Log Message:
-----------
sty2dtx (17oct22)
Modified Paths:
--------------
trunk/Build/source/texk/texlive/linked_scripts/sty2dtx/sty2dtx.pl
trunk/Master/texmf-dist/doc/man/man1/sty2dtx.1
trunk/Master/texmf-dist/doc/man/man1/sty2dtx.man1.pdf
trunk/Master/texmf-dist/doc/support/sty2dtx/sty2dtx.pdf
trunk/Master/texmf-dist/scripts/sty2dtx/sty2dtx.pl
Added Paths:
-----------
trunk/Master/texmf-dist/doc/support/sty2dtx/README.txt
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/support/sty2dtx/README
Modified: trunk/Build/source/texk/texlive/linked_scripts/sty2dtx/sty2dtx.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/sty2dtx/sty2dtx.pl 2022-10-18 20:55:39 UTC (rev 64745)
+++ trunk/Build/source/texk/texlive/linked_scripts/sty2dtx/sty2dtx.pl 2022-10-18 20:56:06 UTC (rev 64746)
@@ -9,11 +9,19 @@
=head1 VERSION
-Version: v2.3
+Version: v2.4 - 2022/10/18
+=head1 LINKS
+
+CTAN: https://ctan.org/pkg/sty2dtx
+
+Repository: https://github.com/MartinScharrer/sty2dtx
+
+Issues: https://github.com/MartinScharrer/sty2dtx/issues
+
=head1 COPYRIGHT
-Copyright (c) 2010-2012 Martin Scharrer <martin at scharrer-online.de>
+Copyright (c) 2010-2022 Martin Scharrer <martin.scharrer at web.de>
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
@@ -26,7 +34,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+along with this program. If not, see <https://www.gnu.org/licenses/>.
=head1 DESCRIPTION
@@ -220,7 +228,7 @@
Martin Scharrer
-E-mail: L<martin at scharrer-online.de>
+E-mail: L<martin.scharrer at web.de>
WWW: L<http://www.scharrer-online.de>
@@ -229,7 +237,7 @@
################################################################################
use Pod::Usage;
-my $VERSION = "v2.3";
+my $VERSION = "v2.4";
$VERSION =~ tr/-/\//;
my $TITLE = << "EOT";
@@ -329,11 +337,11 @@
)
\\(
[gex]?def \s* \\ # TeX definitions
- | (?:new|renew|provide)command\s* \*? \s* {? \s* \\ # LaTeX definitions
- | \@namedef{? # Definition by name only
+ | (?:new|renew|provide)command\s* \*? \s* \{? \s* \\ # LaTeX definitions
+ | \@namedef\{? # Definition by name only
)
($rmacroname) # Macro name without backslash
- \s* }? # Potential closing brace
+ \s* \}? # Potential closing brace
(.*) # Rest of line
/xms;
@@ -342,9 +350,9 @@
\\
(define\@[a-z]*key)
\s*
- {([^}]+)} # Key family
+ \{([^}]+)\} # Key family
\s*
- {([^}]+)} # Key name
+ \{([^}]+)\} # Key name
(.*) # Rest of line
/xms;
@@ -351,10 +359,10 @@
my $renvdef = qr/
^ # Begin of line (no whitespaces!)
\\(
- (?:new|renew|provide)environment\s* { \s* # LaTeX definitions
+ (?:new|renew|provide)environment\s* \{ \s* # LaTeX definitions
)
($renvname) # Environment names follow same rules as macro names
- \s* } # closing brace
+ \s* \} # closing brace
(.*) # Rest of line
/xms;
@@ -378,6 +386,7 @@
}
my ( $mday, $mon, $year ) = ( localtime(time) )[ 3 .. 5 ];
+$mday = sprintf( "%02d", $mday );
$mon = sprintf( "%02d", $mon + 1 );
$year += 1900;
@@ -748,7 +757,7 @@
# Real comments are either: 1) starting with a '%' at SOL or 2) are followed
# by at least one whitespace. This exclude (most) commented out code.
elsif (/^%|^\s*%\s/) {
- if (!$removeenvs || !/^%\s+\\(?:begin|end){(?:macro|environment|macrocode|key)}/) {
+ if (!$removeenvs || !/^%\s+\\(?:begin|end)\{(?:macro|environment|macrocode|key)\}/) {
$_ =~ s/^\s*//;
if ($comments || !/^%\s*$/){
$comments .= $_;
Modified: trunk/Master/texmf-dist/doc/man/man1/sty2dtx.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/sty2dtx.1 2022-10-18 20:55:39 UTC (rev 64745)
+++ trunk/Master/texmf-dist/doc/man/man1/sty2dtx.1 2022-10-18 20:56:06 UTC (rev 64746)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
+.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -38,6 +38,8 @@
. ds PI \(*p
. ds L" ``
. ds R" ''
+. ds C`
+. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
@@ -44,21 +46,28 @@
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
-.ie \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
..
-. nr % 0
-. rr F
-.\}
-.el \{\
-. de IX
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+. if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
..
+. if !\nF==2 \{\
+. nr % 0
+. nr F 2
+. \}
+. \}
.\}
+.rr rF
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
@@ -124,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "STY2DTX 1"
-.TH STY2DTX 1 "2012-11-07" "perl v5.14.2" "User Contributed Perl Documentation"
+.TH STY2DTX 1 "2022-10-18" "perl v5.30.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -133,10 +142,17 @@
sty2dtx \-\- Converts a LaTeX .sty file to a documented .dtx file
.SH "VERSION"
.IX Header "VERSION"
-Version: v2.3
+Version: v2.4 \- 2022/10/18
+.SH "LINKS"
+.IX Header "LINKS"
+\&\s-1CTAN:\s0 https://ctan.org/pkg/sty2dtx
+.PP
+Repository: https://github.com/MartinScharrer/sty2dtx
+.PP
+Issues: https://github.com/MartinScharrer/sty2dtx/issues
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
-Copyright (c) 2010\-2012 Martin Scharrer <martin at scharrer\-online.de>
+Copyright (c) 2010\-2022 Martin Scharrer <martin.scharrer at web.de>
.PP
This program is free software: you can redistribute it and/or modify
it under the terms of the \s-1GNU\s0 General Public License as published by
@@ -144,12 +160,12 @@
(at your option) any later version.
.PP
This program is distributed in the hope that it will be useful,
-but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of
-\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the
+but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of
+\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the
\&\s-1GNU\s0 General Public License for more details.
.PP
You should have received a copy of the \s-1GNU\s0 General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+along with this program. If not, see <https://www.gnu.org/licenses/>.
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Converts a .sty file (LaTeX package) to .dtx format (documented LaTeX source),
@@ -204,7 +220,7 @@
.SS "Files"
.IX Subsection "Files"
.IP "\(bu" 2
-can be '\f(CW\*(C`\-\*(C'\fR' for \s-1STDIN\s0 or \s-1STDOUT\s0, which is the default if no files are given
+can be '\f(CW\*(C`\-\*(C'\fR' for \s-1STDIN\s0 or \s-1STDOUT,\s0 which is the default if no files are given
.IP "\(bu" 2
multiple input files are merged to one output file
.SS "Variables"
@@ -335,6 +351,6 @@
.IX Header "AUTHOR"
Martin Scharrer
.PP
-E\-mail: martin at scharrer\-online.de
+E\-mail: martin.scharrer at web.de
.PP
-\&\s-1WWW:\s0 http://www.scharrer\-online.de <http://www.scharrer-online.de>
+\&\s-1WWW:\s0 <http://www.scharrer\-online.de>
Modified: trunk/Master/texmf-dist/doc/man/man1/sty2dtx.man1.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/support/sty2dtx/README
===================================================================
--- trunk/Master/texmf-dist/doc/support/sty2dtx/README 2022-10-18 20:55:39 UTC (rev 64745)
+++ trunk/Master/texmf-dist/doc/support/sty2dtx/README 2022-10-18 20:56:06 UTC (rev 64746)
@@ -1,155 +0,0 @@
-NAME
- sty2dtx -- Converts a LaTeX .sty file to a documented .dtx file
-
-VERSION
- Version: v2.3
-
-COPYRIGHT
- Copyright (c) 2010-2012 Martin Scharrer <martin at scharrer-online.de>
-
- 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 the
- Free Software Foundation, either version 3 of the License, or (at your
- option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program. If not, see <http://www.gnu.org/licenses/>.
-
-DESCRIPTION
- Converts a .sty file (LaTeX package) to .dtx format (documented LaTeX
- source), by surrounding macro definitions with 'macro' and 'macrocode'
- environments. The macro name is automatically inserted as an argument to
- the 'macro' environemnt. Code lines outside macro definitions are
- wrapped only in 'macrocode' environments. Empty lines are removed. The
- script is not thought to be fool proof and 100% accurate but rather as a
- good start to convert undocumented style files to .dtx files.
-
- Basic Usage
- perl sty2dtx.pl infile [infile ...] outfile
-
- or
-
- perl sty2dtx.pl < file.sty > file.dtx
-
- Supported Definitions
- The following macro definitions are detected when they are at the start
- of a line (can be prefixed by \global, \long, \protected and/or \outer):
-
- \def \edef \gdef \xdef
- \newcommand{\name} \newcommand*{\name}
- \newcommand\name \newcommand*\name
- \renewcommand{\name} \renewcommand*{\name}
- \renewcommand\name \renewcommand*\name
- \providecommand{\name} \providecommand*{\name}
- \providecommand\name \providecommand*\name
- \@namedef{\name} \@namedef\name
-
- The following environment definitions are detected when they are at the
- start of a line:
-
- \newenvironment{name} \renewenvironemnt{name} \provideenvironment{name}
-
- The macro and environment definition must either end at the same line or
- with a '"}"' on its own on a line.
-
-USAGE
- sty2dtx [<options>] [--<VAR>=<VALUE> ...] [--] [<infile(s)>] [<outfile>]
-
- Files
- * can be '"-"' for STDIN or STDOUT, which is the default if no files are
- given
-
- * multiple input files are merged to one output file
-
- Variables
- Variables can be defined using
-
- --<VAR>=<VALUE>
-
- or
-
- --<VAR> <VALUE>
-
- and will be used for substitutions in the template file.
-
- Common variables:
- author, email, maintainer, year (for copyright),
- version, date, description (of package/class),
- type (either 'package' default or 'class'),
- filebase (automatically set from output or input file name),
-
- Options
- -h Print this help text
- -H Print extended help
- -V Print version and copyright
- -v Be verbose
- -o output Use given file as output
- -O Overwrite already existing output file(s)
- -B Use basename of single input file for output file
- -I Also create .ins (install) file
- -c Only use code section (like v1.0)
- -r Remove existing 'macro', 'macrocode', etc. environments.
- -R Do not remove existing 'macro', 'macrocode', etc.
- environments.
- -i ins-file Create .ins file with given name
- -t template Use this file as template instead of the default one
- -T template Use this file as template for the .ins file
- -e file Export default .dtx template to file and exit
- -E file Export default .ins template to file and exit
- -D Use current date as file date
- -F file Read more options and variables from file.
- -N Do not read default config file; must be the first option
-
- Config files
- A default config file either named 'sty2dtx.cfg' or '.sty2dtx.cfg' is
- searched in the current directory, the users home directory and the
- directory of this script, in this order. The first one found is loaded.
- If none is found the 'texmf' tree is searched for a 'sty2dtx.cfg' config
- file. As with -F files the config file should contain one option or
- variable per line. Lines starting with '"%"' or '"#"' are ignored.
-
-Examples
- Produce 'file.dtx' from 'file.sty':
-
- sty2dtx.pl < file.sty > file.dtx
-
- or
-
- sty2dtx.pl file.sty file.dtx
-
- or
-
- sty2dtx.pl -B file.sty
-
- Produce 'file.dtx' and 'file.ins' from 'file.sty':
-
- sty2dtx.pl -I file.sty file.dtx
-
- or
-
- sty2dtx.pl file.sty -i file.sty file.dtx
-
- or
-
- sty2dtx.pl -IB file.sty
-
- Set custom variable values:
-
- sty2dtx.pl --author Me --email me at there.com mypkg.sty mypkg.dtx
-
- Produce DTX file for a class:
-
- sty2dtx.pl --type class mycls.sty mycls.dtx
-
-AUTHOR
- Martin Scharrer
-
- E-mail: martin at scharrer-online.de
-
- WWW: <http://www.scharrer-online.de>
-
Added: trunk/Master/texmf-dist/doc/support/sty2dtx/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/sty2dtx/README.txt (rev 0)
+++ trunk/Master/texmf-dist/doc/support/sty2dtx/README.txt 2022-10-18 20:56:06 UTC (rev 64746)
@@ -0,0 +1,162 @@
+NAME
+ sty2dtx -- Converts a LaTeX .sty file to a documented .dtx file
+
+VERSION
+ Version: v2.4 - 2022/10/18
+
+LINKS
+ CTAN: https://ctan.org/pkg/sty2dtx
+
+ Repository: https://github.com/MartinScharrer/sty2dtx
+
+ Issues: https://github.com/MartinScharrer/sty2dtx/issues
+
+COPYRIGHT
+ Copyright (c) 2010-2022 Martin Scharrer <martin.scharrer at web.de>
+
+ 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 the
+ Free Software Foundation, either version 3 of the License, or (at your
+ option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program. If not, see <https://www.gnu.org/licenses/>.
+
+DESCRIPTION
+ Converts a .sty file (LaTeX package) to .dtx format (documented LaTeX
+ source), by surrounding macro definitions with 'macro' and 'macrocode'
+ environments. The macro name is automatically inserted as an argument to
+ the 'macro' environemnt. Code lines outside macro definitions are
+ wrapped only in 'macrocode' environments. Empty lines are removed. The
+ script is not thought to be fool proof and 100% accurate but rather as a
+ good start to convert undocumented style files to .dtx files.
+
+ Basic Usage
+ perl sty2dtx.pl infile [infile ...] outfile
+
+ or
+
+ perl sty2dtx.pl < file.sty > file.dtx
+
+ Supported Definitions
+ The following macro definitions are detected when they are at the start
+ of a line (can be prefixed by \global, \long, \protected and/or \outer):
+
+ \def \edef \gdef \xdef
+ \newcommand{\name} \newcommand*{\name}
+ \newcommand\name \newcommand*\name
+ \renewcommand{\name} \renewcommand*{\name}
+ \renewcommand\name \renewcommand*\name
+ \providecommand{\name} \providecommand*{\name}
+ \providecommand\name \providecommand*\name
+ \@namedef{\name} \@namedef\name
+
+ The following environment definitions are detected when they are at the
+ start of a line:
+
+ \newenvironment{name} \renewenvironemnt{name} \provideenvironment{name}
+
+ The macro and environment definition must either end at the same line or
+ with a '"}"' on its own on a line.
+
+USAGE
+ sty2dtx [<options>] [--<VAR>=<VALUE> ...] [--] [<infile(s)>] [<outfile>]
+
+ Files
+ * can be '"-"' for STDIN or STDOUT, which is the default if no files are
+ given
+
+ * multiple input files are merged to one output file
+
+ Variables
+ Variables can be defined using
+
+ --<VAR>=<VALUE>
+
+ or
+
+ --<VAR> <VALUE>
+
+ and will be used for substitutions in the template file.
+
+ Common variables:
+ author, email, maintainer, year (for copyright),
+ version, date, description (of package/class),
+ type (either 'package' default or 'class'),
+ filebase (automatically set from output or input file name),
+
+ Options
+ -h Print this help text
+ -H Print extended help
+ -V Print version and copyright
+ -v Be verbose
+ -o output Use given file as output
+ -O Overwrite already existing output file(s)
+ -B Use basename of single input file for output file
+ -I Also create .ins (install) file
+ -c Only use code section (like v1.0)
+ -r Remove existing 'macro', 'macrocode', etc. environments.
+ -R Do not remove existing 'macro', 'macrocode', etc.
+ environments.
+ -i ins-file Create .ins file with given name
+ -t template Use this file as template instead of the default one
+ -T template Use this file as template for the .ins file
+ -e file Export default .dtx template to file and exit
+ -E file Export default .ins template to file and exit
+ -D Use current date as file date
+ -F file Read more options and variables from file.
+ -N Do not read default config file; must be the first option
+
+ Config files
+ A default config file either named 'sty2dtx.cfg' or '.sty2dtx.cfg' is
+ searched in the current directory, the users home directory and the
+ directory of this script, in this order. The first one found is loaded.
+ If none is found the 'texmf' tree is searched for a 'sty2dtx.cfg' config
+ file. As with -F files the config file should contain one option or
+ variable per line. Lines starting with '"%"' or '"#"' are ignored.
+
+Examples
+ Produce 'file.dtx' from 'file.sty':
+
+ sty2dtx.pl < file.sty > file.dtx
+
+ or
+
+ sty2dtx.pl file.sty file.dtx
+
+ or
+
+ sty2dtx.pl -B file.sty
+
+ Produce 'file.dtx' and 'file.ins' from 'file.sty':
+
+ sty2dtx.pl -I file.sty file.dtx
+
+ or
+
+ sty2dtx.pl file.sty -i file.sty file.dtx
+
+ or
+
+ sty2dtx.pl -IB file.sty
+
+ Set custom variable values:
+
+ sty2dtx.pl --author Me --email me at there.com mypkg.sty mypkg.dtx
+
+ Produce DTX file for a class:
+
+ sty2dtx.pl --type class mycls.sty mycls.dtx
+
+AUTHOR
+ Martin Scharrer
+
+ E-mail: martin.scharrer at web.de
+
+ WWW: <http://www.scharrer-online.de>
+
Property changes on: trunk/Master/texmf-dist/doc/support/sty2dtx/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/support/sty2dtx/sty2dtx.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/scripts/sty2dtx/sty2dtx.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/sty2dtx/sty2dtx.pl 2022-10-18 20:55:39 UTC (rev 64745)
+++ trunk/Master/texmf-dist/scripts/sty2dtx/sty2dtx.pl 2022-10-18 20:56:06 UTC (rev 64746)
@@ -9,11 +9,19 @@
=head1 VERSION
-Version: v2.3
+Version: v2.4 - 2022/10/18
+=head1 LINKS
+
+CTAN: https://ctan.org/pkg/sty2dtx
+
+Repository: https://github.com/MartinScharrer/sty2dtx
+
+Issues: https://github.com/MartinScharrer/sty2dtx/issues
+
=head1 COPYRIGHT
-Copyright (c) 2010-2012 Martin Scharrer <martin at scharrer-online.de>
+Copyright (c) 2010-2022 Martin Scharrer <martin.scharrer at web.de>
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
@@ -26,7 +34,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+along with this program. If not, see <https://www.gnu.org/licenses/>.
=head1 DESCRIPTION
@@ -220,7 +228,7 @@
Martin Scharrer
-E-mail: L<martin at scharrer-online.de>
+E-mail: L<martin.scharrer at web.de>
WWW: L<http://www.scharrer-online.de>
@@ -229,7 +237,7 @@
################################################################################
use Pod::Usage;
-my $VERSION = "v2.3";
+my $VERSION = "v2.4";
$VERSION =~ tr/-/\//;
my $TITLE = << "EOT";
@@ -329,11 +337,11 @@
)
\\(
[gex]?def \s* \\ # TeX definitions
- | (?:new|renew|provide)command\s* \*? \s* {? \s* \\ # LaTeX definitions
- | \@namedef{? # Definition by name only
+ | (?:new|renew|provide)command\s* \*? \s* \{? \s* \\ # LaTeX definitions
+ | \@namedef\{? # Definition by name only
)
($rmacroname) # Macro name without backslash
- \s* }? # Potential closing brace
+ \s* \}? # Potential closing brace
(.*) # Rest of line
/xms;
@@ -342,9 +350,9 @@
\\
(define\@[a-z]*key)
\s*
- {([^}]+)} # Key family
+ \{([^}]+)\} # Key family
\s*
- {([^}]+)} # Key name
+ \{([^}]+)\} # Key name
(.*) # Rest of line
/xms;
@@ -351,10 +359,10 @@
my $renvdef = qr/
^ # Begin of line (no whitespaces!)
\\(
- (?:new|renew|provide)environment\s* { \s* # LaTeX definitions
+ (?:new|renew|provide)environment\s* \{ \s* # LaTeX definitions
)
($renvname) # Environment names follow same rules as macro names
- \s* } # closing brace
+ \s* \} # closing brace
(.*) # Rest of line
/xms;
@@ -378,6 +386,7 @@
}
my ( $mday, $mon, $year ) = ( localtime(time) )[ 3 .. 5 ];
+$mday = sprintf( "%02d", $mday );
$mon = sprintf( "%02d", $mon + 1 );
$year += 1900;
@@ -748,7 +757,7 @@
# Real comments are either: 1) starting with a '%' at SOL or 2) are followed
# by at least one whitespace. This exclude (most) commented out code.
elsif (/^%|^\s*%\s/) {
- if (!$removeenvs || !/^%\s+\\(?:begin|end){(?:macro|environment|macrocode|key)}/) {
+ if (!$removeenvs || !/^%\s+\\(?:begin|end)\{(?:macro|environment|macrocode|key)\}/) {
$_ =~ s/^\s*//;
if ($comments || !/^%\s*$/){
$comments .= $_;
More information about the tex-live-commits
mailing list.