% \iffalse % % Part of Will Robertson's DTXGALLERY bundle, version 1. % %<*internal> \iffalse % %<*readme> ----------------- single-source.dtx This is an example of everything being extracted from the .dtx file. ----------------- % %<*internal> \fi \begingroup % %<*batchfile> \input docstrip.tex \keepsilent\askforoverwritefalse \nopreamble\nopostamble \generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}} % %\endbatchfile %<*internal> \generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}} \generate{\file{\jobname-readme.txt}{\from{\jobname.dtx}{readme}}} \endgroup % % %<*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} % % % \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 :)} % % \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