texlive[74068] branches/branch2024.final: texdef (branch) (17feb25)

commits+karl at tug.org commits+karl at tug.org
Mon Feb 17 21:47:28 CET 2025


Revision: 74068
          https://tug.org/svn/texlive?view=revision&revision=74068
Author:   karl
Date:     2025-02-17 21:47:28 +0100 (Mon, 17 Feb 2025)
Log Message:
-----------
texdef (branch) (17feb25)

Modified Paths:
--------------
    branches/branch2024.final/Build/source/texk/texlive/linked_scripts/texdef/texdef.pl
    branches/branch2024.final/Master/texmf-dist/doc/support/texdef/texdef.pdf
    branches/branch2024.final/Master/texmf-dist/scripts/texdef/texdef.pl

Added Paths:
-----------
    branches/branch2024.final/Master/texmf-dist/doc/support/texdef/CHANGELOG.txt
    branches/branch2024.final/Master/texmf-dist/doc/support/texdef/DEPENDS.txt
    branches/branch2024.final/Master/texmf-dist/doc/support/texdef/INSTALL.txt
    branches/branch2024.final/Master/texmf-dist/doc/support/texdef/README.txt
    branches/branch2024.final/Master/texmf-dist/doc/support/texdef/texdef.tex

Removed Paths:
-------------
    branches/branch2024.final/Master/texmf-dist/doc/support/texdef/CHANGELOG
    branches/branch2024.final/Master/texmf-dist/doc/support/texdef/INSTALL
    branches/branch2024.final/Master/texmf-dist/doc/support/texdef/README
    branches/branch2024.final/Master/texmf-dist/source/support/texdef/

Modified: branches/branch2024.final/Build/source/texk/texlive/linked_scripts/texdef/texdef.pl
===================================================================
--- branches/branch2024.final/Build/source/texk/texlive/linked_scripts/texdef/texdef.pl	2025-02-17 20:47:14 UTC (rev 74067)
+++ branches/branch2024.final/Build/source/texk/texlive/linked_scripts/texdef/texdef.pl	2025-02-17 20:47:28 UTC (rev 74068)
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
 ################################################################################
 #  texdef -- Show definitions of TeX commands
-#  Copyright (c) 2011-2020 Martin Scharrer <martin at scharrer-online.de>
+#  Copyright (c) 2011-2025 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
@@ -116,14 +116,14 @@
 my $BEGINENVSTR = '%s';
 my $ENDENVSTR   = '%s';
 
-my $VERSION = 'Version 1.9 -- 2020/09/27';
+my $VERSION = 'Version 1.10 -- 2025/02/17';
 sub usage {
     my $option = shift;
     my $ret    = ($option) ? 0 : 1;
 print << 'EOT';
 texdef -- Show definitions of TeX commands
-Version 1.9 -- 2020/09/27
-Copyright (C) 2011-2020  Martin Scharrer <martin at scharrer-online.de>
+Version 1.10 -- 2025/02/17
+Copyright (c) 2011-2025  Martin Scharrer <martin.scharrer at web.de>
 This program comes with ABSOLUTELY NO WARRANTY;
 This is free software, and you are welcome to redistribute it under certain conditions;
 
@@ -222,7 +222,7 @@
 }
 
 ## Define and process options
