diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-05 00:40:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-05 00:40:56 +0000 |
commit | 0dda076376f317c796a6a40d5006ef05cc7c031b (patch) | |
tree | 35c84148fa9a5d94eb0ea032fab58172b7dc6eac /Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty | |
parent | 2a4a5f695e45cb0addf21e35fe7d5089202afeca (diff) |
ydoc (3may12)
git-svn-id: svn://tug.org/texlive/trunk@26202 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty index 3115370a579..257cc758ff8 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty @@ -8,13 +8,30 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{ydoc-expl}[% - 2011/11/19 + 2012/05/03 v0.6alpha ydoc package to insert live examples of LaTeX code] \RequirePackage{listings} \lst@RequireAspects{writefile} \def\ydoc@exafile{\jobname.exa} -\lstdefinestyle{examplecode}{numbers=left,firstnumber=1,numberstyle=\tiny\color{gray}\sffamily,numbersep=5pt}% +\lstdefinestyle{examplecode}{% + language=[latex]tex, + basicstyle=\ttfamily, + columns=fullflexible, + numbers=left, + firstnumber=1, + numberstyle=\tiny\color{gray}\sffamily, + numbersep=5pt, + breaklines,prebreak={\mbox{\tiny$\swarrow$}}, + commentstyle=\color{black!60}, +}% +\lstdefinestyle{exampleresult}{% + firstnumber=1, + gobble=0, + basicstyle=\ttfamily, + columns=fullflexible, + commentstyle=\color{black!60}, +} \lstdefinestyle{exampleextract}{gobble=4}% \newbox\examplecodebox \newbox\exampleresultbox @@ -24,6 +41,7 @@ {\ydoc@exafile}% \unskip\color@endgroup}% \setbox\exampleresultbox\hbox{\color@setgroup + \lstset{style=exampleresult}% \@@input\ydoc@exafile\relax \unskip\color@endgroup}% } @@ -53,8 +71,8 @@ } \lstnewenvironment{examplecode}[1][]{% \lstdefinestyle{thisexampleprint}{#1}% - \lstset{style=exampleextract,#1}% \setbox\@tempboxa\hbox\bgroup + \lstset{style=exampleextract,#1}% \lst@BeginWriteFile{\ydoc@exafile}% } {% |