\typeout{mdocchea.tex 2010/03/21 cheat sheat for `makedoc.sty'} % \listfiles \documentclass{article} \input{makedoc.cfg} %% with pdf stuff and 'niceverb' \makeatletter \def\today{\the\year/\two@digits\month/\two@digits\day} % \let\sofar@arraycr\@arraycr \newenvironment*{displines} {\def\ccr{\\&}% \csname eqnarray*\endcsname&} {\csname endeqnarray*\endcsname} \def\@listi{\leftmargin\leftmargini \parsep 3\p@ \@plus2\p@ \@minus\p@ \topsep 6\p@ \@plus2\p@ \@minus4\p@ \itemsep3\p@ \@plus2\p@ \@minus\p@} \let\@listI\@listi \makeatother \newcommand*{\defto}[2]{$#1\to_{\mathit{default}}#2$} % \sfcode`/=1001 %% TODO makedoc.cfg!? 2010/03/15 \sloppy \begin{document} % \null\kern-1\baselineskip \begin{center} \bfseries \Large 'makedoc' \& 'fifinddo'\footnote{\url{http://ctan.org/pkg/nicetext}} File Handling Commands \\[.4ex] \mdseries \large Uwe L\"uck, \today \\[10pt] \normalsize |\usepackage{makedoc}|, see 'makedoc.pdf' for details \end{center} \thispagestyle{empty} \par\kern5pt \noindent \textbf{Most simple:} |\MakeInputJobDoc| in `.tex' \emph{after} &\begin{document} \begin{displines} `\MakeInputJobDoc{}{}' \ccr `\MakeInputJobDoc[]{}{}' \ccr `\MakeInputJobDoc[][]{}{}' \end{displines} documents `\mdJobName.' via `\mdJobName.', \defto{}{`sty'}, \defto{&\mdJobName}{}, \defto{}{`doc'}, \par\kern-5pt \begin{center} %% Parsers: \begin{tabular}{@{}l@{\hskip4pt }l@{\hskip4pt }l@{}} \endcell detects\endcell involves\\\hline `\SectionLevelThreeParseInput'\endcell `==== ===='\endcell`\mdSectionLevelThree'\\ `\SectionLevelTwoParseInput'\endcell `=== <title> ==='\endcell`\mdSectionLevelTwo'\\ `\SectionLevelOneParseInput'\endcell `== <title> =='\endcell`\mdSectionLevelOne'\\ `\ProcessInputWith{comment}'\endcell %% removed `}' 2010/03/21 `%% <comment>'\endcell `%%<nothing>', 'mdoccorr.cfg' \end{tabular} \end{center} % \par\kern-2pt \noindent \textbf{Preprocessing before} &\begin{document}: |\MakeJobDoc| (same parameters) \vskip10pt \raggedright \noindent \textbf{More fine-grained:}\\ \textbf{a.~Choices for next preprocessing run:} \begin{description} \cmdboxitem|\ResultFile{<output>}| opens <output> % \cmdboxitem|\LaTeXresultFile{<output>}| see below \cmdboxitem|\Headerlines{<header-lines>}| `\MakeJobDoc''s first mandatory argument \cmdboxitem|\MainDocParser{<main-parser>}| `\MakeJobDoc''s second mandatory \rlap{argument} \cmdboxitem|\ProcessLineMessage{<message>}| \defto{<message>}{&\message{.}} \cmdboxitem|\input{mdoccorr.cfg}| chooses `\MakeDocCorrectHook' \end{description} \textbf{b.~Manual insertions to <output>:} \begin{description} \cmdboxitem|\WriteResult{<balanced>}| writes <balanced> to <output> \cmdboxitem|\WriteProvides| writes `\ProvidesFile' line from 'fifindo'. \cmdboxitem|\LaTeXresultFile{<output>}| issues `\ResultFile{<output>}', writes `\ProvidesFile' line from 'makedoc'. \end{description} \textbf{c.~Processing <input>, closing <output>:} \begin{description} \cmdboxitem|\ProcessFileWith{<input>}{<loop-body>}| reads each <input> line to macro |\fdInputLine|, applies <loop-body> \cmdboxitem|\MakeDoc{<input>}| copies <header-lines> from <input> to <output>, applies <main-parser> \cmdboxitem|\CloseResultFile| closes <output> \cmdboxitem|\MakeCloseDoc{<input>}| issues `\MakeDoc{<input>}\CloseResultFile'. \end{description} \end{document}