summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/plain
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-06-25 11:13:36 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-06-25 11:13:36 +0000
commit4530a2c792171b2f0db4d844f06a3a52d3d41b94 (patch)
tree1fa09d1a2f98500a4041705c1db0bb6e72387372 /Master/texmf-dist/doc/plain
parente65a48b471957ddb65bddba0a6c6d4906c68c215 (diff)
mkpattern v1.2 2008/06/22
git-svn-id: svn://tug.org/texlive/trunk@9035 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/plain')
-rw-r--r--Master/texmf-dist/doc/plain/mkpattern/README2
-rw-r--r--Master/texmf-dist/doc/plain/mkpattern/mkpatdoc.tex37
-rw-r--r--Master/texmf-dist/doc/plain/mkpattern/mkpatter.pdfbin49442 -> 71868 bytes
3 files changed, 27 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/plain/mkpattern/README b/Master/texmf-dist/doc/plain/mkpattern/README
index bb46924e2e7..d2ba201f6d9 100644
--- a/Master/texmf-dist/doc/plain/mkpattern/README
+++ b/Master/texmf-dist/doc/plain/mkpattern/README
@@ -1,4 +1,4 @@
-Mkpatter v. 1.1, 2007/04/23.
+Mkpatter v. 1.2, 2008/06/22.
Mkpattern is a general purpose program for the generation of hyphenation
patterns, with definition of letter sets and template-like constructions.
diff --git a/Master/texmf-dist/doc/plain/mkpattern/mkpatdoc.tex b/Master/texmf-dist/doc/plain/mkpattern/mkpatdoc.tex
index c7a9ca4bc5b..5facdc94a13 100644
--- a/Master/texmf-dist/doc/plain/mkpattern/mkpatdoc.tex
+++ b/Master/texmf-dist/doc/plain/mkpattern/mkpatdoc.tex
@@ -85,20 +85,33 @@
\ \number\day, \number\year}
\null\vskip50pt
-\centerline{\titlefont The mkpattern program}
+\centerline{\titlefont The Mkpattern program}
\bigskip
\centerline{Javier A. M\'ugica de Rivera}
\medskip
-\centerline{Version\ 1.1, \today}
+\centerline{Version\ 1.2, July 22, 2008}%\today}
\vskip40pt plus 10pt minus 6pt
\def\indexsectionline#1#2#3{\vskip3pt\leavevmode\hbox to1em{\hss#1.\kern0.8em}#2\kern1em #3\par}
\def\indexsubsectionline#1#2#3{\vskip1pt\leavevmode\hbox to2em{\hss}#2\par}
\def\toindex#1{\edef\tempa{\write\tocfile{\noex\indexsubsectionline{}{#1}{\noexpand\the\count0}}}\tempa}
-\noindex\nonumber\section{Index}
-\everypar\@everypar\vskip-3pt
-\input \jobname.toc
+\newif\iffile
+\newread\checkfile
+
+\openin\checkfile \jobname.toc
+\ifeof\checkfile\filefalse
+\else\filetrue
+\fi
+
+\iffile
+\def\next{%
+ \noindex\nonumber\section{Index}
+ \everypar\@everypar\vskip-3pt
+ \input \jobname.toc
+}
+\expandafter\next
+\fi
\newwrite\tocfile
\immediate\openout\tocfile=\jobname.toc
@@ -195,12 +208,12 @@ Successive occurrences of {\tt \encodingreplacements] and {\tt \letters] are add
The relative order of encoding replacement declarations, letter declarations and letter set definitions is free, because mkpattern simply stores the information necessary when processing those commands, and it does not write anything to the patterns file till it sees the beginning of the patterns.
\medskip
-Finally, the other predefined command is {\tt \templatedef]\toindex{Giving names to templates}, and example of the use of which is {\tt \templatedef{prefixos}{#1&{V}2}], and later in the pseudopatterns you could write
+Finally, the other predefined command is {\tt \templatedef]\toindex{Giving names to templates}, an example of the use of which is {\tt \templatedef{prefixos}{#1&{V}2}], and later in the pseudopatterns you could write
\begin{syntax}
\begin{prefixos}/hb
<#-parts>/hb
-\end{syntax}
+\end{prefixos}
/endsyntax
It is selfexplanatory once you know about templates, which is explained below.
@@ -211,7 +224,7 @@ The pseudopatterns are the bulk of the generating file. There you may write bare
\displayline{&{Vall}1/rm ,]
-\noindent with the set {\tt Vall] defined as above, would be replaced by the five patterns {\tt a1], $\dots$, {\tt ú1]; and the input {\tt &{Vall}2&{Vall+}] would write to the patterns file a pattern matrix starting at {\tt a2a] and ending at {\tt ú2h]. If the name of the letter set consists of a single character you may omit the braces.
+\noindent with the set {\tt Vall] defined as above, would be replaced by the ten patterns {\tt a1], $\dots$, {\tt ú1]; and the input {\tt &{Vall}2&{Vall+}] would write to the patterns file a pattern matrix starting at {\tt a2a] and ending at {\tt ú2h]. If the name of the letter set consists of a single character you may omit the braces.
If a single pattern is written it will be transparently passed to the patterns file. Indeed, any text that does not deserve any special treatment is directly output to the patterns file. Any such text as well as pseudopatterns are {\emph words\/}. Words must be preceded and followed by one or more spaces or end of lines. Remember this when you write control sequences or comments (do not append them directly to a word).
@@ -263,6 +276,8 @@ mkpattern has a command that allows you to place any text (any balanced text) in
The most frequent elements that need to be written, and that cannot be written by simply placing them in the generating file, are comments and empty lines. mkpattern treats the end of a line and empty lines as spaces, so the only way to insert an end of line in the patterns file is with the command {\tt \newline] (you can include end(s) of line in the argument to \put, but it will output the character 13, which may or may not be the end of line for your OS). You may occasionally need to write two {\tt \newline] instead of one. As it has already been shown, this command may appear in the definition of a template.
+Since July 2008, empty lines within patterns are repaced by lines containing just a \%. Previously, the problem of empty lines was avoided enclosing the patterns in a group and making the catcode of end-of-line equal to that of space. If you want the old behavour, just write {\tt \oldnewlines] somewhere before the pseudopatterns.
+
Comments may be output with \put, but there are other possibilities. mkpattern has three states regarding the treatment of comments:
\displayline{\nocomments/hfill \halfcomments/hfill \keepcomments]
@@ -293,7 +308,7 @@ Currently, outside the pseudopatterns a common {\tt \input] will work, but you'd
It is obvious that mkpattern makes substantial changes to the catcodes. In this respect the program is quite radical, which makes sense if you think that the main task of \TeX{} is usually to output pages or read macro definitions, while the mkpattern program processes a file with the purpose of writing another text file. It has to catch every character of the input file, so that instead of being added to a box to be eventually typeset it is added to the material to be eventually written to the patterns file, after prior processing if necessary.
-All these is done by means a control sequence named {\tt \lee]. It is triggered by {\tt \begin{pseudopatterns}] and does not stop to act till the end of the input, which is signalled by {\tt \end{}]. When the command {\tt \lee] sees another command in front of it, it executes that command, thus yielding temporarily the control to that command. Every command designed in mkpatter.tex and liable to appear inside pseudopatterns, places a {\tt \lee] after it has completely expanded, restoring the control to the main reading flow of the program. In the like manner, every control sequence designed by the user should place the control sequence {\tt \lee], or any other that does that, before any text, lest the following text goes to the dvi file. Thus, the following definitions are valid:
+All these is done by means a macro named {\tt \lee]. It is triggered by {\tt \begin{pseudopatterns}] and does not stop to act till the end of the input, which is signalled by {\tt \end{}]. When the command {\tt \lee] sees another command in front of it, it executes that command, thus yielding temporarily the control to that command. Every command designed in mkpatter.tex and liable to appear inside pseudopatterns, places a {\tt \lee] after it has completely expanded, restoring the control to the main reading flow of the program. In the like manner, every macro designed by the user should place the control sequence {\tt \lee], or any other that does that, before any text, lest the following text goes to the dvi file. Thus, the following definitions are valid:
\begin{syntax}
\def\foo{\newline c2c}/ / \def\twolines{\newline\newline}/hb
@@ -332,7 +347,7 @@ It sets the catcode equal to those that will be in force inside the pseudopatter
\begin{syntax}
\begin{patternscode}/hb
/null/kern2em \def\prefixos{\template{#1&{V}2}}/hb
-/null/kern2em \endprefixos{\end{\template}}/hb
+/null/kern2em \def\endprefixos{\end{\template}}/hb
\end{patternscode}
/endsyntax
@@ -343,7 +358,7 @@ When material to be output is seen by the program it is not usually directly out
\displayline{\iwrite{<material>}[/rm ,/egroup]
-\noindent but recall that each write goes to a separate line.
+\noindent but recall that each write goes to a separate line. Note also that {\tt iwrite] is a low level macro that does not provide its own {\tt lee] at the end.
\section{Tracing and the log file}
diff --git a/Master/texmf-dist/doc/plain/mkpattern/mkpatter.pdf b/Master/texmf-dist/doc/plain/mkpattern/mkpatter.pdf
index edef6065c8c..a3c96bc49d1 100644
--- a/Master/texmf-dist/doc/plain/mkpattern/mkpatter.pdf
+++ b/Master/texmf-dist/doc/plain/mkpattern/mkpatter.pdf
Binary files differ