<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\ProvidesFile{mdoccheat.tex}[2011/01/26 cheat sheet 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{\\&amp;}% 
                   \csname eqnarray*\endcsname&amp;}
                  {\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$}
\usepackage[margin=3cm]{geometry}                     %% 2012/03/18
% \sfcode`/=1001 %% TODO makedoc.cfg!? 2010/03/15
\sloppy
\begin{document}
%  \enlargethispage{1\baselineskip} %% 2010/03/29 %% rm. 2012/03/18
%   \null\kern-1\baselineskip
\begin{center}
 \bfseries \Large
  'makedoc' \&amp; '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 `&lt;jobname&gt;.tex' \emph{after} &amp;\begin{document}
\begin{displines}
  `\MakeInputJobDoc{&lt;header-lines&gt;}{&lt;main-parser&gt;}'
    \ccr
  `\MakeInputJobDoc[&lt;in-ext&gt;]{&lt;header-lines&gt;}{&lt;main-parser&gt;}'
    \ccr
  `\MakeInputJobDoc[&lt;out-ext&gt;][&lt;in-ext&gt;]{&lt;header-lines&gt;}{&lt;main-parser&gt;}'
\end{displines} 
documents `\mdJobName.&lt;in-ext&gt;' via `\mdJobName.&lt;out-ext&gt;', 
\defto{&lt;in-ext&gt;}{`sty'}, \defto{&lt;out-ext&gt;}{`doc'}, \defto{&amp;\mdJobName}{&lt;jobname&gt;} 
  \par\kern-5pt
\begin{center} %% Parsers:
\begin{tabular}{@{}l@{\hskip4pt }l@{\hskip4pt }l@{}}
&lt;main-parser&gt;\endcell detects\endcell involves\\\hline
`\SectionLevelThreeParseInput'\endcell
    `==== &lt;title&gt; ===='\endcell`\mdSectionLevelThree'\\
`\SectionLevelTwoParseInput'\endcell
    `=== &lt;title&gt; ==='\endcell`\mdSectionLevelTwo'\\
`\SectionLevelOneParseInput'\endcell
    `== &lt;title&gt; =='\endcell`\mdSectionLevelOne'\\
%% 2010/03/29:
`\ProcessInputWith{PPScomment}'\endcell 
    `%% &lt;comment&gt;'\endcell `%%&lt;empty&gt;', 'mdoccorr.cfg'\\
`\ProcessInputWith{PScomment}'\endcell 
    `% &lt;comment&gt;'\endcell `%&lt;empty&gt;', 'mdoccorr.cfg'
\end{tabular}
\end{center}

%   \par\kern-2pt
\noindent \textbf{Preprocessing before} &amp;\begin{document}: 
|\MakeJobDoc| (same parameters)

  \vskip10pt \raggedright
\noindent \textbf{More fine-grained:}\\
\textbf{a.~Choices for next preprocessing run:}
\begin{description}
\cmdboxitem|\ResultFile{&lt;output&gt;}| opens &lt;output&gt;
% \cmdboxitem|\LaTeXresultFile{&lt;output&gt;}| see below
\cmdboxitem|\Headerlines{&lt;header-lines&gt;}| 
    `\MakeJobDoc''s first mandatory argument 
\cmdboxitem|\MainDocParser{&lt;main-parser&gt;}| 
    `\MakeJobDoc''s second mandatory \rlap{argument}
\cmdboxitem|\ProcessLineMessage{&lt;message&gt;}| 
    \defto{&lt;message&gt;}{&amp;\message{.}}
\cmdboxitem|\input{mdoccorr.cfg}| chooses `\MakeDocCorrectHook'
\end{description}
\textbf{b.~Manual insertions to &lt;output&gt;:}
\begin{description}
\cmdboxitem|\WriteResult{&lt;balanced&gt;}| writes &lt;balanced&gt; to &lt;output&gt; 
\cmdboxitem|\WriteProvides| writes `\ProvidesFile' line from 'fifindo'
\cmdboxitem|\LaTeXresultFile{&lt;output&gt;}| issues
    `\ResultFile{&lt;output&gt;}', writes `\ProvidesFile' line from 'makedoc'
\end{description}
\textbf{c.~Processing &lt;input&gt;, closing &lt;output&gt;:}
\begin{description}
\cmdboxitem|\ProcessFileWith{&lt;input&gt;}{&lt;loop-body&gt;}| 
    reads each &lt;input&gt; line to macro |\fdInputLine|, 
    applies &lt;loop-body&gt;
\cmdboxitem|\MakeDoc{&lt;input&gt;}|
    inputs `mdoccorr.cfg'
    copies &lt;header-lines&gt; from &lt;input&gt; to &lt;output&gt;, 
    applies &lt;main-parser&gt;
\cmdboxitem|\CloseResultFile| closes &lt;output&gt;
\cmdboxitem|\MakeCloseDoc{&lt;input&gt;}| issues 
    `\MakeDoc{&lt;input&gt;}\CloseResultFile'
\cmdboxitem|\MakeSingleDoc[&lt;out-ext&gt;]{&lt;in-output&gt;.&lt;in-ext&gt;}| 
    issues `\LaTeXresultFile{&lt;in-output&gt;.&lt;out-ext&gt;}'
    and `\MakeDocCloseDoc{&lt;in-output&gt;.&lt;in-ext&gt;}',
    \defto{&lt;out-ext&gt;}{`doc'},
\end{description}
%% 2012/03/18:
\textbf{d.~Avoid &amp;\input{mdoccorr.cfg} by} 
|\MakeInputJobDoc*|, |\MakeJobDoc*|, |\MakeDoc*|, 
|\MakeCloseDoc*|, or |\MakeSingleDoc*|

\end{document}

</pre></body></html>