summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/nicetext
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-04-20 22:50:28 +0000
committerKarl Berry <karl@freefriends.org>2009-04-20 22:50:28 +0000
commitee53eac199e12fb91859fd18a43dd506ff75e3a9 (patch)
treeebe1417122388e1022b9ab77f0af3e687a7c061f /Master/texmf-dist/doc/latex/nicetext
parented190dcc699e8dbd39a0f38c26e80270b7e4df92 (diff)
nicetext update (20apr09)
git-svn-id: svn://tug.org/texlive/trunk@12766 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/nicetext')
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/CHANGE.LOG33
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/NNOUNCE.TXT25
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/README73
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/README.txt90
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/doclog/fifinddo.doc807
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/doclog/makedoc.doc442
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/doclog/mdcorr.doc25
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/doclog/niceverb.doc283
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/docsrc/WIKICHEA.TEX148
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/docsrc/makedoc.tex82
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/docsrc/niceverb.tex261
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/fifinddo.pdfbin0 -> 250201 bytes
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/makedoc.pdfbin0 -> 210492 bytes
-rw-r--r--Master/texmf-dist/doc/latex/nicetext/niceverb.pdfbin138688 -> 184077 bytes
14 files changed, 1757 insertions, 512 deletions
diff --git a/Master/texmf-dist/doc/latex/nicetext/CHANGE.LOG b/Master/texmf-dist/doc/latex/nicetext/CHANGE.LOG
new file mode 100644
index 00000000000..cb8826d2ff2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nicetext/CHANGE.LOG
@@ -0,0 +1,33 @@
+______________________________________________________________________
+nicetext RELEASE 0.2 2009/04/15 add `fifinddo' and `makedoc' for
+ txt -> latex preprocessing
+
+- README 2009/04/15 updated
+ CHANGE.LOG 2009/04/15 new
+
+- fifinddo.sty v0.3 2009/04/15 first CTAN release
+ fifinddo.pdf 2009/04/15
+ mkfddoc.tex 2009/04/15
+
+- makedoc.sty v0.2 2009/04/13 first CTAN release
+ makedoc.pdf 2009/04/15
+ makedoc.cfg 2009/04/15
+ mdcorr.cfg 2009/04/15
+
+- niceverb.sty v0.2 2009/04/15 strengthened \SimpleVerb,
+ \sf detection after `(',
+ more for \niceverbNoVerList
+ niceverb.pdf 2009/04/15 adjusted to new doc generation
+ method, mentioning it,
+ motivation extended,
+ more examples
+
+______________________________________________________________________
+nicetext RELEASE 0.1 2009/02/23: first CTAN releases of
+ `niceverb' and `wiki'
+
+- niceverb.sty v0.1 2009/02/21
+ niceverb.pdf 2009/02/23
+
+- wiki.sty v0.2 2008/07/02
+ wikicheat.pdf 2009/01/17
diff --git a/Master/texmf-dist/doc/latex/nicetext/NNOUNCE.TXT b/Master/texmf-dist/doc/latex/nicetext/NNOUNCE.TXT
new file mode 100644
index 00000000000..4d3c83272a0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nicetext/NNOUNCE.TXT
@@ -0,0 +1,25 @@
+'fifinddo' & 'makedoc' -- string substitution and "txt->TeX" by LaTeX
+======================================================================
+The NICETEXT bundle offers ``minimal'' markup syntax for restricted
+kinds of text: There should not be much more characters typed than
+printed! (though keeping LaTeX quality.) No more backslashes,
+technical terms, and curly braces! (so clumsy on PC keyboards) ...
+
+Main focus now is easy *documentation of LaTeX packages*.
+Preprocessing by 'Perl' or so is replaced by TeX macros
+(reviving/generalizing the 'docstrip' idea).
+
+'fifinddo.sty' provides setup for txt -> TeX preprocessing macros
+including *expandable* sequences of safe, correct string substitions.
+'fifinddo.pdf' mathematically characterizes wrong substring
+detection by 'substr.sty' as well as by LaTeX's internal `\in@'.
+
+There is a script language for detecting package code and
+documentation and for supplying plain text with typographical markup
+('makedoc.sty', 'mdcorr.cfg').
+______________________________________________________________________
+CATALOGUE: These packages might be compared with:
+- easylatex, txt2latex, txt2tex
+ (typographical and TeX input enhancement);
+- doc, gmdoc, lineno (\DocInput);
+- substr, datatool, xstring, stringstrings, makematch, ... (parsing)
diff --git a/Master/texmf-dist/doc/latex/nicetext/README b/Master/texmf-dist/doc/latex/nicetext/README
index 171fd1d339f..b2b7811b975 100644
--- a/Master/texmf-dist/doc/latex/nicetext/README
+++ b/Master/texmf-dist/doc/latex/nicetext/README
@@ -2,14 +2,22 @@
(c) 2009 Uwe Lueck http://contact-ednotes.sty.de.vu
+
== General Idea ==
-The NICETEXT bundle offers ``minimal'' markup syntax for rather
+The NICETEXT bundle supports ``minimal'' markup syntax for rather
simple kinds of text. The code you type should show little more
characters than are printed, though you get LaTeX quality. We try
to do away with backslashes, technical terms, and curly braces
(which also are so clumsy to type on PC keyboards).
+Main focus is easy documentation of LaTeX packages. Preprocessing
+by Perl or so is replaced by TeX macros (reviving/generalizing the
+'docstrip' idea), including expandable, safe, correct string
+substitution and typographical enhancements of plain text for
+LaTeX input.
+
+
== Packages ==
'wiki.sty' addresses general kinds of texts. 'niceverb.sty' is
@@ -23,37 +31,60 @@ you just type
\foo[<opt-arg>]{<mand-arg>}
!-)
- == Comparison ==
+'fifinddo.sty' provides basic setup for text filtering, especially
+string substitution. 'makedoc.sty' extends it to provide a simple
+script language for transforming plain text package files into LaTeX
+input files [manual!?]. One LaTeX run can perform preprocessing and
+typesetting.
+
+
+ == Comparisons ==
-One source of inspiration is the markup syntax that is used in
-editing Wikipedia pages. The package 'wiki.sty' of the bundle
-offers a very similar syntax as a LaTeX front-end. It suffices for
-italics, boldface, sectioning, and certain list-like environments.
-This is also similar to 'easylatex',
+One source of inspiration is the markup syntax of editing Wikipedia
+pages. 'wiki.sty' of the bundle offers something similar as a LaTeX
+front-end for italics, boldface, sectioning, and certain list-like
+environments. This is also similar to 'easylatex',
http.//www.ctan.org/pkg/easylatex
-which is more powerful and uses Perl. 'wiki.sty', by contrast, is
-just a LaTeX package, working on any TeX installation.
+which is more powerful and uses Perl. NICETEXT, by contrast, consists
+just of LaTeX packages, working on any TeX installation [!? note
+restrictions in 'fifinddo.pdf']. Cf. also preprocessor packages
+'txt2tex' and 'txt2latex'.
+
+Concerning ``self-documentation,'' there is a difference to current
+`\DocInput', similar ideas are in 'gmdoc' and 'lineno.sty',
+see 'niceverb.pdf' and 'makedoc.pdf'. Standard 'doc.sty' and
+'contrib' extensions of it are rather avoided.
+
+There are several *LaTeX macro* packages for processing text or
+databases or for editing TeX's input stream while typesetting
+-- see 'fifinddo.pdf'. What seems to be new here is
+*expandable string substitution* and safe, correct detection of
+substrings -- discussed in 'fifinddo.pdf'.
+
== Documentation ==
+'fifinddo.pdf' describes 'fifinddo.sty', typeset from 'fifinddo.tex'.
+'makedoc.pdf' describes 'makedoc.sty', typeset from 'makedoc.tex'.
+'niceverb.pdf' describes 'niceverb.sty', typeset from 'niceverb.tex'.
+
+Typesetting them anew (for customizing printout) requires
+'makedoc.cfg', 'mdcorr.cfg', 'mkfddoc.tex' and the *.sty files
+in the working directory (no special guarantee that your hacks will
+work!) Cf. provided *.log files for what was input for *.pdf.
+
'wikicheat.pdf' is a one-page manual of 'wiki.sty'. The file
-'wiki.sty' contains additional documentation as ASCII text.
-'niceverb.pdf' describes 'niceverb.sty'. Note that certain
-features must be activated by commands in the document environment.
+'wiki.sty' contains additional documentation as plain text.
+Note that certain features must be activated by commands in the
+document environment.
+
== What is missing ==
-1. 'niceverb' should extend 'wiki', yet their font switchings are
-incompatible at present. 2. 'niceverb' should typeset the ASCII
-documentation of 'wiki.sty' ... This upload is for reference and
-for proving that I am not just dreaming. I think repairing needs
-only few hours, yet I must do something different right now. See
-more on what's missing in 'niceverb.pdf'.
+A lot, see niceverb.pdf and fifinddo.pdf.
-3. I have a package 'nicedots' for controlling horizontal spacing
-with ellipses which may go here.
________________________________
- [This file 2009/02/23 Uwe Lueck]
+ [This file 2009/04/15 Uwe Lueck]
diff --git a/Master/texmf-dist/doc/latex/nicetext/README.txt b/Master/texmf-dist/doc/latex/nicetext/README.txt
new file mode 100644
index 00000000000..b2b7811b975
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nicetext/README.txt
@@ -0,0 +1,90 @@
+ The NICETEXT bundle
+
+ (c) 2009 Uwe Lueck http://contact-ednotes.sty.de.vu
+
+
+ == General Idea ==
+
+The NICETEXT bundle supports ``minimal'' markup syntax for rather
+simple kinds of text. The code you type should show little more
+characters than are printed, though you get LaTeX quality. We try
+to do away with backslashes, technical terms, and curly braces
+(which also are so clumsy to type on PC keyboards).
+
+Main focus is easy documentation of LaTeX packages. Preprocessing
+by Perl or so is replaced by TeX macros (reviving/generalizing the
+'docstrip' idea), including expandable, safe, correct string
+substitution and typographical enhancements of plain text for
+LaTeX input.
+
+
+ == Packages ==
+
+'wiki.sty' addresses general kinds of texts. 'niceverb.sty' is
+made for documenting LaTeX packages. 'niceverb.sty' especially
+offers [almost-]WYSIWIG for meta-variables (macro arguments) and
+for referring to commands (and their syntax) in footnotes,
+section titles etc. E.g., to get the syntax description
+
+ \foo[<opt-arg>]{<mand-arg>}
+you just type
+ \foo[<opt-arg>]{<mand-arg>}
+!-)
+
+'fifinddo.sty' provides basic setup for text filtering, especially
+string substitution. 'makedoc.sty' extends it to provide a simple
+script language for transforming plain text package files into LaTeX
+input files [manual!?]. One LaTeX run can perform preprocessing and
+typesetting.
+
+
+ == Comparisons ==
+
+One source of inspiration is the markup syntax of editing Wikipedia
+pages. 'wiki.sty' of the bundle offers something similar as a LaTeX
+front-end for italics, boldface, sectioning, and certain list-like
+environments. This is also similar to 'easylatex',
+
+ http.//www.ctan.org/pkg/easylatex
+
+which is more powerful and uses Perl. NICETEXT, by contrast, consists
+just of LaTeX packages, working on any TeX installation [!? note
+restrictions in 'fifinddo.pdf']. Cf. also preprocessor packages
+'txt2tex' and 'txt2latex'.
+
+Concerning ``self-documentation,'' there is a difference to current
+`\DocInput', similar ideas are in 'gmdoc' and 'lineno.sty',
+see 'niceverb.pdf' and 'makedoc.pdf'. Standard 'doc.sty' and
+'contrib' extensions of it are rather avoided.
+
+There are several *LaTeX macro* packages for processing text or
+databases or for editing TeX's input stream while typesetting
+-- see 'fifinddo.pdf'. What seems to be new here is
+*expandable string substitution* and safe, correct detection of
+substrings -- discussed in 'fifinddo.pdf'.
+
+
+ == Documentation ==
+
+'fifinddo.pdf' describes 'fifinddo.sty', typeset from 'fifinddo.tex'.
+'makedoc.pdf' describes 'makedoc.sty', typeset from 'makedoc.tex'.
+'niceverb.pdf' describes 'niceverb.sty', typeset from 'niceverb.tex'.
+
+Typesetting them anew (for customizing printout) requires
+'makedoc.cfg', 'mdcorr.cfg', 'mkfddoc.tex' and the *.sty files
+in the working directory (no special guarantee that your hacks will
+work!) Cf. provided *.log files for what was input for *.pdf.
+
+'wikicheat.pdf' is a one-page manual of 'wiki.sty'. The file
+'wiki.sty' contains additional documentation as plain text.
+Note that certain features must be activated by commands in the
+document environment.
+
+
+ == What is missing ==
+
+A lot, see niceverb.pdf and fifinddo.pdf.
+
+
+ ________________________________
+ [This file 2009/04/15 Uwe Lueck]
diff --git a/Master/texmf-dist/doc/latex/nicetext/doclog/fifinddo.doc b/Master/texmf-dist/doc/latex/nicetext/doclog/fifinddo.doc
new file mode 100644
index 00000000000..7178ee20640
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nicetext/doclog/fifinddo.doc
@@ -0,0 +1,807 @@
+\ProvidesFile{fifinddo.doc}[2009/04/16 automatically generated with makedoc.sty]
+\begin{packagecode}
+%% Macro package `fifinddo.sty' for LaTeX2e, %% FIDO, FIND!
+%% copyright (C) 2009 Uwe L\"uck,
+%% http://www.contact-ednotes.sty.de.vu
+%% -- author-maintained in the sense of LPPL below --
+%% for processing tex(t) files
+%% (checking, filtering, converting, substituting, expanding, ...)
+
+\def\fileversion{0.3} \def\filedate{2009/04/15}
+
+%% This file can be redistributed and/or modified under
+%% the terms of the LaTeX Project Public License; either
+%% version 1.3a of the License, or any later version.
+%% The latest version of this license is in
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% We did our best to help you, but there is NO WARRANTY.
+%% Please report bugs, problems, and suggestions via
+%%
+%% http://www.contact-ednotes.sty.de.vu
+%%
+%% For the full documentation, look for `fifinddo.pdf'.
+%% Its source starts in `fifinddo.tex'.
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Format and package version \unskip }
+
+\begin{packagecode}
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+% 1994/12/01: \newcommand* etc.
+\ProvidesPackage{fifinddo}[\filedate\space v\fileversion\space
+ filtering TeX(t) files by TeX (UL)]
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Category codes \unskip }
+
+
+We use the ``underscore'' as ``compound identifier.''
+\begin{packagecode}
+\catcode`\_=11 %% underscore used in control words
+\end{packagecode}
+|\MakeOther| is a synonym for `\@makeother', needed for matching
+special characters from the input file. It is exemplified by
+|\fdPatternCodes| which is the default of |\PatternCodes|.
+The latter is used in setup macros for reading patterns.
+\begin{packagecode}
+\@ifundefined{MakeOther}{\let\MakeOther\@makeother}{}
+\newcommand*{\fdPatternCodes}{\MakeOther\&\MakeOther\$}
+\newcommand*{\PatternCodes}{} \let\PatternCodes\fdPatternCodes
+ %% TODO adding/removing
+\end{packagecode}
+It would be bad to have `\MakeOther\%' and `\MakeOther\ ' here in
+that this may have unexpected, weird effects with arguments of
+setup macros. Therefore neither `\dospecials' nor `\@sanitize' are
+used. Curly braces remain untouched as default delimiters in setup
+macros. For matching them, you must use `\MakeOther\{' and
+`\MakeOther' in your `\PatternCodes', or |\Delimiters| to introduce
+new ones at the same time, e.g., `\Delimiters\[\]':
+\begin{packagecode}
+\newcommand*{\Delimiters}[2]{%
+ \MakeOther\{\MakeOther\}\catcode`#1=1\catcode`#2=2\relax}
+\end{packagecode}
+For replacing strings or for defining other strings of ``other''
+characters by `\edef', you can use some \LaTeX\ constructs---here
+are copies |\PercentChar| and |\BackslashChar| of them
+(do you need more?):
+\begin{packagecode}
+\newcommand*{\PercentChar}{} \let\PercentChar\@percentchar
+\newcommand*{\BackslashChar}{} \let\BackslashChar\@backslashcar
+\end{packagecode}
+
+\section{\hspace{1sp}\ignorespaces File handling \unskip }
+
+\begin{packagecode}
+\newwrite\result_file %% or write to \@mainaux!?
+\end{packagecode}
+|\ResultFile{<output>}| opens (and empties) a file
+<output> to be written into.
+\begin{packagecode}
+\newcommand*{\ResultFile}[1]{%
+ \def\result_file_name{#1}%
+ \immediate\openout\result_file=#1}
+\end{packagecode}
+|\WriteResult{<balanced>}| writes a <balanced> line into
+<output> (or more lines with `^^J').
+\begin{packagecode}
+\newcommand*{\WriteResult}[1]{%
+ \immediate\write\result_file{#1}}
+\end{packagecode}
+|\WriteProvides| writes a `\ProvidesFile' command to the
+opened <output> file. This should be used when <output>
+is made as \LaTeXe\ input.
+\begin{packagecode}
+\newcommand*{\WriteProvides}{%
+ \WriteResult{%
+ \string\ProvidesFile{\result_file_name}%
+ [\the\year/\two@digits\month/\two@digits\day\space
+ automatically generated with fifinddo.sty]}}%
+\end{packagecode}
+|\ProcessFileWith{<input>}{<loop-body>}| opens a file <input>
+and runs a loop on its lines the main body of which is <loop-body>.
+When it starts, a new line of <input> is stored as macro
+|\fdInputLine|.
+\begin{packagecode}
+\newcommand*{\ProcessFileWith}[2]{%
+ \openin\@inputcheck=#1%
+% \ifeof\@inputcheck %% bad `exists?' test
+% \PackageError{fifinddo}{File `#1' not here}%
+% {Mistyped?}%
+% \else
+ \global\c@fdInputLine=\z@ %% line counter reset
+ \begingroup
+ \MakeOther\{\MakeOther\}\@sanitize
+ %% from docstrip.tex:
+ % \MakeOther\^^A\MakeOther\^^K%% irrelevant, not LaTeX
+ \endlinechar\m@ne
+ %% <- cf. TeXbook "extended keyboards" up-/downarrow
+ %% -> "math specials", cf. "space specials"
+ \MakeOther\^^I% ASCII horizontal tab -- guessed!? ^^L!?
+ \loop \ifeof\@inputcheck \else
+ \read\@inputcheck to \fdInputLine
+ \ignorespaces #2%
+ \repeat
+ \endgroup
+% \fi
+ \closein\@inputcheck}
+\end{packagecode}
+|\CloseResultFile| closes <output>.
+\begin{packagecode}
+\newcommand*{\CloseResultFile}{\immediate\closeout\result_file}
+\end{packagecode}
+Peter Wilson's 'newfile' provides more powerful file handling.
+% <- TODO relevant? 2009/04/12
+
+\pagebreak %% TODO move theory to fifinddo.tex 2009/04/12
+
+\section{\hspace{1sp}\ignorespaces Basic handling of substring conditionals \unskip }
+
+\label{sec:theory}
+
+\subsection{\hspace{1sp}\ignorespaces ``Substring Theory'' \unskip }
+
+\begin{flushright}\it
+I wished I could study string theory,\\
+but I only could study substring theory.
+\end{flushright}
+A \TeX\ macro, say, `\find' whose parameter text
+(cf.\ \TeX book p.~203)
+starts with `#1<pattern>#2&' stops \TeX\ with an error if it does
+not find <pattern> and then `&'. Otherwise we have a situation
+`\find<split1><pattern><split2>&', and `\find' reads <split1> as
+#1 and <split2> as #2. An important point to note is that <split1>
+will not contain <pattern>, but possibly <pattern> has more
+occurrences in <split2>. In this sense, `\find' uses the
+\emph{first} occurrence of <pattern> it finds in order to delimit #1.
+Finding the \emph{last} occurrence of <pattern> therefore needs a
+special idea.
+
+In order to use `\find' for a test whether <pattern> is in
+<target>, we build a ``sandbox'' |\find<sand>&|, where <sand>
+contains <target> \emph{and additionally} <pattern>---as a
+``dummy;'' so `&' delimits the search and `\find' finds
+<pattern> either in <target> or somewhere else before `&'.
+
+Consider the simple sandbox |\find<target><pattern>&|.
+We can test #1 and #2 on being empty by `\ifx$#1$' and `\ifx$#2$'.
+If #2 is empty, <pattern> is \emph{not} in <target>.
+If #1 is empty at the same time, <target> is empty.
+If #1 is empty and #2 is not, <pattern> \emph{starts} <target>!
+This can be used to implement
+Wikipedia-like lists %% TODO 2009/04/11
+and to distinguish package code from comments in 'makedoc'.
+
+If #2 is \emph{not} empty, <pattern> occurs in <target>---or this once
+was \emph{thought}, some time in developping the present package,
+as well as in the version of 'substr.sty' marked
+`2005-11-29',\footnote{\hspace{1sp}'substr' does not change
+ category codes
+ % as 'fifinddo' does
+ and uses \cs{@nil} as delimiter instead of our &&.} try
+\[`\IfSubStringInString{<str1><str2><str1>}{<str1><str2>}{YES}{NO}'\]
+which works \emph{verbatim} as well as considering <str1> and
+<str2> \emph{placeholders}, e.g., for
+\begin{center}
+ `\IfSubStringInString{day after day}{day after }{YES}{NO}'\footnote{%
+ Likewise \texttt{t\string\^ete-\string\`a-t\string\^te} $\dots$}\\
+ `\IfSubStringInString{AMSTERDAM}{AMSTERD}{YES}{NO}'\\
+ `\IfSubStringInString{TORONTO}{TORON}{YES}{NO}'\\
+ `\IfSubStringInString{bonbon}{bon}{YES}{NO}'\footnote{%
+ Polynesian: `aku aku', `rongorongo', `wiki wiki' $\dots$}\\
+ `\IfSubStringInString{bonobo}{bono}{YES}{NO}'
+ (an ape)
+\end{center}
+or `\IfSubStringInString{ionization}{ionizat}{YES}{NO}'.\footnote{%
+ Read 'substr.sty' or try ``normal'' things to convince yourself
+ that the syntax indeed is
+ &\IfSubStringInString{<pattern>}{<target>}{<yes>}{<no>}.}
+Same with \LaTeX's internal `\in@':
+\[`\makeatletter \in@{bonbon}{bon}\ifin@ YES\else NO\fi \makeatother'\]
+%% \makeatletter \in@{bonbon}{bon}\ifin@ YES\else NO\fi \makeatother
+%% \IfSubStringInString{ionization}{ionizat}{YES}{NO}
+
+In general, the previous approach \emph{fails if and exactly if}
+<pattern> has a \emph{period} $p$---less than its length---in the sense of that
+the $p$th token to the right or left of each token in <pattern>
+is the \emph{same} token.
+`AMSTERDAM' has a period 8, `day after day' 10, `bonbon' 3, `bonobo' 4.
+There is a counterexample <target> of length $p$ iff
+<pattern> has period $p$, namely the first substring of <pattern>
+having length $p$. If the length of <pattern> exceeds a multiple
+$mp$ of its period, the first $mp$ tokens of <pattern> form
+a counterexample <target>.
+
+Therefore, a sandbox must have something between <target> and
+<pattern>. We choose |\find<target>~<pattern>$&| as standard.
+The `$' will be used as an argument delimiter to get rid of the dummy
+<pattern> in <split2>, as well as to decide whether the match was
+in <target> or in the dummy part of the sandbox.
+The `$' can be replaced by another tilde `~' in order to
+test whether <target> \emph{ends} on a <pattern>, defining a macro
+like `\findatend' whose parameter text starts with `#1<pattern>~#2&'.
+
+
+\subsection{\hspace{1sp}\ignorespaces Plan for proceeding \unskip }
+
+When we check a file for several patterns, we seem to need
+\emph{two} macros for each pattern: one that has the pattern
+in its parameter text and one that stores the pattern for building
+the sandbox.\footnote{If it were for the pattern only, the parsing
+ macro might suffice and the macro calling it might extract the
+ pattern from a ``dummy expansion.'' Somewhat too much for me now;
+ on the other hand the calling macro also hands some ``current''
+ informations to the parsing macro---oh, even this could be
+ handled by a general ``calling'' macro \dots}
+ %% TODO 2009/04/15
+We use a separate \emph{``name space''} for each of
+both kinds. The parsing macro and the macro building the sandbox
+will have a common \emph{``identifier''} by which the user or
+programmer calls them. Actually, she will usually (first) call
+the sandbox box builder. The sandbox builder calls the parsing
+macro. When \emph{all} occurrences of a pattern in the target are
+looked for, the parser may call itself.
+
+Actually, the parsing macro will execute certain actions
+depending on what it finds in the sandbox, so we call it a
+\emph{``substring conditional''}. It may read additional arguments
+after the sandbox that store information gathered before.
+This is especially useful for designing \emph{``expandable''}
+chains (sequences) of conditionals where macros cannot store information in
+macros. The macro setting up the sandbox will initialize such
+extra arguments at the same time.
+
+It may be more efficient \emph{not} to use the following setup
+macros but to type the macros yourself, just using the following
+as templates. The setup macros are especially useful with patterns
+that contain ``special characters,'' as when you are looking for
+lines that might be package comments.
+
+
+\subsection{\hspace{1sp}\ignorespaces Set up conditionals \unskip }
+
+`substr_cond' is the ``name space'' for substring conditionals.
+A colon separates it from \emph{``job identifiers''} in the actual
+macro names.
+\begin{packagecode}
+\def\substr_cond{substr_cond:}
+\end{packagecode}
+|\MakeSubstringConditional{<id>}[<changes>]{<pattern>}|
+starts the definition of a conditional with \emph{identifier} <id>
+and pattern <pattern>. <changes> optionally add commands to
+be executed after `\PatternCodes' in a local group.
+It may be more safe to redefine `\PatternCodes' instead.
+\begin{packagecode}
+\newcommand*{\MakeSubstringConditional}{%
+ \afterassignment\mk_substr_cond_san \def\cond_id}
+\newcommand*{\mk_substr_cond_san}[1][]{%
+ \begingroup \PatternCodes #1\mk_substr_cond}
+ %% #1 more changes
+\end{packagecode}
+`\begingroup' |\mk_substr_cond{<pattern>}|
+can be directly called by other programmer setup commands when
+`\cond_id' and <pattern> have been read.
+\begin{packagecode}
+\def\mk_substr_cond #1{%% #1 pattern string
+ \endgroup \@namedef{\substr_cond \cond_id}##1#1##2&}
+\end{packagecode}
+This really is not \LaTeX. We are starting defining a macro
+`\substr_cond:<id>' in primitive \TeX\ with `\def' in the form
+\[`\def\substr_cond:<id>#1<pattern>#2&'\]
+where `\csname' etc.\ render \lq`:<id>'\rq\ part of the macro name.
+The user or programmer macro produces the part of the definition
+until the delimiter `&' to match the sandbox. You have to add
+(maybe) #3 etc.\ and the `{<definition text>}'
+just as with primitive \TeX.
+
+
+\subsection{\hspace{1sp}\ignorespaces Set up sandboxes \unskip }
+
+There was a \emph{question:} will we rather see
+\emph{string macros} or \emph{strings from macro arguments}?
+The input file content always comes
+as `\fdInputLine' first, so we at least \emph{must account} for
+the possibility of string macros as input.
+
+One easy way to apply several checks and substitutions to
+`\fdInputLine' before the result is written to <output> is
+`\let\OutputString\fdInputLine' and then let `\OutputString'
+be to what each job refers as \emph{its}
+input and output, finally `\WriteResult{\OutputString}'.
+(`\fdInputLine' might better not be touched, it could be used
+for a final test whether any change applied for some message on
+screen, even with an entirely expandable chain of actions.)
+This way each job, indeed each recursive substitution of a single
+string must start with expanding `\OutputString'.
+
+On the other hand, there is the idea of \emph{``expandable''
+chains of substitutions}. We may, e.g., define a macro, say,
+`\manysubstitutions{<macro-name>}', such that
+`\WriteResult{\manysubstitutions{\fdInputLine}}'
+writes to <output> the result of applying many expandable
+substitutions to `\fdInputLine'.
+Such a macro `\manysubstitutions' may read `\fdInputLine',
+but it must not redefine any macros.
+Instead, the substitution macros it calls must read results
+of previous substitutions as \emph{arguments}.
+
+Another aspect:
+the order of substitutions should be easy to
+change. Therefore expanding of string macros should rather be
+controlled by the way a job is \emph{called}, not right here
+at the \emph{definition} of the job. For this reason,
+a variant of the sandbox builder expanding some macro was given up.
+
+`setup_substr_cond' is the name space for macros that build
+sandboxes and initialize arguments for conditional macros.
+\begin{packagecode}
+\def\setup_substr_cond{setup_substr_cond:}
+\end{packagecode}
+|\MakeSetupSubstringCondition{<id>}[<changes>]{<pattern>}{<more-args>}|
+% <- TODO allow `%' and ` ' for breaking code lines.
+---same <id>, <changes>, <pattern> as for
+`\MakeSubstringConditional' (this is bad, there may be
+|\MakeSubstringConditional*{<more-args>}|)---creates the
+% <- TODO: store args in \Make$\dots$Conditional
+corresponding sandbox, by default without tilde wrap.
+<more-args> may contain `{#1}' to store the string that was tested,
+also `{<id>}' for calling repetitions and `{<pattern>}' for screen
+or log informations.
+\begin{packagecode}
+\newcommand*{\MakeSetupSubstringCondition}{%
+ \afterassignment\mk_setup_substr_cond_san \def\cond_id}
+\newcommand*{\mk_setup_substr_cond_san}[1][]{%
+ \begingroup \PatternCodes #1\mk_setup_substr_cond}
+\end{packagecode}
+`\begingroup' |\mk_setup_substr_cond{<pattern>}{<more-args>}|
+can be directly called by other programmer setup commands after
+`\cond_id' and <pattern> have been read:
+\begin{packagecode}
+\def\mk_setup_substr_cond #1#2{%% #1 pattern string,
+ %% #2 additional arguments, e.g., `{#1}' to keep tested string
+ \endgroup
+ \expandafter \edef
+ \csname \setup_substr_cond \cond_id \endcsname ##1{%
+% \expandafter \noexpand
+% \csname \substr_cond \cond_id \endcsname %% 2009/04/10:
+ \make_not_expanding_cs{\substr_cond \cond_id}%
+\end{packagecode}
+By `\edef', the name of the substring conditional is stored here
+as a single token. The rest of the sandbox follows.
+\begin{packagecode}
+ ##1\noexpand~#1\dollar_tilde&#2}%
+ \let\dollar_tilde\sandbox_dollar}
+\end{packagecode}
+If a tilde `~' has been used instead of `$', the default
+is restored.
+\begin{packagecode}
+\def\sandbox_dollar{$}
+\let\dollar_tilde\sandbox_dollar
+\end{packagecode}
+The following general tool |\make_not_expanding_cs| has been used
+(many definitions in 'latex.ltx' could have used it): %% 2009/04/10
+\begin{packagecode}
+\def\make_not_expanding_cs#1{%
+ \expandafter \noexpand \csname #1\endcsname}
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Getting rid of the tildes \unskip }
+
+|\let~\TildeGobbles| can be used to suppress dummy patterns
+(contained in <split2>)
+in `\write'ing or with `\edef'. $\dots$ will probably become obsolete
+$\dots$ however, it is helpful in that you needn't care
+whether there is a dummy wrap left at all. (2009/04/13)
+\begin{packagecode}
+\newcommand{\TildeGobbles}{} \def\TildeGobbles#1${}
+\end{packagecode}
+|\RemoveDummyPattern| is used to remove the dummy pattern
+\emph{immediately}, not waiting for `\write'ing
+or other ``total'' expansion: %% 2009/04/13
+\begin{packagecode}
+\newcommand{\RemoveDummyPattern}{} \def\RemoveDummyPattern#1~#2${#1}
+\end{packagecode}
+|\RemoveDummyPatternArg<macro>{<arg>}| executes
+`\RemoveDummyPattern' in the next argument:
+\begin{packagecode}
+\newcommand*{\RemoveDummyPatternArg}[2]{%
+ \expandafter #1\expandafter {\RemoveDummyPattern #2}}
+\end{packagecode}
+|\RemoveTilde| is used to remove the tilde that separated
+the dummy pattern from <split1>.
+\begin{packagecode}
+% %% An alternative policy is to pass
+% %% <target> (as an argument) to the parsing macro.
+\newcommand{\RemoveTilde}{} \def\RemoveTilde#1~{#1}
+\end{packagecode}
+|\RemoveTildeArg<macro>{<arg>}| executes `\RemoveTilde'
+in the next argument:
+\begin{packagecode}
+\newcommand*{\RemoveTildeArg}[2]{%
+ \expandafter #1\expandafter {\RemoveTilde #2}}
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Calling conditionals \unskip }
+
+|\ProcessStringWith{<target-string>}{<id>}| builds the sandbox
+to search <target-string> for the <pattern> associated with the
+parser-conditional that is identified by <id>, the sandbox then
+calls the parser.
+\begin{packagecode}
+\newcommand*{\ProcessStringWith}[2]{%
+ \csname \setup_substr_cond #2\endcsname{#1}}
+\end{packagecode}
+|\ProcessExpandedWith{<string-macro>}{<id>}| does the same but with
+a \emph{macro} (like `\fdInputLine' or `\OutputString') in which
+the string to be tested is stored.
+\begin{packagecode}
+\newcommand*{\ProcessExpandedWith}[2]{%
+ \csname \setup_substr_cond #2\expandafter \endcsname
+ \expandafter{#1}}
+\end{packagecode}
+I would have preferred the reversed order of arguments which seems
+to be more natural, but the present is more efficient.
+Macros with reversed order are currently stored after `\endinput'
+in section~\ref{sec:pondered}, may be they once return.
+
+Anyway, most desired will be |\ProcessInputWith{<id>}| just
+applying to `\fdInputLine':
+\begin{packagecode}
+\newcommand*{\ProcessInputWith}[1]{%
+ \csname \setup_substr_cond #1\expandafter \endcsname
+ \expandafter{\fdInputLine}}
+\end{packagecode}
+(Definition almost copied for efficiency.)
+\begin{packagecode}
+ %% TODO: error when undefined 2009/04/07
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Copy jobs \unskip }
+
+A job identifier <id> may also be considered a mere \emph{hook},
+a \emph{placeholder} for a parsing job. What function actually is
+called may depend on conditions that change while reading the
+<input> file. %%% On a certain condition,
+|\CopyFDconditionFromTo{<id1>}{<id2>}|
+\emph{creates or redefines a sandbox builder} with identifier <id2>
+that afterwards behaves like the sandbox builder <id1>.
+So you can store a certain behaviour as <id1> in advance in order
+once to change the behaviour of <id2> into that of <id1>.
+\begin{packagecode}
+\newcommand*{\CopyFDconditionFromTo}[2]{%
+ \expandafter \let
+ \csname \setup_substr_cond #2\expandafter \endcsname
+ \csname \setup_substr_cond #1\endcsname}
+\end{packagecode}
+(Only the \emph{sandbox} is copied here---what about
+changing conditionals?) %% TODO
+
+An ``almost'' example is typesetting documentation from a package
+file where the ``Legalese'' header might be typeset verbatim
+although it is marked as ``comment.'' (The present %% 2009/04/07
+example changes ``hand-made'' macros instead.)
+
+This feature could have been placed more below as a ``programming
+tool.''
+
+
+\section{\hspace{1sp}\ignorespaces Programming tools \unskip }
+
+
+\subsection{\hspace{1sp}\ignorespaces Tails of conditionals \unskip }
+
+\label{sec:tails}
+When creating complex \emph{expandable} conditionals,
+this may amount to have primitive `\if' $\dots$ `\fi' conditionals
+nested quite deeply, once perhaps too deep for \TeX's memory.
+To avoid this, you can apply the common `\expandafter' trick
+which finishes the current `\if' $\dots$ `\fi' before an inside
+macro is executed (cf.\ \TeX book p.~219 on ``tail recursion'').
+
+Internally tests whether certain strings are present at certain
+places will be carried out by tests on emptiness or
+onwards) on starting with `~'. E.g.,
+``#1~=~<split1> empty'' indicates that either the <pattern>
+starts a line or the line is empty altogether (this must be
+decided by another test).
+
+|\IfFDempty{<arg>}{<when-empty>}{<when-not-empty>}|
+is used to test <arg> on emptyness (without expanding it):
+\begin{packagecode}
+\newcommand*{\IfFDempty}[1]{%
+ \ifx$#1$\expandafter \@firstoftwo \else
+ \expandafter \@secondoftwo \fi}
+\end{packagecode}
+|\IfFDinputEmpty{<when-empty>}{<when-not-empty>}| is a variant of
+the previous to execute <when-empty> if the loop processing <input>
+finds an empty line---otherwise <when-not-empty>.
+\begin{packagecode}
+\newcommand*{\IfFDinputEmpty}{%
+ \ifx\fdInputLine\@empty \expandafter \@firstoftwo \else
+ \expandafter \@secondoftwo \fi}
+\end{packagecode}
+|\IfFDdollar{<arg>}{<when-empty>}{<when-not-empty>}|
+is another variant, testing <split2> for being `$',
+main indicator of there is a match anywhere in <target>
+(as opposed to starting or ending match):
+\begin{packagecode}
+\newcommand*{\IfFDdollar}[1]{%
+ \ifx$#1\expandafter \@firstoftwo \else
+ \expandafter \@secondoftwo \fi}
+\end{packagecode}
+It is exemplified and explained in section~\ref{sec:replchain}.
+(The whole policy requires that `~' remains active in any
+ testing macros here!)
+
+However, you might always just type the replacement text
+(in one line) instead of
+such an `\If'\,$\dots$ (for efficiency \dots)
+
+If expandability is not desired, you can just chain macros that
+rework (so re-define) `\OutputString' or so.
+
+2009/04/11: tending towards combining $\dots$
+Keeping empty input and empty arguments apart is useful in that
+\emph{one} test of emptiness per input line should suffice---it
+may be left open whether this should be the first of all tests
+\dots
+
+
+\subsection{\hspace{1sp}\ignorespaces Line counter \unskip }
+
+A \LaTeX\ counter |fdInputLine| may be useful for screen or log
+messages, moreover you can use it to control processing of the
+<input> file ``from outside,'' not dependent on what the parsing
+macros find. The header of the file might be typeset verbatim,
+but we may be too lazy to define the ``header'' in terms of
+what is in the file. We just decide that the first $\dots$ lines
+are the ``header,'' even without counting just trying whether
+the output is fine. It may be necessary to change that number
+manually when the header changes.
+
+You also can insert lines in <output>
+which have no counterpart in <input>---if you know what you are
+doing. With 'makedoc', there is a hook `\EveryComment' that can
+be used to issue commands ``from outside'' at a place where
+executing the command is safe or appropriate.
+\begin{packagecode}
+\newcounter{fdInputLine}
+\end{packagecode}
+You then must insert |\CountInputLines| in the second argument
+of `\ProcessFileWith' (or in a macro called from there)
+so that the counter is stepped. %% TODO!? 2009/04/07
+\begin{packagecode}
+\newcommand*{\CountInputLines}{\global\advance\c@fdInputLine\@ne}
+\end{packagecode}
+At present %% 2009/04/07 TODO
+the counter is reset by `\ProcessFileWith', this may change.
+
+|\IfInputLine{<relation><number>}{<true>}{<false>}|, when called
+from the processing loop (second argument of `\ProcessFileWith')
+issues <true> commands if `\value{fdInputLine}<relation><number>'
+is true, otherwise <false>. <relation> may usually be just `='.
+\begin{packagecode}
+\newcommand*{\IfInputLine}[1]{%
+ \ifnum\c@fdInputLine#1\relax \expandafter \@firstoftwo
+ \else \expandafter \@secondoftwo \fi}
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces The ``identity job'' `LEAVE' \unskip }
+
+\label{sec:LEAVE}
+The job with identifier |LEAVE|
+\emph{leaves} an (expandable) chain of jobs
+(as expandable replacement in section~\ref{sec:replchain})
+and \emph{leaves} the processed string without changing it
+and without the braces enclosing it:
+\begin{packagecode}
+\expandafter \let
+ \csname \setup_substr_cond LEAVE\endcsname \@firstofone
+\end{packagecode}
+I.e., `\ProcessStringWith{<string>}{LEAVE}' expands to <string>
+$\dots$ \ProcessStringWith{(Indeed!)}{LEAVE}
+
+
+\section{\hspace{1sp}\ignorespaces Setup for expandable chains of replacements \unskip }
+
+\label{sec:replchain}%% TODO makedoc: provide less visible label/ref 2009/04/11
+By the following means, you can create macros
+(`\Transform' among them) such that, e.g.,
+\[`\edef\OutputString{\Transform{<string>}}'\] renders `\OutputString'
+the result of applying a chain (sequence) of stringwise replacements
+to <string>.
+You can even write a transformed input <string> to a file
+without defining anything anything after `\read to'\,.\,.\,.
+In this case however, you don't get any statistical message
+about what happened or not. With `\edef\OutputString' you can at
+least issue some `changed!' or `left!' (maybe `\message{!}' vs.\
+`\message{.}').
+There is an application in 'makedoc' for ``typographical upgrading''
+from plain text to \TeX\ input.
+
+|\repl_all_chain_expandable| will be the backbone of the
+replacements. It is called by some parsing macro <parser>
+and receives from the latter <split1>~=~#1 and <split2>~=~#2.
+#3 is the result of what happened so far.
+\begin{packagecode}
+\def\repl_all_chain_expandable#1#2#3#4#5#6{%
+ %% #1, #2 splits, #3 past, #4 substitute,
+ %% #5 repeat parser, #6 pass to
+% \ifx~#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+\end{packagecode}
+The previous line would be somewhat faster, but let us exemplify
+`\IfFDdollar' from section~\ref{sec:tails} instead:
+\begin{packagecode}
+ \IfFDdollar{#2}%
+\end{packagecode}
+If #2 starts with `$'---with category code 3, ``math shift''!,
+it \emph{is} `$', due to not reading `$'
+from input with its standard category code 3
+and the sandbox construction (where `$' appears with its standard
+category code). %% TODO might be explained earlier 2009/04/11
+ %% or refer to here.
+And this is the case \emph{exactly} when the <pattern> from
+<parser> didn't match, again due to the input category codes.
+Now on \emph{no} match, the sandbox builder #6 is called
+with target string #3#1 where the last tested string is attached
+to previous results. The ending `~' is removed, #6 inserts a new
+wrap for the new dummy pattern.
+\begin{packagecode}
+ {\RemoveTildeArg #6{#3#1}}%
+\end{packagecode}
+Otherwise $\dots$ the \emph{sandbox builder} <sandbox>
+(that will be shown below) that called <parser>
+initialized #5 to be that <parser> itself. (<parser> otherwise
+wouldn't know who it is.) So <parser> calls itself with another sandbox
+`#2&'. Note that #2 contains \lq`~<pattern>$'\rq\ due to the initial
+<sandbox> building.
+\begin{packagecode}
+ {#5#2&{#3#1#4}{#4}#5#6}}
+\end{packagecode}
+#4 is the replacement string that <sandbox> passed to <parse>.
+The first argument after the `&' is previous stuff plus
+the recently skipped <split1>
+plus #4 replacing the string <pattern> that was matched.
+
+Finally, #5 and #6 again ``recall'' <parser> and the sandbox
+builder to which to change in case of no other match.
+
+% TODO move following up!? 2009/04/11
+|\MakeExpandableAllReplacer{<id>}{<pattern>}{<replace>}{<id-next>}|
+creates sandbox and parser with common identifier <id> and search
+pattern <pattern>. Each occurrence of <pattern> will be replaced by
+<replace>. When <pattern> is not found, the sandbox builder for
+<id-next> is called. This may be another replacing macro of the
+same kind. To return the result without further transformations,
+call job `LEAVE' (section~\ref{sec:LEAVE}).
+\begin{packagecode}
+\newcommand*{\MakeExpandableAllReplacer}{%
+ \afterassignment\mk_setup_xpdbl_all_repl_san
+ \def\cond_id}
+\end{packagecode}
+$\dots$ usual intermezzo for reading patterns with non-standard
+category codes, this time we read \emph{two} patterns \dots
+\begin{packagecode}
+\newcommand*{\mk_setup_xpdbl_all_repl_san}[1][]{%
+ \begingroup \PatternCodes #1\mk_setup_xpdbl_all_repl}
+\end{packagecode}
+Here comes the real work.
+\begin{packagecode}
+\newcommand*{\mk_setup_xpdbl_all_repl}[3]{%
+ %% #1 pattern, #2 substitute, #3 pass to
+ \endgroup
+\end{packagecode}
+We take pains to call next jobs by single
+command strings and store them this way, not by `\csname',
+as `\ProcessStringWith' would do it. `\edef\@tempa'
+is used for this purpose, but \dots
+\begin{packagecode}
+ \edef\@tempa{%
+ \noexpand\mk_setup_substr_cond{#1}{%
+ {}{#2}%
+ \noexpand\noexpand
+\end{packagecode}
+That `\edef\@tempa' must \emph{not expand} the controll
+words after they have been computed from `\csname' etc.
+Moreover, expansion of the parser commands
+must be avoided another time, when `\@tempa' is executed.
+\begin{packagecode}
+ \make_not_expanding_cs{\substr_cond\cond_id}%
+ \noexpand\noexpand
+ \make_not_expanding_cs{\setup_substr_cond #3}}}%
+\end{packagecode}
+Those internal setup commands start with `\endgroup' to switch back
+to standard category codes. We must match them here by
+`\begingroup'.
+\begin{packagecode}
+ \begingroup \@tempa
+ \begingroup \mk_substr_cond{#1}{%
+ \repl_all_chain_expandable{##1}{##2}}}
+\end{packagecode}
+The final command is the one that we explained first. %% TODO 2009/04/11
+
+Support for dozens of replacements in one sequence
+and for screen messages
+must wait for another release, sorry! %% TODO 2009/04/11
+
+
+\section{\hspace{1sp}\ignorespaces Leave package mode \unskip }
+
+We restore the underscore `_' for math subscripts.
+(This might better depend on something \dots) %% TODO 2009/04/07
+\begin{packagecode}
+\catcode`\_=8 %% restores underscore use for subscripts
+
+\endinput
+\end{packagecode}
+\TeX\ ignores the rest of the file when it is \emph{input}
+``in the sense of `\input''', as opposed to just reading
+the file line by line to a macro like `\fdInputLine'.
+
+
+\section{\hspace{1sp}\ignorespaces Pondered \unskip }
+
+\label{sec:pondered}
+\begin{packagecode}
+ %% TODO abbreviated commands (aliases) \MkSubstrCond...
+ %% TODO \@onlypreamble!?
+\newcommand*{\ApplySubstringConditional}[1]{%
+ %% #1 identifier; text to be searched expected next
+ \csname setup_substr_cond:#1\endcsname}
+\newcommand*{\ApplySubstringConditionalToExpanded}[1]{% 2009/03/31+
+ \csname setup_substr_cond:#1\expandafter \endcsname \expandafter}
+\newcommand*{\ApplySubstringConditionalToInputString}[1]{% 2009/03/31+
+ \csname setup_substr_cond:#1\expandafter \endcsname
+ \expandafter {\fdInputLine}}
+ %% TODO or `\OutputString', even `\read' to `\OutputString'!?
+% \newcommand*{\ApplySubstringConditionalToExpanded}[2]{%
+% %% note: without assignments, robust!
+% %% BUT the `\csname ... \expandafter \endcsname' method is faster
+% \expandafter \reversed_apply_substr_cond
+% \expandafter {#2}{#1}}
+% \newcommand*{\reversed_apply_substr_cond}[2]{%
+% \ApplySubstringConditional{#2}{#1}}
+ %% ODER:
+% \newcommand*{\expand_attach_arg}[2]{%% 2009/03/31
+% %% #1 command with previous args, TODO cf. LaTeX3
+% \expandafter \attach_arg \expandafter {#1}{#2}}
+% %% actually #1 may contain more than one token,
+% %% only first expanded
+% \newcommand*{\attach_arg}[2]{#2{#1}}
+% \newcommand*{\ApplySubstringConditionalToExpanded}[2]{%
+% \expandafter \attach_arg \expandafter
+% {#2}{\ApplySubstringConditional{#1}}}
+\end{packagecode}
+
+\section{\hspace{1sp}\ignorespaces VERSION HISTORY \unskip }
+
+
+\begin{packagecode}
+v0.1 2009/04/03 very first version, tested on morgan.sty
+v0.2 2009/04/05 counter fdInputLine, \ProvidesFile moved from
+ \ProcessFile to \ResultFile, \CopyFD...,
+ category section first, more sectioning,
+ suppressing empty code lines before section
+ titles; discussion, \Delimiters
+ 2009/04/06 more discussion
+ 2009/04/07 more discussion, factored \WriteProvides out from
+ \ResultFile, \ProcessExpandedWith corrected
+ 2009/04/08 \InputString -> \fdInputline;
+ removed \ignorespaces
+ 2009/04/09 \WhenInputLine[2] -> \IfInputline[3],
+ \ProcessInputWith, typos,
+ \WriteProvides message `with'
+ 2009/04/10 \make_not_expanding_cs
+ DISCOVERED ``IF SUBSTRING'' ALGORITHM WRONG
+ (<str1><str2><str1> in <str1><str2>)
+v0.3 2009/04/11 SOME THINGS GIVEN UP EARLIER WILL BE REMOVED,
+ TO BE STORED IN THE COPY AS OF 2009/04/10
+ mainly: sandbox setup (tilde/dollar)
+ REAL ADDITION: setup for expandable replacing
+ 2009/04/12 played with `chain' vs. `sequence';
+ plain `...', `cf.', `etc.' for `mdcorr.cfg'
+ 2009/04/13 \RemoveTilde...
+ 2009/04/15 reworked text, same mistake \in@
+
+\end{packagecode}
diff --git a/Master/texmf-dist/doc/latex/nicetext/doclog/makedoc.doc b/Master/texmf-dist/doc/latex/nicetext/doclog/makedoc.doc
new file mode 100644
index 00000000000..ab4c7dc7370
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nicetext/doclog/makedoc.doc
@@ -0,0 +1,442 @@
+\ProvidesFile{makedoc.doc}[2009/04/16 automatically generated with makedoc.sty]
+\begin{packagecode}
+%% Macro package `makedoc.sty' for LaTeX2e,
+%% copyright (C) 2009 Uwe L\"uck,
+%% http://www.contact-ednotes.sty.de.vu
+%% -- author-maintained in the sense of LPPL below --
+%% for preparing documentations from packages.
+
+\def\fileversion{0.2} \def\filedate{2009/04/13}
+
+%% This file can be redistributed and/or modified under
+%% the terms of the LaTeX Project Public License; either
+%% version 1.3a of the License, or any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% We did our best to help you, but there is NO WARRANTY.
+%%
+%% Please report bugs, problems, and suggestions via
+%%
+%% http://www.contact-ednotes.sty.de.vu
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+% 1994/12/01: \newcommand* etc.
+\ProvidesPackage{makedoc}[\filedate\space v\fileversion\space
+ TeX input from *.sty (UL)]
+\end{packagecode}
+|\PackageCodeTrue| and |\PackageCodeFalse| set `\ifPackageCode'
+globally, so redefinition of `~' may be kept local. Note the
+capital `T' and `F'!
+\begin{packagecode}
+\newcommand*{\PackageCodeTrue} {\global\let\ifPackageCode\iftrue}
+\newcommand*{\PackageCodeFalse}{\global\let\ifPackageCode\iffalse}
+\end{packagecode}
+|\ifPackageCode| is used to determine whether a listing environment
+must be `\beg'un or `\end'ed. You may also want to suppress empty
+code lines, while empty lines should issue a `\par' break in
+``comment'' mode.
+
+Since `\newif' is not used, `\ifPackageCode' must be declared
+explicitly. Declaration of new `\if's must be early in case
+they occur in code that is skipped by another `\if'\dots
+\begin{packagecode}
+\PackageCodeFalse
+\end{packagecode}
+'makedoc' is an extension of 'fifinddo' on which it depends.
+\begin{packagecode}
+\RequirePackage{fifinddo}[2009/04/13]
+\end{packagecode}
+Both 'fifinddo' and 'makedoc' use the ``underscore'' as ``private
+letter'' and make it ``other'' at their end (functionality as with
+``at'' and `\RequirePackage' is missing here). So after loading
+'fifinddo', I must restore the new private letter.
+\begin{packagecode}
+\catcode`\_=11 %% underscore used in control words
+\end{packagecode}
+\subsection{&\MakeDocCorrectHook}
+|\MakeDocCorrectHook| is predefined to leave its argument without
+the enclosing braces, otherwise unchanged:
+\begin{packagecode}
+\let\MakeDocCorrectHook\@firstofone
+\end{packagecode}
+Less efficiently, the same could have been set up as
+\begin{packagecode}
+% \newcommand*{\MakeDocCorrectHook}[1]{\ProcessStringWith{#1}{LEAVE}}
+\end{packagecode}
+according to 'fifinddo'.
+
+It may be \emph{redefined} in a \emph{configuration} file like
+'makedoc.cfg' or the 'makedoc' script file applying to a single
+package file in order to, e.g., converting plain text to \TeX\ input
+conforming to typographical conventions, making `$\dots$' from
+`$\dots$', e.g.
+Replace `LEAVE' in the previous suggestion by an identifier
+whose job you have defined before, and use `\renewcommand'
+in place of `\newcommand'.
+See an example in 'makedoc.cfg'.
+
+You can \emph{test} your own `\MakeDocCorrectHook' by
+\[`\typeout{\MakeDocCorrectHook{<test-string>}}'\]
+$\dots$ provided (sometimes) `\MakeOther\ ' $\dots$
+You can even change it using `\IfInputLine' from 'fifinddo' in the
+midst of preprocessing a package documentation.
+
+\subsection{Distinguish package code from comments}%% <- wiki style breaks in self-doc.
+Use of comment marks is a matter of personal style. Only lines
+starting with the sequence `%% ' are typeset in \TeX\ quality
+under the present release. Lines just containing `%%'
+(without the space) are used to suppress empty code lines
+preceding section titles (while keeping some visual space
+in the package file). There is a preferable way to do this,
+however not in the present release \dots
+
+The parsing macros must be set up reading `%' and ` ' as ``other''
+characters. Using the optional arguments for this creates
+difficulties that can be somewhat avoided by redefining
+|\PatternCodes|.
+\begin{packagecode}
+\renewcommand*{\PatternCodes}{\MakeOther\%\MakeOther\ }%% 2009/04/02
+\end{packagecode}
+Look here: the line became too long and could not be broken.
+Must we really introduce new comment marks?
+\begin{packagecode}
+% \MakeSetupSubstringCondition{comment}[\MakeOther\%\MakeOther\ ]
+\end{packagecode}
+The next line sets the ``sandbox'' for the detecting macro, as it
+is coined in the documentation of 'fifinddo', with ``identifier''
+|PPScomment|.
+\begin{packagecode}
+\MakeSetupSubstringCondition{PPScomment}{%% }{{#1}}
+\end{packagecode}
+The last argument stores the expanded input line for reference by
+macros called. The next line is a test whether the setup works.
+\begin{packagecode}
+% \expandafter \show \csname \setup_substr_cond PPScomment\endcsname
+\end{packagecode}
+Here comes the definition of the corresponding testing macro.
+#3 is the expanded input line from above. The `\If'\dots commands,
+`\fdInputLine', `\fdInputLine', and `\RemoveDummyPatternArg'
+are from 'fifinddo'.
+\begin{packagecode}
+% \MakeSubstringConditional{comment}[\MakeOther\%\MakeOther\ ]
+\MakeSubstringConditional{PPScomment}{%% }#3{%% #3 entire test string
+ \IfFDinputEmpty{\OnEmptyInputLine}{%
+\end{packagecode}
+The empty line test comes early to offer control with
+`\OnEmptyInputLine' both code and comment mode.
+Maybe it should always? %% TODO 2009/04/13
+\begin{packagecode}
+ \IfFDempty{#1}%%
+ {\TreatAsComment{%
+ \RemoveDummyPatternArg\MakeDocCorrectHook{#2}}}%
+ {\ifx\fdInputLine\PPstring
+ \ifPackageCode\else \WriteResult{}\fi%% 2009/04/05
+ %% <- allow paragraphs in comments
+ \else \TreatAsCode{#3}\fi}}}
+% \expandafter \show \csname \substr_cond PPScomment\endcsname
+\end{packagecode}
+|\PPstring| stores the line suppressing empty code lines.
+\begin{packagecode}
+\newcommand*{\PPstring}{} \xdef\PPstring{\PercentChar\PercentChar}
+\end{packagecode}
+|comment| will be a ``generic'' identifier to call a comment line
+detector. It might be predefined to issue an ``undifined'' error;
+however this release predefines it to behave like `PPScomment'.
+\begin{packagecode}
+\CopyFDconditionFromTo{PPScomment}{comment}
+\end{packagecode}
+Alternative still to be considered:
+\begin{packagecode}
+% \@namedef{\setup_substr_cond comment}{%
+% \PackageError{makedoc}{Job `comment' not defined}%
+% {Use \string\CopyFDconditionFromTo{comment}}}
+\end{packagecode}
+\subsection{Dealing with comments}
+|\TreatAsComment{<text>}| writes <text> to the documentation
+file. If we had ``package code'' (were in ``code mode'') so far,
+the listing environment is ended first.
+\begin{packagecode}
+\newcommand*{\TreatAsComment}[1]{%
+ \ifPackageCode
+ \WriteResult{\string\end{packagecode\@empty}}%
+\end{packagecode}
+The `\@empty' here is a lazy trick to save self-documentation
+fighting 'verbatim''s ``highlight'' of finding ends of listings
+(to be improved). %%
+
+We always use `\string' to prevent macro expansion in `\write'ing
+in place of \LaTeX's `\protect',
+as long as 'fifinddo' simply uses the primitive `\write' in place
+of \LaTeX's `\proteced@write' \dots %% todo 2009/04/08
+\begin{packagecode}
+ \PackageCodeFalse
+ \EveryComment
+% \_empty_code_lines_false
+ \fi
+ \WriteResult{#1}}
+\end{packagecode}
+Here, |\EveryComment| is a macro hook for inserting material that should
+not appear in a listing environment.
+\begin{packagecode}
+\global\let\EveryComment\relax %% should be changed globally.
+\end{packagecode}
+\subsection{Sectioning}
+\label{sec:secparsers}
+We provide a facility from 'wiki.sty' that imitates the sectioning
+syntax used in editing \emph{Wikipedia} pages, in a different
+implementation (better compatibility) and in a more general way.
+On Wikipedia, `== Definition ==' works similar as
+`\section{Definition}' does with \LaTeX. With the present
+implementation, you can type, e.g.,
+\[`%%%%%%%%%%%%%%%%%%%%%% == Definition == %%%%%%%%%%%%%%%%%%%%%%'\]
+to get a similar result. The number of `%' characters doesn't
+matter, and there can be other stuff, however: additional `='
+symbols may harm. Three sectioning levels are supported, through
+`==<text>==', `===<text>===', and `====<text>====' (deepest).
+
+There are three detector macros made for programmers.
+The most general one is
+In the following definitions, there is a single tilde to prevent
+`=' symbols being gobbled by the test (realized by accident).
+%% 2009/04/13
+|\SectionLevelThreeParseInput|:
+\begin{packagecode}
+\newcommand*{\SectionLevelThreeParseInput}{%
+ \expandafter \test_sec_level_iii \fdInputLine ~========&}
+\end{packagecode}
+|\SectionLevelTwoParseInput|
+\begin{packagecode}
+\newcommand*{\SectionLevelTwoParseInput}{%
+ \expandafter \test_sec_level_ii \fdInputLine ~======&}
+\end{packagecode}
+and |\SectionLevelOneParseInput|
+\begin{packagecode}
+\newcommand*{\SectionLevelOneParseInput}{%
+ \expandafter \test_sec_level_i \fdInputLine ~====&}
+\end{packagecode}
+allow skipping deeper levels for efficiency.
+% TODO in fifinddo: setup for 2 strings in 1 line 2009/04/13
+
+In the terminology of the 'fifinddo' documentation, the previous
+three commands are ``sandbox builders.'' The following three
+commands are the corresponding ``substring conditionals.''
+However, 'fifinddo' so far %% todo 2009/04/08
+only deals with \emph{single} substrings, while here we are
+dealing with \emph{pairs} of substrings. We are not using
+general setup macros, but define the parsing macros ``manually,''
+as it is typical in many other macros in 'latex.ltx' and other
+\LaTeX\ packages. You can fool our macros easily, there is
+no syntax check. %% todo 2009/04/08
+\begin{packagecode}
+\def\test_sec_level_iii#1====#2====#3&{%
+ \IfFDempty{#2}%
+ {\test_sec_level_ii #1======&}%
+ {\WriteSection\mdSectionLevelThree{#2}}}
+\def\test_sec_level_ii#1===#2===#3&{%
+ \IfFDempty{#2}%
+ {\test_sec_level_i #1====&}%
+ {\WriteSection\mdSectionLevelTwo{#2}}}
+\def\test_sec_level_i#1==#2==#3&{%
+ \IfFDempty{#2}%
+ {\RemoveTildeArg \ProcessStringWith{#1}{comment}}%
+ {\WriteSection\mdSectionLevelOne{#2}}}
+\end{packagecode}
+`\ProcessStringWith' here passes the expanded `\fdInputLine'
+to the general comment detector.
+
+|\WriteSection{<command>}{<text>}| replaces an input line
+with a line \[`<command>{\hspace{1sp}\ignorespaces <text>\unskip }'\]
+in the documentation file and switches into ``comment mode.''
+`\hspace{1sp}' ensures that 'niceverb''s package name feature works.
+`\ignorespaces' and `\unskip' undo the spaces between title text and
+the `=' symbols that usually are typed for readability.
+\begin{packagecode}
+\newcommand*{\WriteSection}[2]{%
+ \TreatAsComment{%
+ ^^J#1{\string\hspace{1sp}\ignorespaces
+ \MakeDocCorrectHook{#2}\unskip}^^J}}
+\end{packagecode}
+We insert `\section' using |\mdSectionLevelOne| etc.\
+which the programmer can redefine, e.g., when the
+documentation is part of a `\section' (or even deeper)
+according to the ``documentation driver'' file.
+\begin{packagecode}
+\newcommand*\mdSectionLevelOne {\string\section}
+\newcommand*\mdSectionLevelTwo {\string\subsection}
+\newcommand*\mdSectionLevelThree{\string\subsubsection}
+\end{packagecode}
+This sectioning feature is not used in 'makedoc.sty' since the
+\emph{definitions} of the parsing macros fool the same macros \dots
+
+\subsection{Commented code}
+|\TreatAsCode{<text>}| is the opposite to `\TreatAsComment{<text>}':
+\begin{packagecode}
+\newcommand*{\TreatAsCode}[1]{%
+ \ifPackageCode
+% \_empty_code_lines_true
+ \else
+ \WriteResult{\string\begin{packagecode}}%
+ \PackageCodeTrue
+ \fi
+ \WriteResult{#1}%
+% \WriteResult{\maybe_result_empty_line #1}%
+% \let\maybe_result_empty_line\empty
+}
+\end{packagecode}
+\subsection{Dealing with empty input lines}
+|\OnEmptyInputLine| is a default setting (or hook) for what to do
+with empty lines in the input file. The default is to insert an
+empty line in the output file:
+\begin{packagecode}
+\newcommand*{\OnEmptyInputLine}{\WriteResult{}}
+\end{packagecode}
+|\NoEmptyCodeLines| changes the setting to suppressing empty code
+lines, while in ``comment mode'' an empty input line \emph{does}
+insert an empty line, for starting a new paragraph:
+\begin{packagecode}
+\newcommand*{\NoEmptyCodeLines}{%% suppress empty code lines
+ \renewcommand*{\OnEmptyInputLine}{%
+ \ifPackageCode \else \WriteResult{}\fi}}
+\end{packagecode}
+There is a better policy---didn't work so far \dots
+
+\subsection{Bundling typical things: script commands}
+\label{sec:script}
+First practical experiences suggest the following shorthands.
+They should simplify matters so much that the 'makedoc' script
+for a single package really should need about five lines only,
+%% <- TODO check 2009/04/08
+and even \emph{they} should be so simple that you should hardly
+spend a minute about them.
+
+|\LaTeXresultFile{<output>}| saves you the extra line for inserting
+the `\ProvidesFile' line $\dots$ no, actually it is 'makedoc'
+that wants to be mentioned with `\ProvidesFile' $\dots$
+(otherwise copied from 'fifinddo') \dots
+\begin{packagecode}
+\newcommand*{\LaTeXresultFile}[1]{%
+ \ResultFile{#1}%%% \WriteProvides}
+ \WriteResult{%
+ \string\ProvidesFile{\result_file_name}%
+ [\the\year/\two@digits\month/\two@digits\day\space
+ automatically generated with makedoc.sty]}}%
+\end{packagecode}
+|\MakeDoc{<input>}| preprocesses <input> to render input for
+\LaTeX, considering what is typical for a \LaTeX\ package as the
+<input> one here:
+\begin{packagecode}
+\newcommand*{\MakeDoc}[1]{%
+\end{packagecode}
+In case of a ``header'' (see below) we change into ``code mode'':
+\begin{packagecode}
+ \ifnum\header_lines>\z@
+ \WriteResult{\string\begin{packagecode}}%
+ \PackageCodeTrue %% TODO both lines makedoc command!?
+ %% 2009/04/08
+ \else \PackageCodeFalse \fi
+\end{packagecode}
+The loop follows. There is a placeholder `\makd_doc_line_body'
+that is predefined below and can be changed while processing the
+<input> file.
+\begin{packagecode}
+ \ProcessFileWith{#1}{%
+ \CountInputLines %% stepping line counter is standard
+ \make_doc_line_body
+ \process_line_message}%
+\end{packagecode}
+Currently the ``VERSION HISTORY'' is typeset verbatim
+(for ``tabbing''), we then must leave ``code mode'' here:
+\begin{packagecode}
+ \ifPackageCode
+ \WriteResult{\string\end{packagecode\@empty}}%% self-doc-trick
+ \PackageCodeFalse %% TODO both lines makedoc command!? 2009/04/08
+ \fi
+\end{packagecode}
+When the <input> file has been processed, certain default settings
+might be restored---in case another <input> file is processed for the
+same documentation document:
+\begin{packagecode}
+% \HeaderLines{0}%
+% \MainDocParser{\SectionLevelThreeParseInput}%% TODO!? 2009/04/08
+}
+\end{packagecode}
+\subsubsection{File preamble}
+A \LaTeX\ package typically has a ``header'' or ``preamble''
+(automatically inserted by 'docstrip') with very scarce information
+on which file it is and what it provides, and with much more Legalese.
+Typesetting it in \TeX\ quality may be more misleading than
+typesetting it \emph{verbatim}. So we typeset it \emph{verbatim}.
+Now: where does the ``header'' end?
+`\NeedsTeXFormat' might be considered the border.---Yet it seems
+to be more simple and reliable just to act in terms of the
+\emph{number of lines}
+that the header should be long. This length <how-many-lines> is declared by
+|\HeaderLines{<how-many-lines>}|:
+\begin{packagecode}
+\newcommand*{\HeaderLines}{\def\header_lines}
+\HeaderLines{0}
+\end{packagecode}
+So the default is that there aren't any header lines, unless
+another `\HeaderLines' is issued before some `\MakeDoc'.
+The way input is parsed after the ``header'' is set by
+|\MainDocParser{<parsing-command>}|.
+\begin{packagecode}
+\newcommand*{\MainDocParser}{\def\main_doc_parser}
+\end{packagecode}
+`\SectionLevelThreeParseInput' from section~\ref{sec:secparsers}
+is the default, two alternatives are defined there, another one is
+`\ProcessInputWith{comment}' from 'fifinddo'.
+\begin{packagecode}
+\MainDocParser{\SectionLevelThreeParseInput}
+\end{packagecode}
+Here is how `\HeaderLines' and `\MainDocParser' act:
+\begin{packagecode}
+\def\make_doc_line_body{%
+ \IfInputLine{>\header_lines}%
+ {\let\make_doc_line_body\main_doc_parser
+ \make_doc_line_body}% %% switch to deciding
+ {\TreatAsCode{\fdInputLine}}} %% header verbatim
+\end{packagecode}
+|\ProcessLineMessage{<command>}| is designed to define a screen
+(or log) message <command>.
+% A simple setting may be \[`\ProcessLineMessage{\message{.}}'\] with
+`\ProcessLineMessage{\message{.}}' has a result like with 'docstrip'.
+You just get one dot on screen per input line
+as a simple confirmation that
+the program is not hung up. %% TODO phrase!? 2009/04/08
+However, the message may slow down a run considerably
+(if so, choose `\ProcessLineMessage{}' in the script).
+% , you really have to
+% wait about a second while you hardly notice the 'makedoc' run
+% without screen messages. Therefore, the default is \emph{not}
+% to issue any screen message.%% TODO more complex procedures!? 2009/04/08
+%---No!
+But it is better for beginner users of the package,
+so made default. %% 2009/04/09
+\begin{packagecode}
+\newcommand*{\ProcessLineMessage}{\def\process_line_message}
+% % \ProcessLineMessage{} %% no, still more efficient:
+% \let\process_line_message\relax
+\ProcessLineMessage{\message{.}}
+\end{packagecode}
+\subsection{Leave the package}
+\begin{packagecode}
+\catcode`\_=8 %% restores underscore use for subscripts
+
+\endinput
+\end{packagecode}
+\subsection{VERSION HISTORY}
+
+\begin{packagecode}
+v0.1 2009/04/03 very first version, tested on morgan.sty
+v0.2 2009/04/05 \OnEmptyInputLine, \NoEmptyCodeLines
+ comment -> PPScomment, \IfFDinputEmpty,
+ \EveryComment, \PPstring may be par break
+ 2009/04/08 \InputString -> \fdInputLine,
+ \section -> \subsection; documentation!
+ 2009/04/08f. \MakeDoc
+ 2009/04/12 ``line too long'' w/o redefining \PatternCodes;
+ \MakeDocCorrectHook
+ 2009/04/13 tilde with sectioning
+
+\end{packagecode}
diff --git a/Master/texmf-dist/doc/latex/nicetext/doclog/mdcorr.doc b/Master/texmf-dist/doc/latex/nicetext/doclog/mdcorr.doc
new file mode 100644
index 00000000000..e63659b5e22
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nicetext/doclog/mdcorr.doc
@@ -0,0 +1,25 @@
+\ProvidesFile{mdcorr.doc}[2009/04/16 automatically generated with makedoc.sty]
+\begin{packagecode}
+\ProvidesFile{mdcorr.cfg}[2009/04/15
+ local typographical corrections with makedoc.sty]
+\end{packagecode}
+Also demonstrates 'niceverb.sty'.
+\begin{packagecode}
+\renewcommand*{\PatternCodes}{\MakeOther\\\MakeOther\ }
+\renewcommand*{\MakeDocCorrectHook}[1]{\ProcessStringWith{#1}{dots}}
+\end{packagecode}
+|\MakeExpandableAllReplacer{<id>}{<find>}{<replace>}{<id-next>}|%
+\footnote{Yes,
+&\MakeExpandableAllReplacer{<id>}{<find>}{<replace>}{<id-next>}.}
+\begin{packagecode}
+\MakeExpandableAllReplacer{dots}{...}{$\dots$}{cf}
+\MakeExpandableAllReplacer{cf}{cf.}{cf.\ }{etc}
+\MakeExpandableAllReplacer{etc}{etc. }{etc.\ }{LEAVE}
+\end{packagecode}
+So you can keep inter-sentence space after `etc.'
+by a code line break
+\begin{packagecode}
+\renewcommand*{\PatternCodes}{\fdPatternCodes}
+\end{packagecode}
+$\dots$ restores 'fifinddo' default.
+
diff --git a/Master/texmf-dist/doc/latex/nicetext/doclog/niceverb.doc b/Master/texmf-dist/doc/latex/nicetext/doclog/niceverb.doc
new file mode 100644
index 00000000000..6acb7eada6f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nicetext/doclog/niceverb.doc
@@ -0,0 +1,283 @@
+\ProvidesFile{niceverb.doc}[2009/04/16 automatically generated with makedoc.sty]
+\begin{packagecode}
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{niceverb}[2009/04/15 v0.2
+ minimize \string\verb\space code (UL)]
+
+%% Copyright (C) 2009 Uwe Lueck,
+%% http://www.contact-ednotes.sty.de.vu
+%% -- author-maintained in the sense of LPPL below --
+%%
+%% This file can be redistributed and/or modified under
+%% the terms of the LaTeX Project Public License; either
+%% version 1.3a of the License, or any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% We did our best to help you, but there is NO WARRANTY.
+%%
+%% Please report bugs, problems, and suggestions via
+%%
+%% http://www.contact-ednotes.sty.de.vu
+%%
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Switching category codes \unskip }
+
+\begin{packagecode}
+\providecommand{\CatCode}{\catcode`}
+% \providecommand*{\MakeActive}[1]{\CatCode#1\active}
+\providecommand*{\MakeAlign} [1]{\CatCode#14\relax}
+\providecommand*{\MakeLetter}[1]{\CatCode#111\relax}
+\providecommand*{\MakeOther} [1]{\CatCode#112\relax}
+\providecommand*{\MakeSub} [1]{\CatCode#18\relax}
+
+\newcommand*{\MakeActiveLet}[2]{%% cf. \@sverb & \do@noligs
+ \CatCode#1\active
+ \begingroup
+ \lccode`\~`#1\relax \lowercase{\endgroup \let~#2}}
+
+\MakeLetter\_
+
+% \newcommand*{\make_iii_other}{\MakeOther\\\MakeOther\{\MakeOther\}}
+ %% <- replaced 2009/04/05
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Sloppy variant of &\verb \unskip }
+
+\begin{packagecode}
+\newcommand*{\begin_min_verb}{%
+ \relax \ifmmode \hbox \else \leavevmode\null \fi
+ %% <- standard, for $$...$$
+ \bgroup \tt %%%\let\do\MakeOther \dospecials
+ \MakeLetter\_\MakeLetter\@}
+\newcommand*{\SimpleVerb}[1]{%
+\end{packagecode}
+Mainly avoid `\verb''s noligs list which overrides definitions
+of some active characters, while 'cmtt' doesn't have any
+ligatures anyway.
+\begin{packagecode}
+ \ifx\protect\@typeset@protect
+ \begin_min_verb %%%\make_iii_other %% much usual 2009/04/05
+ \let\do\MakeOther \dospecials %% 2009/04/06
+ \MakeOther\|%% probably 'niceverb'
+ \MakeActiveLet#1\niceverb_egroup %% 2009/04/11
+ \verb@eol@error %% TODO change message 2009/04/09
+ \else \string\SimpleVerb \string#1\fi}
+\end{packagecode}
+2009/04/11: about `etc.'
+\begin{packagecode}
+\newcommand*{\niceverb_egroup}{\egroup\ifmmode\else\@\fi}
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Single quotes typeset meta-code \unskip }
+
+\begin{packagecode}
+\newcommand*{\lq_verb}{%
+ \ifx\protect\@typeset@protect
+ \expandafter \lq_double_test
+ \else \lq \fi}
+% \ifcat\noexpand'\noexpand~%
+% \expandafter\expandafter\expandafter
+% \protect_corresp_quotes
+% \else
+% \rq_verb
+% \fi
+% \fi}
+\newcommand*{\lq_double_test}{%
+ %% test settles next catcode, better switch to ``other''
+ %% in advance:
+ \begingroup \let\do\MakeOther \dospecials
+ \futurelet\let_token \lq_double_decide}
+\newcommand*{\lq_double_decide}{%
+ \ifx\let_token\lq_verb
+ \endgroup
+ \lq\lq \expandafter \@gobble
+\end{packagecode}
+Corresponding right quotes will become ``other'' due to
+having no space at the left.
+\begin{packagecode}
+ %%TODO to be changed with 'wiki.sty'.
+ \else
+ \endgroup
+% \expandafter \rq_verb
+ \expandafter \SimpleVerb \expandafter \'%
+ \fi}
+% \newcommand*{\rq_verb}{\SimpleVerb\'}
+% \AtBeginDocument{\MakeActiveLet\`\rq_verb}
+\AtBeginDocument{\MakeActiveLet\`\lq_verb}
+ %% Strings referred to will be code
+ %% TODO to be changed with wiki.sty
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Ampersand typesets meta-code \unskip }
+
+\begin{packagecode}
+\newcommand*{\CmdSyntaxVerb}{%
+ \ifx\protect\@typeset@protect
+ \expandafter \cmd_syntax_verb
+ \else %% thinking of .aux only
+ \string\CmdSyntaxVerb \expandafter \string
+ \fi}
+\newcommand*{\cmd_syntax_verb}[1]{%
+ \begin_min_verb \string#1\futurelet\let_token \after_cs}
+
+\AtBeginDocument{\MakeActiveLet\&\CmdSyntaxVerb}
+ %% not needed with \Auto... OTHERWISE useful in args!
+ %% TODO \MakeAmpCmdSyntax
+ %% TODO \let\endcell& (wie \endline, \endgraf) \MakeEndCell
+\newcommand*{\after_cs}{%
+ \ifcat\noexpand\let_token a\egroup \space
+ \else \expandafter \decide_verb \fi}
+\newcommand*{\test_more_verb}{\futurelet\let_token \decide_verb}
+\newcommand*{\decide_verb}{%
+% \show\let_token
+ \jumpteg_on_with\bgroup\braces_verb
+ \jumpteg_on_with[\brackets_verb
+ \jumpteg_on_with*\star_verb
+ \egroup}
+ %% CAUTION/TODO wrong before (... if cmd without arg
+ %% use \ then or choose usual verb...
+ %% or \MakeLetter\( etc. ... or \xspace
+\newcommand*{\jumpteg_on_with}[2]{%
+ \ifx\let_token#1\do_jumpteg_with#2\fi}
+ %% TODO cf. xfor, xspace (break@loop);
+ %% \DoOrBranch#1...#1 or so
+\def\do_jumpteg_with#1#2\egroup{\fi#1}
+\def\braces_verb#1{\string{#1\string}\test_more_verb}
+\def\brackets_verb[#1]{[#1]\test_more_verb}
+\def\star_verb*{*\test_more_verb}
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Escape character typesets meta-code \unskip }
+
+\begin{packagecode}
+\DeclareRobustCommand*{\BuildCsSyntax}{%
+ \futurelet\let_token \build_cs_syntax_sp}
+\newcommand*{\build_cs_syntax_sp}{%
+ \ifx\let_token\@sptoken \else %% TODO ^^M!?
+ \expandafter \start_build_cs_syntax
+ \fi}
+\newcommand*{\start_build_cs_syntax}[1]{%
+ \edef\string_built{\string#1}%% #1 may be active
+ \MakeLetter\_\MakeLetter\@%% CAUTION, cf. ...
+ \test_more_cs}
+\newcommand*{\test_more_cs}{%
+ \futurelet\let_token \decide_more_cs}
+\newcommand*{\decide_more_cs}{%
+ \ifcat\noexpand\let_token a\expandafter \add_to_cs
+ \else
+ \MakeSub\_\MakeOther\@%
+ \expandafter \in@ \expandafter
+ {\csname \string_built \expandafter \endcsname
+ \expandafter}\expandafter{\niceverbNoVerbList}%
+ \ifin@
+ \csname \string_built
+ \expandafter\expandafter\expandafter \endcsname
+ \else
+ \begin_min_verb \@backslashchar\string_built
+ \expandafter\expandafter\expandafter \test_more_verb
+ \fi
+ \fi}
+ %% TODO such \if nestings with ifthen!?
+ %% cf.:
+% \let\let_token,\typeout{\meaning\let_token}
+ %% TEST TODO fuer xspace!? (\ifin@)
+\newcommand*{\add_to_cs}[1]{%
+ \edef\string_built{\string_built#1}\test_more_cs}
+\newcommand*{\AutoCmdSyntaxVerb}{\MakeActiveLet\\\BuildCsSyntax}
+ %% TODO or \niceverbswitch...
+
+\newcommand*{\EndAutoCmdSyntaxVerb}{\CatCode\\\z@}
+\newcommand*{\NormalCommand}{} \let\NormalCommand\@nameuse
+ %% Were tests:
+% \futurelet\LetToken\relax \relax
+% \show\LetToken \typeout{\ifcat\noexpand\LetToken aa\else x\fi}
+
+\newcommand*{\niceverbNoVerbList}{%
+ \begin\end\item\verb\EndAutoCmdSyntaxVerb\NormalCommand
+ \section\subsection\subsubsection}%% TODO!?
+\providecommand*{\AddToMacro}[1]{%
+ \expandafter \def \expandafter #1\expandafter}
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Meta-variables \unskip }
+
+\begin{packagecode}
+\def\niceverb_meta#1>{%
+ \mbox{\normalfont\itshape $\langle$#1\/$\rangle$}}
+ %% TODO offer without angles as well
+\AtBeginDocument{\MakeActiveLet\<\niceverb_meta}
+ %% difference to ltxguide.cls: also outside verbatim
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Hash mark is code \unskip }
+
+\begin{packagecode}
+\newcommand*{\param_verb}[1]{{\tt\##1}}
+\AtBeginDocument{\MakeActiveLet\#\param_verb}
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Single right quote for &\textsf \unskip }
+
+\begin{packagecode}
+\newcommand*{\niceverb_rq_sf}{%
+% \relax %% in case of \hskip1sp 2009/04/08
+ %% but spoils ligature 2009/04/09
+ \ifx\protect\@typeset@protect
+ \expandafter \niceverb_rq_sf_test
+ \else \rq \fi}
+\end{packagecode}
+Another macro just to avoid more sequences of `\expandafter':
+\begin{packagecode}
+\newcommand*{\niceverb_rq_sf_test}{%
+ \ifhmode
+ \ifdim\lastskip>\z@
+ \expandafter\expandafter\expandafter \niceverb_rq_sf_exec
+ \else
+ \ifnum\spacefactor=1001 %% in parentheses 2009/04/10
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter
+ \niceverb_rq_sf_exec
+ \else \rq \fi
+% \rq
+ \fi
+ \else \ifvmode
+ \expandafter\expandafter\expandafter \niceverb_rq_sf_exec
+ \else \rq \fi
+ \fi}
+\sfcode`\(=1001 %% enable in parentheses 2009/04/10
+{\CatCode\'\active \gdef\niceverb_rq_sf_exec#1'{\textsf{#1}}}
+ %% TODO to be changed with wiki.sty:
+\AtBeginDocument{\MakeActiveLet\'\niceverb_rq_sf}
+
+ %% TODO \niceverbswitch{<mode>}{<on/off>} (bzw. Doku ohne {})
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces Leave package mode \unskip }
+
+\begin{packagecode}
+\MakeSub\_
+
+\endinput
+\end{packagecode}
+
+\subsection{\hspace{1sp}\ignorespaces VERSION HISTORY \unskip }
+
+
+\begin{packagecode}
+v0.1 2009/02/21 very first, sent to CTAN
+v0.2 2009/04/04 ...NoVerbList: \subsubsection, \AddToMacro,
+ 2009/04/05 \SimpleVerb makes more other than iii
+ 2009/04/06 just uses \dospecials
+ 2009/04/08 debugging code for rq/sf, +\relax
+ 2009/04/09 +\verb@eol@error, prepared for new doc method,
+ removed spurious \makeat..., -\relax (ligature),
+ 2009/04/10 ('-trick
+ 2009/04/11 \@ after \SimpleVerb
+ 2009/04/14 noted TODO below
+ 2009/04/15 change v0.1 to 2009/02/21
+
+TODO: choose expansions of active characters by options 2009/04/10
+TODO: &\@tempa and &\_tempa fail 2009/04/14
+
+\end{packagecode}
diff --git a/Master/texmf-dist/doc/latex/nicetext/docsrc/WIKICHEA.TEX b/Master/texmf-dist/doc/latex/nicetext/docsrc/WIKICHEA.TEX
deleted file mode 100644
index e56bff99120..00000000000
--- a/Master/texmf-dist/doc/latex/nicetext/docsrc/WIKICHEA.TEX
+++ /dev/null
@@ -1,148 +0,0 @@
-\ProvidesFile{wikicheat}[2008/07/10 Cheatsheet for wiki.sty]
-% \def\title{Cheatsheet for the \textsf{wiki} Package}
-\def\title{\textbf{Cheatsheet} for the \textbf{\textsf{wiki}} Package}
-\def\author{Uwe L\"uck}
-\documentclass[12pt,a4paper]{article}
-\nofiles
-\pagestyle{empty}
-\makeatletter
-\@ifundefined{UndeclareTextCommand}{}{\usepackage{upquote}} %% 2008/07/02
-\makeatother
-\usepackage{wiki}
-% \let\WE\relax \let\WF\relax \let\WH\relax
-\let\WE\wikiEnvironments
-\let\WF\wikiFonts
-\let\WH\wikiHeadings
-\def\SP#1{\multicolumn{3}{\VR c\VR}{%
-% \parbox{11cm}{%
- \parbox{13cm}{%
- \footnotesize\it\sloppy\SU#1\SD}}}
-\def\SL{/\hskip.16667em}
-% \setbox0\hbox{(}\showthe\ht0\showthe\dp0 %% height = 3x depth
-\def\SU{\rule{0pt}{.99em}}%%%{1.1em}}
-\def\HSU{\rule{0pt}{.75em}}
-\def\SD{\rule[-.33em]{0pt}{0pt}}%%%45em]{0pt}{0pt}}
-% \def\CS#1{{\tt\textbackslash #1}} %% 2008/07/02
-{\makeatletter \gdef\CS#1{{\tt\@backslashchar#1}}}
-\let\VR| \catcode`\|\active \def|{\verb|}
-\begin{document}
-% \maketitle
-
-\enlargethispage{3\normalbaselineskip}
-\vspace*{-\topmargin} %% !?
-\vspace*{-\headheight}\vspace*{-\headsep}\vspace*{-\topsep}\vspace*{-\partopsep}
-\begin{center}
-\large \title\\[.4ex] \normalsize
-Some \LaTeX-Markup through some Wiki-Markup\\[.8ex]
- \author, \today
-% \end{center}
-
-\vspace{\topsep}
-\vspace*{\partopsep}
-% \vspace{1.5ex}
-% \vspace{1ex}
-% \hrule
-% \vspace{1ex}
-
-% \begin{center}
-\leavevmode\kern-1em
-\begin{tabular}{\VR l\VR l\VR l\VR}
-\hline\hline
-\SU\SD\bf Code for \textsf{wiki.sty}&\bf What you get& \bf like \LaTeX-code\\
-\hline\hline
-|''italic''|&\WF ''italic''&|\textit{italic}|\SU\\
-|'''bold'''|&\WF '''bold'''&|\textbf{bold}|%%%\\
-\SD\\
-% |'''''bf+it'''''|&\WF '''''bf+it'''''
-% &|\textbf{\textit{bf+it}}|\SD\\
-% |'''''B+I'''''|&\WF '''''B+I''''' &|\textbf{\textit{B+I}}|\SD\\
-\hline
-\SP{``Italic'' and ``bold'' may be combined, nested, overlap.
-% Automatic italic correction cannot be suppressed by \CS{nocorr}.
-% Implementation uses \LaTeX\ internals; no groups are formed.
-Quotation marks
-% (even German)
-usually are not
-affected.---Turn
-% {\tt '\string{\string}''} may help with
-% apostrophes.---Turn
-font feature on/off by \CS{wikiFonts}\SL\CS{nowikiFonts}; disable feature
-entirely by package option {\tt noFonts}.}\\
-\hline\hline
-|== Level 1 ==|&\Large\bf\HSU 1\quad Level 1&|\section{Level 1}|\SU\\
-|=== Level 2 ===|&\large\bf 1.1\quad Level 2&|\subsection{Level 2}|\SU\\
-|==== Level 3 ====|&\bf 1.1.1\quad Level 3&|\subsubsection{Level 3}|\\
-|===== Level 4 =====|&\bf Level 4 &|\paragraph{Level 4}|\SD\\
-|====== Level 5 ======|&\bf Level 5 &|\subparagraph{Level 5}|\SD\\
-\hline
-\SP{Turn heading feature on/off by \CS{wikiHeadings}\SL\CS{nowikiHeadings};
-disable feature entirely by package option {\tt noHeadings}.}\\
-\hline\hline
-&&|\begin{itemize}|\SU\\
-|* One|&\textbullet\hspace\labelsep One &|\item One|\\[2\parsep]
-|* Two|&\textbullet\hspace\labelsep Two &|\item Two|\\
-&&|\end{itemize}|\SD\\
-\hline
-&&|\begin{enumerate}|\SU\\
-|# One|&1.\hspace\labelsep One &|\item One|\\[2\parsep]
-|# Two|&2.\hspace\labelsep Two &|\item Two|\\
-&&|\end{enumerate}|\SD\\
-\hline
-&&|\begin{description}|\SU\\
-|;[club] explain|&\textbf{club}\hspace\labelsep explain
- &|\item[club] explain|\\[2\parsep]
-|;[widow] explain|&\textbf{widow}\hspace\labelsep explain
- &|\item[widow] explain|\\
-&&|\end{description}|\SD\\
-\hline
- & &|She wrote:|\SU\\
-|She wrote:|&\smash{\raisebox{\topsep}{She wrote:}}&|\begin{quote}|\\
-|:Indeed| &\hspace\leftmargini Indeed&|Indeed|\\
- & &|\end{quote}|\SD\\
-\hline
- & &|Type|\SU\\
-|Type| &\smash{\raisebox{\topsep}{Type}}&|\begin{verbatim}|\\
-| \typeout{OK!}| &|\typeout{OK!}|&|\typeout{OK!}|\\
- & &|\end{verbatim}|\SD\\
-\hline
-\SP{A \CS{begin} is executed when {\tt*} etc.\ is first character of a
-code line; an indent starts {\tt verbatim}.
-\CS{end} is executed at code line without indent and not beginning with
-{\tt*} etc.---Turn this feature on by \CS{wikiEnvironments}; turn off by
-\CS{nowikiEnvironments}, e.g., to get around incompatibilities
-(lists feature is most dangerous).
-Disable feature entirely by package option {\tt noEnvironments}.
-Package option {\tt noVerbatim} instead may usually suffice,
-if you don't want to have any {\tt verbatim}.}\\
-\hline
-\end{tabular}
-\kern-1em
-\end{center}
-
-% \section{Test}\subsection{Sub-Test}\subsubsection{Subsub-Test}
-% \paragraph{Para}\subparagraph{Sub-Para}
-
-\footnotesize
-% \vspace{2ex}
-\sloppy
-\noindent \WE\WF %%% '''Please note:'''
-''Note:''
-% *
-Explicit '''turning on''' by %%% one of
-% \[|\wikiEnvironments|,\quad |\wikiFonts|,\quad |\wikiHeadings|\]
-|\wikiEnvironments| %%% , |\wikiFonts|, |\wikiHeadings|,
-etc.\
-% or by |\wikimarkup| (which executes the former three) is ''required'';
-is '''required''';
-e.g., after %%% |\maketitle| and
-|\tableofcontents|.
-|\wikimarkup| '''activates ''all''''' the features.
-% *
-|\nowikimarkup| %%% executes all of
-% \[|\nowikiEnvironments|,\quad |\nowikiFonts|,\quad |\nowikiHeadings|.\]
-% |\nowikiEnvironments|, |\nowikiFonts|, |\nowikiHeadings|.
-% Use them to get around incompatible code.
-'''''dis''ables all''' of them, e.g., to get around incompatibilities.
-
-\end{document}
-
diff --git a/Master/texmf-dist/doc/latex/nicetext/docsrc/makedoc.tex b/Master/texmf-dist/doc/latex/nicetext/docsrc/makedoc.tex
deleted file mode 100644
index 65beb83f9f1..00000000000
--- a/Master/texmf-dist/doc/latex/nicetext/docsrc/makedoc.tex
+++ /dev/null
@@ -1,82 +0,0 @@
-\ProvidesPackage{makedoc.tex}[2009/02/21 (UL)]
-%% make packagecode environments and remove percents starting lines
-
-\makeatletter \catcode`\_=11
-
-\openin\@inputcheck=niceverb.sty %% JUST HERE
-\newwrite\result_file
- \immediate\openout \result_file=niceverb.doc %% JUST HERE
-
-\newif\if_package_code_ \_package_code_false
-% \newif\if_empty_code_lines_ \_empty_code_lines_false
- %% <- FAILED SO FAR
-% \let\maybe_result_empty_line\empty
-% \def\result_empty_line{^^J}
-
-\def\write_result{\immediate\write\result_file}
-
-\def\process_file{%
- %% This macro here to avoid category changes
- %% affecting the present code
- \begingroup
- \let\do\@makeother \dospecials
- %% from docstrip.tex:
- \@makeother\^^A\@makeother\^^K\endlinechar\m@ne
- %% <- cf. TeXbook "extended keyboards" up-/downarrow
- %% -> "math specials", cf. "space specials"
- \@makeother\^^I% ASCII horizontal tab -- guessed!? ^^L!?
-% \tracingmacros=1
- \loop \ifeof\@inputcheck \else
- \read\@inputcheck to \InputLine
- \expandafter \process_line \InputLine ======&%% primitive version
- \repeat
- \endgroup}
-
-\def\process_line#1===#2===#3&{%% may be preferable to wiki.sty
- \ifx$#2$%
- \ifx$#1$%
-% \show\InputLine
- \if_package_code_
-% \if_empty_code_lines_
-% \write_result{}\_empty_code_lines_false
-% \fi
- \else
- \write_result{}%
-% \let\maybe_result_empty_line\result_empty_line
- \fi
- \else
-% \show\InputLine
- \if_package_code_
-% \_empty_code_lines_true
- \else
- \write_result{\string\begin{packagecode}}%
- \_package_code_true
- \fi
- \write_result{#1}%
-% \write_result{\maybe_result_empty_line #1}%
-% \let\maybe_result_empty_line\empty
- \fi
- \else
- \write_result{%
- \string\end{packagecode}^^J^^J%
- \string\subsection{\ignorespaces#2\unskip}^^J}%
- \_package_code_false
-% \_empty_code_lines_false
- \fi}
-
-\process_file
-
-\write_result{\string\end{packagecode}}
-\closein\@inputcheck \immediate\closeout\result_file
-
-\endinput
-
-\stop
- %% TODO or \ThankYou; which NICEVERB.TEX may redefine into \endinput
- %% or \ThankYou issues \endinput if jobname ...
- %% the whole file may be enclosed in \begingroup ... \endgroup
- %% ... this is a "driver file"!?
-
-TODO make own listing environment like this -- own linewise processing,
- without verbatim.sty
-
diff --git a/Master/texmf-dist/doc/latex/nicetext/docsrc/niceverb.tex b/Master/texmf-dist/doc/latex/nicetext/docsrc/niceverb.tex
deleted file mode 100644
index be4c19e3e43..00000000000
--- a/Master/texmf-dist/doc/latex/nicetext/docsrc/niceverb.tex
+++ /dev/null
@@ -1,261 +0,0 @@
-\ProvidesFile{niceverb.tex}[2009/02/23 documenting niceverb.sty]
-\title{\textsf{niceverb.sty}\\---\\Minimizing
- Markup\\for Documenting \LaTeX\ packages\thanks{This
- manual describes package version
- version 0.1 as of February 23, 2009%%%\fileversion\ as of \filedate\
- .}}%%%of the package.}}
-\author{Uwe L\"uck\\{\tt http://contact-ednotes.sty.de.vu}}
-\input{makedoc}
-\documentclass[12pt,a4paper]{article}
-\usepackage{niceverb}
-\usepackage{moreverb}
-% \usepackage{verbatim}
-\newenvironment{packagecode}
- {\PackageCode}
- {\endPackageCode}
- \gdef\PackageCode{\listing[5]{1}}
- \gdef\endPackageCode{%
- \endlisting
- \global\let\PackageCode\listingcont
- \global\let\endPackageCode\endlistingcont}
-\begin{document}
-\maketitle
-
-\tableofcontents
-
-\section{Presenting 'niceverb'}
-\subsection{Purpose}
-% \begin{abstract}\noindent
-% The 'nicetext' bundle provides ``minimal'' markup
-The 'niceverb' package provides ``minimal'' markup for documenting \LaTeX\
-packages, reducing the number of keystrokes/visible characters needed
-% .\,.\,. %%% ... %% TODO nicedots
-(kind of poor man's WYSIWYG).\footnote{``What you see is what you
-get.'' Novices are always warned that WYSIWYG is essentially
-impossible with \LaTeX.}
-% One feature---\verb'&\foo'%%% badly self-documenting, `&' fails
-It conveniently handles command names in arguments of macros
-such as &\footnote or even of sectioning commands.
-% (`.aux'/`.toc' entries).
-%
-% This is done by making some characters active.
-% 'niceverb.sty' thus resembles 'wiki.sty'; both are siblings.
-% \end{abstract}
-Commands for typesetting a package's code are inserted
-automatically (just using \TeX). %%%\footnote{Stephan I. B\"ottcher used
-%%%'AWK' instead to typeset the documentation of his 'lineno.sty'.}
-As opposed to tools that are rather common on UNIX/Linux, this
-operation should work at any \TeX\ installation, irrespective of
-platform.
-
-The package may at least be useful while working at a very new package
-and may suffice with small, simple packages. After having edited your
-package's code (typically in a `.sty' file), you just ``{`latex'}'' the
-manual file (maybe some `.tex' file) and get instantly the corresponding
-refreshed documentation.
-
-'niceverb' may also help to generate without much effort documentations
-of nowadays commonly expected typographical quality for packages that
-so far only had ASCII documentations.
-
-\subsection{Acknowledgement/Basic Ideas}
-Three ideas of Stephan I. B\"ottcher's in documenting his 'lineno.sty'
-inspired the present work:
-\begin{enumerate}
-\item
-The markup and its definitions are short and simple,
-markup commands are placed at the right ``margin''
-of the ASCII file,
-so you hardly see them in reading the source file,
-you rather just read the text that will be printed.
-\item
-An 'AWK' script removes the `%'s starting \emph{documentation} lines
-and inserts the commands for typesetting the package's \emph{code}
-(you don't see them in the source).
-\item
-An active character (\lq`|'\rq) issues a `\string' \emph{and} switches
-to typewriter typeface for typesetting a command verbatim---so this
-works without changing category codes (which is the usual idea of
-typesetting code), therefore it works even in macro arguments.
-\end{enumerate}
-
-\subsection{The Commands and Features of 'niceverb'}
-
-Single quotes \verb|`|, \verb|'|, ``less than'' \verb|<| (accompanied
-with \verb|>|), the hash mark \verb|#|, ampersand \verb|&|, and in an
-extended ``auto mode'' even backslash \verb|\| become &\active
-characters with ``special effects.''
-
-The package mainly aims at typesetting commands and descriptions of their
-syntax \emph{if the latter is ``standard \LaTeX-like''},
-using ``meta-variables.'' A string to be
-typeset ``verbatim'' thus is assumed to start with a single command like
-&\foo, maybe followed by stars (\lq`*'\rq) and pairs of
-square brackets (`['.\,.\,.`]') or
-curly braces (\verb'{'.\,.\,.\verb'}'),
-where those pairs contain strings indicating the typical
-kinds of contents for the respective arguments of that command.
-A typical example is this:
-$$&\foo*[<opt-arg>]{<mand-arg>}$$
-This was achieved by typing \verb'&\foo*[<opt-arg>]{<mand-arg>}'.
-In ``auto mode'' of the package, even typing
-$$\verb|\foo*[<opt-arg>]{<mand-arg>}|$$
- %% angle brackets feature to be suppressed here!
-would have sufficed---WYSIWYG! (I call such mixtures of
-\emph{verbatim} and ``meta-variables'' \textit{\lq meta-code\rq}.)
-
-Now for the details:
-\begin{description}
-
-\item[``Meta-variables:''] {\sloppy The package supports the ``angle
-brackets'' style of ``meta-variables'' (as with <meta-variable>).
-You just type \lq\verb'<foo>'\rq\ to get \lq<foo>\rq.\par}
-
-This works due to a sloppy variant &\SimpleVerb of &\verb
-which doesn't care about possible ligatures and definitions of active
-characters. Instead, it assumes that the ``verbatim'' font doesn't
-contain ligatures anyway. \lq\verb'\verb|<foo>|'\rq, by contrast, just
-yields \lq\verb'<foo>'\rq.
-
-Almost the same feature is offered by 'ltxguide.cls' which formats the
-basic guides from the \LaTeX\ Project Team. The present feature,
-however, also works in plain text outside verbatim mode.
-% On the other hand: without << feature
-
-\item[Single quotes (left/right) for ``short verb:'']
-{\sloppy The package ``assumes'' that \emph{quoting} refers to
-\emph{code}, therefore \lq\verb|`foo'|\rq\ is typeset as
-\lq`foo'\rq. This somewhat resembles the &\MakeShortVerb feature of
-'doc.sty'.\par}
-
-It will typically fail when you try to typeset commands (and their
-syntax) in \emph{macro arguments}---e.g.,
-$$\verb|\footnote{`\bar' is a celebrated fake example!}|$$
-will try to \emph{execute} &\bar instead of typesetting it, giving
-an ``undefined'' error so.
-\verb|\verb| fails in the same situation, for the same reason.
-\lq\verb|&|\rq\ (&\footnote{&&&\bar<remaining>}) or
-``auto mode'' (see below) may then work better.
-
-Double quotes and apostrophes should still work the usual way;
-otherwise you could control the parsing mechanisms using curly braces
-(outside and inside don't interact).
-To get usual single quotes, you can use their standard substitutes
-`\lq' and `\rq'.
-You can ``abuse'' this ``single quotes'' feature just to get typewriter
-typeface.\footnote{In macro arguments this requires that the right
-single quote &' is &\active.}
-For difficult cases, you can still use the standard `\verb'
-command from \LaTeX.
-
-\item[Single right quotes for &\textsf:]
-{\sloppy Package names are (by some unwritten convention!?)
-typeset with `\textsf';
-it was natural to use a remaining case of using single quotes
-for replacing &\textsf{<text>} by \SimpleVerb|'<text>'|.\footnote{%
-Font switching by sequences of single quotes is a feature of the
-syntax for editing Wikipedia pages and of 'wiki.sty'.}\par}
-%% TODO fails in parentheses due to preserving apostrophes
-
-This idea of switching fonts continues font switching of 'wiki.sty'
-which uses the syntax for editing Wikipedia pages.
-
-\item[Ampersand \lq&&\rq\ typesets command syntax even in arguments:]
-\hfil e.g., type \lq\verb|&\foo{<arg>}|\rq\ to get
-\lq`\foo{<arg>}'\rq. This may be even more convenient for typing than
-the single quotes method, although looking somewhat strange.
-However, `&' may terminate \textit{verbatim} unexpectedly, being
-designed for displaying ``\LaTeX-like command syntax'' in the first
-instance.\footnote{Moreover, && currently has a limited 'xspace'
-functionality only.}\footnote{You can even use && for referring to
-active characters like && in footnotes etc.!}
-
-\begin{sloppypar}
-This choice of `&' rests on the assumption that there won't be many
-tables in the documenation. You can restore the usual meaning of `&'
-by \verb|\MakeAlign\&| and turn the present special meaning on again by
-$$\verb|\MakeActiveLet\&\CmdSyntaxVerb|.$$
-You could also
-redefine (&\renewcommand) &\descriptionlabel using `\CmdSyntaxVerb'
-(the ``normal command'' equivalent to `&') so \verb|\item[\foo]| works
-as wanted.
-\end{sloppypar}
-
-\item[``Auto mode'' typesets commands verbatim unless .\,.\,.]
-{\sloppy
-\hfil In~``auto mode'', the backslash \lq`\'\rq\ is an active character that
-builds a command name from the ensuing letters and typesets the
-command (and its syntax, allowing meta-variables) verbatim.
-However, there are some exceptions, which are collected in a macro
-&\niceverbNoVerbList. &\begin, &\end, and &\item belong to this list,
-you can redefine (`\renewcommand') it.
-There is also a command &\NormalCommand{<letters>} \emph{issuing} the
-command `\<letters>' instead of typesetting it.
-Since auto mode is somewhat dangerous, you have to start it explicitly
-by &\AutoCmdSyntaxVerb. You can end it by &\EndAutoCmdSyntaxVerb.\par}
-
-Auto mode is motivated by the observation that there are package files
-containing their documentation as pure (well-readable) ASCII
-text---containing the names of the new commands without any kind of
-quotation marks or verbatim commands.
-Auto mode should typeset such documentation just from the same ASCII
-text.
-
-\item[Hash mark &# comes verbatim.]
-No macro definitions are expected in the `document'
-environment.\footnote{This idea recently appeared on the 'latex-l'
-mailing list. It may be wrong, not sure at the moment, think of
-'latexa.ltx' .\,.\,.}
-Rather, \lq`#'\rq\ is an active character for taking the next
-character (assuming it is a digit) to form a reference to a
-\emph{macro parameter}---\lq`#1'\rq\ becomes \lq#1\rq\ (WYSIWYG
-indeed!).
-\end{description}
-
-\subsection{What is Wrong with the Present Version}
-\begin{enumerate}
-\item
-'niceverb.sty' should be an extension of 'wiki.sty';
-yet their font selection mechanisms are currently not compatible.
-\item
-Font switching or horizontal spacing may fail in certain situations with
-parentheses. (You can correct spacing by \lq`\ '\rq.)
-\item
-The feature of mixing high-quality-typeset comments into the
-package code listing is implemented in a very rudimentary way only.
-% just allowing for `\subsection's.
-The ``comment detector'' detects Wikipedia-style subsection titles
-instead of lines beginning with percent characters.\footnote{%
-Percent characters will definitely not be ``ignored'' as with &\DocInput,
-rather they will hide rests of \emph{documentation} lines as usually,
-while they will be typeset verbatim in \emph{package code} lines.}
-% Switching between plain and verbatim typesetting in the package
-% listings isn't settled yet, since there are different styles of using
-% percent symbols. I have sometimes used double percent symbols
-% (\lq\verb|%%|\rq)
-% for commenting text and single ones just for ``reversible deletion of
-% code,'' while usually single percent symbols indicate commenting text
-% indeed. Double percent symbols may, by contrast, mean that the text remains
-% visible in the `.sty' file only, suppressed in the typeset
-% documentation ('lineno.sty').
-% For a while, it may be necessary to provide replacing macros for each
-% package separately instead of providing a single macro package
-% managing all of them.
-\item
-The code listing currently uses the `listing' and `listingcont'
-environments of 'moreverb.sty';
-the code font and the line numbers may be too large.
-\item
-The ``vertical'' character \lq`|'\rq\ should be active and provide a
-version of the `decl' environment of 'ltxguide.cls'.
-\end{enumerate}
-
-\section{Implementation of the Markup Syntax}
-% \verbatiminput{niceverb.sty}
-% \listinginput[5]{1}{niceverb.sty}
-\input{niceverb.doc}
-
-\section{Code Preparing Source for Typesetting}
-This is at present in a file `makedoc.tex'.
-\listinginput[5]{1}{makedoc}
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/nicetext/fifinddo.pdf b/Master/texmf-dist/doc/latex/nicetext/fifinddo.pdf
new file mode 100644
index 00000000000..7c4dfcb9a1d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nicetext/fifinddo.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/nicetext/makedoc.pdf b/Master/texmf-dist/doc/latex/nicetext/makedoc.pdf
new file mode 100644
index 00000000000..b9f4bb18ce2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nicetext/makedoc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/nicetext/niceverb.pdf b/Master/texmf-dist/doc/latex/nicetext/niceverb.pdf
index 51bd438d453..8ca92c6249d 100644
--- a/Master/texmf-dist/doc/latex/nicetext/niceverb.pdf
+++ b/Master/texmf-dist/doc/latex/nicetext/niceverb.pdf
Binary files differ