summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-09-28 21:01:50 +0000
committerKarl Berry <karl@freefriends.org>2020-09-28 21:01:50 +0000
commitc1c6d73af9421082eecd62ac0b3760f97c87c43e (patch)
treecb38685b8f26985a209c256c8646f284401a701f /Master
parente6208354db843fb0d95197b86c0d4cddd8e7fd28 (diff)
texdef (28sep20)
git-svn-id: svn://tug.org/texlive/trunk@56466 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/support/texdef/CHANGELOG7
-rw-r--r--Master/texmf-dist/doc/support/texdef/README5
-rw-r--r--Master/texmf-dist/doc/support/texdef/texdef.pdfbin151692 -> 152172 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/texdef/texdef.pl34
-rw-r--r--Master/texmf-dist/source/support/texdef/texdef.tex16
5 files changed, 46 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/support/texdef/CHANGELOG b/Master/texmf-dist/doc/support/texdef/CHANGELOG
index 4cdb7aa1ca7..e9831d741ee 100644
--- a/Master/texmf-dist/doc/support/texdef/CHANGELOG
+++ b/Master/texmf-dist/doc/support/texdef/CHANGELOG
@@ -1,5 +1,12 @@
= 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.
diff --git a/Master/texmf-dist/doc/support/texdef/README b/Master/texmf-dist/doc/support/texdef/README
index b8b1554d988..cbeaa33c3b3 100644
--- a/Master/texmf-dist/doc/support/texdef/README
+++ b/Master/texmf-dist/doc/support/texdef/README
@@ -1,6 +1,6 @@
texdef -- Show definitions of TeX commands
-Version 1.8a -- 2019/03/28
-Copyright (C) 2011-2018 Martin Scharrer <martin@scharrer-online.de>
+Version 1.9 -- 2020/09/27
+Copyright (C) 2011-2020 Martin Scharrer <martin@scharrer-online.de>
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it under certain conditions;
@@ -13,6 +13,7 @@ Other program names are possible. See the 'tex' option. Command names do not ne
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).
diff --git a/Master/texmf-dist/doc/support/texdef/texdef.pdf b/Master/texmf-dist/doc/support/texdef/texdef.pdf
index 9a0cfd2bdd5..56f6f55f248 100644
--- a/Master/texmf-dist/doc/support/texdef/texdef.pdf
+++ b/Master/texmf-dist/doc/support/texdef/texdef.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/texdef/texdef.pl b/Master/texmf-dist/scripts/texdef/texdef.pl
index 8b7b69a4da6..ac84c1f29cb 100755
--- a/Master/texmf-dist/scripts/texdef/texdef.pl
+++ b/Master/texmf-dist/scripts/texdef/texdef.pl
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
################################################################################
# texdef -- Show definitions of TeX commands
-# Copyright (c) 2011-2012 Martin Scharrer <martin@scharrer-online.de>
+# Copyright (c) 2011-2020 Martin Scharrer <martin@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
@@ -116,14 +116,14 @@ my $ISCONTEXT = 0;
my $BEGINENVSTR = '%s';
my $ENDENVSTR = '%s';
-my $VERSION = 'Version 1.8a -- 2018/03/28';
+my $VERSION = 'Version 1.9 -- 2020/09/27';
sub usage {
my $option = shift;
my $ret = ($option) ? 0 : 1;
print << 'EOT';
texdef -- Show definitions of TeX commands
-Version 1.8a -- 2019/03/28
-Copyright (C) 2011-2018 Martin Scharrer <martin@scharrer-online.de>
+Version 1.9 -- 2020/09/27
+Copyright (C) 2011-2020 Martin Scharrer <martin@scharrer-online.de>
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it under certain conditions;
@@ -136,6 +136,7 @@ Other program names are possible. See the 'tex' option. Command names do not ne
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).
@@ -306,23 +307,23 @@ if ($EDIT && !$EDITOR) {
}
## Format specific settings
-if ($TEX =~ /latex$/) {
+if ($TEX =~ /latex(?:-dev)?$/) {
$ISLATEX = 1;
$BEGINENVSTR = '\begin{%s}' . "\n";
$ENDENVSTR = '\end{%s}' . "\n";
}
-elsif ($TEX =~ /tex$/) {
+elsif ($TEX =~ /tex(?:-dev)?$/) {
$ISTEX = 1;
$BEGINENVSTR = '\%s' . "\n";
$ENDENVSTR = '\end%s' . "\n";
}
-elsif ($TEX =~ /context$/) {
+elsif ($TEX =~ /context(?:-dev)?$/) {
$ISCONTEXT = 1;
$BEGINENVSTR = '\start%s' . "\n";
$ENDENVSTR = '\stop%s' . "\n";
}
-if ($TEX =~ /^dvi((la)?tex)$/) {
+if ($TEX =~ /^dvi((la)?tex)(?:-dev)?$/) {
$TEX = $1;
$TEXOPTIONS .= ' -output-format=dvi '
}
@@ -774,6 +775,16 @@ sub print_orig_def {
return $found;
}
+sub cleanpath {
+ my $path = shift;
+ chomp $path;
+ if ($path =~ /[a-z]:/i) {
+ $path =~ s/\//\\/g;
+ }
+ return $path;
+}
+
+
open (my $texpipe, '-|', "$TEX $TEXOPTIONS $USERTEXOPTIONS \"$TMPFILE\" ");
my $name = '';
@@ -786,21 +797,20 @@ while (<$texpipe>) {
my $line = $1;
if ($FINDDEF == 2) {
if ($line =~ /first defined in "(.*)"/) {
- my $path = `kpsewhich "$1"`;
- chomp $path;
+ my $path = cleanpath(`kpsewhich "$1"`);
$line =~ s/$1/$path/;
}
}
if ($PRINTORIGDEF) {
if ($line =~ /first defined in "(.*)"/) {
my $file = $1;
- my $path = `kpsewhich "$file"`;
+ my $path = cleanpath(`kpsewhich "$file"`);
chomp $path;
$origdeffound = print_orig_def($cmd, $file, $path);
}
elsif ($line =~ /is defined by \(La\)TeX./) {
my $file = 'latex.ltx';
- my $path = `kpsewhich "$file"`;
+ my $path = cleanpath(`kpsewhich "$file"`);
chomp $path;
$file = $path if $FINDDEF > 1;
$origdeffound = print_orig_def($cmd, $file, $path);
diff --git a/Master/texmf-dist/source/support/texdef/texdef.tex b/Master/texmf-dist/source/support/texdef/texdef.tex
index 744814822b6..765a4f67757 100644
--- a/Master/texmf-dist/source/support/texdef/texdef.tex
+++ b/Master/texmf-dist/source/support/texdef/texdef.tex
@@ -4,8 +4,8 @@
\title{The \textsf{texdef} script}
\author{Martin Scharrer}
\email{martin@scharrer-online.de}
-\repository{https://bitbucket.org/martin_scharrer/texdef}
-\date{Version 1.8a -- 2018/03/28}
+\repository{https://sourceforge.net/projects/texdef/}
+\date{Version 1.9 -- 2020/09/27}
\makeatletter
\DeclareRobustCommand{\LATeX}{%
@@ -53,6 +53,7 @@ The following options can be used:
\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
@@ -201,6 +202,17 @@ latexdef -l -p xspace
\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.