diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/nicetext')
4 files changed, 94 insertions, 48 deletions
diff --git a/Master/texmf-dist/tex/latex/nicetext/fifinddo.sty b/Master/texmf-dist/tex/latex/nicetext/fifinddo.sty index e25e67aed5d..d8bb3ef6a94 100644 --- a/Master/texmf-dist/tex/latex/nicetext/fifinddo.sty +++ b/Master/texmf-dist/tex/latex/nicetext/fifinddo.sty @@ -1,11 +1,11 @@ %% Macro package `fifinddo.sty' for LaTeX2e, %% FIDO, FIND! -%% copyright (C) 2009-2011 Uwe L\"uck, +%% copyright (C) 2009-2012 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.5} \def\filedate{2011/11/21} +\def\fileversion{0.51} \def\filedate{2012/03/17} %% This file can be redistributed and/or modified under %% the terms of the LaTeX Project Public License; either @@ -565,8 +565,8 @@ \noexpandcsname \substr_cond \fdParserId \endcsname %% By `\edef', the name of the substring conditional is stored here %% as a single token. The rest of the sandbox follows. - ##1~#1\dollar_tilde}% -%% <- `\noexpand~' replaced for v0.5 according to + ##1\FD_noexpand~#1\dollar_tilde}% +%% <- `\noexpand~' as before v0.5 replaced for v0.51 according to %% Sec.~\ref{sec:pseudo-tilde}. \let\dollar_tilde\sandbox_dollar} %% If a tilde `~' has been used instead of `$', the default @@ -613,13 +613,24 @@ %% to the original one by |\FDnormalTilde| %% (which, however, works only for new processing jobs and %% processing another file---at present, TODO 2011/11/21): -\newcommand*{\FDnormalTilde}{\def~{\noexpand~}% - \let\RemoveTilde\FD_remove_normal_tilde} +\newcommand*{\FDnormalTilde}{% + \let\FD_noexpand\noexpand %% v0.51 +%% v0.5 had a modification of `~' that corrupted typesetting. + \let\RemoveTilde\FD_remove_normal_tilde} \let\FD_remove_normal_tilde\RemoveTilde \FDnormalTilde -\newcommand*{\FDpseudoTilde}{\def~{\noexpand\pseudo_tilde}% - \let\RemoveTilde\FD_remove_pseudo_tilde} +\newcommand*{\FDpseudoTilde}{% + \def\FD_noexpand~{\noexpand\pseudo_tilde}% %% v0.51 + \let\RemoveTilde\FD_remove_pseudo_tilde} \def\FD_remove_pseudo_tilde#1\pseudo_tilde{#1} +%% TODO 2012/01/20: This way outer braces of splits or the +%% target token list are removed. With 'blog.sty', this has been +%% relevant for displaying code only (where using source braces +%% for displaying braces, instead of using `\{' and `\}', +%% it was a bad habit anyway). In order to fix this, the target +%% token list must be surrounded with some additional dummy things, +%% and `\RemoveTildeArg' must add another trick. +%% %% <- stored in "bad" directory. %% %% === Calling conditionals === %% |\ProcessStringWith{<target-string>}{<id>}| \ builds the sandbox @@ -1130,5 +1141,8 @@ v0.5 2011/11/13 \PrependExpandableAllReplacer*, \MakeSetupCommand; 2011/11/20 \noexpandcsname; "default job" lowercase 2011/11/21 \ProcessInputWith "less efficient", \protected@edef, "pseudo-tilde" + -> r0.5 +v0.51 2012/01/20 updated (C); TODO on pseudo-tilde + 2012/03/17 fixed \FDnormalTilde/\FDpseudoTilde TODO: cleveref 2010/03/18 diff --git a/Master/texmf-dist/tex/latex/nicetext/makedoc.sty b/Master/texmf-dist/tex/latex/nicetext/makedoc.sty index 67658845ab3..f09a891434e 100644 --- a/Master/texmf-dist/tex/latex/nicetext/makedoc.sty +++ b/Master/texmf-dist/tex/latex/nicetext/makedoc.sty @@ -1,10 +1,10 @@ %% Macro package `makedoc.sty' for LaTeX2e, -%% copyright (C) 2009-2011 Uwe L\"uck, +%% copyright (C) 2009-2012 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.42} \def\filedate{2011/11/19} +\def\fileversion{0.5} \def\filedate{2012/03/18} %% This file can be redistributed and/or modified under %% the terms of the LaTeX Project Public License; either @@ -49,6 +49,7 @@ \catcode`\_=11 %% underscore used in control words %% %% \subsection{&\MakeDocCorrectHook\ (\dqtd{`txt2TeX'})} +%% \label{sec:mdoccorr} %% 2012/03/17 %% |\MakeDocCorrectHook| is predefined to leave its argument without %% the enclosing braces, otherwise unchanged: \let\MakeDocCorrectHook\@firstofone @@ -342,7 +343,7 @@ % \let\maybe_result_empty_line\empty } %% -%% \subsection{Dealing with empty input lines} %% TODO use!? 2010/03/09 +%% \subsection{Dealing with empty input lines} %% TODO use!? 2010/03/09 %% \label{sec:emptylines} %% |\OnEmptyInputLine| is a default setting (or hook) for what to do %% with empty lines in the input file. The default is to insert an @@ -377,26 +378,43 @@ %% \subsubsection{Choose input file and run!} %% |\MakeDoc{<input>}| preprocesses <input> to render input for %% \LaTeX, considering what is typical for a \LaTeX\ package as the -%% <input> one here: -\newcommand*{\MakeDoc}[1]{% - \input{mdoccorr.cfg}% %% 2011/11/05 -%% ... added for what `makedoc.tex' says about it. -%% See `\make_doc_job' for TODOs about it. -%% Now also wondering: \ (i)~there are other ways to get the -%% correcting hook, so why forcing this here? \ -%% (ii)~different correcting hooks for different input files?---% -%% In case of a ``header" (see below) we change into ``code mode": +%% <input> one here. It reads 'mdoccorr.cfg' (Sec.~\ref{sec:mdoccorr}) +%% automatically. +%% % [`input{mdoccorr.cfg}'] added for what `makedoc.tex' says about it. +%% % See `\make_job_doc' for TODOs about it. +%% % Now also wondering: \ (i)~there are other ways to get the +%% % correcting hook, so why forcing this here? \ +%% % (ii)~different correcting hooks for different input files?---% +%% % In case of a ``header" (see below) we change into ``code mode": +%% |\MakeDoc*{<input>}| \emph{avoids} inputting 'mdoccorr.cfg' +%% (e.g., for allowing replacements specific for the single package). +%% All similar commands (including those invoking `\MakeDoc') +%% get this ``my way" feature as of v0.5: +\newif\if_makedoc_autocorr_ +\newcommand*{\makedoc_maybe_autocorr}{% + \if_makedoc_autocorr_ \input{mdoccorr.cfg}% + \else \_makedoc_autocorr_true \fi} +%% <- TODO warning if one from `TEXMF/' used inadvertently!? +%% avoid reading twice!? %% 2010/03/11 +%% % or read it from 'makedoc' already? %% 2010/03/13 +%% +%% |\makedoc_star<next-cmd>| abbreviates star version definitions: +\newcommand*{\makedoc_star}[1]{% + \@ifstar{\_makedoc_autocorr_false#1}#1} +\newcommand*{\MakeDoc}{\makedoc_star\make_doc_arg} +\newcommand*{\make_doc_arg}[1]{% + \makedoc_maybe_autocorr \ifnum\header_lines>\z@ \WriteResult{\string\begin{mdPackageCode}}% \PackageCodeTrue %% TODO both lines makedoc command!? %% 2009/04/08 \else \PackageCodeFalse \fi -%% The loop follows. There is a placeholder `\makd_doc_line_body' +%% The loop follows. There is a placeholder `\makedoc_line_body' %% that is predefined below and can be changed while processing the %% <input> file. \ProcessFileWith{#1}{% \CountInputLines %% stepping line counter is standard - \make_doc_line_body + \makedoc_line_body \process_line_message}% %% Currently the ``VERSION HISTORY" or, more generally, %% a final part of the <input> file is typeset verbatim @@ -416,8 +434,11 @@ %% is a kind of shorthand for %% \[`\MakeDoc{<input>}\CloseResultFile'\] %% was MakeClose 2011/10/12 %% where `\CloseResultFile' is from 'fifinddo'. -\newcommand*{\MakeCloseDoc}[1]{\MakeDoc{#1}\CloseResultFile} -%% Reimplementation using 'fifinddo' v0.5 failed: %% 2011/11/19 +%% The star version \[|\MakeCloseDoc*{<input>}|\] %% 2012/03/18 +%% \emph{avoids} reading 'mdoccorr.cfg': +\newcommand*{\MakeCloseDoc} {\makedoc_star\make_close_doc} +\newcommand*{\make_close_doc}[1]{\MakeDoc{#1}\CloseResultFile} +%% Reimplementation using 'fifinddo' v0.5 failed 2011/11/19: % \newcommand*{\MakeCloseDoc}{\FinalInputFiletrue\MakeDoc} %% `\MakeDoc' and `\MakeCloseDoc' actually \emph{process} %% the <input> file, @@ -430,8 +451,13 @@ %% using settings like `\MakeDoc'. The default for <out-ext> is `doc'. %% `\MakeSingleDoc' combines `\LaTeXresultFile' %% and `\MakeCloseDoc' with appropriate arguments. +%% The star version %% 2012/03/18 +%% \[|\MakeSingleDoc*[<out-ext>]{<in-output>.<in-ext>}|\] +%% \emph{avoids} reading 'mdoccorr.cfg'. %% (TODO: not so sure about dot vs.\ optional <in-ext>.) -\newcommand*{\MakeSingleDoc}[2][doc]{\make_single_doc[#1]#2\@nil} +\newcommand*{\MakeSingleDoc}{\makedoc_star\make_single_doc_args} +\newcommand*{\make_single_doc_args}[2][doc]{% + \make_single_doc[#1]#2\@nil} \def\make_single_doc[#1]#2.#3\@nil{% \LaTeXresultFile{#2.#1}\MakeCloseDoc{#2.#3}} %% @@ -462,10 +488,10 @@ %% (general dividing into code and comments). \MainDocParser{\SectionLevelThreeParseInput} %% Here is how `\HeaderLines' and `\MainDocParser' act: -\def\make_doc_line_body{% +\newcommand*{\makedoc_line_body}{% \IfInputLine{>\header_lines}% - {\let\make_doc_line_body\main_doc_parser - \make_doc_line_body}% %% switch to deciding + {\let\makedoc_line_body\main_doc_parser + \makedoc_line_body}% %% switch to deciding {\TreatAsCode{\fdInputLine}}} %% header verbatim %% \subsubsection{Screen messages} %% |\ProcessLineMessage{<command>}| is designed to choose a screen @@ -493,7 +519,7 @@ %% |\MakeInputJobDoc{<header-lines>}{<main-parser>}| %% by default produces a file %% \[`\jobname.doc' \mbox{\quad from\quad } `\jobname.sty'\] -%% with some standard settings.\footnote{This command is new with v0.3.} +%% with some standard settings. %%% \footnote{This command is new with v0.3.} %% 'mdoccorr.cfg' (for `.txt'$\to$\LaTeX\ functionality) is read, %% `\HeaderLines{<header-lines>}' %% and `\MainDocParser{<main-parser>}' and finally @@ -519,6 +545,8 @@ %% |\MakeJobDoc| does the same as `\MakeInputJobDoc' apart from %% typesetting the <created> file, so the latter needs an additional %% `\input{<created>}'. +%% The star forms |\MakeInputJobDoc*| and %% 2012/03/18 +%% |\MakeJobDoc*| \emph{avoid} reading 'mdoccorr.cfg'. %% %% My original idea was that all preprocessing of package files %% to be documented should <happen> \emph{before} @@ -534,11 +562,11 @@ %% This is the code for both `\MakeJobDoc' and `\MakeInputJobDoc': \@ifdefinable{\mdJobName}{\let\mdJobName\jobname} \newif\if_makedoc_input_ -\newcommand*{\MakeInputJobDoc}{\_makedoc_input_true - \make_job_doc_read} -\newcommand*{\MakeJobDoc} {\_makedoc_input_false - \make_job_doc_read} -\newcommand*{\make_job_doc_read}[1][sty] +\newcommand*{\MakeInputJobDoc}{% + \_makedoc_input_true \makedoc_star\make_job_doc_arg} +\newcommand*{\MakeJobDoc} {% + \_makedoc_input_false \makedoc_star\make_job_doc_arg} +\newcommand*{\make_job_doc_arg}[1][sty] {\@testopt{\make_job_doc[#1]}{doc}} %% Reading files as follows would fail with active 'niceverb' settings, %% so we issue `\noNiceVerb' if it is defined. We do it inside a group @@ -547,12 +575,8 @@ \begingroup \@ifundefined{noNiceVerb}{}% {\let\MakeNormal\MakeNormalHere \noNiceVerb}% - \input{mdoccorr.cfg}% - %% <- TODO warning if not found!? - %% or if one from TEXMF/ used inadvertently!? - %% avoid reading twice!? 2010/03/11 - %% <- TODO stack danger in group!? 2010/03/13 - %% <- TODO or read it from 'makedoc' already! 2010/03/13 + \makedoc_maybe_autocorr %% 2012/03/17 +%% <- TODO stack danger in group!? 2010/03/13 \LaTeXresultFile{\mdJobName.#2}% \HeaderLines{#3}% \MainDocParser{#4}% @@ -564,7 +588,7 @@ } %% This feature may \emph{change}. %% -%% \subsection{Leave the package} +%% \subsection{Leaving the package} %% mod. 2012/03/18 \catcode`\_=8 %% restores underscore use for subscripts \endinput %% @@ -613,3 +637,7 @@ v0.41a 2011/08/22 doc.: makedoc.cfg -> mdoccorr.cfg v0.41b 2011/10/12 doc.: MakeClose -> MakeDoc v0.42 2011/11/05 \MakeDoc reads mdoccorr.cfg, \MakeSingleDoc 2011/11/19 failing reimplementation of \MakeCloseDoc +v0.5 2012/03/17 removing 1 \make_job_doc TODO; star versions; + a few make_doc -> makedoc + 2012/03/18 star variants completed, copyright updated, + doc. "Leaving" diff --git a/Master/texmf-dist/tex/latex/nicetext/run/arseneau.tex b/Master/texmf-dist/tex/latex/nicetext/run/arseneau.tex index 10b86dc6254..c2a59f45552 100644 --- a/Master/texmf-dist/tex/latex/nicetext/run/arseneau.tex +++ b/Master/texmf-dist/tex/latex/nicetext/run/arseneau.tex @@ -1,5 +1,5 @@ \ProvidesFile{arseneau.tex} - [2010/04/05 some packages by D. Arseneau (ul)] + [2012/03/18 some packages by D. Arseneau (ul)] \title{A Few Packages by Donald Arseneau} \author{Uwe L\"uck\thanks{applying \url{http://ctan.org/pkg/nicetext}}} % \listfiles @@ -20,7 +20,7 @@ \HeaderLines{2} \LaTeXresultFile{nolbreaks.doc} -\MakeCloseDoc{nolbreaks.sty} +\MakeCloseDoc*{nolbreaks.sty} %% notoccite: \MakeExpandableAllReplacer{LaTeX}{LaTeX }{\LaTeX{} }{LEAVE} @@ -38,7 +38,7 @@ \HeaderLines{3} \LaTeXresultFile{notoccite.doc} -\MakeCloseDoc{notoccite.sty} +\MakeCloseDoc*{notoccite.sty} \ProcessLineMessage{\message{.}} %% optional: @@ -58,7 +58,7 @@ \HeaderLines{14} \LaTeXresultFile{optional.doc} -\MakeCloseDoc{optional.sty} +\MakeCloseDoc*{optional.sty} %% Typesetting: diff --git a/Master/texmf-dist/tex/latex/nicetext/run/substr.tex b/Master/texmf-dist/tex/latex/nicetext/run/substr.tex index 1974b2e15bf..64f202f0e9d 100644 --- a/Master/texmf-dist/tex/latex/nicetext/run/substr.tex +++ b/Master/texmf-dist/tex/latex/nicetext/run/substr.tex @@ -1,4 +1,4 @@ -\ProvidesFile{substr.tex}[{2011/08/20 [2010/03/30] documentation for substr.sty}] +\ProvidesFile{substr.tex}[2012/03/18 documentation for substr.sty] \title{\textsf{substr.sty}\thanks{See \url{http://ctan.org/pkg/substr} for more about \textsf{substr.sty}.}---Substring @@ -36,7 +36,7 @@ \HeaderLines{3} \MainDocParser{\ProcessInputWith{comment}} \LaTeXresultFile{substr.doc} -\MakeCloseDoc{substr.sty} +\MakeCloseDoc*{substr.sty} \documentclass{article} @@ -45,11 +45,12 @@ \newcommand*{\MEDSK}{\par\medskip} \newcommand*{\SECT}[1]{\MEDSK\textbf{#1}\nopagebreak\par} \newcommand*{\COPYRIGHT}{\MEDSK\textbf{Copyright} } -\usepackage[utf8]{inputenc} %% for v1.2 +\usepackage[utf8]{inputenc} %% for v1.2 \pagestyle{myheadings} \markboth{\textsf{substr.sty}}{\textsf{substr.sty}} \usepackage{parskip} +\usepackage{ragged2e} %% 2012/03/18 \begin{document} \maketitle @@ -79,8 +80,10 @@ %% ??? \end{abstract} \sloppy +\RaggedRight % \MakeJobDoc{3}{\ProcessInputWith{comment}} \AutoCmdInput{substr.doc} +\enlargethispage{\baselineskip} \end{document} %% HISTORY @@ -90,4 +93,5 @@ 2010/03/29 \SetPatternCodes etc. 2010/03/30 import -> substr; see source file 2011/08/20 \ProvidesFile for fileinfo +2012/03/18 use \MakeCloseDoc*, \enlargethispage, ragged2e |