summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ydoc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-22 00:05:19 +0000
committerKarl Berry <karl@freefriends.org>2010-12-22 00:05:19 +0000
commit01cfc3264298d1b9982c3955ff58a3f7b593d7b5 (patch)
treeab8540e0b8468d44c4a22e4ad8b5be3d3233d441 /Master/texmf-dist/source/latex/ydoc
parent4d94830abaa19630ce446cf73cd5d2dca75dfc2f (diff)
ydoc (21dec10)
git-svn-id: svn://tug.org/texlive/trunk@20823 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/ydoc')
-rw-r--r--Master/texmf-dist/source/latex/ydoc/ydoc.dtx89
1 files changed, 71 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/latex/ydoc/ydoc.dtx b/Master/texmf-dist/source/latex/ydoc/ydoc.dtx
index 9335c986862..757c6372374 100644
--- a/Master/texmf-dist/source/latex/ydoc/ydoc.dtx
+++ b/Master/texmf-dist/source/latex/ydoc/ydoc.dtx
@@ -35,8 +35,8 @@
%<expl> [ydoc-expl]
%<doc> [ydoc-doc]
%<*driver|class|package|code|desc|expl|doc>
- {$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]
%</driver|class|package|code|desc|expl|doc>
%<class> [ydoc class: document LaTeX class and packages]
%<package> [ydoc package: document LaTeX class and packages]
@@ -65,6 +65,7 @@
\caption
}
+\hypersetup{colorlinks=true,linkcolor=green}
\begin{document}
\DocInput{ydoc.dtx}
\PrintChanges
@@ -73,7 +74,7 @@
%</driver>
% \fi
%
-% \CheckSum{1151}
+% \CheckSum{1237}
%
% \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
@@ -394,6 +395,11 @@
%
% \subsection{Macros and Environments to document Implementations}
%
+% \begin{macrocode}
+\RequirePackage{hyperref}
+\hypersetup{colorlinks=true,pdfborder=0 0 0,pdfborderstyle={}}
+% \end{macrocode}
+%
% \subsubsection{Color and style definitions}
% \begin{macrocode}
\RequirePackage{xcolor}
@@ -586,7 +592,7 @@
% \begin{macro}{\macro@impl@argline}[2]{argument number}{argument description}
% \begin{macrocode}
\def\macro@impl@argline#1#2{%
- \par{\texttt{\##1}:~#2}%
+ \par{\texttt{\##1}:~#2\strut}%
}
% \end{macrocode}
% \end{macro}
@@ -608,7 +614,7 @@
% \begin{environment}{macro}[1]{implemented macro}
% \begin{macrocode}
\def\macro#1{%
- \PrintMacroImplName{#1}%
+ \PrintMacroImpl{#1}%
\@ifnextchar[%]
{\macro@impl@args}%
{}%
@@ -629,16 +635,37 @@
% \end{macrocode}
% \end{environment}
%
-% \begin{macro}{\PrintMacroImplName}[1]{macro (token)}
+% \begin{macro}{\PrintMacroImpl}[1]{macro (token)}
% \begin{macrocode}
-\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
}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\PrintMacroImplName}[1]{macro (token)}
+% \begin{macrocode}
+\def\PrintMacroImplName#1{%
+ \implstyle{\string#1\strut}%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\PrintEnvImplName}[1]{environment name}
% test
% \begin{macrocode}
@@ -813,9 +840,16 @@
% \end{macro}
%
% \begin{macro}{\GetFileInfo}
+% Current implementation taken from \pkg{doc} package.
% \begin{macrocode}
\providecommand*\GetFileInfo[1]{%
- \PackageWarning{ydoc}{Get File Info not implemented yet!}{}{}%
+ \def\filename{#1}%
+ \def\@tempb##1 ##2 ##3\relax##4\relax{%
+ \def\filedate{##1}%
+ \def\fileversion{##2}%
+ \def\fileinfo{##3}}%
+ \edef\@tempa{\csname ver@#1\endcsname}%
+ \expandafter\@tempb\@tempa\relax? ? \relax\relax
}
% \end{macrocode}
% \end{macro}
@@ -860,6 +894,11 @@
% \fi
% \subsection{Description Macros and Environments}
%
+% \begin{macrocode}
+\RequirePackage{hyperref}
+\hypersetup{colorlinks=true,pdfborder=0 0 0,pdfborderstyle={}}
+% \end{macrocode}
+%
% \subsubsection{Color and style definitions}
% \begin{macrocode}
\RequirePackage{xcolor}
@@ -998,19 +1037,26 @@
% \begin{macro}{\pkg}
% \begin{macro}{\cls}
% \begin{macro}{\env}
-% \begin{macro}{\cs}
% \begin{macro}{\opt}
% \begin{macrocode}
-\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}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+%
+% \begin{macro}{\cs}
+% \begin{macro}{\cmd}
+% \begin{macrocode}
+\newrobustcmd*\cs[1]{\texttt{\textbackslash #1}}
+\newrobustcmd*\cmd[1]{\texttt{{\escapechar=92\string#1}}}
+% \end{macrocode}
+% \end{macro}
% \end{macro}
%
% \subsubsection{Text Formatting Styles}
@@ -1343,8 +1389,14 @@
% \begin{macrocode}
\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
}
@@ -1390,9 +1442,10 @@
% \begin{macrocode}
\newcommand*\MacroArgs{%
\begingroup
- \let\end@Macro@args\endgroup
+ \def\end@Macro@args{\endgroup\xspace}%
\read@Macro@arg
}
+\RequirePackage{xspace}
% \end{macrocode}
% \end{macro}
%
@@ -1617,7 +1670,7 @@
\def\PrintEnvName#1#2{%
\strut
\string#1\braceleft
- {\macrodescstyle#2}%
+ {\macrodescstyle#2\strut}%
\braceright
}
% \end{macrocode}