summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty31
1 files changed, 21 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty
index f921666ae5a..0a91285f3d4 100644
--- a/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty
+++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty
@@ -29,9 +29,11 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackageSVN
[ydoc-desc]
- {$Id: ydoc.dtx 1847 2010-04-10 10:57:11Z martin $}
- [v0.1alpha]
+ {$Id: ydoc.dtx 1921 2010-12-20 21:55:39Z martin $}
+ [v0.3alpha]
[ydoc package to describe macros, environments, options etc.]
+\RequirePackage{hyperref}
+\hypersetup{colorlinks=true,pdfborder=0 0 0,pdfborderstyle={}}
\RequirePackage{xcolor}
\definecolor{macrodesc}{rgb}{0.0,0.0,0.8}
\definecolor{macroimpl}{rgb}{0.0,0.0,0.4}
@@ -87,11 +89,13 @@
}}%
}
\def\sarg{{\sargstyle{*}}}
-\def\pkg{\texttt}
-\def\cls{\texttt}
-\def\env{\texttt}
-\def\cs#1{\texttt{\textbackslash #1}}
-\def\opt{\textsf}
+\RequirePackage{etoolbox}
+\newrobustcmd*\pkg{\texttt}
+\newrobustcmd*\cls{\texttt}
+\newrobustcmd*\env{\texttt}
+\newrobustcmd*\opt{\textsf}
+\newrobustcmd*\cs[1]{\texttt{\textbackslash #1}}
+\newrobustcmd*\cmd[1]{\texttt{{\escapechar=92\string#1}}}
\def\macrodescstyle{\ttfamily\bfseries\color{macrodesc}}
\def\macroargsstyle{\ttfamily}
\def\envcodestyle{\ttfamily}
@@ -217,8 +221,14 @@
}
\def\Describe@Macro#1{%
\endgroup
+ \edef\name{\expandafter\@gobble\string#1}%
+ \global\@namedef{href@desc@\name}{}%
+ \immediate\write\@mainaux{%
+ \global\noexpand\@namedef{href@desc@\name}{}%
+ }%
\hbox\y@bgroup
- \PrintMacroName{#1}%
+ \@ifundefined{href@impl@\name}{}{\hyperlink{impl:\name}}%
+ {\hypertarget{desc:\name}{\PrintMacroName{#1}}}%
\macroargsstyle
\read@Macro@arg
}
@@ -238,9 +248,10 @@
}
\newcommand*\MacroArgs{%
\begingroup
- \let\end@Macro@args\endgroup
+ \def\end@Macro@args{\endgroup\xspace}%
\read@Macro@arg
}
+\RequirePackage{xspace}
\def\DescribeMacros{%
\begingroup
\let\Macro\@Macro
@@ -359,7 +370,7 @@
\def\PrintEnvName#1#2{%
\strut
\string#1\braceleft
- {\macrodescstyle#2}%
+ {\macrodescstyle#2\strut}%
\braceright
}
\def\PrintMacros{%