Debian Codegraph @

texmf-dist/source/latex/nicetext/mdoccheat.tex

raw
1 \ProvidesFile{mdoccheat.tex}[2011/01/26 cheat sheet for `makedoc.sty']
2 % \listfiles
3 \documentclass{article}
4 \input{makedoc.cfg} %% with pdf stuff and 'niceverb'
5 \makeatletter
6 \def\today{\the\year/\two@digits\month/\two@digits\day}
7 % \let\sofar@arraycr\@arraycr
8 \newenvironment*{displines}
9 {\def\ccr{\\&}%
10 \csname eqnarray*\endcsname&}
11 {\csname endeqnarray*\endcsname}
12 \def\@listi{\leftmargin\leftmargini
13 \parsep 3\p@ \@plus2\p@ \@minus\p@
14 \topsep 6\p@ \@plus2\p@ \@minus4\p@
15 \itemsep3\p@ \@plus2\p@ \@minus\p@}
16 \let\@listI\@listi
17 \makeatother
18 \newcommand*{\defto}[2]{$#1\to_{\mathit{default}}#2$}
19 \usepackage[margin=3cm]{geometry} %% 2012/03/18
20 % \sfcode`/=1001 %% TODO makedoc.cfg!? 2010/03/15
21 \sloppy
22 \begin{document}
23 % \enlargethispage{1\baselineskip} %% 2010/03/29 %% rm. 2012/03/18
24 % \null\kern-1\baselineskip
25 \begin{center}
26 \bfseries \Large
27 'makedoc' \& 'fifinddo'\footnote{\url{http://ctan.org/pkg/nicetext}}
28 File Handling Commands
29 \\[.4ex] \mdseries \large
30 Uwe L\"uck, \today
31 \\[10pt] \normalsize
32 |\usepackage{makedoc}|, see 'makedoc.pdf' for details
33 \end{center}
34 \thispagestyle{empty}
35 \par\kern5pt
36 \noindent \textbf{Most simple:} |\MakeInputJobDoc|
37 in `<jobname>.tex' \emph{after} &\begin{document}
38 \begin{displines}
39 `\MakeInputJobDoc{<header-lines>}{<main-parser>}'
40 \ccr
41 `\MakeInputJobDoc[<in-ext>]{<header-lines>}{<main-parser>}'
42 \ccr
43 `\MakeInputJobDoc[<out-ext>][<in-ext>]{<header-lines>}{<main-parser>}'
44 \end{displines}
45 documents `\mdJobName.<in-ext>' via `\mdJobName.<out-ext>',
46 \defto{<in-ext>}{`sty'}, \defto{<out-ext>}{`doc'}, \defto{&\mdJobName}{<jobname>}
47 \par\kern-5pt
48 \begin{center} %% Parsers:
49 \begin{tabular}{@{}l@{\hskip4pt }l@{\hskip4pt }l@{}}
50 <main-parser>\endcell detects\endcell involves\\\hline
51 `\SectionLevelThreeParseInput'\endcell
52 `==== <title> ===='\endcell`\mdSectionLevelThree'\\
53 `\SectionLevelTwoParseInput'\endcell
54 `=== <title> ==='\endcell`\mdSectionLevelTwo'\\
55 `\SectionLevelOneParseInput'\endcell
56 `== <title> =='\endcell`\mdSectionLevelOne'\\
57 %% 2010/03/29:
58 `\ProcessInputWith{PPScomment}'\endcell
59 `%% <comment>'\endcell `%%<empty>', 'mdoccorr.cfg'\\
60 `\ProcessInputWith{PScomment}'\endcell
61 `% <comment>'\endcell `%<empty>', 'mdoccorr.cfg'
62 \end{tabular}
63 \end{center}
64
65 % \par\kern-2pt
66 \noindent \textbf{Preprocessing before} &\begin{document}:
67 |\MakeJobDoc| (same parameters)
68
69 \vskip10pt \raggedright
70 \noindent \textbf{More fine-grained:}\\
71 \textbf{a.~Choices for next preprocessing run:}
72 \begin{description}
73 \cmdboxitem|\ResultFile{<output>}| opens <output>
74 % \cmdboxitem|\LaTeXresultFile{<output>}| see below
75 \cmdboxitem|\Headerlines{<header-lines>}|
76 `\MakeJobDoc''s first mandatory argument
77 \cmdboxitem|\MainDocParser{<main-parser>}|
78 `\MakeJobDoc''s second mandatory \rlap{argument}
79 \cmdboxitem|\ProcessLineMessage{<message>}|
80 \defto{<message>}{&\message{.}}
81 \cmdboxitem|\input{mdoccorr.cfg}| chooses `\MakeDocCorrectHook'
82 \end{description}
83 \textbf{b.~Manual insertions to <output>:}
84 \begin{description}
85 \cmdboxitem|\WriteResult{<balanced>}| writes <balanced> to <output>
86 \cmdboxitem|\WriteProvides| writes `\ProvidesFile' line from 'fifindo'
87 \cmdboxitem|\LaTeXresultFile{<output>}| issues
88 `\ResultFile{<output>}', writes `\ProvidesFile' line from 'makedoc'
89 \end{description}
90 \textbf{c.~Processing <input>, closing <output>:}
91 \begin{description}
92 \cmdboxitem|\ProcessFileWith{<input>}{<loop-body>}|
93 reads each <input> line to macro |\fdInputLine|,
94 applies <loop-body>
95 \cmdboxitem|\MakeDoc{<input>}|
96 inputs `mdoccorr.cfg'
97 copies <header-lines> from <input> to <output>,
98 applies <main-parser>
99 \cmdboxitem|\CloseResultFile| closes <output>
100 \cmdboxitem|\MakeCloseDoc{<input>}| issues
101 `\MakeDoc{<input>}\CloseResultFile'
102 \cmdboxitem|\MakeSingleDoc[<out-ext>]{<in-output>.<in-ext>}|
103 issues `\LaTeXresultFile{<in-output>.<out-ext>}'
104 and `\MakeDocCloseDoc{<in-output>.<in-ext>}',
105 \defto{<out-ext>}{`doc'},
106 \end{description}
107 %% 2012/03/18:
108 \textbf{d.~Avoid &\input{mdoccorr.cfg} by}
109 |\MakeInputJobDoc*|, |\MakeJobDoc*|, |\MakeDoc*|,
110 |\MakeCloseDoc*|, or |\MakeSingleDoc*|
111
112 \end{document}
113