Debian Codegraph @

texmf-dist/doc/latex/dtxgallery/single-source.dtx

raw
1 % \iffalse
2 %
3 % Part of Will Robertson's DTXGALLERY bundle, version 1.
4 %
5 %<*internal>
6 \iffalse
7 %</internal>
8 %<*readme>
9 -----------------
10 single-source.dtx
11
12 This is an example of everything
13 being extracted from the .dtx file.
14 -----------------
15 %</readme>
16 %<*internal>
17 \fi
18 \begingroup
19 %</internal>
20 %<*batchfile>
21 \input docstrip.tex
22 \keepsilent\askforoverwritefalse
23 \nopreamble\nopostamble
24 \generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}}
25 %</batchfile>
26 %<batchfile>\endbatchfile
27 %<*internal>
28 \generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}}
29 \generate{\file{\jobname-readme.txt}{\from{\jobname.dtx}{readme}}}
30 \endgroup
31 %</internal>
32 %
33 %<*driver>
34 \documentclass{ltxdoc}
35 \usepackage{single-source,fancyvrb}
36 \EnableCrossrefs
37 \CodelineIndex
38 \RecordChanges
39 %\OnlyDescription
40 \begin{document}
41 \title{Example of `single source' docscript extraction}
42 \DocInput{\jobname.dtx}
43 \end{document}
44 %</driver>
45 %
46 % \fi
47 %
48 % \section{The documented source code}
49 %
50 % \begin{macrocode}
51 %<*package>
52 \NeedsTeXFormat{LaTeX2e}
53 \ProvidesPackage{single-source}[2005/07/15 v0.1 dtx: single-source]
54 \def\mymacro{hello :)}
55 %</package>
56 % \end{macrocode}
57 %
58 % \section{The contents of single-source.sty}
59 % \VerbatimInput[frame=single]{single-source.sty}
60 %
61 % \section{The contents of single-source.ins}
62 % \VerbatimInput[frame=single]{single-source.ins}
63 %
64 % \section{The contents of single-source-readme.txt}
65 % \VerbatimInput[frame=single]{single-source-readme.txt}
66 %
67 % \Finale