diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty | 18 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty | 380 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty | 95 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty | 10 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc.cfg | 63 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc.cls | 14 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc.sty | 14 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydocstrip.tex | 70 |
8 files changed, 522 insertions, 142 deletions
diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty index dbac15c6a3b..2d03623c619 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty @@ -6,6 +6,7 @@ %% %% ydoc.dtx (with options: `code') %% +%% %% Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de> %% WWW: http://latex.scharrer-online.de/ %% @@ -25,15 +26,19 @@ %% 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] +\RequirePackage{svn-prov}[2010/04/03] \ProvidesPackageSVN - [ydoc-code] - {$Id: ydoc.dtx 2163 2011-02-16 17:19:27Z martin $} - [v0.4alpha] + {$Id: ydoc_code_sty.dtx 2339 2011-03-18 20:18:09Z martin $} + [v0.5alpha] [ydoc package to document macro code] \RequirePackage{hyperref} \hypersetup{colorlinks=true,pdfborder=0 0 0,pdfborderstyle={}} +\IfFileExists{needspace.sty}{% + \RequirePackage{needspace} +}{% + \def\Needspace{\@ifstar\@gobble\@gobble} +} \RequirePackage{xcolor} \definecolor{macroimpl}{rgb}{0.0,0.0,0.4} \@ifundefined{ydocwrite}{% @@ -133,9 +138,11 @@ \lstset{% language=[latex]tex,basicstyle=\ttfamily, numbers=left,numberstyle=\tiny\color{gray},firstnumber=last, - breaklines,prebreak={\mbox{\tiny$\swarrow$}}% + breaklines,prebreak={\mbox{\tiny$\swarrow$}}, + commentstyle=\color{black!60}, }% } +\ydoclistingssettings \def\macro@impl@args[#1]{% \begingroup \parindent=10pt\relax @@ -181,6 +188,7 @@ \def\endenvironment{} \def\PrintMacroImpl#1{% \par\bigskip\noindent + \Needspace*{3\baselineskip}% \hbox{% \edef\name{\expandafter\@gobble\string#1}% \global\@namedef{href@impl@\name}{}% diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty index 43d9be9330c..a9e69681788 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty @@ -6,6 +6,7 @@ %% %% ydoc.dtx (with options: `desc') %% +%% %% Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de> %% WWW: http://latex.scharrer-online.de/ %% @@ -25,76 +26,122 @@ %% 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-desc] - {$Id: ydoc.dtx 2163 2011-02-16 17:19:27Z martin $} - [v0.4alpha] +\RequirePackage{svn-prov}[2010/04/03] +\ProvidesPackageSVN[ydoc-desc] + {$Id: ydoc_desc_sty.dtx 2369 2011-03-20 00:04:45Z martin $} + [v0.5alpha] [ydoc package to describe macros, environments, options etc.] -\RequirePackage{hyperref} -\hypersetup{colorlinks=true,pdfborder=0 0 0,pdfborderstyle={}} +\IfFileExists{needspace.sty}{% + \RequirePackage{needspace} +}{% + \def\Needspace{\@ifstar\@gobble\@gobble} +} \RequirePackage{shortvrb} +\RequirePackage{etoolbox} \RequirePackage{xcolor} -\definecolor{macrodesc}{rgb}{0.0,0.0,0.8} -\definecolor{macroimpl}{rgb}{0.0,0.0,0.4} -\definecolor{meta}{rgb}{0.0,0.4,0.4} +\definecolor{macrodesc}{rgb}{0,0.2,0.6} +\definecolor{macroimpl}{rgb}{0,0.1,0.3} +\definecolor{meta}{rgb}{0,0.25,0.75} \definecolor{scriptcolor}{rgb}{0.2,0.6,0.2} \definecolor{optioncolor}{rgb}{0.3.0.2,0} \colorlet{optional}{black!65!white} \colorlet{metaoptional}{optional!50!meta} -\def\meta#1{% +\providecolor{urlcolor}{named}{blue} +\providecolor{linkcolor}{named}{blue} +\providecolor{filecolor}{named}{blue} +\providecolor{citecolor}{named}{blue} +\providecolor{anchorcolor}{named}{blue} +\providecolor{menucolor}{named}{blue} +\providecolor{runcolor}{named}{blue} + +\RequirePackage{hyperref} +\hypersetup{% + colorlinks=true, + pdfborder=0 0 0, + pdfborderstyle={}, + urlcolor=urlcolor, + linkcolor=linkcolor, + filecolor=filecolor, + citecolor=citecolor, + anchorcolor=anchorcolor, + menucolor=menucolor, + runcolor=runcolor, +} + +\newrobustcmd*\meta[1]{% + {\metastyle{% \ensuremath\langle - {\metastyle{#1\/}}% + #1\/% \ensuremath\rangle + }}% } -\def\marg#1{\@marg{<#1>}} -\def\oarg#1{\@oarg{<#1>}} -\def\parg#1{\@parg{<#1>}} -\def\aarg#1{\@aarg{<#1>}} -\def\@marg#1{% +\newrobustcmd*{\marg}[1]{% {\margstyle{% {\ttfamily\braceleft}% - {\def\end@Macro@args{}\read@Macro@arg#1}% + \meta{#1}% {\ttfamily\braceright}% }}% } -\def\@oarg#1{% +\newrobustcmd*{\oarg}[1]{% {\oargstyle{% {\ttfamily[}% - {\def\end@Macro@args{}\read@Macro@arg#1}% + \meta{#1}% {\ttfamily]}% }}% } -\def\@parg#1{% +\newrobustcmd*{\parg}[1]{% {\pargstyle{% {\ttfamily(}% - {\def\end@Macro@args{}\read@Macro@arg#1}% + \meta{#1}% {\ttfamily)}% }}% } -\def\@aarg#1{% +\newrobustcmd*{\aarg}[1]{% {\aargstyle{% {\ttfamily<}% - {\def\end@Macro@args{}\read@Macro@arg#1}% + \meta{#1}% {\ttfamily>}% }}% } -\def\sarg{{\sargstyle{*}}} -\RequirePackage{etoolbox} -\newrobustcmd*\pkg{\texttt} -\newrobustcmd*\cls{\texttt} -\newrobustcmd*\env{\texttt} -\newrobustcmd*\opt{\textsf} +\newrobustcmd*{\sarg}{{\sargstyle{*}}} +\newrobustcmd*\pkg[1]{{\pkgstyle{#1}}} +\newrobustcmd*\cls[1]{{\clsstyle{#1}}} +\newrobustcmd*\lib[1]{{\libstyle{#1}}} +\newrobustcmd*\env[1]{{\envstyle{#1}}} + +\newrobustcmd*\opt{\@ifstar\ys@opt\y@opt} +\def\y@opt#1{{\optstyle{#1}}} +\def\ys@opt#1{{\optstyle{#1}}\optpar{#1}} +\newrobustcmd*\optpar[1]{\marginpar{\hbox to \marginparwidth{\hss\y@opt{#1}}}} + +\newrobustcmd*\file[1]{{\filestyle{#1}}} +\newcommand*\pkgstyle[1]{\texttt{\textcolor{pkg}{#1}}} +\newcommand*\clsstyle[1]{\texttt{\textcolor{cls}{#1}}} +\newcommand*\libstyle[1]{\texttt{\textcolor{lib}{#1}}} +\newcommand*\envstyle[1]{\texttt{\textcolor{env}{#1}}} +\newcommand*\optstyle[1]{\textsf{\textcolor{opt}{#1}}} +\newcommand*\filestyle[1]{\texttt{\textcolor{file}{#1}}} +\colorlet{cls}{black} +\colorlet{lib}{black} +\colorlet{env}{black} +\colorlet{file}{black} +\colorlet{pkg}{black} +\definecolor{opt}{rgb}{0.5,0.16666,0} \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} -\def\verbstyle{\ttfamily} +\def\verbstyle{\verbatim@font} \def\metastyle{\normalfont\itshape\color{meta}} \def\margstyle{} -\def\oargstyle{\color{optional}\colorlet{meta}{metaoptional}} +\protected\def\Optional{\optionalon\optional} +\def\optionalstyle{\blendcolors*{!60!white}\color{black!75}} +\def\optionalon{\protected\def\optional{\optionalstyle}} +\def\optionaloff{\let\optional\relax} +\optionalon +\def\oargstyle{\optional} \def\pargstyle{} \def\aargstyle{} \def\sargstyle{\ttfamily\color{optional}} @@ -112,35 +159,46 @@ \def\read@Macro@arg{% \futurelet\@let@token\handle@Macro@arg } +\newcommand*\AlsoMacro{% + \begingroup\makeatletter + \AlsoMacro@ +} +\def\AlsoMacro@#1{% + \endgroup + \PrintMacroName{#1}% + \read@Macro@arg +} +\begingroup +\catcode`\|\active +\gdef\ydoc@short@AlsoMacro{% + \catcode`\|\active + \let|\AlsoMacro +} +\endgroup +\def\ydoc@macrocatcodes{% + \ydoc@short@AlsoMacro + \@makeother\'% + \@makeother\!% + \@makeother\[% + \@makeother\]% + \@makeother\(% + \@makeother\)% +} \def\handle@Macro@arg{% - \ifcase0% - \ifx\@let@token\bgroup1\else - \ifx\@let@token[\empty2\else - \ifx\@let@token(\empty3\else - \ifx\@let@token<\empty4\else - \ifx\@let@token*\empty5\else - \ifx\@let@token'\empty6\else - \ifx\@let@token!\empty7\else - \ifx\@let@token\@sptoken8\else - \ifx\@let@token\space9\else - \ifx\@let@token~9\else - \ifx\@let@token\AlsoMacro10\else - \ifx\@let@token\DescribeMacro11\fi - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi - \relax - \unskip - \expandafter\end@Macro@args%0 - \or\expandafter\read@Macro@marg%1 - \or\expandafter\read@Macro@oarg%2 - \or\expandafter\read@Macro@parg%3 - \or\expandafter\read@Macro@angle%4 - \or\expandafter\read@Macro@sarg%5 - \or\expandafter\read@Macro@verb%6 - \or\expandafter\read@Macro@cmds%7 - \or\expandafter\read@Macro@rmspace%8 - \or\expandafter\read@Macro@addtoken%9 - \else%10- + \expandafter\let\expandafter\handler\csname handle@Macro@token@\meaning\@let@token\endcsname + \ifx\handler\relax + \def\handler{\ifhmode\unskip\fi\end@Macro@args}% \fi + \handler +} +\def\define@Macro@handler{% + \begingroup + \ydoc@macrocatcodes + \define@Macro@handler@ +} +\def\define@Macro@handler@#1{% + \endgroup + \@namedef{handle@Macro@token@\meaning#1}% } \def\end@Macro@args{% \y@egroup @@ -148,35 +206,79 @@ } \def\after@Macro@args{% } -\def\read@Macro@marg{% +\define@Macro@handler{\bgroup}{% \begingroup - \afterassignment\read@Macro@marg@ - \let\@let@token=% + \afterassignment\read@Macro@marg@ + \let\@let@token=% } \def\read@Macro@marg@{% - \setbox\@tempboxa\hbox\bgroup - \color@setgroup\bgroup - \aftergroup\color@endgroup - \aftergroup\egroup - \aftergroup\read@Macro@marg@@ + \bgroup + \margstyle{}% \let\end@Macro@args\empty% + {\ttfamily\braceleft}% + \aftergroup\read@Macro@marg@@ \read@Macro@arg } \def\read@Macro@marg@@{% - \@marg{\usebox\@tempboxa}% - \endgroup - \read@Macro@arg + {\ttfamily\braceright}% + \endgroup + \read@Macro@arg +} +\define@Macro@handler{[}[{% + \begingroup + \let\read@Macro@oarg@end\read@Macro@oarg@@end + \let\end@Macro@args\read@Macro@oarg@end + \oargstyle{}% + {\ttfamily[}%] + \read@Macro@arg +} +\define@Macro@handler{]}{% + \read@Macro@oarg@end +} +\def\read@Macro@oarg@@end#1]{% + #1% + {\ttfamily]}% + \endgroup + \read@Macro@arg +} +\def\read@Macro@oarg@end{\end@Macro@args} +\let\read@Macro@aarg@end\read@Macro@oarg@end +\let\read@Macro@parg@end\read@Macro@oarg@end +\define@Macro@handler{(}({% + \begingroup + \let\read@Macro@parg@end\read@Macro@parg@@end + \let\end@Macro@args\read@Macro@parg@end + \pargstyle{}% + {\ttfamily(}%) + \read@Macro@arg +} +\define@Macro@handler{)}{% + \read@Macro@parg@end } -\def\read@Macro@oarg[#1]{% - \@oarg{#1}\read@Macro@arg +\def\read@Macro@parg@@end#1){% + #1% + {\ttfamily)}% + \endgroup + \read@Macro@arg } -\def\read@Macro@parg(#1){% - \@parg{#1}\read@Macro@arg +\def\read@Macro@aarg<{% + \begingroup + \let\read@Macro@aarg@end\read@Macro@aarg@@end + \let\end@Macro@args\read@Macro@aarg@end + \aargstyle{}% + {\ttfamily<}% + \read@Macro@arg +} +\define@Macro@handler{>}{% + \read@Macro@aarg@end } -\def\read@Macro@aarg<#1>>{% - \@aarg{#1}\read@Macro@arg +\def\read@Macro@aarg@@end#1>>{% + #1% + {\ttfamily>}% + \endgroup + \read@Macro@arg } -\def\read@Macro@angle<{% +\define@Macro@handler{<}<{% \futurelet\@let@token\read@Macro@angle@ } \def\read@Macro@angle@{% @@ -189,33 +291,48 @@ \def\read@Macro@meta#1>{% \meta{#1}\read@Macro@arg } -\def\read@Macro@sarg#1{% +\define@Macro@handler**{% \sarg\read@Macro@arg } -\def\read@Macro@verb{% +\define@Macro@handler{'}'{% \begingroup \let\do\@makeother \dospecials + \@noligs + \@makeother\'% \obeyspaces \read@Macro@verb@ } -\def\read@Macro@verb@'#1'{% +\begingroup +\@makeother\'% +\gdef\read@Macro@verb@#1'{% \endgroup \ifx\relax#1\relax {\verbstyle{\string'}}% \else - {\verbstyle{#1}}% + {% + \frenchspacing + \@noligs\verbstyle{#1}}% \fi \read@Macro@arg } -\def\read@Macro@cmds!#1!{% +\endgroup +\define@Macro@handler!!#1!{% #1\relax \read@Macro@arg } -\@firstofone{\def\read@Macro@rmspace} {% +\define@Macro@handler{\@sptoken} {% \read@Macro@arg } -\def\read@Macro@addtoken#1{% +\define@Macro@handler{~}#1{% + #1\read@Macro@arg +} +\AtBeginDocument{% +\define@Macro@handler{~}#1{% + #1\read@Macro@arg +} +} +\define@Macro@handler{\space}#1{% #1\read@Macro@arg } \@ifundefined{DescribeMacro}{}{% @@ -224,10 +341,22 @@ \def\DescribeMacro{% \DescribeMacros \let\DescribeMacros\y@egroup + \optionalon \def\after@Macro@args{\endDescribeMacros}% \begingroup\makeatletter \Describe@Macro } +\def\DescribeScript#1{% + \DescribeMacros + \let\DescribeMacros\y@egroup + \optionalon + \def\after@Macro@args{\endDescribeMacros}% + \hbox\y@bgroup + \texttt{#1}% + \ydoc@macrocatcodes + \macroargsstyle + \read@Macro@arg~% +} \def\Describe@Macro#1{% \endgroup \edef\name{\expandafter\@gobble\string#1}% @@ -237,14 +366,14 @@ }% \hbox\y@bgroup \@ifundefined{href@impl@\name}{}{\hyperlink{impl:\name}}% - {\hypertarget{desc:\name}{\PrintMacroName{#1}}}% + {% + \hbox{\vbox to 0pt{\vss\hbox{\raisebox{4ex}{\hypertarget{desc:\name}{}}}}% + \PrintMacroName{#1}}% + }% \ydoc@macrocatcodes \macroargsstyle \read@Macro@arg } -\def\ydoc@macrocatcodes{% - \ydoc@short@AlsoMacro -} \newcommand*\MakeShortMacroArgs{% \@ifstar {\@MakeShortMacroArgs\Macro}% @@ -266,22 +395,8 @@ \begingroup\makeatletter \Describe@Macro } -\newcommand*\AlsoMacro{% - \begingroup\makeatletter - \AlsoMacro@ -} -\def\AlsoMacro@#1{% - \endgroup - \PrintMacroName{#1}% - \read@Macro@arg -} -\begingroup -\catcode`\|\active -\gdef\ydoc@short@AlsoMacro{% - \catcode`\|\active - \let|\AlsoMacro -} -\endgroup +\define@Macro@handler\AlsoMacro{} +\define@Macro@handler\DescribeMacro{} \newcommand*\MacroArgs{% \begingroup \def\end@Macro@args{\endgroup\xspace}% @@ -403,7 +518,7 @@ {\macrodescstyle{\strut \texttt{\char92}% \escapechar\m@ne - \string#1}}% + \string#1\strut}}% } \let\PrintLengthName\PrintMacroName \def\PrintEnvName#1#2{% @@ -414,21 +529,26 @@ } \def\PrintMacros{% \par\vspace\beforedescskip - \noindent\hspace*{\descindent}% - \ifdim\wd\descbox>\linewidth - \makebox[\linewidth][c]{\fbox{\hspace*{\descsep}\usebox{\descbox}\hspace*{\descsep}}} + \begingroup + \sbox\@tempboxa{\descframe{\usebox{\descbox}}}% + \Needspace*{\dimexpr\ht\@tempboxa+2\baselineskip\relax}% + \par\noindent + \ifdim\wd\@tempboxa>\dimexpr\linewidth-2\descindent\relax + \makebox[\linewidth][c]{\usebox\@tempboxa}% \else - \fbox{\hspace*{\descsep}\usebox{\descbox}\hspace*{\descsep}}% + \hspace*{\descindent}% + \usebox\@tempboxa \fi - \par\vspace\afterdescskip + \endgroup + \par + \vspace\afterdescskip + \par\noindent } -\let\PrintLength\PrintMacros -\def\PrintEnv{% - \par\vspace\beforedescskip - \noindent\hspace*{\descindent}% - \fbox{\hspace*{\descsep}\usebox{\descbox}\hspace*{\descsep}}% - \par\vspace\afterdescskip +\def\descframe#1{% + \fbox{\hspace*{\descsep}#1\hspace*{\descsep}}% } +\let\PrintLength\PrintMacros +\let\PrintEnv\PrintMacros \def\PrintSubEnv{% \hbox{\hbox{\usebox{\descbox}}}% } @@ -452,6 +572,34 @@ \endgroup \def\y@bgroup{\bgroup\color@setgroup} \def\y@egroup{\color@endgroup\egroup} +\newcommand*{\codeline}[1][c]{% + \codelinebefore + \hbox to \hsize\bgroup + \ifx i#1\hspace*{\leftmargin}\else + \ifx l#1\else\hss\fi + \fi + \let\xspace\relax + \hbox\bgroup + \aftergroup\codeline@end + \aftergroup#1% + \afterassignment\MacroArgs + \let\@let@token=% +} +\def\codeline@end#1{% + \ifx r#1\else\hss\fi + \egroup + \codelineafter +} +\newcommand*\codelinebefore{\par\smallskip\noindent} +\newcommand*\codelineafter {\par\smallskip\noindent} +\newenvironment{codequote}{% + \def\\{\newline\relax\MacroArgs}% + \par\smallskip\bgroup\leftskip=\leftmargin\rightskip=\rightmargin\noindent\MacroArgs} + {\par\egroup\smallskip\noindent\ignorespacesafterend} +\newenvironment{macroquote}{% + \def\\{\newline\relax\Macro}% + \par\smallskip\bgroup\leftskip=\leftmargin\rightskip=\rightmargin\noindent\Macro} + {\par\egroup\smallskip\noindent\ignorespacesafterend} \endinput %% %% End of file `ydoc-desc.sty'. 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'. diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty index 25f45d7ed7d..ff5f245a205 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty @@ -6,6 +6,7 @@ %% %% ydoc.dtx (with options: `expl') %% +%% %% Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de> %% WWW: http://latex.scharrer-online.de/ %% @@ -25,12 +26,11 @@ %% 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-expl] - {$Id: ydoc.dtx 2163 2011-02-16 17:19:27Z martin $} - [v0.4alpha] +\RequirePackage{svn-prov}[2010/04/03] +\ProvidesPackageSVN[ydoc] + {$Id: ydoc_expl_sty.dtx 2332 2011-03-17 17:12:35Z martin $} + [v0.5alpha] [ydoc package to insert live examples of LaTeX code] \RequirePackage{listings} \lst@RequireAspects{writefile} diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc.cfg b/Master/texmf-dist/tex/latex/ydoc/ydoc.cfg new file mode 100644 index 00000000000..38b4dae7ae8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc.cfg @@ -0,0 +1,63 @@ +%% +%% This is file `ydoc.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ydoc.dtx (with options: `cfg') +%% +%% +%% Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de> +%% WWW: http://latex.scharrer-online.de/ +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Martin Scharrer. +%% +%% This work consists of the files ydoc.dtx and ydoc.ins +%% and the derived file ydoc.cls, ydoc.sty, ydoc-code.sty, +%% ydoc-expl.sty and ydoc-desc.sty. +%% +%% Please delete the following line on manual changes: +\ProvidesFileSVN[ydoc.cfg]{$Id: ydoc_cfg.dtx 2338 2011-03-18 01:14:34Z martin $} + [v0.5alpha] + [Default config file for ydoc] +\usepackage[T1]{fontenc} +\IfFileExists{libertine.sty}{% + \usepackage{libertine} + \begingroup + \setbox0\hbox{\it g\/} + \setbox1\hbox{\it g} + \ifnum\wd0>\wd1\else + \gdef\/{\kern 0.8864pt} + \fi + \endgroup +}{} +\IfFileExists{lmodern.sty}{% + %\usepackage{lmodern} + \renewcommand{\ttdefault}{lmtt} +}{} +\urlstyle{sf} +\usepackage{ifpdf} +\ifpdf +\usepackage{microtype} +\fi +\usepackage{array} +\usepackage{booktabs} +\usepackage{multicol} +\usepackage{xcolor} +\usepackage{listings} +\usepackage{booktabs} +\usepackage{hyperref} +\reversemarginpar +\endinput +%% +%% End of file `ydoc.cfg'. diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc.cls b/Master/texmf-dist/tex/latex/ydoc/ydoc.cls index a800783768c..0861fe49aaa 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc.cls +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc.cls @@ -6,6 +6,7 @@ %% %% ydoc.dtx (with options: `class') %% +%% %% Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de> %% WWW: http://latex.scharrer-online.de/ %% @@ -25,13 +26,16 @@ %% and the derived file ydoc.cls, ydoc.sty, ydoc-code.sty, %% ydoc-expl.sty and ydoc-desc.sty. %% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] \RequirePackage{svn-prov}[2010/04/03] \ProvidesClassSVN - {$Id: ydoc.dtx 2163 2011-02-16 17:19:27Z martin $} - [v0.4alpha] - [ydoc class: document LaTeX class and packages] -\LoadClassWithOptions{article} -%%\RequirePackage{doc} + {$Id: ydoc_cls.dtx 2336 2011-03-18 00:56:07Z martin $} + [v0.5alpha] + [ydoc class: document LaTeX class and packages] +\PassOptionsToClass{a4paper}{article} +\DeclareOption*{\expandafter\PassOptionsToClass\expandafter{\CurrentOption}{article}} +\ProcessOptions\relax +\LoadClass{article} \RequirePackage{ydoc} \endinput %% diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc.sty index 3a30527ef8d..9be7a39ce00 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc.sty @@ -6,6 +6,7 @@ %% %% ydoc.dtx (with options: `package') %% +%% %% Copyright (c) 2010-2011 by Martin Scharrer <martin@scharrer-online.de> %% WWW: http://latex.scharrer-online.de/ %% @@ -25,12 +26,13 @@ %% 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 - {$Id: ydoc.dtx 2163 2011-02-16 17:19:27Z martin $} - [v0.4alpha] - [ydoc package: document LaTeX class and packages] +\RequirePackage{svn-prov}[2010/04/03] +\ProvidesPackageSVN[ydoc] + {$Id: ydoc_sty.dtx 2332 2011-03-17 17:12:35Z martin $} + [v0.5alpha] + [ydoc package: document LaTeX class and packages] +\RequirePackage{svn-prov}[2010/04/03] \RequirePackage{ydoc-code} \RequirePackage{ydoc-expl} \RequirePackage{ydoc-desc} @@ -39,6 +41,8 @@ \RequirePackage{newverbs} \MakeSpecialShortVerb{\qverb}{\"} \AtBeginDocument{\catcode`\^^A=14\relax} + +\input{ydoc.cfg} \endinput %% %% End of file `ydoc.sty'. diff --git a/Master/texmf-dist/tex/latex/ydoc/ydocstrip.tex b/Master/texmf-dist/tex/latex/ydoc/ydocstrip.tex new file mode 100644 index 00000000000..25ec2c5e63f --- /dev/null +++ b/Master/texmf-dist/tex/latex/ydoc/ydocstrip.tex @@ -0,0 +1,70 @@ +%&pdflatex +\input docstrip + +\def\checkOption<#1{% + \ifcase + \ifx*#10\else \ifx/#11\else + \ifx+#12\else \ifx-#13\else + \ifx<#14\else + \ifx=#15\else + \ifx!#16\else + 10\fi\fi\fi\fi\fi\fi\fi\relax + \expandafter\starOption\or + \expandafter\slashOption\or + \expandafter\plusOption\or + \expandafter\minusOption\or + \expandafter\verbOption\or + \expandafter\varOption\or + \expandafter\valueOption\else + \expandafter\doOption\fi + #1} + +\def\varOption =#1#2>#3\endLine{{% + \ifx*#1\relax + \edef\varStop{\perCent<=/#2>}% + \global\expandafter\let\csname ydocstrip@var@#2\endcsname\empty% + \expandafter\def\csname ydocstrip@var@#2\endcsname##1{}% + \loop + \ifeof\inFile + \errmessage{Source file ended while reading a multi-line variable content!}% + \fi + \read\inFile to \inLine + \if 1\ifx\inLine\varStop 0\fi 1% if not inLine==varStop + \expandafter\xdef\csname ydocstrip@var@#2\endcsname{\csname ydocstrip@var@#2\endcsname^^J\inLine}% + \maybeMsg{.}% + \repeat + \else + \ifx/#1\relax + \errmessage{Error in expression: spurious '<=/#2>'}% + \else + \ifx+#1\relax + \expandafter\ifx\csname ydocstrip@var@#2\endcsname\relax + \expandafter\xdef\csname ydocstrip@var@#2\endcsname{#3}% + \else + \expandafter\xdef\csname ydocstrip@var@#2\endcsname{\csname ydocstrip@var@#2\endcsname^^J#3}% + \fi + \else + \expandafter\gdef\csname ydocstrip@var@#1#2\endcsname{#3}% + \fi + \fi + \fi +}} + + +\def\valueOption !#1>#2\endLine{% + \begingroup + \expandafter\let\expandafter\var\csname ydocstrip@var@#1\endcsname + \ifx\var\relax + \errmessage{Used variable '#1' was never defined!}% + \else + \ifx\var\empty\else + \def\do##1##2##3{% + \StreamPut##1{\csname ydocstrip@var@#1\endcsname}% + }% + \activefiles + \fi + \fi + \endgroup +} + + |