summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/plain
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-09 22:52:03 +0000
committerKarl Berry <karl@freefriends.org>2013-05-09 22:52:03 +0000
commit75b2113b57c777aaac8bf52968a2accf10c4a2c7 (patch)
tree8656cae5e32b6c0e710a55e9aedef570e16ad8ab /Master/texmf-dist/doc/plain
parent4e4c128479aaf71fbcea7350a046b57c8f74fcfd (diff)
plipsum (9may13)
git-svn-id: svn://tug.org/texlive/trunk@30353 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/plain')
-rw-r--r--Master/texmf-dist/doc/plain/plipsum/README2
-rw-r--r--Master/texmf-dist/doc/plain/plipsum/plipsum-doc.pdfbin227140 -> 230007 bytes
-rw-r--r--Master/texmf-dist/doc/plain/plipsum/plipsum.nw114
3 files changed, 51 insertions, 65 deletions
diff --git a/Master/texmf-dist/doc/plain/plipsum/README b/Master/texmf-dist/doc/plain/plipsum/README
index dd5def6ff6f..2c478a9f4a9 100644
--- a/Master/texmf-dist/doc/plain/plipsum/README
+++ b/Master/texmf-dist/doc/plain/plipsum/README
@@ -6,7 +6,7 @@ of the plain TeX developers.
Author: Sergio Spina <sergio.am.spina@gmail.com>
-Version: 4.2 of 2013.05.06
+Version: 4.3 of 2013.05.08
Contents of the package
diff --git a/Master/texmf-dist/doc/plain/plipsum/plipsum-doc.pdf b/Master/texmf-dist/doc/plain/plipsum/plipsum-doc.pdf
index 7165bf06cb9..14157ec4139 100644
--- a/Master/texmf-dist/doc/plain/plipsum/plipsum-doc.pdf
+++ b/Master/texmf-dist/doc/plain/plipsum/plipsum-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/plain/plipsum/plipsum.nw b/Master/texmf-dist/doc/plain/plipsum/plipsum.nw
index b9152bcd2dd..1e238398232 100644
--- a/Master/texmf-dist/doc/plain/plipsum/plipsum.nw
+++ b/Master/texmf-dist/doc/plain/plipsum/plipsum.nw
@@ -1,7 +1,7 @@
%
% filename: plipsum.nw
-% version: 4.2
-% date: May 6, 2013
+% version: 4.3
+% date: May 8, 2013
% author: Sergio Spina <sergio.am.spina@gmail.com>
% description: 'Lorem ipsum' paragraphs for the purposes
% of the plain TeX developers.
@@ -53,8 +53,8 @@
\catcode`@=11
\def\newpage{\vfill\pagebreak}
-\let\p@rt\part
-\def\part{\newpage\p@rt}
+\let\@@part\part
+\def\part{\newpage\@@part}
\def\<{\ifmmode\langle\else$\langle$\fi}
\def\>{\ifmmode\rangle\else$\rangle$\fi}
\catcode`@=12
@@ -63,7 +63,7 @@
\title{P-Lipsum\\[.3\baselineskip]\small A `lorem ipsum' paragraph generator\\ in plain \TeX\ for plain \TeX ers.}
\author{Sergio Spina\\sergio.am.spina@gmail.com}
-\date{May 6, 2013}
+\date{May 8, 2013}
\maketitle
@@ -89,7 +89,7 @@ typographic ligatures with the font choosen for your document.
your document.
\part{Macros}
-\section{[[\lipsum]]} It's the main macro. It can accept one or two arguments
+\section{\textbackslash lipsum} It's the main macro. It can accept one or two arguments
separated by an hyphen and an optional parameter.
The argument is one or two different numbers in the range 1-100.
@@ -128,11 +128,13 @@ It's ok if the first argument is greater than the second.
$$\halign{#\kern.2in\hfil$\leftarrow$\quad &#\hfil\cr
[[\lipsum{33-13}]] & E. same as example `C'; it works as well.\cr}$$
-\section{[[\everystartplipsumpar \everyendplipsumpar]]} These two token lists
-were in existence in the previous version of \plipsum. As far as they can be
-easily replaced with normal \TeX\ programming tools they have been deleted.
+\section{\textbackslash everystartplipsumpar
+\textbackslash everyendplipsumpar}
+These two token lists were in existence in the previous version of \plipsum.
+As far as they can be easily replaced with normal \TeX\ programming tools
+they have been deleted.
-\section{[[\nopar.]]} It eliminates the [[\par]] between one paragraph and
+\section{\textbackslash nopar.} It eliminates the [[\par]] between one paragraph and
the following one. This way many paragraphs may become one single big paragraph.
$$\halign{#\kern.2in\hfil$\leftarrow$\quad &#\hfil\cr
[[{\nopar\lipsum{14-16}}\par]] & \vtop{\hsize2.36in \noindent One single
@@ -166,18 +168,23 @@ Let's begin with the introductory things.
Version informations in a comfortable place.
<<preliminaries>>=
\def\PLversion{4}
-\def\PLrevision{2}
-\def\PLrevisiondate{2013/05/06}
+\def\PLrevision{3}
+\def\PLrevisiondate{2013/05/08}
@
The sign `@' for the private macros.
<<preliminaries>>=
\chardef\beforeplipsumatcatcode=\the\catcode`@
\catcode`@=11
@
+Messages in the log file. Handle the newline with the pipe char.
+<<preliminaries>>=
+\def\@message#1{{\newlinechar`\^^J\message{#1}}}
+\def\@errmessage#1{{\newlinechar`\^^J\errmessage{#1}}}
+@
The first cry of this \TeX\ child.
<<preliminaries>>=
-{\newlinechar`|\message{|P-lipsum version
- \PLversion.\PLrevision\space-- revision \PLrevisiondate|}}
+\@message{^^JP-lipsum version
+ \PLversion.\PLrevision\space-- revision \PLrevisiondate^^J}
@
Let's go with the real thing. The job will be done in two stages:
\begin{enumerate}
@@ -840,16 +847,15 @@ occultissimarum. Conclusum est enim contra Cyrenaicos satis acute, nihil ad Epic
@ Anyway, after so much work the format launch an echo of proudness in the
[[.log]] file.
<<echo>>=
-{\newlinechar`|\message{|P-lipsum: created
- \number\c@parnumber\space paragraphs.|}}
+\@message{^^JP-lipsum: created
+ \number\c@parnumber\space paragraphs.^^J}
@
Before of the beginning of the interface building, in which the users will
insert values, let's define some error messages.
<<interface>>=
\newhelp\optparams@error{%
Valid optional parameters are 's', 'short', 'm', 'medium', 'l', 'long'.}
-\newhelp\paramexcess@error{%
- The best possible value is \the\c@parnumber.}
+\newhelp\paramexcess@error{The best possible value is 100}
@
Once builded the foundations we can build the main macro of the format.
[[\lipsum]] has a lot of behaviors:
@@ -910,13 +916,13 @@ optional parameters at all.
\ifx\param@ne\@short@\shorttrue\mediumfalse\longfalse
\else
\errhelp\optparams@error
- {\newlinechar`|\errmessage{|P-lipsum: !! ERROR !!
- Wrong optional parameter.}}
+ \@errmessage{^^JP-lipsum: !! ERROR !!
+ Wrong optional parameter.^^J}
\fi\fi\fi\fi\fi\fi
\no@opt@par{#2}}
@
-Now it is necessary to scan the parameter to ensure that there is an hyphen. In
-this case is called the macro [[\noopt@parA]], otherwise the macro
+Now it is necessary to scan the parameter to ensure that there is an hyphen.
+In this case is called the macro [[\noopt@parA]], otherwise the macro
[[\noopt@parB]]
<<interface>>=
\newif\ifhyphen
@@ -950,16 +956,24 @@ Now everything is simple and the macros are self-explaining.
If the parameter of [[\lipsum]] has an hyphen will be performed [[\noopt@parA]];
otherwise [[\noopt@parB]].
<<interface>>=
-\countdef\c@plipsumAone=253
-\countdef\c@plipsumAtwo=251
+\newcount\c@plipsumAone
+\newcount\c@plipsumAtwo
+\newcount\c@max
+
+\c@max\c@parnumber
+\divide\c@max by3\relax
\def\noopt@parA#1-#2\end{{%
\global\c@plipsumAone=#1\relax
\global\c@plipsumAtwo=#2\relax
- \ifnum\c@plipsumAone>\c@parnumber
- \warnmsg{first}\fi
- \ifnum\c@plipsumAtwo>\c@parnumber
- \warnmsg{second}\fi
+ \ifnum\c@plipsumAone>\c@max
+ \errhelp\paramexcess@error
+ \@errmessage{^^JP-lipsum: ERROR at line \the\inputlineno. The
+ first parameter of \string\lipsum\space is too big.^^J}\fi
+ \ifnum\c@plipsumAtwo>\c@max
+ \errhelp\paramexcess@error
+ \@errmessage{^^JP-lipsum: ERROR at line \the\inputlineno. The
+ second parameter of \string\lipsum\space is too big.^^J}\fi
\ifmedium
\advance\c@plipsumAone by100\relax
\advance\c@plipsumAtwo by100\relax
@@ -973,12 +987,14 @@ otherwise [[\noopt@parB]].
\types@t}}
\def\noopt@parB#1\end{%
- \ifnum#1>\c@parnumber
- \warnmsg{}\fi
- \count253=#1\relax
- \ifmedium\advance\count253 by100\relax\else
- \ifshort\advance\count253 by200\relax\fi\fi
- \csname plips@\romannumeral\count253\endcsname}
+ \c@plipsumAone#1
+ \ifnum\c@plipsumAone>\c@max
+ \errhelp\paramexcess@error
+ \@errmessage{^^JP-lipsum: ERROR at line \the\inputlineno. The
+ parameter of \string\lipsum\space is too big.^^J}\fi
+ \ifmedium\advance\c@plipsumAone by100\relax
+ \else\ifshort\advance\c@plipsumAone by200\relax\fi\fi
+ \csname plips@\romannumeral\c@plipsumAone\endcsname}
\def\types@t{\let\next\relax
\ifnum\c@plipsumAone>\c@plipsumAtwo\else
@@ -1044,36 +1060,6 @@ A very long lipsum paragaph:\par
<<ending>>
%% end of file `plipsum.tex'
@
-\part{Revision history}
-\begin{description}
-\item[rev.\ 2.2] 2012 aug 27
- \begin{description}
- \item[--] published on CTAN
- \end{description}
-\item[rev.\ 2.3] 2012 sep 14
- \begin{description}
- \item[--] rewritten the [[\scan]] macro, now much more simple and readable.
- \item[--] added the documentation in noweb.
- \item[--] solved a bug in [[\warnmsg]].
- \end{description}
-\item[rev.\ 2.4] 2012 nov 23
- \begin{description}
- \item[--] added [[\everystartplipsumpar]] and [[\everyendplipsumpar]].
- \item[--] replaced all paragraphs.
- \item[--] many cosmethyc changes.
- \end{description}
-\item[rev.\ 3.0] 2013 apr 27
- \begin{description}
- \item[--] deleted [[\everystartplipsumpar]] and [[\everyendplipsumpar]].
- \end{description}
-\item[rev.\ 4.0] 2013 may 05
- \begin{description}
- \item[--] modified the interface of [[\lipsum]].
- \item[--] added the optional parameter.
- \item[--] 300 latin paragraphs.
- \end{description}
-\end{description}
-@
\part{Indexes}
\section{Chunks.}
\nowebchunks