From 2d0760c2d539075994a651bbcbddb1c1f97bee4d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 14 Mar 2008 00:23:51 +0000 Subject: new latex package show2e (13mar08) git-svn-id: svn://tug.org/texlive/trunk@6959 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/show2e/README | 37 +++ Master/texmf-dist/doc/latex/show2e/show2e-fr.pdf | Bin 0 -> 37333 bytes Master/texmf-dist/doc/latex/show2e/show2e.pdf | Bin 0 -> 46012 bytes Master/texmf-dist/source/latex/show2e/show2e.dtx | 352 +++++++++++++++++++++++ Master/texmf-dist/tex/latex/show2e/show2e.sty | 55 ++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 + Master/tlpkg/tlpsrc/show2e.tlpsrc | 2 + 8 files changed, 448 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/show2e/README create mode 100644 Master/texmf-dist/doc/latex/show2e/show2e-fr.pdf create mode 100644 Master/texmf-dist/doc/latex/show2e/show2e.pdf create mode 100644 Master/texmf-dist/source/latex/show2e/show2e.dtx create mode 100644 Master/texmf-dist/tex/latex/show2e/show2e.sty create mode 100644 Master/tlpkg/tlpsrc/show2e.tlpsrc (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/show2e/README b/Master/texmf-dist/doc/latex/show2e/README new file mode 100644 index 00000000000..9b655724e49 --- /dev/null +++ b/Master/texmf-dist/doc/latex/show2e/README @@ -0,0 +1,37 @@ + The show2e package + + \show variants for LaTeX2e commands + + Manuel P\'egouri\'e-Gonnard (mpg@elzevir.fr) + + +Presentation +------------ + +This small package aims at making debugging (esp. in an interactive way) +easier, by providing \show variants suited to \LaTeXe's commands (with +optional arguments or robust) and environments: those variants also +display the internal macros used by such commands, if any. The \showcs +variant helps with macros with exotic names. + +Contents +-------- + +show2e.sty: the package itself +show2e.pdf: the (English) documentation and documented code +show2e-fr.pdf: the French documentation + +show2e.dtx: source for both documentations and package + +Version info +------------ + +2008-03-13 v1.0 first release + +License +------- + +This material is subject to the LaTeX Project Public License. See +http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the +details of that license. + diff --git a/Master/texmf-dist/doc/latex/show2e/show2e-fr.pdf b/Master/texmf-dist/doc/latex/show2e/show2e-fr.pdf new file mode 100644 index 00000000000..9f7ac0b2ada Binary files /dev/null and b/Master/texmf-dist/doc/latex/show2e/show2e-fr.pdf differ diff --git a/Master/texmf-dist/doc/latex/show2e/show2e.pdf b/Master/texmf-dist/doc/latex/show2e/show2e.pdf new file mode 100644 index 00000000000..2a8af836ac4 Binary files /dev/null and b/Master/texmf-dist/doc/latex/show2e/show2e.pdf differ diff --git a/Master/texmf-dist/source/latex/show2e/show2e.dtx b/Master/texmf-dist/source/latex/show2e/show2e.dtx new file mode 100644 index 00000000000..0b2c2c43519 --- /dev/null +++ b/Master/texmf-dist/source/latex/show2e/show2e.dtx @@ -0,0 +1,352 @@ +% +% \iffalse /!\ this file contains non-ascii -- encoding is utf-8 /!\ +% +% show2e package by Manuel P\'egouri\'e-Gonnard +% -------------------------------------------------------------- +% +% This work may be distributed and/or modified under the conditions of +% the LaTeX Project Public License, either version 1.3c of this license +% or (at your option) any later version. The latest version of this +% license is in: +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.3c or later is part of all distributions of LaTeX +% version 2006/05/20 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The current maintainer of this work is Manuel P\'egouri\'e-Gonnard. +% +% This work consists of the file show2e.dtx and the derived files +% show2e.sty, show2e.pdf and show2e-fr.pdf. +% +% +%<*gobble> +\ProvidesFile{show2e.dtx} +% +%\NeedsTeXFormat{LaTeX2e} +%\ProvidesPackage{show2e} +%<*package> +% \fi +% \ProvidesFile{show2e.dtx} + [2008/03/13 v1.0 \space \show variants for latex2e \space (mpg)] +% \iffalse +% +% \fi +% \CheckSum{85} +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% \iffalse +%<*gobble> +\begingroup +% +%<*batchfile> +\input docstrip +\keepsilent +\preamble + +show2e package by Manuel P\string\'egouri\string\'e-Gonnard % + +This is a generated file. See show2e.dtx for license information. + +\endpreamble +\askforoverwritefalse +%\generate{\file{show2e.ins}{\from{show2e.dtx}{batchfile}}} +%\generate{\file{show2e.drv}{\from{show2e.dtx}{driver}}} +\generate{\file{show2e.sty}{\from{show2e.dtx}{package}}} +\generate{\file{show2e-fr.drv}{\from{show2e.dtx}{pilote}}} +% +%<*gobble> +\endgroup +% +%<*driver|pilote> +\documentclass[oneside, a4paper]{ltxdoc} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{lmodern} +\usepackage[babel=true, expansion=false]{microtype} +\usepackage{fixltx2e} +\expandafter\newif\csname iffrenchdoc\endcsname % cachez ce if... +%\frenchdoctrue +% +%<*gobble> +\iffrenchdoc +% +%<*pilote> +\usepackage[lmargin=4.5cm, rmargin=3cm]{geometry} +\OnlyDescription +\usepackage[english, french]{babel} +\FrenchFootnotes \AddThinSpaceBeforeFootnotes +\newcommand*\eng[1]{\emph{\foreignlanguage{english}{#1}}} +\usepackage[bookmarks=false]{hyperref} +\hypersetup{% + pdftitle=L'extension show2e + pdfsubject=Une DESCRIPTION} +% +%<*gobble> +\else +% +%<*driver> +\AlsoImplementation +\usepackage[english]{babel} +\usepackage[bookmarks=false]{hyperref} +\hypersetup{% + pdftitle=The show2e package, + pdfsubject=A DESCRIPTION} +\settowidth\MacroIndent{\rmfamily\scriptsize 000\ } +\setlength\MacroTopsep{0pt} +\setcounter{tocdepth}{1} +% +%<*gobble> +\fi +% +%<*driver|pilote> +\hypersetup{% + colorlinks=true, linkcolor=black, urlcolor=black, + pdfauthor=Manuel Pégourié-Gonnard} +\newcommand\file{\nolinkurl} +\newcommand\pf{\textsf} +\newcommand\optstar{\meta{$*$}} +\newcommand\topcs[1]{\texorpdfstring{\cs{#1}}{#1}} +\begin{document} + \DocInput{show2e.dtx} +\end{document} +% +%<*package> +% \fi +% +% \GetFileInfo{show2e.dtx} +% +% \title{\iffrenchdoc L'extension \pf{show2e}\else The \pf{show2e} package\fi} +% \author{Manuel Pégourié-Gonnard\\ +% \href{mailto:mpg@elzevir.fr}{mpg@elzevir.fr}} +% \date{\fileversion\ (\filedate)} +% +% \maketitle +% +% \iffrenchdoc\else +% \bigbreak\noindent +% \emph{Important note for French readers}: the file +% \file{show2e-fr.pdf} contains the same documenation in French. +% \fi +% +% \section{Introduction} +% +% \iffrenchdoc +% +% Cette toute petite extension a pour but de simplifier légèrement le +% déboguage, notamment interactif, en fournissant quelques variantes de +% |\show| adaptées aux objets introduits par \LaTeXe{} : commandes à +% arguments optionnels, commandes robustes, environnements. +% +% \else +% +% This small package aims at making debugging (esp.\@ in an interactive +% way) easier, by providing |\show| variants suited to \LaTeXe's +% commands (with optional arguments or robust) and environments. +% +% \fi +% +% \section{Usage} +% +% \iffrenchdoc +% +% \DescribeMacro{\showcmd} +% La commande |\showcmd| sert à afficher une commande comme le ferait la +% primitive |\show| de \TeX, mais en effectuant en plus quelques tests +% pour savoir si la commande est une macro qui prend un argument +% optionnel (comme on peut en définir avec |\newcommand|), ou qui a été +% définie comme robuste avec |\DeclareRobustCommand|, ou ultérieurement +% rendue robuste par |\MakeRobust| (fourni par \pf{fixltx2e}). Dans ce +% cas, la commande utilise aussi une ou plusieurs macros interne, que +% |\showcmd| affichera automatiquement pour vous. +% +% \DescribeMacro{\showcs} +% \DescribeMacro{\showenv} +% La variante |\showcs| fonctionne de la même manière, mais prend comme +% argument le \emph{nom} de la commande entre accolades : les deux +% formes |\showcmd\truc| et |\showcs{truc}| sont donc équivalentes. +% Enfin, |\showenv| montre les definitions de début et de fin d'un +% environnement. +% +% \medbreak +% +% C'est tout pour la description des commandes. Il faut bien remarquer +% qu'elles ne sont pas infaillibles, et ne fonctionnent qu'avec les +% commandes crées par les macros standard de \LaTeXe{} (et celles de +% \pf{xargs}, d'ailleurs) : elles n'essayent pas de prendre en compte +% des usages directs de |\@ifnextchar|, ni même de |\@ifstar| (pour le +% moment). +% +% Pour les curieux, le code commenté apparaît à la fin de la version +% anglaise de cette documentation +% +% \begin{center}\large +% C'est tout pour cette fois ! \\ +% Amusez-vous bien avec \LaTeX{} ! +% \end{center} +% +% \else +% +% \DescribeMacro{\showcmd} +% The |\showcmd| command displays a command like \TeX's |\show|, but +% with a little bonus: it also checks if the macros takes an optional +% argument (like some commands defined with |\newcommand| do), or was +% made robust by using |\DeclareRobustCommand| or \pf{fixltx2e}'s +% |\MakeRobust|. Such commands use other(s) internal command(s), which +% |\showcmd| will also display for you. +% +% \DescribeMacro{\showcs} +% \DescribeMacro{\showenv} +% The |\showcs| command does the same thing as |\showcmd|, but takes the +% command's \emph{name} as its argument: |\showcmd\truc| is equivalent +% to |\showcs{truc}|. Finally, the |\showenv| command does the same for +% environments. +% +% \medbreak +% +% The previous commands will only work on simple commands defined with +% standard \LaTeXe{} commands (or, by the way, with \pf{xargs}): they +% do not try to guess such things as a direct use of |\@ifnextchar|, or +% even |\@ifstar| (at the moment). +% +% \fi +% +% \StopEventually{} +% +% \section{Implementation} +% +% \begin{macro}{\showcmd} +% The |\showcmd| macro just checks to beginning of the meaning of is +% argument, in order to decide if there are any internal macro to +% show too. It also sets a default value for |\escapechar| for sake of +% readability. +% \begin{macrocode} +\newcommand* \showcmd [1] {% + \begingroup \escapechar92 + \show#1% + \showe@if@meaning@prefix@NnT #1 {\x@protect} + {\showe@show@space@macro@N #1}% + \showe@if@meaning@prefix@NnT #1 {\protect} + {\showe@show@space@macro@N #1}% + \showe@if@meaning@prefix@NoT #1 {\string\@protected@testopt} + {\showe@show@backslash@macro@N #1}% + \endgroup} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\showcs} +% \begin{macro}{\showenv} +% The two variants are only wrappers for |\showcmd|. +% \begin{macrocode} +\newcommand* \showcs [1] {% + \expandafter \showcmd \csname#1\endcsname} +% \end{macrocode} +% \begin{macrocode} +\newcommand* \showenv [1] {% + \showcs{#1}% + \expandafter \show\csname end#1\endcsname} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\showe@show@backslash@macro@N} +% \begin{macro}{\showe@show@space@macro@N} +% Macros for showing the internal macros found, either with |\show| or +% with |\showcmd|. +% \begin{macrocode} +\newcommand* \showe@show@backslash@macro@N [1] {% + \expandafter \show \csname\string#1\endcsname} +% \end{macrocode} +% \begin{macrocode} +\newcommand* \showe@show@space@macro@N [1] {% + \begingroup \escapechar\m@ne \expandafter\endgroup + \expandafter \showcmd \csname\string#1 \endcsname} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\showe@if@meaning@prefix@NnT} +% \begin{macro}{\showe@if@meaning@prefix@NoT} +% Check if the second argument is a prefix for the meaning of the first. +% Variant expanding the second argument once before (named in l3 style). +% \begin{macrocode} +\newcommand* \showe@if@meaning@prefix@NnT [2] {% + \def \@tempa {#2}% + \showe@if@prefix@ooT {\meaning #1} {\meaning \@tempa}} +% \end{macrocode} +% \begin{macrocode} +\newcommand* \showe@if@meaning@prefix@NoT [2] {% + \expandafter \showe@if@meaning@prefix@NnT + \expandafter #1% + \expandafter {#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\showe@if@prefix@nnT} +% \begin{macro}{\showe@if@prefix@ooT} +% Check if string 2 is a prefix of string 1. Variant expanding the two +% arguments once before checking. +% \begin{macrocode} +\newcommand* \showe@if@prefix@nnT [2] {% + \def \@tempa ##1#2##2\@nil {% + \ifx\empty##2\empty + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi}% + \@tempa#1#2\@nil} +% \end{macrocode} +% \begin{macrocode} +\newcommand* \showe@if@prefix@ooT [2] {% + \edef \@tempa {{#1}{#2}}% + \expandafter \showe@if@prefix@nnT\@tempa} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \bigskip +% \begin{center}\Large +% That's all folks!\\ +% Happy \TeX ing! +% \end{center} +% +% \Finale +% +% \iffalse +% +%<*batchfile> +% \fi +% \begingroup\obeyspaces +% \typeout{*****************************************************} +% \typeout{* *} +% \typeout{* To finish the installation you have to move the *} +% \typeout{* following file into a directory searched by TeX: *} +% \typeout{* *} +% \typeout{* show2e.sty *} +% \typeout{* *} +% \typeout{* Documentation is in show2e.dvi or show2e.pdf *} +% \typeout{* *} +% \typeout{* To produce the french documentation, run *} +% \typeout{* (pdf)latex show2e-fr.drv *} +% \typeout{* *} +% \typeout{* Happy TeXing! *} +% \typeout{* *} +% \typeout{*****************************************************} +% \endgroup +% \iffalse +% +% \fi +\endinput diff --git a/Master/texmf-dist/tex/latex/show2e/show2e.sty b/Master/texmf-dist/tex/latex/show2e/show2e.sty new file mode 100644 index 00000000000..20709b2b66d --- /dev/null +++ b/Master/texmf-dist/tex/latex/show2e/show2e.sty @@ -0,0 +1,55 @@ +%% +%% This is file `show2e.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% show2e.dtx (with options: `package') +%% +%% show2e package by Manuel P\'egouri\'e-Gonnard +%% This is a generated file. See show2e.dtx for license information. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{show2e} + [2008/03/13 v1.0 \space \show variants for latex2e \space (mpg)] +\newcommand* \showcmd [1] {% + \begingroup \escapechar92 + \show#1% + \showe@if@meaning@prefix@NnT #1 {\x@protect} + {\showe@show@space@macro@N #1}% + \showe@if@meaning@prefix@NnT #1 {\protect} + {\showe@show@space@macro@N #1}% + \showe@if@meaning@prefix@NoT #1 {\string\@protected@testopt} + {\showe@show@backslash@macro@N #1}% + \endgroup} +\newcommand* \showcs [1] {% + \expandafter \showcmd \csname#1\endcsname} +\newcommand* \showenv [1] {% + \showcs{#1}% + \expandafter \show\csname end#1\endcsname} +\newcommand* \showe@show@backslash@macro@N [1] {% + \expandafter \show \csname\string#1\endcsname} +\newcommand* \showe@show@space@macro@N [1] {% + \begingroup \escapechar\m@ne \expandafter\endgroup + \expandafter \showcmd \csname\string#1 \endcsname} +\newcommand* \showe@if@meaning@prefix@NnT [2] {% + \def \@tempa {#2}% + \showe@if@prefix@ooT {\meaning #1} {\meaning \@tempa}} +\newcommand* \showe@if@meaning@prefix@NoT [2] {% + \expandafter \showe@if@meaning@prefix@NnT + \expandafter #1% + \expandafter {#2}} +\newcommand* \showe@if@prefix@nnT [2] {% + \def \@tempa ##1#2##2\@nil {% + \ifx\empty##2\empty + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi}% + \@tempa#1#2\@nil} +\newcommand* \showe@if@prefix@ooT [2] {% + \edef \@tempa {{#1}{#2}}% + \expandafter \showe@if@prefix@nnT\@tempa} +\endinput +%% +%% End of file `show2e.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 673869a2ab2..978ae9f39af 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -152,7 +152,7 @@ my @WorkingTLP = qw( scalebar schedule scientificpaper sciposter screenplay script sdrt sectionbox sectsty semantic semaphor seminar semioneside seqsplit setspace sf298 sffms sfg sfmath sgame shadbox shapepar - shipunov shorttoc showdim showexpl showlabels + shipunov shorttoc show2e showdim showexpl showlabels si sidecap sides siggraph simplecv simplewick SIstyle SIunits skak skaknew slideshow smalltableof smartref snapshot songbook sort-by-letters soul sparklines spie diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index efc02ae8388..c80eece275f 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -441,6 +441,7 @@ depend shapepar depend shipunov depend shortlst depend shorttoc +depend show2e depend showdim depend showexpl depend showlabels diff --git a/Master/tlpkg/tlpsrc/show2e.tlpsrc b/Master/tlpkg/tlpsrc/show2e.tlpsrc new file mode 100644 index 00000000000..44fddffff8a --- /dev/null +++ b/Master/tlpkg/tlpsrc/show2e.tlpsrc @@ -0,0 +1,2 @@ +name show2e +category Package -- cgit v1.2.3