summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-02-18 00:16:15 +0000
committerKarl Berry <karl@freefriends.org>2011-02-18 00:16:15 +0000
commitb2ddfab321304389582ff4e049ef73f818d12628 (patch)
tree83e297d7292c853cef3187e255a92c29076eded9 /Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty
parent9ea95092c2e062767ff36b7a4842d0465f30d695 (diff)
ydoc (17feb11)
git-svn-id: svn://tug.org/texlive/trunk@21443 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty32
1 files changed, 31 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty
index 607efc48538..43d9be9330c 100644
--- a/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty
+++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty
@@ -29,11 +29,12 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackageSVN
[ydoc-desc]
- {$Id: ydoc.dtx 2073 2011-01-26 11:25:50Z martin $}
+ {$Id: ydoc.dtx 2163 2011-02-16 17:19:27Z martin $}
[v0.4alpha]
[ydoc package to describe macros, environments, options etc.]
\RequirePackage{hyperref}
\hypersetup{colorlinks=true,pdfborder=0 0 0,pdfborderstyle={}}
+\RequirePackage{shortvrb}
\RequirePackage{xcolor}
\definecolor{macrodesc}{rgb}{0.0,0.0,0.8}
\definecolor{macroimpl}{rgb}{0.0,0.0,0.4}
@@ -237,9 +238,29 @@
\hbox\y@bgroup
\@ifundefined{href@impl@\name}{}{\hyperlink{impl:\name}}%
{\hypertarget{desc:\name}{\PrintMacroName{#1}}}%
+ \ydoc@macrocatcodes
\macroargsstyle
\read@Macro@arg
}
+\def\ydoc@macrocatcodes{%
+ \ydoc@short@AlsoMacro
+}
+\newcommand*\MakeShortMacroArgs{%
+ \@ifstar
+ {\@MakeShortMacroArgs\Macro}%
+ {\@MakeShortMacroArgs\MacroArgs}%
+}
+\def\@MakeShortMacroArgs#1#2{%
+ \MakeShortVerb{#2}
+ \catcode`#2\active
+ \begingroup
+ \catcode`\~\active
+ \lccode`\~`#2\relax
+ \lowercase{\endgroup\gdef~{\bgroup\let~\egroup#1}}%
+}
+\newcommand*\DeleteShortMacroArgs[1]{%
+ \DeleteShortVerb{#1}%
+}
\newcommand*\Macro{\MacroArgs\AlsoMacro}
\def\@Macro{%
\begingroup\makeatletter
@@ -254,9 +275,17 @@
\PrintMacroName{#1}%
\read@Macro@arg
}
+\begingroup
+\catcode`\|\active
+\gdef\ydoc@short@AlsoMacro{%
+ \catcode`\|\active
+ \let|\AlsoMacro
+}
+\endgroup
\newcommand*\MacroArgs{%
\begingroup
\def\end@Macro@args{\endgroup\xspace}%
+ \ydoc@macrocatcodes
\macroargsstyle
\read@Macro@arg
}
@@ -338,6 +367,7 @@
\let\PrintEnv\PrintSubEnv
\hbox\y@bgroup
\PrintEnvName{\begin}{\DescribeEnv@name}%
+ \ydoc@macrocatcodes
\macroargsstyle
\read@Macro@arg
}