-Getopt::Long::Configure ("bundling");
+Getopt::Long::Configure ("bundling","no_ignore_case");
 GetOptions (
    'value|v!' => \$SHOWVALUE,
    'Environment|E!' => \$ISENVIRONMENT,

Deleted: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/CHANGELOG
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/support/texdef/CHANGELOG	2025-02-17 20:47:14 UTC (rev 74067)
+++ branches/branch2024.final/Master/texmf-dist/doc/support/texdef/CHANGELOG	2025-02-17 20:47:28 UTC (rev 74068)
@@ -1,58 +0,0 @@
-= Changelog =
-
-== v1.9 from 2020/09/27 ==
- * Added support for develop versions of formats, e.g. 'latex-dev'.
-
-== v1.8c from 2019/01/15 ==
- * Changed path printing format to native format of the used OS 
-   (e.g. under Windows file paths now habe `\` instead of `/`)
-
-== v1.8a from 2018/03/28 ==
- * Further fixes of braces in regexs to avoid "Unescaped left brace in regex is deprecated" warnings or errors.
-
-== v1.8 from 2018/03/25 ==
- * Added "dvitex" and "dvilatex" as formats. These will set DVI mode on "tex" or "latex".
- * Escaped further braces in regexs to avoid "Unescaped left brace in regex is deprecated" warnings or errors.
- * Added option '--texoptions' to allow the passing of compiler options for special cases.
-
-== v1.7c from 2017/12/09 ==
- * Fixed 'Unescaped left brace in regex is deprecated' warning.
-   Thanks goes to Paulo Cereda <cereda.paulo at gmail.com> for providing the patch.
-
-== v1.7b from 2012/05/15 ==
- * Added support for \chardef, \countdef, \dimendef, \mathchardef, \myskip, \skipdef and \toksdef.
- * Added support for \newbox, \newcount, \newdimen, \newif, \newinsert, \newread, \newskip, \newtoks, \newwrite.
- * Added support for "\newif" and "\newcount".
- * Changed internal processing order to put more frequently used elements first.
-
-== v1.7a from 2012/05/08 ==
- * Fix for currfile v0.6.
-
-== v1.7 from 2012/05/07 ==
- * Changed "--help" to return status code 0.
- * Changed Windows default editor to texworks. Fixed If-statement.
- * Fixed bug which reported name of included subpackages.
- * Added option "--edit".
- * Added "--editor" option and better editor handling.
- * Added variable substitution for editor.
- * Added support for "TEXDEF_EDITOR" variable. Added Mac "open" command.
- * Fixed for behaviour when -s is used (correct name in message; do not follow protected macros etc.)
-
-== v1.6 from 2012/05/02 ==
- * Changed implementation of -E option to work better with new environment source code.
- * Added code to detect environment source definitions.
- * Added -E option.
- * Changed "flavour" to "format".
- * Added support for \let.
- * Added fallback for when the source code can not be found. Added support for -F with "latex.ltx".
-
-== v1.5 from 2012/04/29 ==
- * Added experimental --source option to show source code of the definitions.
- * Script now works correctly under MS Windows.
-
-== v1.4 from 2011/07/28 ==
- * Added -F option to display file path.
- * Added basic support for pdfkeys using -k and -K options.
- * Added -V option to print version numbers of LaTeX packages or classes.
- * Added '--tempdir' option to specify the location of the temporary files. Useful for debugging.
-

Added: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/CHANGELOG.txt
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/support/texdef/CHANGELOG.txt	                        (rev 0)
+++ branches/branch2024.final/Master/texmf-dist/doc/support/texdef/CHANGELOG.txt	2025-02-17 20:47:28 UTC (rev 74068)
@@ -0,0 +1,61 @@
+= Changelog =
+
+== v1.10 from 2025/02/17 ==
+ * Added support for current versions of Perl.
+
+== v1.9 from 2020/09/27 ==
+ * Added support for develop versions of formats, e.g. 'latex-dev'.
+
+== v1.8c from 2019/01/15 ==
+ * Changed path printing format to native format of the used OS 
+   (e.g. under Windows file paths now habe `\` instead of `/`)
+
+== v1.8a from 2018/03/28 ==
+ * Further fixes of braces in regexs to avoid "Unescaped left brace in regex is deprecated" warnings or errors.
+
+== v1.8 from 2018/03/25 ==
+ * Added "dvitex" and "dvilatex" as formats. These will set DVI mode on "tex" or "latex".
+ * Escaped further braces in regexs to avoid "Unescaped left brace in regex is deprecated" warnings or errors.
+ * Added option '--texoptions' to allow the passing of compiler options for special cases.
+
+== v1.7c from 2017/12/09 ==
+ * Fixed 'Unescaped left brace in regex is deprecated' warning.
+   Thanks goes to Paulo Cereda <cereda.paulo at gmail.com> for providing the patch.
+
+== v1.7b from 2012/05/15 ==
+ * Added support for \chardef, \countdef, \dimendef, \mathchardef, \myskip, \skipdef and \toksdef.
+ * Added support for \newbox, \newcount, \newdimen, \newif, \newinsert, \newread, \newskip, \newtoks, \newwrite.
+ * Added support for "\newif" and "\newcount".
+ * Changed internal processing order to put more frequently used elements first.
+
+== v1.7a from 2012/05/08 ==
+ * Fix for currfile v0.6.
+
+== v1.7 from 2012/05/07 ==
+ * Changed "--help" to return status code 0.
+ * Changed Windows default editor to texworks. Fixed If-statement.
+ * Fixed bug which reported name of included subpackages.
+ * Added option "--edit".
+ * Added "--editor" option and better editor handling.
+ * Added variable substitution for editor.
+ * Added support for "TEXDEF_EDITOR" variable. Added Mac "open" command.
+ * Fixed for behaviour when -s is used (correct name in message; do not follow protected macros etc.)
+
+== v1.6 from 2012/05/02 ==
+ * Changed implementation of -E option to work better with new environment source code.
+ * Added code to detect environment source definitions.
+ * Added -E option.
+ * Changed "flavour" to "format".
+ * Added support for \let.
+ * Added fallback for when the source code can not be found. Added support for -F with "latex.ltx".
+
+== v1.5 from 2012/04/29 ==
+ * Added experimental --source option to show source code of the definitions.
+ * Script now works correctly under MS Windows.
+
+== v1.4 from 2011/07/28 ==
+ * Added -F option to display file path.
+ * Added basic support for pdfkeys using -k and -K options.
+ * Added -V option to print version numbers of LaTeX packages or classes.
+ * Added '--tempdir' option to specify the location of the temporary files. Useful for debugging.
+


Property changes on: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/CHANGELOG.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/DEPENDS.txt
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/support/texdef/DEPENDS.txt	                        (rev 0)
+++ branches/branch2024.final/Master/texmf-dist/doc/support/texdef/DEPENDS.txt	2025-02-17 20:47:28 UTC (rev 74068)
@@ -0,0 +1 @@
+# No dependencies


Property changes on: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/DEPENDS.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/INSTALL
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/support/texdef/INSTALL	2025-02-17 20:47:14 UTC (rev 74067)
+++ branches/branch2024.final/Master/texmf-dist/doc/support/texdef/INSTALL	2025-02-17 20:47:28 UTC (rev 74068)
@@ -1,59 +0,0 @@
-Installation
-============
-
-Requirements
-------------
-
-The `texdef` program is a Perl script which needs a Perl interpreter to work.
-Informations about installing Perl can be found at http://www.perl.org/get.html.
-
-The script calls a TeX compiler (tex, latex, ...) to display the definition of commands/macros.
-Therefore (La)TeX must also be installed.
-Informations about installing (La)TeX can be found at http://www.latex-project.org/ftp.html.
-
-
-Location
---------
-
-For installation the script 'texdef.pl' must simply be copied to a location suitable for executables,
-i.e. a directory in the PATHi, e.g. '/usr/bin' or '/usr/local/bin' for Linux/Unix.
-
-The script should be set as "executable", i.e. 'chmod +x texdef.pl' for Linux/Unix.
-This is not required for MS Windows.
-
-
-Name
-----
-
-This script can show the definitions of commands with different flavours of TeX
-(tex, etex, latex, pdftex, pdfetex, pdflatex, xetex, xelatex, context, ...).
-The flavour can be given using an command line option or over the _script name_,
-i.e. if the script is called 'texdef' it will use 'tex', but called 'latexdef'
-it will use 'latex' and so on.  
-The script can be simply copied several times, but creating _symbolic links_
-to the real script is enough on operation systems / file systems which support
-this.
-
-At least the two variations 'texdef' and 'latexdef' should be installed.
-
-
-Quick Install Nodes for Linux/Unix
-----------------------------------
-
-    cp texdef.pl /usr/local/bin/
-    cd /usr/local/bin
-    ln -s texdef.pl texdef
-    ln -s texdef.pl latexdef
-    ln -s texdef.pl etexdef
-    ln -s texdef.pl luatexdef
-    ln -s texdef.pl lualatexdef
-    ln -s texdef.pl pdftexdef
-    ln -s texdef.pl pdflatexdef
-    ln -s texdef.pl xetexdef
-    ln -s texdef.pl xelatexdef
-    ln -s texdef.pl 'some other TeX flavour of your choice'
-
-or use the Makefile (defaults to `/usr/local/bin`)
-
-    make install INSTALLDIR=/your/path
-

Added: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/INSTALL.txt
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/support/texdef/INSTALL.txt	                        (rev 0)
+++ branches/branch2024.final/Master/texmf-dist/doc/support/texdef/INSTALL.txt	2025-02-17 20:47:28 UTC (rev 74068)
@@ -0,0 +1,59 @@
+Installation
+============
+
+Requirements
+------------
+
+The `texdef` program is a Perl script which needs a Perl interpreter to work.
+Informations about installing Perl can be found at http://www.perl.org/get.html.
+
+The script calls a TeX compiler (tex, latex, ...) to display the definition of commands/macros.
+Therefore (La)TeX must also be installed.
+Informations about installing (La)TeX can be found at http://www.latex-project.org/ftp.html.
+
+
+Location
+--------
+
+For installation the script 'texdef.pl' must simply be copied to a location suitable for executables,
+i.e. a directory in the PATHi, e.g. '/usr/bin' or '/usr/local/bin' for Linux/Unix.
+
+The script should be set as "executable", i.e. 'chmod +x texdef.pl' for Linux/Unix.
+This is not required for MS Windows.
+
+
+Name
+----
+
+This script can show the definitions of commands with different flavours of TeX
+(tex, etex, latex, pdftex, pdfetex, pdflatex, xetex, xelatex, context, ...).
+The flavour can be given using an command line option or over the _script name_,
+i.e. if the script is called 'texdef' it will use 'tex', but called 'latexdef'
+it will use 'latex' and so on.  
+The script can be simply copied several times, but creating _symbolic links_
+to the real script is enough on operation systems / file systems which support
+this.
+
+At least the two variations 'texdef' and 'latexdef' should be installed.
+
+
+Quick Install Nodes for Linux/Unix
+----------------------------------
+
+    cp texdef.pl /usr/local/bin/
+    cd /usr/local/bin
+    ln -s texdef.pl texdef
+    ln -s texdef.pl latexdef
+    ln -s texdef.pl etexdef
+    ln -s texdef.pl luatexdef
+    ln -s texdef.pl lualatexdef
+    ln -s texdef.pl pdftexdef
+    ln -s texdef.pl pdflatexdef
+    ln -s texdef.pl xetexdef
+    ln -s texdef.pl xelatexdef
+    ln -s texdef.pl 'some other TeX flavour of your choice'
+
+or use the Makefile (defaults to `/usr/local/bin`)
+
+    make install INSTALLDIR=/your/path
+


Property changes on: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/INSTALL.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/README
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/support/texdef/README	2025-02-17 20:47:14 UTC (rev 74067)
+++ branches/branch2024.final/Master/texmf-dist/doc/support/texdef/README	2025-02-17 20:47:28 UTC (rev 74068)
@@ -1,90 +0,0 @@
-texdef -- Show definitions of TeX commands
-Version 1.9 -- 2020/09/27
-Copyright (C) 2011-2020  Martin Scharrer <martin at scharrer-online.de>
-This program comes with ABSOLUTELY NO WARRANTY;
-This is free software, and you are welcome to redistribute it under certain conditions;
-
-Usage:
-  texdef   [options] commandname [commandname ...]
-  latexdef [options] commandname [commandname ...]
-
-Other program names are possible. See the 'tex' option.  Command names do not need to start with `\`.
-
-Options:
-  --tex <format>, -t <format>   : Use given format of TeX: 'tex', 'latex', 'context'.
-                                  Variations of 'tex' and 'latex', like 'luatex', 'lualatex', 'xetex', 'xelatex' are supported.
-                                  The postfix '-dev' for develop versions of the format is also supported (e.g. 'latex-dev').
-                                  The default is given by the used program name: 'texdef' -> 'tex', 'latexdef' -> 'latex', etc.
-  --texoptions <options>        : Call (La)TeX with the given options.
-  --source, -s                  : Try to show the original source code of the command definition (L).
-  --value, -v                   : Show value of command instead (i.e. \the\command).
-  --Environment, -E             : Every command name is taken as an environment name. This will show the definition of
-                                  both \Macro\foo and \Macro\endfoo if \texttt{foo} is used as command name (L).
-  --preamble, -P                : Show definition of the command inside the preamble.
-  --beforeclass, -B             : Show definition of the command before \documentclass.
-  --package <pkg>, -p <pkg>     : (M) Load given tex-file, package or module depending on whether '*tex', '*latex'
-                                  or 'context' is used. For LaTeX the <pkg> can start with `[<options>]` and end 
-                                  with `<pkgname>` or `{<pkgname>}`.
-  --class <class>, -c <class>   : (LaTeX only) Load given class instead of default ('article').
-                                  The <class> can start with `[<class options>]` and end 
-                                  with `<classname>` or `{<classname>}`.
-  --environment <env>, -e <env> : (M) Show definition inside the given environment <env>.
-  --othercode <code>, -o <code> : (M) Add other code into the preamble before the definition is shown.
-                                  This can be used to e.g. load PGF/TikZ libraries.
-  --before <code>, -b <code>    : (M) Place <code> before definition is shown.
-                                  The <code> can be arbitray TeX code and doesn't need be be balanced.
-  --after  <code>, -a <code>    : (M) Place <code> after definition is shown.
-                                  The <code> can be arbitray TeX code and doesn't need be be balanced.
-  --find, -f                    : Find file where the command sequence was defined (L).
-  --Find, -F                    : Show full filepath of the file where the command sequence was defined (L).
-  --list, -l                    : List user level command sequences of the given packages (L).
-  --list-defs, -L               : List user level command sequences and their shorten definitions of the given packages (L).
-  --list-all, -ll               : List all command sequences of the given packages (L).
-  --list-defs-all, -LL          : List all command sequences and their shorten definitions of the given packages (L).
-  --ignore-cmds <cs,cs,..>,  -i : Ignore the following command sequence(s) in the above lists. (M)
-  --ignore-regex <regex,..>, -I : Ignore all command sequences in the above lists which match the given Perl regular expression(s). (M)
-  --pgf-keys, -k                : Takes commands as pgfkeys and displays their definitions. Keys must use the full path but the common '.\@cmd' prefix is applied.
-  --pgf-Keys, -K                : Takes commands as pgfkeys and displays their definitions. Keys must use the full path.
-  --version, -V                 : If used alone prints version of this script.
-                                  (L) Together with -p or -c prints version of LaTeX package(s) or class, respectively.
-  --edit                        : Opens the file holding the macro definition. Uses --Find and --source. (L)
-                                  If the source definition can not be found the definition is printed as normal instead.
-  --editor <editor>             : Can be used to set the used editor. If not used the environment variables TEXDEF_EDITOR, EDITOR and
-                                  SELECTED_EDITOR are read in this order. If none of these are set a list of default
-                                  editors are tried.  The <editor> string can include '%f' for the filename, '%n' for
-                                  the line number and '%%' for a literal '%'.  If no '%' is used '+%n %f' is added to
-                                  the given command.
-  --tempdir <directory>         : Use given existing directory for temporary files.
-  --help, -h                    : Print this help and quit.
-
- Long option can be shorten as long the are still unique.  Short options can be combined.
- If the option 'environment', 'before' and 'after' are used toegether the
- produced code will be inserted in the given order (reversed order for 'after').
- (M) = This option can be given multiple times.
- (L) = LaTeX only. Requires the packages 'filehook' and 'currfile'.
-
-Examples:
-Show the definition of '\chapter' with different classes ('article' (default), 'book' and 'scrbook'):
-
-    latexdef chapter
-    latexdef -c book chapter
-    latexdef -c scrbook chapter
-
-Show value of `\textwidth` with different class options:
-
-    latexdef -c [a4paper]{book} -v paperwidth
-    latexdef -c [letter]{book}  -v paperwidth
-
-Show definition of TikZ's '\draw' outside and inside a 'tikzpicture' environment:
-
-    latexdef -p tikz draw
-    latexdef -p tikz --env tikzpicture draw
-
-Show definition of TikZ's '\draw' inside a node, inside a 'beamer' frame in 'handout' mode:
-
-    latexdef -c [handout]beamer -p tikz --env frame --env tikzpicture -b '\node {' -a '};' draw
-
-List all user level command sequences (macros) defined by the 'xspace' LaTeX package:
-
-    latexdef -l -p xspace
-

Added: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/README.txt
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/support/texdef/README.txt	                        (rev 0)
+++ branches/branch2024.final/Master/texmf-dist/doc/support/texdef/README.txt	2025-02-17 20:47:28 UTC (rev 74068)
@@ -0,0 +1,90 @@
+texdef -- Show definitions of TeX commands
+Version 1.10 -- 2025/02/17
+Copyright (c) 2011-2025  Martin Scharrer <martin.scharrer at web.de>
+This program comes with ABSOLUTELY NO WARRANTY;
+This is free software, and you are welcome to redistribute it under certain conditions;
+
+Usage:
+  texdef   [options] commandname [commandname ...]
+  latexdef [options] commandname [commandname ...]
+
+Other program names are possible. See the 'tex' option.  Command names do not need to start with `\`.
+
+Options:
+  --tex <format>, -t <format>   : Use given format of TeX: 'tex', 'latex', 'context'.
+                                  Variations of 'tex' and 'latex', like 'luatex', 'lualatex', 'xetex', 'xelatex' are supported.
+                                  The postfix '-dev' for develop versions of the format is also supported (e.g. 'latex-dev').
+                                  The default is given by the used program name: 'texdef' -> 'tex', 'latexdef' -> 'latex', etc.
+  --texoptions <options>        : Call (La)TeX with the given options.
+  --source, -s                  : Try to show the original source code of the command definition (L).
+  --value, -v                   : Show value of command instead (i.e. \the\command).
+  --Environment, -E             : Every command name is taken as an environment name. This will show the definition of
+                                  both \Macro\foo and \Macro\endfoo if \texttt{foo} is used as command name (L).
+  --preamble, -P                : Show definition of the command inside the preamble.
+  --beforeclass, -B             : Show definition of the command before \documentclass.
+  --package <pkg>, -p <pkg>     : (M) Load given tex-file, package or module depending on whether '*tex', '*latex'
+                                  or 'context' is used. For LaTeX the <pkg> can start with `[<options>]` and end 
+                                  with `<pkgname>` or `{<pkgname>}`.
+  --class <class>, -c <class>   : (LaTeX only) Load given class instead of default ('article').
+                                  The <class> can start with `[<class options>]` and end 
+                                  with `<classname>` or `{<classname>}`.
+  --environment <env>, -e <env> : (M) Show definition inside the given environment <env>.
+  --othercode <code>, -o <code> : (M) Add other code into the preamble before the definition is shown.
+                                  This can be used to e.g. load PGF/TikZ libraries.
+  --before <code>, -b <code>    : (M) Place <code> before definition is shown.
+                                  The <code> can be arbitray TeX code and doesn't need be be balanced.
+  --after  <code>, -a <code>    : (M) Place <code> after definition is shown.
+                                  The <code> can be arbitray TeX code and doesn't need be be balanced.
+  --find, -f                    : Find file where the command sequence was defined (L).
+  --Find, -F                    : Show full filepath of the file where the command sequence was defined (L).
+  --list, -l                    : List user level command sequences of the given packages (L).
+  --list-defs, -L               : List user level command sequences and their shorten definitions of the given packages (L).
+  --list-all, -ll               : List all command sequences of the given packages (L).
+  --list-defs-all, -LL          : List all command sequences and their shorten definitions of the given packages (L).
+  --ignore-cmds <cs,cs,..>,  -i : Ignore the following command sequence(s) in the above lists. (M)
+  --ignore-regex <regex,..>, -I : Ignore all command sequences in the above lists which match the given Perl regular expression(s). (M)
+  --pgf-keys, -k                : Takes commands as pgfkeys and displays their definitions. Keys must use the full path but the common '.\@cmd' prefix is applied.
+  --pgf-Keys, -K                : Takes commands as pgfkeys and displays their definitions. Keys must use the full path.
+  --version, -V                 : If used alone prints version of this script.
+                                  (L) Together with -p or -c prints version of LaTeX package(s) or class, respectively.
+  --edit                        : Opens the file holding the macro definition. Uses --Find and --source. (L)
+                                  If the source definition can not be found the definition is printed as normal instead.
+  --editor <editor>             : Can be used to set the used editor. If not used the environment variables TEXDEF_EDITOR, EDITOR and
+                                  SELECTED_EDITOR are read in this order. If none of these are set a list of default
+                                  editors are tried.  The <editor> string can include '%f' for the filename, '%n' for
+                                  the line number and '%%' for a literal '%'.  If no '%' is used '+%n %f' is added to
+                                  the given command.
+  --tempdir <directory>         : Use given existing directory for temporary files.
+  --help, -h                    : Print this help and quit.
+
+ Long option can be shorten as long the are still unique.  Short options can be combined.
+ If the option 'environment', 'before' and 'after' are used toegether the
+ produced code will be inserted in the given order (reversed order for 'after').
+ (M) = This option can be given multiple times.
+ (L) = LaTeX only. Requires the packages 'filehook' and 'currfile'.
+
+Examples:
+Show the definition of '\chapter' with different classes ('article' (default), 'book' and 'scrbook'):
+
+    latexdef chapter
+    latexdef -c book chapter
+    latexdef -c scrbook chapter
+
+Show value of `\textwidth` with different class options:
+
+    latexdef -c [a4paper]{book} -v paperwidth
+    latexdef -c [letter]{book}  -v paperwidth
+
+Show definition of TikZ's '\draw' outside and inside a 'tikzpicture' environment:
+
+    latexdef -p tikz draw
+    latexdef -p tikz --env tikzpicture draw
+
+Show definition of TikZ's '\draw' inside a node, inside a 'beamer' frame in 'handout' mode:
+
+    latexdef -c [handout]beamer -p tikz --env frame --env tikzpicture -b '\node {' -a '};' draw
+
+List all user level command sequences (macros) defined by the 'xspace' LaTeX package:
+
+    latexdef -l -p xspace
+


Property changes on: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/texdef.pdf
===================================================================
(Binary files differ)

Added: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/texdef.tex
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/support/texdef/texdef.tex	                        (rev 0)
+++ branches/branch2024.final/Master/texmf-dist/doc/support/texdef/texdef.tex	2025-02-17 20:47:28 UTC (rev 74068)
@@ -0,0 +1,286 @@
+\documentclass{ydoc}
+\usepackage{tabularx}
+
+\title{The \textsf{texdef} script}
+\author{Martin Scharrer}
+\email{martin.scharrer at web.de}
+\repository{https://github.com/MartinScharrer/texdef}
+\date{Version 1.10 -- 2025/02/17}
+
+\makeatletter
+\DeclareRobustCommand{\LATeX}{%
+    (L\kern -.36em{\sbox \z@ T\vbox to\ht \z@ {\hbox {\check at mathfonts \fontsize \sf at size \z@ \math at fontsfalse \selectfont A}\vss }}\kern -.075em)\kern -.15em\TeX
+}
+\makeatother
+
+\newenvironment{options}{%
+    \def\cstart{\begingroup\ttfamily\par\noindent\ignorespaces}%
+    \def\csep{\endgroup\begingroup\list {}{}\item \relax}%
+    \def\cend{\endlist\par\medskip\endgroup\cstart}%
+    \cstart
+}{%
+    \endgroup
+}
+
+\begin{document}
+\maketitle
+
+\begin{abstract}
+This Perl script shows the definition of \LATeX\ commands in a similar way as the \TeX\ primitive \Macro\show.
+It is intended to allow users to quickly see the definitions of user level or internal package macros as well as the
+values of registers. The given commands are compiled internally with \LATeX\ and the output of \Macro\show is formatted
+and shown to the user.
+\end{abstract}
+
+\tableofcontents
+
+
+\section{Usage}
+The script executable is called \texttt{texdef} (or maybe \texttt{texdef.pl}).
+A normal installation is supposed to also install it as \texttt{latexdef} (e.g.\ using a symlink to \texttt{texdef}) in order to 
+allow for quick access to the \LaTeX\ format. Further format shortcuts are possible as explained in the installation section.
+
+\parindent=0pt
+\DescribeScript{texdef}[<options>]~<commandname>~[<commandname>~!\ldots!]
+\DescribeScript{latexdef}[<options>]~<commandname>~[<commandname>~!\ldots!]
+
+Other program names are possible. See the \texttt{tex} option.  Command names do not need to start with `|\|'.
+
+\subsection*{Options}
+The following options can be used:
+\par\medskip
+
+\begin{options}
+  --tex \MacroArgs<format>, -t \MacroArgs<format>    \csep Use given format of TeX: 'tex', 'latex', 'context'.
+                                                       Variations of 'tex' and 'latex', like 'luatex', 'lualatex', 'xetex', 'xelatex' are supported.
+                                                       The postfix '-dev' for develop versions of the format is also supported (e.g. 'latex-dev').
+                                                       The default is given by the used program name: 'texdef' -> 'tex', 'latexdef' -> 'latex', etc.\cend
+  --texoptions \MacroArgs<options>                   \csep Call \LaTeX/\TeX{} with the given options.\cend
+  --source, -s                                       \csep Try to show the original source code of the command definition (L).\cend
+  --value, -v                                        \csep Show value of command instead (i.e. \Macro\the\AlsoMacro\command).\cend
+  --preamble, -P                                     \csep Show definition of the command inside the preamble.\cend
+  --Environment, -E                                  \csep Every command name is taken as an environment name. This will show the definition of
+                                                             both \Macro\foo and \Macro\endfoo if \texttt{foo} is used as command name (L).\cend
+  --beforeclass, -B                                  \csep Show definition of the command before \Macro\documentclass.\cend
+  --package \MacroArgs<pkg>, -p \MacroArgs<pkg>      \csep (M) Load given tex-file, package or module depending on whether '*tex', '*latex'
+                                                       or 'context' is used. For LaTeX the \MacroArgs<pkg> can start with `[<options>]` and end
+                                                       with \MacroArgs<pkgname> or \MacroArgs{<pkgname>}.\cend
+  --class \MacroArgs<class>, -c \MacroArgs<class>    \csep (LaTeX only) Load given class instead of default ('article').
+                                                       The \MacroArgs<class> can start with \MacroArgs[<class options>] and end
+                                                       with \MacroArgs<classname> or \MacroArgs{<classname>}.\cend
+  --environment \MacroArgs<env>, -p \MacroArgs<env>  \csep (M) Show definition inside the given environment \MacroArgs<env>.\cend
+  --othercode \MacroArgs<code>, -o \MacroArgs<code>  \csep (M) Add other code into the preamble before the definition is shown.
+                                                       This can be used to e.g. load PGF/TikZ libraries.\cend
+  --before \MacroArgs<code>, -b \MacroArgs<code>     \csep (M) Place \MacroArgs<code> before definition is shown.
+                                                       The \MacroArgs<code> can be arbitray TeX code and doesn't need be be balanced.\cend
+  --after  \MacroArgs<code>, -a \MacroArgs<code>     \csep (M) Place \MacroArgs<code> after definition is shown.
+                                                       The \MacroArgs<code> can be arbitray TeX code and doesn't need be be balanced.\cend
+  --find, -f                                         \csep Find file where the command sequence was defined (L).\cend
+  --Find, -F                                         \csep Show full filepath of the file where the command sequence was defined (L).\cend
+  --list, -l                                         \csep List user level command sequences of the given packages (L).\cend
+  --list-defs, -L                                    \csep List user level command sequences and their shorten definitions of the given packages (L).\cend
+  --list-all, -ll                                    \csep List all command sequences of the given packages (L).\cend
+  --list-defs-all, -LL                               \csep List all command sequences and their shorten definitions of the given packages (L).\cend
+  --ignore-cmds \MacroArgs<cs,cs,..>,  -i            \csep Ignore the following command sequence(s) in the above lists. (M)\cend
+  --ignore-regex \MacroArgs<regex,..>, -I            \csep Ignore all command sequences in the above lists which match the given Perl regular expression(s). (M)\cend
+  --pgf-keys, -k                                     \csep Takes commands as \pkg{pgfkeys} and displays their definitions. Keys must use the full path but the common '.\@cmd' prefix is applied.\cend
+  --pgf-Keys, -K                                     \csep Takes commands as \pkg{pgfkeys} and displays their definitions. Keys must use the full path.\cend
+  --version, -V                                      \csep If used alone prints version of this script.
+                                                       (L) Together with -p or -c prints version of LaTeX package(s) or class, respectively.\cend
+  --edit                                             \csep Opens the file holding the macro definition. Uses |--Find| and |--source|.
+                                                           If the source definition can not be found the definition is printed as normal instead. (L)\cend
+  --editor <editor>                                  \csep Can be used to set the used editor. If not used the environment variables |TEXDEF_EDITOR|, |EDITOR| and
+                                                       |SELECTED_EDITOR| are read in this order. If none of these are set a list of default
+                                                       editors are tried.  The |<editor>| string can include `|%f|' for the filename, `|%n|' for
+                                                       the line number and `|%%|' for a literal `|%|'.  If no `|%|' is used `|+%n %f|' is added to
+                                                       the given command.\cend
+  --tempdir <directory>                              \csep Use given existing directory for temporary files.\cend
+  --help, -h                                         \csep Print this help and quit.\cend
+\end{options}
+
+\noindent \textbf{Notes:}\\
+ Long option can be shorten as long the are still unique.  Short options can be combined.
+ If the option 'environment', 'before' and 'after' are used toegether the
+ produced code will be inserted in the given order (reversed order for 'after').\\
+ (M) = This option can be given multiple times.\\
+ (L) = LaTeX only. Requires the packages 'filehook' and 'currfile'.
+
+
+\section{Installation}\label{sec:install}
+
+The latest official release of the script can be obtained from CTAN under \url{http://mirrors.ctan.org/support/texdef/texdef.pl}.
+The latest develop version (which can be unstable!) can be obtained from the source code repository under 
+\url{https://github.com/MartinScharrer/texdef/src/tip/texdef.pl}.
+
+For installation the script file |texdef.pl| must simply renamed to |texdef| and be copied to a location suitable for executables,
+i.e. a directory in the |PATH|, e.g.\ |/usr/bin| or |/usr/local/bin| for Linux/Unix.
+The script should be set as \emph{executable}, i.e. |chmod +x texdef.pl| for Linux/Unix.
+This is not required for MS Windows.
+
+This script can show the definitions of commands with different formats of TeX
+(|tex|, |etex|, |latex|, |pdftex|, |pdfetex|, |pdflatex|, |xetex|, |xelatex|, |context|, \ldots).
+The format can be given using an command line option or over the \emph{script name},
+i.e.\ if the script is called |texdef| it will use |tex|, but called |latexdef|
+it will use |latex| and so on.
+The script can be simply copied several times, but creating \emph{symbolic links}
+to the real script is enough on operation systems/file systems which support
+this.
+At least the two variations |texdef| and |latexdef| should be installed.
+
+
+\subsection*{Requirements}
+
+The |texdef| program is a Perl script which needs a Perl interpreter to work.
+Informations about installing Perl can be found at \url{http://www.perl.org/get.html}.
+
+The script calls a TeX compiler (|tex|, |latex|, \ldots) to display the definition of commands/macros.
+Therefore \LATeX\ must also be installed.
+Informations about installing \LATeX\ can be found at \url{http://www.latex-project.org/ftp.html}.
+
+
+
+
+\subsection*{Quick Install Nodes for Linux/Unix}
+
+\begin{verbatim}
+    cp texdef.pl /usr/local/bin/
+    cd /usr/local/bin
+    ln -s texdef.pl texdef
+    ln -s texdef.pl latexdef
+    ln -s texdef.pl etexdef
+    ln -s texdef.pl luatexdef
+    ln -s texdef.pl lualatexdef
+    ln -s texdef.pl pdftexdef
+    ln -s texdef.pl pdflatexdef
+    ln -s texdef.pl xetexdef
+    ln -s texdef.pl xelatexdef
+    ln -s texdef.pl 'some other TeX format of your choice'
+\end{verbatim}
+
+\noindent or use the Makefile (defaults to |/usr/local/bin|)
+
+\begin{verbatim}
+    make install INSTALLDIR=/your/path
+\end{verbatim}
+
+\section{Examples}
+Show the definition of \Macro\chapter with different classes (\cls{article} (default), \cls{book} and \cls{scrbook}):
+
+\begin{verbatim}
+latexdef chapter
+latexdef -c book chapter
+latexdef -c scrbook chapter
+\end{verbatim}
+
+Show value of \Macro\textwidth with different class options:
+
+\begin{verbatim}
+latexdef -c [a4paper]{book} -v paperwidth
+latexdef -c [letter]{book}  -v paperwidth
+\end{verbatim}
+
+Show definition of TikZ's \Macro\draw outside and inside a \env{tikzpicture} environment:
+
+\begin{verbatim}
+latexdef -p tikz draw
+latexdef -p tikz --env tikzpicture draw
+\end{verbatim}
+
+Show definition of TikZ's \Macro\draw inside a node, inside a \cls{beamer} frame in \opt{handout} mode:
+
+\begin{verbatim}
+latexdef -c [handout]beamer -p tikz --env frame \
+    --env tikzpicture -b '\node {' -a '};' draw
+\end{verbatim}
+
+List all user level command sequences (macros) defined by the \pkg{xspace} LaTeX package:
+
+\begin{verbatim}
+latexdef -l -p xspace
+\end{verbatim}
+
+
+\section{Changelog}
+
+\subsection*{v1.9 from 2020/09/27}
+\begin{itemize}
+ \item Added support for develop versions of the formats, e.g.\ "latex-dev".
+\end{itemize}
+
+\subsection*{v1.8c from 2010/01/15}
+\begin{itemize}
+ \item Changed path printing format to native format of the used OS 
+      (e.g. under Windows file paths now habe `\textbackslash' instead of `/')
+\end{itemize}
+
+\subsection*{v1.8a from 2018/03/28}
+\begin{itemize}
+ \item Further fixes of braces in regexs to avoid ``Unescaped left brace in regex is deprecated'' warnings or errors.
+\end{itemize}
+
+\subsection*{v1.8 from 2018/03/25}
+\begin{itemize}
+ \item Added "dvitex" and "dvilatex" as formats. These will set DVI mode on "tex" or "latex".
+ \item Escaped further braces in regexs to avoid warnings or errors.
+ \item Added option "--texoptions" to allow the passing of compiler options for special cases.
+\end{itemize}
+
+\subsection*{v1.7c from 2017/12/09}
+\begin{itemize}
+ \item Fixed 'Unescaped left brace in regex is deprecated' warning.
+   Thanks goes to Paulo Cereda <cereda.paulo at gmail.com> for providing the patch.
+\end{itemize}
+
+\subsection*{v1.7b from 2012/05/15}
+\begin{itemize}
+ \item Added support for \Macro\chardef, \Macro\countdef, \Macro\dimendef, \Macro\mathchardef, \Macro\myskip, \Macro\skipdef and \Macro\toksdef.
+ \item Added support for \Macro\newbox, \Macro\newcount, \Macro\newdimen, \Macro\newif, \Macro\newinsert, \Macro\newread, \Macro\newskip, \Macro\newtoks, \Macro\newwrite.
+ \item Added support for \Macro\newif and \Macro\newcount.
+ \item Changed internal processing order to put more frequently used elements first.
+\end{itemize}
+
+\subsection*{v1.7a from 2012/05/08}
+\begin{itemize}
+ \item Fix for currfile v0.6.
+\end{itemize}
+
+\subsection*{v1.7 from 2012/05/07}
+\begin{itemize}
+ \item Changed "--help" to return status code 0.
+ \item Changed Windows default editor to texworks. Fixed If-statement.
+ \item Fixed bug which reported name of included subpackages.
+ \item Added option "--edit".
+ \item Added "--editor" option and better editor handling.
+ \item Added variable substitution for editor.
+ \item Added support for "TEXDEF_EDITOR" variable. Added Mac "open" command.
+ \item Fixed for behaviour when -s is used (correct name in message; do not follow protected macros etc.)
+\end{itemize}
+
+\subsection*{v1.6 from 2012/05/02}
+\begin{itemize}
+ \item Changed implementation of -E option to work better with new environment source code.
+ \item Added code to detect environment source definitions.
+ \item Added -E option.
+ \item Changed "flavour" to "format".
+ \item Added support for \Macro\let.
+ \item Added fallback for when the source code can not be found. Added support for -F with "latex.ltx".
+\end{itemize}
+
+\subsection*{v1.5 from 2012/04/29}
+\begin{itemize}
+ \item Added experimental --source option to show source code of the definitions.
+ \item Script now works correctly under MS Windows.
+\end{itemize}
+
+\subsection*{v1.4 from 2011/07/28}
+\begin{itemize}
+ \item Added -F option to display file path.
+ \item Added basic support for pdfkeys using -k and -K options.
+ \item Added -V option to print version numbers of LaTeX packages or classes.
+ \item Added '--tempdir' option to specify the location of the temporary files. Useful for debugging.
+\end{itemize}
+
+
+
+\end{document}
+


Property changes on: branches/branch2024.final/Master/texmf-dist/doc/support/texdef/texdef.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/branch2024.final/Master/texmf-dist/scripts/texdef/texdef.pl
===================================================================
--- branches/branch2024.final/Master/texmf-dist/scripts/texdef/texdef.pl	2025-02-17 20:47:14 UTC (rev 74067)
+++ branches/branch2024.final/Master/texmf-dist/scripts/texdef/texdef.pl	2025-02-17 20:47:28 UTC (rev 74068)
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
 ################################################################################
 #  texdef -- Show definitions of TeX commands
-#  Copyright (c) 2011-2020 Martin Scharrer <martin at scharrer-online.de>
+#  Copyright (c) 2011-2025 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
@@ -116,14 +116,14 @@
 my $BEGINENVSTR = '%s';
 my $ENDENVSTR   = '%s';
 
-my $VERSION = 'Version 1.9 -- 2020/09/27';
+my $VERSION = 'Version 1.10 -- 2025/02/17';
 sub usage {
     my $option = shift;
     my $ret    = ($option) ? 0 : 1;
 print << 'EOT';
 texdef -- Show definitions of TeX commands
-Version 1.9 -- 2020/09/27
-Copyright (C) 2011-2020  Martin Scharrer <martin at scharrer-online.de>
+Version 1.10 -- 2025/02/17
+Copyright (c) 2011-2025  Martin Scharrer <martin.scharrer at web.de>
 This program comes with ABSOLUTELY NO WARRANTY;
 This is free software, and you are welcome to redistribute it under certain conditions;
 
@@ -222,7 +222,7 @@
 }
 
 ## Define and process options
-Getopt::Long::Configure ("bundling");
+Getopt::Long::Configure ("bundling","no_ignore_case");
 GetOptions (
    'value|v!' => \$SHOWVALUE,
    'Environment|E!' => \$ISENVIRONMENT,



More information about the tex-live-commits mailing list.