diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty | 95 |
1 files changed, 89 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty index ba8407ddd98..b9dcc943a96 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty @@ -6,6 +6,7 @@ %% %% ydoc.dtx (with options: `doc') %% +%% %% Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de> %% WWW: http://latex.scharrer-online.de/ %% @@ -25,13 +26,12 @@ %% and the derived file ydoc.cls, ydoc.sty, ydoc-code.sty, %% ydoc-expl.sty and ydoc-desc.sty. %% -\RequirePackage{svn-prov}[2010/04/03] \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackageSVN - [ydoc-doc] - {$Id: ydoc.dtx 2163 2011-02-16 17:19:27Z martin $} - [v0.4alpha] - [ydoc package to provide 'doc' macros] +\RequirePackage{svn-prov}[2010/04/03] +\ProvidesPackageSVN[ydoc] + {$Id: ydoc_doc_sty.dtx 2378 2011-03-20 20:34:27Z martin $} + [v0.5alpha] + [ydoc package to provide 'doc' macros] \newcount\ydoc@bslashcnt \def\ydoc@countbslashes{% \begingroup @@ -165,6 +165,89 @@ } \RequirePackage{shortvrb} \AtBeginDocument{\MakeShortVerb{\|}} +\RequirePackage{url} + +\def\package{\def\@package} +\package{\jobname} + +\def\ctanlocation{\def\@ctanlocation##1} +\ctanlocation{http://www.ctan.org/pkg/#1} + +\date{Version \fileversion\space -- \filedate} + +\def\@homepage{% + \begingroup + \edef\@tempa{% + \endgroup + \noexpand\url + {\@ctanlocation{\@package}}% + }% + \@tempa +} + +\protected\def\homepage{\urldef\@homepage\url} +\protected\def\email{\hyper@normalise\email@} +\def\email@#1{\def\@plainemail{#1}\def\@email{\hyper@linkurl{\Hurl{#1}}{mailto:#1}}} + +\let\@email\empty + +\let\@plainemail\empty +\title{The \texorpdfstring{\pkgtitle{\@package}}{\@package} Package} + +\protected\def\pkgtitle#1{% + \texorpdfstring{\textsf{#1}}{#1}% +} + +\def\@maketitle{% + \newpage + \null\vskip 2em + \begin{center}% + \let\footnote\thanks + {\LARGE \@title \par }\vskip 1.5em% + {\large \lineskip .5em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}% + \par}% + \ifx\@plainemail\empty\else + {\large \lineskip .5em% + \begin{tabular}[t]{c}% + \@email + \end{tabular}% + \par}% + \fi + \vskip 1em + {\large \lineskip .5em% + \begin{tabular}[t]{c}% + \@homepage + \end{tabular}% + \par}% + \vskip 1em + {\large \@date }% + \end{center}% + \par\vskip 1.5em + \aftergroup\ydocpdfsettings +} + +\ifpdf +\def\ydocpdfsettings{% + \hypersetup{% + pdfauthor = {\@author\space<\@plainemail>}, + pdftitle = {\@title}, + pdfsubject = {Documentation of LaTeX package \@package}, + pdfkeywords = {\@package, LaTeX, TeX} + }% +} +\else +\let\ydocpdfsettings\empty +\fi + +\let\orig@maketitle\maketitle +\def\maketitle{% + \ydocpdfsettings + \orig@maketitle + \let\orig@maketitle\relax +} \endinput %% %% End of file `ydoc-doc.sty'. |