summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty18
1 files changed, 13 insertions, 5 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}{}%