diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/nicetext/run')
-rw-r--r-- | Master/texmf-dist/doc/latex/nicetext/run/arseneau.tex | 220 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/nicetext/run/fdtxttex.tex | 116 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/nicetext/run/fdtxttex.tpl | 26 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/nicetext/run/makedoc.tpl | 33 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/nicetext/run/sample.txt | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/nicetext/run/substr.tex | 184 |
6 files changed, 584 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/nicetext/run/arseneau.tex b/Master/texmf-dist/doc/latex/nicetext/run/arseneau.tex new file mode 100644 index 00000000000..2a1874bf912 --- /dev/null +++ b/Master/texmf-dist/doc/latex/nicetext/run/arseneau.tex @@ -0,0 +1,220 @@ +\typeout{arseneau.tex 2010/03/30 some packages by D. Arseneau} + +\title{A Few (just Two) Packages by Donald Arseneau} + +\author{Uwe L\"uck\thanks{applying \url{http://ctan.org/pkg/nicetext}}} + +% \listfiles + + + +%% Preprocessing: + +\RequirePackage{makedoc} + +% \CopyFDconditionFromTo{PScomment}{comment} + +\MainDocParser{\ProcessInputWith{PScomment}} + +%% nolbreaks: + +%% Replacements: + +\SetPatternCodes{\MakeOther\\\MakeOther\ } + +\MakeExpandableAllReplacer{LaTeX}{LaTeX }{\LaTeX{} }{LEAVE} + +% \MakeExpandableAllReplacer{TeX}{\TeX }{\TeX{} }{LEAVE} + +\PrependExpandableAllReplacer{opt}{[ragged]}{`[ragged]'} + +\PrependExpandableAllReplacer{braces}[\Delimiters<>]<{ }><`{ }'> + +\SetCorrectHookJobLast + + + +\HeaderLines{2} + +\LaTeXresultFile{nolbreaks.doc} + +\MakeCloseDoc{nolbreaks.sty} + + + +%% notoccite: + +\MakeExpandableAllReplacer{LaTeX}{LaTeX }{\LaTeX{} }{LEAVE} + +\PrependExpandableAllReplacer{caption}% + +{ \caption [}{\DISPLAY\caption[} + +\PrependExpandableAllReplacer{unsrt}{unsrt}{`unsrt'} + +\PrependExpandableAllReplacer{toc}{ toc}{ `.toc'} + +\PrependExpandableAllReplacer{lof}{lof}{`.lof'} + +\PrependExpandableAllReplacer{latex}{latex}{`latex'} + +\PrependExpandableAllReplacer{NOTE}{*NOTE*}{\textbf{NOTE:\enspace}} + +\PrependExpandableAllReplacer{does}{*does*}{\emph{does}} + +\PrependExpandableAllReplacer{bibtex}{bibtex}{`bibtex'} + +\ResetPatternCodes + +\SetCorrectHookJobLast + + + +\HeaderLines{3} + +\LaTeXresultFile{notoccite.doc} + +\MakeCloseDoc{notoccite.sty} + + + +%% Typesetting: + +\documentclass{article} + +\usepackage{hyperref,niceverb} %% niceverb after hyperref! + +\AddToNoVerbList{\DISPLAY\textbf\enspace\emph\LaTeX} + +\newcommand*{\DISPLAY}{% + + \\[\smallskipamount]\leavevmode\null\hfil} + +\makeatletter \MakeLetter\_ + +% {\MakeActive\"\gdef\DQcode#1"{\dqtd{\texttt{#1}}}} + +{\MakeActive\"\gdef\DQcode#1"{\texttt{#1}}} + +%% weird problems: + +% \newcommand*{\startDQcode} + +% {``\begingroup\MakeActiveLetHere\"\enddQcode\tt} + +% \def\endDQcode{\endgroup"} + +\pagestyle{headings} + +\usepackage{parskip} + +\begin{document} + +\maketitle + + + +\begin{abstract}\noindent + + This document demonstrates the present + + (i.e., 'nicetext' bundle release v0.4) + + capabilities of 'makedoc' and 'niceverb' + + to typeset \LaTeX\ quality documentation from + + third-party package files having ASCII comments only, + + without modifying such package files manually.\footnote{See + + \url{http://ctan.org/pkg/nicetext} + + for more on these packages.} + + Such packages usually mark comments by lines starting with + + \lq`% '\rq. This is somewhat difficult when the ``comment mark" + + \lq`%'\rq\ + + may at the same time be used for ``commenting out" in place of + + ``true commenting." As opposed to 'substr.sty' that conforms to the + + easier \lq`%% '\rq\ style, the packages 'nolbreaks' and 'notoccite' + + by Donald Arseneau exemplify the \lq`% '\rq\ commenting style. + + + + The ASCII documentation of packages of this kind + + does not always clearly indicate when switching to `\tt' is appropriate. + + This problem is solved here by string replacements very specific + + to the package files. + + The setup for these replacements + + (in the source file 'arseneau.tex') + + still may be simplified. + + %% <- 2010/03/29 + + + + Moreover, some similar packages cannot be properly typeset with + + 'nicetext' at present because 'makedoc''s loop is too rigid to deal with + + (i)~ASCII indents, displays, lists and with (ii)~instructions + + after `\endinput'. + + + + It should be clear that all the package desriptions are Donald Arseneau's, + + 'nicetext' just formats them. + +\end{abstract} + +\tableofcontents + +\pagebreak + + + +\sloppy + + + +\section{'nolbreaks'} + +% \MakeActiveLet\_\textunderscore + +% \MakeActive\*\def*{\texttt{\string*}} + +% \MakeActiveLetHere\"\startDQcode + +\MakeActiveLetHere\"\DQcode + +% \errorcontextlines=6 + +\AutoCmdInput{nolbreaks.doc} + + + +\section{'notoccite'} + +\ResetCodeLineNumbers + +\AutoCmdInput{notoccite.doc} + + + +\end{document} + diff --git a/Master/texmf-dist/doc/latex/nicetext/run/fdtxttex.tex b/Master/texmf-dist/doc/latex/nicetext/run/fdtxttex.tex new file mode 100644 index 00000000000..e36edd2bbfd --- /dev/null +++ b/Master/texmf-dist/doc/latex/nicetext/run/fdtxttex.tex @@ -0,0 +1,116 @@ + \makeatletter + +\typeout{^^J*fdtxttex.tex* 2010/03/30 txt to TeX by dialogue^^J + + (apply \string\MakeDocCorrectHook) + + ^^J} + + + +\RequirePackage{fifinddo} + + + +\catcode`\_=11 + +\def\CorrectionFile{\def\mdoc_corr} + +\CorrectionFile{mdoccorr.cfg} + +\ResultFile{sample.tex} + +\def\InputFile{\def\input_file_name} + +\InputFile{sample.txt} + +\newif\iftoscreen + + + +\def\FD_dialogue{% + + \typeout{^^J% + + ===========================================================^^J% + + \string\CorrectionFile{\mdoc_corr} + + \space (define \@backslashchar MakeDocCorrectHook)^^J% + + \string\InputFile {\input_file_name}^^J% + + \string\ResultFile{\result_file_name} + + \space\space\space\space\space\space\space + + \string\toscreen\iftoscreen true\else false\fi ^^J% + + ===========================================================% + + }% + + \typein[\action]% + + {Run with these settings? (Y)es? (C)hange? (Otherwise quit.)}% + + \csname action_\action \endcsname + +} + +\def\run_with_settings{% + + \input{\mdoc_corr}% + + \WriteProvides + + \ProcessFileWith{\input_file_name}{% + + \WriteResult{\expandafter \MakeDocCorrectHook + + \expandafter{\fdInputLine}}% + + \iftoscreen + + \typeout{\expandafter \MakeDocCorrectHook + + \expandafter{\fdInputLine}}% + + \else + + \message{.}% + + \fi} + + \CloseResultFile + + \typeout{Done.}% + + \FD_dialogue + +} + +\expandafter\let\csname action_y\endcsname \run_with_settings + +\expandafter\let\csname action_Y\endcsname \run_with_settings + + + +\def\change_settings{% + + \typein[\change]{^^JType setting command(s).}% + + \change \FD_dialogue} + +\expandafter\let\csname action_c\endcsname \change_settings + +\expandafter\let\csname action_C\endcsname \change_settings + + + +\FD_dialogue + + + +\stop + diff --git a/Master/texmf-dist/doc/latex/nicetext/run/fdtxttex.tpl b/Master/texmf-dist/doc/latex/nicetext/run/fdtxttex.tpl new file mode 100644 index 00000000000..c9b03b314bc --- /dev/null +++ b/Master/texmf-dist/doc/latex/nicetext/run/fdtxttex.tpl @@ -0,0 +1,26 @@ +\typeout{fdtxttex.tpl 2010/03/30 fifinddo correction template} + +\RequirePackage{fifinddo} + +\input{mdoccorr.cfg} + +\ResultFile{sample.tex} + +\WriteProvides + +\ProcessFileWith{sample.txt}{% + + \typeout{\expandafter \MakeDocCorrectHook + + \expandafter{\fdInputLine}}% + + \WriteResult{\expandafter \MakeDocCorrectHook + + \expandafter{\fdInputLine}}% + +} + +\CloseResultFile + +\stop + diff --git a/Master/texmf-dist/doc/latex/nicetext/run/makedoc.tpl b/Master/texmf-dist/doc/latex/nicetext/run/makedoc.tpl new file mode 100644 index 00000000000..e250cc9f41e --- /dev/null +++ b/Master/texmf-dist/doc/latex/nicetext/run/makedoc.tpl @@ -0,0 +1,33 @@ +\typeout{makedoc.tpl 2010/03/23 makedoc correction template} + +\RequirePackage{makedoc} + +\renewcommand*{\mdJobName}{SAMPLE} + +\input{mdoccorr.cfg} + +\LaTeXresultFile{\mdJobName.doc} + +\HeaderLines{0} + +\ProcessLineMessage{} + +\MainDocParser{% + +% \typeout{\ProcessInputWith{dots}}% + +% \WriteResult{\ProcessInputWith{dots}}% + + \typeout{\expandafter \MakeDocCorrectHook + + \expandafter{\fdInputLine}}% + + \WriteResult{\expandafter \MakeDocCorrectHook + + \expandafter{\fdInputLine}}% + +} + +\MakeCloseDoc{\mdJobName.TEX} + +\stop
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/nicetext/run/sample.txt b/Master/texmf-dist/doc/latex/nicetext/run/sample.txt new file mode 100644 index 00000000000..782297c0c05 --- /dev/null +++ b/Master/texmf-dist/doc/latex/nicetext/run/sample.txt @@ -0,0 +1,5 @@ +blabla ... blabla + +blabla cf. bla + +etc. bla bla
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/nicetext/run/substr.tex b/Master/texmf-dist/doc/latex/nicetext/run/substr.tex new file mode 100644 index 00000000000..371045696a6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/nicetext/run/substr.tex @@ -0,0 +1,184 @@ +\typeout{substr.tex 2010/03/30 documentation for substr.sty} + +\title{\textsf{substr.sty}\thanks{See + + \url{http://ctan.org/pkg/substr} for more about + + \textsf{substr.sty}.}---Substring + + Functions with \LaTeX} + +\author{Harald Harders\thanks{Joint work with Heiko Oberdiek, + + one line + documentation tool + + by Uwe L\"uck.}} + +% \listfiles + + + +%% Preprocessing 'substr.sty': + +\RequirePackage{makedoc} + + + +%% Replacements: + +\SetPatternCodes{\MakeOther\\} + +\MakeExpandableAllReplacer{Cmds} + + {Commands:}{\SECT{Commands:}}{LEAVE} + +\PrependExpandableAllReplacer{Change}{ChangeLog}{\SECT{ChangeLog}} + +\PrependExpandableAllReplacer{CR}{Copyright}{\COPYRIGHT} + +\PrependExpandableAllReplacer{LaTeX} + + [\MakeOther\ ]{LaTeX }{\LaTeX{} } + +\PrependExpandableAllReplacer{HH@} + + {h.harders@tu-bs.de} + + {`h.harders@tu-bs.de'\MEDSK} + +\PrependExpandableAllReplacer{COMP} + + {de.comp.text.tex} + + {`de.comp.text.tex'} + +\PrependExpandableAllReplacer{LPPL} + + {macros/latex/base/lppl.txt} + + {`macros/latex/base/lppl.txt'} + +\PrependExpandableAllReplacer{Hist}[\MakeOther\ ]% + +{History of this package:}{\SECT{History of this package:}} + +\ResetPatternCodes + +\SetCorrectHookJobLast + + + +\HeaderLines{3} + +\MainDocParser{\ProcessInputWith{comment}} + +\LaTeXresultFile{substr.doc} + +\MakeCloseDoc{substr.sty} + + + +\documentclass{article} + + + +\usepackage{hyperref,makedoc,niceverb} %% niceverb after hyperref! + +\AddToNoVerbList{\MEDSK\SECT\textbf\COPYRIGHT,\LaTeX} + +\newcommand*{\MEDSK}{\par\medskip} + +\newcommand*{\SECT}[1]{\MEDSK\textbf{#1}\nopagebreak\par} + +\newcommand*{\COPYRIGHT}{\MEDSK\textbf{Copyright} } + +\usepackage[utf8]{inputenc} %% for v1.2 + + + +\pagestyle{myheadings} + +\markboth{\textsf{substr.sty}}{\textsf{substr.sty}} + +\usepackage{parskip} + + + +\begin{document} + +\maketitle + + + +\begin{abstract}\noindent + + This documentation of 'substr.sty' has been typeset + + by automatical ASCII\slash UTF\hbox{-}8~$\to$ \LaTeX\ + + enhancement provided by 'makedoc.sty' and 'niceverb.sty''s + + ``auto mode."\footnote{See + + \url{http://ctan.org/pkg/nicetext} + + for more on these packages.} + + Some extended formatting---kind of sectioning, + + switches to `\tt'---have been achieved by string replacements + + specific to the comment text of the package file + + (see source file 'substr.tex'). + + + + 'substr.sty' especially demonstrates the rather rare + + \lq`%% '\rq\ style of package comments that is somewhat + + favoured by 'makedoc' because this way ``true comments" + + are easily distinguishable from mere ``commenting out." + +% + +% The idea to use 'parskip.sty' for formatting the documentation + +% (as opposed to the version of the present file of one week ago) + +% is due to the quite recent + +% 'import.tex'\footnote{\url{http://ctan.org/pkg/import}} + +% that + +%% ??? + +\end{abstract} + +\sloppy + +% \MakeJobDoc{3}{\ProcessInputWith{comment}} + +\AutoCmdInput{substr.doc} + +\end{document} + + + +%% HISTORY + +2010/03/18 sent to CTAN + +2010/03/27 removed `\usepackage{substr}' + +2010/03/28 extended formatting by replacing words + +2010/03/29 \SetPatternCodes etc. + +2010/03/30 import -> substr; see source file + + + |