summaryrefslogtreecommitdiff
path: root/info/dtxgallery/single-source.dtx
blob: 2b24ed476377806a9016350d9f33b942596a86c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
% \iffalse
%
% Part of Will Robertson's DTXGALLERY bundle, version 1.
%
%<*internal>
\iffalse
%</internal>
%<*readme>
-----------------
single-source.dtx

This is an example of everything 
being extracted from the .dtx file.
-----------------
%</readme>
%<*internal>
\fi
\begingroup
%</internal>
%<*batchfile>
\input docstrip.tex
\keepsilent\askforoverwritefalse
\nopreamble\nopostamble
\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}}
%</batchfile>
%<batchfile>\endbatchfile
%<*internal>
\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}}
\generate{\file{\jobname-readme.txt}{\from{\jobname.dtx}{readme}}}
\endgroup
%</internal>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{single-source,fancyvrb}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
%\OnlyDescription
\begin{document}
\title{Example of `single source' docscript extraction}
\DocInput{\jobname.dtx}
\end{document}
%</driver>
%
% \fi
%
% \section{The documented source code}
%
%    \begin{macrocode}
%<*package> 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{single-source}[2005/07/15 v0.1 dtx: single-source]
\def\mymacro{hello :)}
%</package>
%    \end{macrocode} 
%
% \section{The contents of single-source.sty}
% \VerbatimInput[frame=single]{single-source.sty}
%
% \section{The contents of single-source.ins}
% \VerbatimInput[frame=single]{single-source.ins}
%
% \section{The contents of single-source-readme.txt}
% \VerbatimInput[frame=single]{single-source-readme.txt}
%
% \Finale