diff options
author | Karl Berry <karl@freefriends.org> | 2010-12-22 00:05:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-12-22 00:05:19 +0000 |
commit | 01cfc3264298d1b9982c3955ff58a3f7b593d7b5 (patch) | |
tree | ab8540e0b8468d44c4a22e4ad8b5be3d3233d441 /Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty | |
parent | 4d94830abaa19630ce446cf73cd5d2dca75dfc2f (diff) |
ydoc (21dec10)
git-svn-id: svn://tug.org/texlive/trunk@20823 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty index 2581ec83ec3..f07e180f963 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty @@ -29,9 +29,11 @@ \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackageSVN [ydoc-code] - {$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 document macro code] +\RequirePackage{hyperref} +\hypersetup{colorlinks=true,pdfborder=0 0 0,pdfborderstyle={}} \RequirePackage{xcolor} \definecolor{macroimpl}{rgb}{0.0,0.0,0.4} \@ifundefined{ydocwrite}{% @@ -152,7 +154,7 @@ \unskip\par\noindent\ignorespaces } \def\macro@impl@argline#1#2{% - \par{\texttt{\##1}:~#2}% + \par{\texttt{\##1}:~#2\strut}% } \def\macro@impl@arg#1{% \advance\macro@impl@curarg by\@ne\relax @@ -164,7 +166,7 @@ \fi } \def\macro#1{% - \PrintMacroImplName{#1}% + \PrintMacroImpl{#1}% \@ifnextchar[%] {\macro@impl@args}% {}% @@ -177,11 +179,27 @@ {}% } \def\endenvironment{} -\def\PrintMacroImplName#1{% +\def\PrintMacroImpl#1{% \par\bigskip\noindent - \hbox{\hspace*{\descindent}\fbox{{\implstyle{\string#1}}}}% + \hbox{% + \edef\name{\expandafter\@gobble\string#1}% + \global\@namedef{href@impl@\name}{}% + \immediate\write\@mainaux{% + \global\noexpand\@namedef{href@impl@\name}{}% + }% + \raisebox{4ex}[4ex]{\hypertarget{impl:\name}{}}% + \hspace*{\descindent}\fbox{% + \hspace*{\descsep}% + \@ifundefined{href@desc@\name}{}{\hyperlink{desc:\name}}% + {\PrintMacroImplName{#1}}% + \hspace*{\descsep}% + }% + }% \par\medskip\noindent } +\def\PrintMacroImplName#1{% + \implstyle{\string#1\strut}% +} \def\PrintEnvImplName#1{% \par\bigskip\noindent \hbox{\hspace*{\descindent}\fbox{{\implstyle{#1}}}}% |