From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- usergrps/uktug/baskervi/3_1/a-agm.tex | 159 ++++++ usergrps/uktug/baskervi/3_1/a-fine.tex | 174 ++++++ usergrps/uktug/baskervi/3_1/a-murphy.tex | 169 ++++++ usergrps/uktug/baskervi/3_1/a-soas.tex | 290 ++++++++++ usergrps/uktug/baskervi/3_1/archive.tex | 54 ++ usergrps/uktug/baskervi/3_1/bask3_1.brf | 0 usergrps/uktug/baskervi/3_1/bask3_1.rep | 36 ++ usergrps/uktug/baskervi/3_1/bask3_1.tex | 49 ++ usergrps/uktug/baskervi/3_1/diag.sty | 895 +++++++++++++++++++++++++++++++ usergrps/uktug/baskervi/3_1/facts.tex | 115 ++++ usergrps/uktug/baskervi/3_1/latex2e.tex | 90 ++++ usergrps/uktug/baskervi/3_1/mfbeg.tex | 859 +++++++++++++++++++++++++++++ usergrps/uktug/baskervi/3_1/pspic.pro | 227 ++++++++ usergrps/uktug/baskervi/3_1/reviews.tex | 97 ++++ usergrps/uktug/baskervi/3_1/shape.tex | 314 +++++++++++ usergrps/uktug/baskervi/3_1/shapepar.sty | 828 ++++++++++++++++++++++++++++ usergrps/uktug/baskervi/3_1/tug93.tex | 161 ++++++ 17 files changed, 4517 insertions(+) create mode 100644 usergrps/uktug/baskervi/3_1/a-agm.tex create mode 100644 usergrps/uktug/baskervi/3_1/a-fine.tex create mode 100644 usergrps/uktug/baskervi/3_1/a-murphy.tex create mode 100644 usergrps/uktug/baskervi/3_1/a-soas.tex create mode 100644 usergrps/uktug/baskervi/3_1/archive.tex create mode 100644 usergrps/uktug/baskervi/3_1/bask3_1.brf create mode 100644 usergrps/uktug/baskervi/3_1/bask3_1.rep create mode 100644 usergrps/uktug/baskervi/3_1/bask3_1.tex create mode 100644 usergrps/uktug/baskervi/3_1/diag.sty create mode 100644 usergrps/uktug/baskervi/3_1/facts.tex create mode 100644 usergrps/uktug/baskervi/3_1/latex2e.tex create mode 100644 usergrps/uktug/baskervi/3_1/mfbeg.tex create mode 100644 usergrps/uktug/baskervi/3_1/pspic.pro create mode 100644 usergrps/uktug/baskervi/3_1/reviews.tex create mode 100644 usergrps/uktug/baskervi/3_1/shape.tex create mode 100644 usergrps/uktug/baskervi/3_1/shapepar.sty create mode 100644 usergrps/uktug/baskervi/3_1/tug93.tex (limited to 'usergrps/uktug/baskervi/3_1') diff --git a/usergrps/uktug/baskervi/3_1/a-agm.tex b/usergrps/uktug/baskervi/3_1/a-agm.tex new file mode 100644 index 0000000000..f7f9fd68bd --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/a-agm.tex @@ -0,0 +1,159 @@ +\title{Report of the 1992 \protect\ukt\ AGM} +\author[R. A. Bailey]{R. A. Bailey \\ Hon. Secretary} +\begin{article} +\newcommand{\voting}[4]{\begin{quote}% + \begin{tabular}{lr@{}l} + For& #1 & \\ + Against & #2 & \\ + Abstentions & #3 & #4 + \end{tabular}\end{quote} +} +%\newcommand{\bask}{\marginpar{editor: alter if necessary}} +\newcommand{\bask}{\relax} +\def\ithead#1{{\bf #1 \ }\ignorespaces} + +\subsubsection*{Official report of the AGM of the UK \TeX\ Users +Group\\held at Aston University (Room 708, Main Building)\\ on Wednesday +14~October 1992 at 1100 hours } + +In the absence through illness of the \ukt\ chair, P.~Abbott, the meeting was +chaired by P.~Taylor. The group sent its condolences to P.~Abbott. +There were, at least, twenty-five members present. The following is a +brief summary of the business transacted; it is categorized by, +roughly, the numbered agenda items. +\begin{enumerate} + + \item \ithead{Chairman's Report} This was read by P.~Taylor. + + \item \ithead{Report of the 1991 AGM} + This report had already been published in {\em Baskerville}, +Volume~2, Number~1. Copies were also presented at the meeting. The +report was received as correct, and signed by P.~Taylor. + + \item \ithead{Matters Arising} + There were no matters arising. + + \item \ithead{Approval of Accounts} + The Treasurer's report was given orally. Copies of the +unaudited accounts for 1991--92 were presented. When audited, the +accounts will appear in {\em Baskerville}. \bask It was reported that +\ukt\ had increased its balance by about \pounds 1000 during the year, +partly because of an increase in membership to about 170, partly +because two of the meetings showed a small profit. + + \item \ithead{Appointment of Auditor(s)} + Colin Smith was reappointed auditor for 1993, and thanked for +his work to date. + + \item \ithead{Election of Committee} + Of the previous committee of twelve, one continues as Chair +and two had been co-opted. Six members retired, only one of whom was +willing and eligible to stand for re-election. There were three further +nominations: thus there was no need for an election and the total size +of the committee became seven (excluding the Chair). + + Subsequently, at its next meeting, the committee invited P.~Taylor to +continue as Acting Chair until P.~Abbott recovered his health. The +committee once again co-opted S.~F.~Brooks (as {\em Baskerville \/} +editor) and J.~Petts; and also co-opted I.~McNeil-Sinclair and +D.~V.~J.~Murphy. It appointed the following honorary officers: + \[ + \begin{tabular}{ll} + R.~A.~Bailey & Committee Secretary\\ + I.~McNeil-Sinclair& Membership Enquiries\\ + I.~W.~Hall & Treasurer\\ + D.~V.~J.~Murphy & Meetings Secretary\\ + D.~W.~Penfold & Membership Secretary + \end{tabular} \] +% \marginpar{editor: This is true, even though IM-S resigned after a month} + The remaining committee membership consists of D.~Eckersley, +R.~Fairbairns, S.~P.~Q.~Rahtz and G.~Toal. + + \item \ithead{Membership Fees} + The Treasurer proposed the following motion, on behalf of the +committee: + \begin{quote} \it + The Committee proposes maintaining membership fees at their 1992 +levels, that is, \pounds 15.00 for full membership or \pounds 7.50 for +student membership. + \end{quote} + G.~Toal proposed an amendment: that the word {\em full-time\/} be +inserted before the word {\em student}. After some discussion, +I.~W.~Hall seconded this amendment, on which the voting was +\voting{17}{2}{3}{.} The voting on the amended proposal was +\voting{20}{0}{2}{.} + + \item \ithead{Meetings Fees} + The Treasurer proposed the following motion, on behalf of the committee: + \begin{quote} \it + The Committee proposes an increase in fees for attending ordinary meetings: + \begin{verse} + from \pounds15 to \pounds 20 for members\\ + from \pounds20 to \pounds 30 for non-members\\ + \end{verse} + and for attending workshops: + \begin{verse} + from \pounds25 to \pounds 30 for members\\ + from \pounds30 to \pounds 40 for non-members.\\ + \end{verse} + \end{quote} + He explained that one motivation for the change was to make membership +more attractive, by enabling members to recoup their membership fees +by attending only two meetings. After some discussion of the benefits +of allowing the committee flexibility in setting fees (for example, to +give a discount for booking in advance, or to put on a popular +loss-leading meeting), J.~Fine proposed an amendment: that the word +{\em customary\/} be inserted before the word {\em fees}. +I.~McNeil-Sinclair seconded the amendment, and the voting was +\voting{15}{3}{5}{.} The Treasurer then moved the amended motion, +seconded by S.~F.~Brooks: the voting was \voting{21}{1}{2}{.} + + \item \ithead{Cathy Booth Memorial Fund} + On behalf of the committee, C.~Hewlett proposed the following +motion: + \begin{quotation} \it + The UK \TeX\ Users' Group will establish a fund to be called the +Cathy Booth Memorial Fund. + + The Fund will be used to support education and research in electronic +publishing in general and in the use and development of \TeX\ and its +relatives in particular, and for other charitable purposes connected +with education. + \end{quotation} + The motion was seconded by C.~A.~Rowley and passed unanimously. + + \item \ithead{Donations} + P.~Taylor reported two donations made by the committee during +the year: \pounds 500 to the \LaTeX3 project; and computing equipment +to D.~Osborne to enable him to maintain the UK\TeX\ Digest and \TeX hax +from home. Both recipients expressed thanks at the meeting. + + \item \ithead{Newsletter Editor} + One edition of the Group's newsletter, {\em Baskerville}, had +appeared in 1992 under the editorship of P.~Taylor. S.~Brooks had then +taken over the editorship, and will soon produce another edition. In +the immediate future, these two people are willing to continue to +share the editorship. Contributions from the membership are always +gratefully received. + + \item \ithead{Other Business} + There was constructive discussion of several issues, which the +committee agreed to look at further. + \begin{itemize} + \item Should the \ukt\ organize professional training of \TeX, and, if +so, how? + \item Could members elect to receive notices from \ukt\ primarily by +electronic mail or primarily by ordinary mail, at choice? + \item The committee would examine the feasibility of creating, +maintaining and circulating a \ukt\ membership list. The list would +not be for sale or gift to any non-member. On membership renewal forms +members would be invited to give such details as they were willing to +have published (e.g.\ telephone number, fax number, electronic mail +address, address, \TeX\ platform), and would be given the opportunity +to opt out of the list completely. + \end{itemize} + \end{enumerate} + The meeting concluded by expressing its thanks to M.~Campbell and the +local catering and technical staff, for making the meeting possible. +\end{article} + diff --git a/usergrps/uktug/baskervi/3_1/a-fine.tex b/usergrps/uktug/baskervi/3_1/a-fine.tex new file mode 100644 index 0000000000..0aab208bf7 --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/a-fine.tex @@ -0,0 +1,174 @@ +% FINE: \tugboat\teach.tex +% +% Jonathan Fine +% 203 Coldhams Lane +% Cambridge +% CB1 3HY +% +% Tel 0223 215389 +% +% Email: J.Fine@pmms.cam.ac.uk + +\title{What should we teach \TeX?} +\author[Jonathan Fine]{Jonathan Fine\\Cambridge} + +\begin{article} + +\begin{quote} +A `virgin' \TeX\ system that has no macros is like a newborn baby +that has an immense amount to learn about the real world; but it is +capable of learning fast. \\ +{\em The \TeX book} p.342 +\end{quote} + + +\section{Introduction} + +I would like to use this article as an opportunity to explain to the +UK \TeX\ community what it is that am doing, and have been trying to +do, for the last two years. This will not be easy -- the subject +matter can be difficult and unfamiliar, even to myself -- and so the +reader's indulgence is asked for. + +I am working in what the cosmologists might call the first seconds of +the universe. More exactly, I am writing macros that are to be +loaded even before the like of \verb|plain| or \LaTeX\ are to be loaded. +Most users are concerned with later time, when \TeX\ is generating a +\verb|dvi| file from the author's typescript. + +\section{Macro packages} + +Before explaining further, a few words about \verb|plain| and \LaTeX. In +the beginning was \verb|plain.tex|, which consists of 1229 lines. \LaTeX\ +2.09 consists of 1318 lines in \verb|lplain.tex|, the \LaTeX\ version of +plain, together with 8565 lines in \verb|latex.tex| and 995 lines in +\verb|lfonts.tex|. Although the new \LaTeX\ 3 is not yet available, two of +its intended support macro files, \verb|doc.doc| and \verb|docstrip.doc|, weigh +in at 4554 and 2918 lines respectively. (In fairness, it should be +added that the relative quantity of documentation is greater in the +later files). + +A file such as \verb|plain.tex| has two purposes. One is to place +particular macros etc.\ into the memory of \TeX -- to teach it +something. The other is for us to read, so that we might know what is +being done. From the beginning there has been a tension between +these two functions. +In the \TeX book Knuth does {\it not\/} list \verb|plain.tex| verbatim. On +p.342 he explains: +\begin{quote} +``Un-optimized versions of the macros are easier for humans to +understand, so we shall deal with those; \verb|plain.tex| contains +equivalent constructions that work better on a machine.'' +\end{quote} +and further explanation is given at the top of p.348. + +This tension between human comprehension and machine efficiency has +grown with time, and is commonly expressed by the complaint, that +\TeX\ is difficult to program, or inadequate as a programming +language. (I personally like the \TeX\ macro language, and believe +its basic conception to be sound. However the complaints are real, +for they have a basis in experience). + +\section{A new point of view} + +If \TeX\ were a new microprocessor with its own instruction set, then +specialist developers would produce language tools. These would +compile higher level commands into \TeX's instruction set. Such +tools would relieve much of the tension and difficulty in programming +\TeX. + +Two years ago I began such a process of development for \TeX. If I +had known then the work involved, I may not have started. It has now +born its first fruit, the \verb|\noname| package, which is a valuable tool +for the author of \TeX\ macros. + +Briefly, \verb|\noname| removes many of the irritations of \TeX\ by +implementing an extension of the \TeX\ programming language. Files +written in the \verb|\noname| dialect of \TeX\ can be loaded directly into +\TeX's memory, or compiled into a form where they can be loaded at +high speed and with minimal overhead. The situation is similar to +that of a language interpreter and compiler. The \verb|\noname| package, +and macros written using \verb|\noname| are completely compatible with, +and independent from, the standard packages such as \verb|plain| and +\LaTeX. + +\section{About {\tt noname}} + +Here are some of the features of \verb|\noname| which ease the +programmer's task. +\begin{itemize} + \item It is easy to write long comments -- every line not beginning with a + space character or a hash \verb|#| is ignored. + \item Lines beginning with a \verb|#| are {\it hash commands}, which control + conditional compilation, much as in {\it C}. + \item All white space in macro code is ignored. However, the escape + character \verb|~| will {\it always\/} produce an ordinary space + character, even after a control word or a previous space producing + \verb|~|. + \item As well as letters and \verb|@| the digits \verb|0..9|, the underscore \verb|_| and + the colon \verb|:| can be used to form a control word. This does not + conflict with the normal use of these characters. + \item Ready access is provided to active characters, and other characters + with unusual catcodes. + \item Ready access is provided to control sequences which store numeric + constants such as $-1$, $0$, $16$ and $255$. One simply types \verb|[-1]| + in place of \verb|\m@ne|, and \verb|[16]| instead of \verb|\sixt@@n|. + \item Support is provided for the powerful control macros \verb|\break|, + \verb|\continue|, \verb|\return|, \verb|\CASE| and \verb|\FIND|. + \end{itemize} + +This is only the beginning. Intended, planned, and under +development enhancements include the following. +\begin{itemize} +\item Indexing and cross-reference utilities. +\item Interactive tutorial material for teaching how macros and primitive +commands work. This will use the next item. +\item A {\it single-step debugger\/} which will execute \TeX\ code one step +at a time. For example, the expansion of an expandable token such as a +macro is a single step, as is the execution of a primitive command. +\TeX\ acts on a stream of tokens. After each step the (changed) +stream of tokens is displayed and the user regains control. +\item A powerful {\it pretty printer\/} for typesetting source files +written in the \verb|\noname| dialect of \TeX. This will require zero or +minimal additional markup. +\item Named parameters for macros. This means one can write +\begin{quote} +\verb|\def\mymacro #\text ... | +\end{quote} +instead of +\begin{quote} +\verb|\def\mymacro #1 ... | +\end{quote} +when coding a macro. This makes it easier for a human to read the +macro. +\item Support for modules, with private and public identifiers. This will +remove much of the conflict that arises from different packages +using the same identifier to hold different meanings. +\item Support for various tricks to help conserve \TeX's hash table +(maximum number of control words), registers (\verb|\count|, \verb|\skip|, +etc.)\ and other resources. +\end{itemize} + +\section{Conclusions} +There is currently international discussion within the \TeX\ +community -- under the title NTS (new typesetting system) -- of what +if anything should replace \TeX\ the program. The \verb|\noname| package +demonstrates that much more can be done with \TeX\ than is commonly +realized. In particular, it removes some (not all) of the +difficulties in programming \TeX. It is important to understand what +can and cannot be done with \TeX\ as it is, and how or why not, if +one is set on creating a successor. + +I began by posing the question, what should we teach \TeX? My +response is this. First of all we should teach \TeX\ how to read and +understand macros written in a well-designed high(er) level extension +or dialect of \TeX. It will then be much easier to write the many +tens of thousands of lines that make up \LaTeX\ 2.09 and 3, and +countless other macro packages across the world. + +If you are interested in \verb|\noname| and would like a demonstration +copy, please contact me. The price, for a site license, will be two +or three figures. For approved public domain developers, the price +will be zero. + +\end{article} diff --git a/usergrps/uktug/baskervi/3_1/a-murphy.tex b/usergrps/uktug/baskervi/3_1/a-murphy.tex new file mode 100644 index 0000000000..5f8c7f6415 --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/a-murphy.tex @@ -0,0 +1,169 @@ +\title{On specialist typesetting packages} +\author[David Murphy]{David Murphy\\University of Birmingham} + +\begin{article} +\makeatletter +\input diag.sty +\makeatother +\special{header=pspic.pro} +\setlength{\diagramcellsize}{8em} + +\noindent Over the last two years I have been involved in the development +of a commuting diagrams package for \LaTeX. This article is based on my +experience of that work. It is meant neither to be read as distilled +wisdom, nor as a provocation, but rather as a basis for discussion of +the kinds of packages users `should' be provided with. + +\section*{Introduction} + +Some of my work uses category theory: this is a branch of mathematics +which makes extensive use of commuting diagrams, Figure~\ref{symmoncoh} +being a typical example. +\begin{figure*} +\centering + \begin{diagram*}(1.6,1.75)(-1.2,-0.05) %(-0.8,-0.05) + \object(0,0){(A \otimes B) \otimes (C \otimes D)} + \object(0.809017,0.587785){((A \otimes B) \otimes C) \otimes D} + \rightobject(0.5,1.538841){(A \otimes (B \otimes C)) \otimes D} + \leftobject(-0.5,1.538841){A \otimes ((B \otimes C) \otimes D)} + \object(-0.809017,0.587785){A \otimes (B \otimes (C \otimes D))} + \Farrow(-0.4, 1.538779)( 0.4, 1.538779) + \Farrow( 0.080902,0.058778)( 0.728116,0.529006) + \Farrow(-0.728116,0.529006)(-0.080901,0.058778) + \Farrow( 0.530901,1.443736)( 0.778116,0.682891) + \Farrow(-0.530901,1.443736)(-0.778116,0.682891) + \end{diagram*} + \caption{Coherence for monoidal categories} + \label{symmoncoh} + \end{figure*} + +There are various commuting diagrams packages available to \TeX~and +\LaTeX\ users; both Michael Barr (McGill Unversity) and Paul Taylor +(Imperial College) distribute popular ones. + However, all popular current packages use \TeX 's \verb"line" founts, +so it is impossible to achieve a diagram with pentagonal symmetry such +as Figure~\ref{symmoncoh}. + Furthermore, both Barr's and Taylor's packages share what is, I find, +a common problem amongst \TeX~shareware, namely that easy things are +easy to achieve, but difficult things, such as Figure~\ref{twocat}, +require an intimate knowledge of the package's workings. + Indeed, I was spurred to work on my own diagram macros by my inability +to understand Taylor's code or to obtain the diagram I wanted from his +package. + +I was very lucky in finding a solid base to build upon: Sean Bechhofer +(Manchester University) had already implemented a rudimentary commuting +diagrams package based on a \verb"picture"-like environment which +compiled arrows directly as PostScript~\verb"\special"s. + I had merely to extend his work, rewrite the \verb"\special"s to work +with \verb"dvips", ensure that his environment interacted reasonably +sensibly with the rest of \LaTeX, and generally tidy up the code. + The result is a package capable of producing diagrams such as +Figure~\ref{twocat} of reasonable quality and complexity. + \setlength{\diagramcellsize}{6em} + \begin{figure*} + \begin{diagram*}(2,2.4)(0,-0.2) + \object(0,1){A} + \object(1,1){B} + \object(1,2){C} + \object(1,0){D} + \object(2,1){{\mathbf{Cat}}} + + \curvearrow(1,1){\east}[i]{\po} + \curvearrow(1,1){\east}[j]{\st} + + \twocell(1,1){\east}{\clock}[\alpha][\far] + + \twocell(0,1){\eneast}{\clock}[\eta_1][\far] + \twocell(0,1){\eseast}{\clock}[\eta_2][\far] + + \plarrow(0,1){\neast}[f_1][\po] + \plarrow(0,1){\east}[f][\st] + \plarrow(0,1){\seast}[f_2][\st] + \plarrow(1,2){\south}[\lambda_{f_i}][\po] + \plarrow(1,1){\south}[\lambda_{f_j}][\po] + \end{diagram*} + \caption{A simple two-categorical diagram} + \label{twocat} + \end{figure*} + \begin{figure*} + +\begin{footnotesize} + \begin{verbatim} +\begin{diagram*}(2,2) +\object(0,1){A} +\object(1,1){B} +\object(1,2){C} +\object(1,0){D} +\object(2,1){{\bf Cat}} + +\curvearrow(1,1){\east}[i]{\po} +\curvearrow(1,1){\east}[j]{\st} + +\twocell(1,1){\east}{\clock}[\alpha][\far] + +\twocell(0,1){\eneast}{\clock}[\eta_1][\far] +\twocell(0,1){\eseast}{\clock}[\eta_2][\far] + +\plarrow(0,1){\neast}{f_1}[\po] +\plarrow(0,1){\east}{f}[\st] +\plarrow(0,1){\seast}{f_2}[\st] +\plarrow(1,2){\south}[\lambda_{f_i}][\po] +\plarrow(1,1){\south}[\lambda_{f_j}][\po] +\end{diagram*} +\end{verbatim} +\end{footnotesize} + \caption{The code for the two-categorical diagram shown in Figure + \protect\ref{twocat}} + \label{syntax} + \end{figure*} + +\section*{What's Wrong?} + +The package I produced, based on Bechhofer's work, has several +manifest disadvantages: +\begin{itemize} +\item It works exclusively with PostScript printers and +\verb"dvips". There are a substantial number of \LaTeX~users without +access to these facilities. +\item The syntax I have adopted, as the code which produces +Figure~\ref{twocat} (shown in Figure~\ref{syntax}) makes clear, +is fairly ad hoc and ill-chosen. +\item There is a considerable jump in complexity between simple +rectangular diagrams and more complex ones. This is wholly due +to the difficulty of doing standard trigonometry in \TeX. If +I could perform fairly simple numerical calculations without +descending to the PostScript level, users would have to think +rather less hard about the relative positions and dimensions +of diagram objects. Some hand-tuning is always going to be +necessary in a complex graphical environment, but more automation +should be possible than I have provided. +\end{itemize} + +My real concern in this article is how much do these problems +matter? I do not doubt that the problems I have outlined above make my +macros entirely unacceptable as a standard package; if something like +\verb"multicol" suffered from similar problems, no one would use it. +However, there is a big difference between carefully-designed packages +like \verb"multicol", which must work in a wide range of circumstances +and with a wide range of users, and a specialist package like my own which +is designed for a small community of relatively skilled users. For the moment +I am willing and able to continue to support the package, but this may not +always be the case. Is it reasonable to ask people to use software for which +no support guarantee can be given? + +My suspicion is that there are rather a lot of packages like mine: +medium-sized, badly-written pieces of code with a small but basically +satisfied user base. Is this a good thing? These users are not numerous +enough to be able to command high-quality software to meet their +needs: not enough people are interested in commuting diagrams for a +diagrams package to be a sensible addition to standard \LaTeX. (Opinions +differ on this point: Barr is currently working on a package that may +come as standard with \LaTeX~3.) Must the category theorist, then, +always be content with software such as mine? +More generally, what is the best way for the specialist typographical +needs of a small community to be met? I hope that these questions will +find some answers in the current debate over the future of \TeX. + +\end{article} + diff --git a/usergrps/uktug/baskervi/3_1/a-soas.tex b/usergrps/uktug/baskervi/3_1/a-soas.tex new file mode 100644 index 0000000000..cd23f2cfd7 --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/a-soas.tex @@ -0,0 +1,290 @@ +\title[Book and Journal Production]{Report on `Book and Journal Production'} +\author[Carol Hewlett]{Carol Hewlett\\London School of Economics} + +\begin{article} + +\def\heading#1#2{\subsection*{#1\\\normalsize\bf#2}} + +The first meeting of the UK \TeX\ Users' Group of 1992 was held at the +School of Oriental and African Studies, London, on Tuesday 11 February +1992. The subject for the day was `Book and Journal Production' which +attracted a large audience including overseas visitors from as far away +as Belfast! + +\heading{Rod~Mulvey}{Printing House, Cambridge University Press} + +Rod~Mulvey assumed that the audience was +familiar with \TeX\ and \LaTeX, +and aimed his talk at publishers, with the following topics: +\begin{enumerate} +\item What type of \TeX\ files should the authors submit +\item How should the \TeX\ files be submitted +\item What agreements should there be with authors +\item Checks to judge if \TeX\ files will work +\item How to convert files to {\it your} design +\item Sub-editing +\item Artwork. +\end{enumerate} +After the receipt of the author's +initial manuscript there needed to be a \TeX\ check and a report and +at the same time the work should be checked by the sub-editor who would +prepare a marked copy. The next step was to determine the final method of +production and the costs. Following that, and assuming \TeX\ was to be +used, the \TeX\ manuscript would be edited and the artwork prepared +separately. The artwork would be pasted in to the pages output +from \TeX\ to make up the pages and this, subject to late corrections, +made up the camera-ready copy. + +The journal production cycle was similar, except that before the manuscript +reached the production stage it would have been refereed and passed by the +journal editor. If the journal was using \TeX\ or \LaTeX\ then any +typescripts would have to be re-keyed. + +Rod then enumerated the kinds of \TeX\ input that an author might submit: +it could be at the initial stage, before any pre-subediting had been done; +it could be at the stage where only re-design and final corrections were +needed; it could include the publisher's design and just need final +corrections and an index -- or it could be a {\tt dvi} file (CRC on disk), +or even the camera-ready copy itself. + +What the author should submit depended partly on which of these stages +of \TeX\ input was involved. If \TeX\ source files were being submitted, +than all author-defined macros must be included. If the author were +submitting {\tt dvi} files then a paper copy must also be sent, as there +could be problems printing from a {\tt dvi} file if non-\TeX\ fonts had been +used. So it was essential for the author to send proper documentation +of what was being submitted, to include a list of all input files and +macros used and full details of any unusual fonts required. + +Authors might submit their work on disks or magnetic tapes, or by +electronic mail. Some problems with electronic mail were the possibility +of the files becoming corrupted and the chance of the printing house +mislaying them because the files were not expected or not identified. +Even disks and tapes did not always contain what they were supposed to! + +Rod pointed out that a lot of work may be needed to convert author's +\TeX\ to printer's \TeX, and gave some examples. + +It was necessary for subeditors to understand \TeX -- he showed an +example of unnecessary subediting for a \TeX\ manuscript. He referred +to an article in {\it Learned Publishing}, volume 4, number 9, 1991 +by R~J~Skaer on subediting for \TeX\ manuscripts. + +Authors tended to use too wide a measure for their text; +in \LaTeX, this could be changed very easily although an automatic change +could also make problems, particularly with mathematical formulae. + +Rod favoured making style files or macros available to intending authors +so that the work was in the right format from the start. This does imply +the existence of suitable style files and macros. It was worth designing +them for journals and standard monographs and for long books --- over +300 pages. For shorter, one-off books designing a style file could cost as +much as conventional typesetting, although if the style file were then used +from the beginning it would be worth it. + +One particular problem that Rod had encountered was the use of Times font +for setting maths. CUP had licensed a \TeX\ simulation of Times for +authors to use. The increased use of PostScript fonts will help get round +this kind of problem. + +Artwork was often a problem for publishers. Typically, artwork would +be done by a drawing office and pasted in. Now authors could include +some artwork with a \TeX\ file: if this were the case, then it was +again essential that the author provided any macros used. + +A major weakness of \TeX\ was that was not an automatic typesetting +program. This was particularly true with respect to floats. There was +no interactive page make up with current \TeX , and this was an area +that he would particularly wish to see improved. + +Rod then discussed the question of who does the work with \TeX\ +manuscripts. It could be some or all of the author, the typesetter, +the subeditor the academic editor/institution and the publishing +house. It was important to make an agreement with the author covering +these issues and to establish a policy with respect to electronic text +regarding subediting and correction. He recommended setting up +standard designs in \LaTeX\ and \TeX. + + +\heading{Geeti~Granger}{John~Wiley \& Sons Ltd} + +Books produced by Wiley are generally +scientific in subject and that their markets cover UK, Europe, +Middle East, Africa and Japan. They produce about 185 new books each +year and over 600 journal issues, together amounting to some 130,000 +pages. Geeti's section was established in 1984 initially to process +disks, but with a set of objectives which included building a +digital archive of the books produced and moving towards true +`demand printing'. A new set of objectives had been established in 1989; +these were: +\begin{enumerate} +\item To develop technical expertise with a view to enhancing John~Wiley's +competitive position in the long term. +\item To assist in the most competitive market of all, that for the best +authors. +\item To offer an increasing level of support to their authors. +\item To prepare for major changes in technology. +\item To open the possibility of genuine on-demand printing. +\end{enumerate} +Geeti's department used Sun systems running Unix, PCs running MS-DOS and +Apple Macintosh machines, linked with LocalTalk and ethernet networks. +Various peripherals were linked in, including a scanner, cassette +tape drive and a number of LaserWriters. + +Various items of software were used: all the machines ran \TeX\ of +some flavour and this, together with Ventura Publisher occupied +6 members of staff. \TeX\ was used for the books and journals, with Ventura +Publisher being used for some in-house material. +Other standard software for DTP, drawing and +translation was available and this was covered by another member of +staff and a technical support person. All the output was PostScript. + +In a typical year, Geeti's department was responsible for about 25 new books, +six complete journal issues plus several individual papers and +about 1000 pages of large indexes made for `non-disk' books. + +The book production cycle at John~Wiley was as follows: +To begin with, the author submitted a test disk and hard copy. +The next stage was a transmittal meeting from the editorial side to the +production side. A standard schedule was used for disk based manuscripts. +Copy editing and artwork preparation were both done by free-lance +people. Then followed page proofs, author's corrections and +camera-ready copy. Geeti said that they imposed no restrictions on the +kind of disks supplied --- provided they were readable and contained what +they were supposed to. As far as \TeX\ was concerned, six standard styles +had been developed, but the macros still needed to be tweaked. Page +balancing in \TeX\ was done by hand at the last stage. + +Geeti identified some of the problems with disks: authors still make +mistakes. They did not always take enough care to distinguish between +1 and l, O and 0. The hard copy supplied was not always the same as the +text on the disk. Authors tended to be inconsistent and didn't follow +guidelines. Where complex maths and chemistry and tables were included +the work had sometimes to be re-input to conform to the required +style. Geeti commented that she found that spell checkers were not +particularly useful in scientific work. + +To conclude, Geeti commented on the position of her department as an +in-house production unit for John~Wiley \& Sons Ltd. She found that +scheduling could be difficult: the work load had great variation. In +very slack periods, they would need to get ordinary manuscripts typed to disk +(by free-lances) so that they could be treated as disk-based. There was also +a lack of flexibility. Being in-house meant there was not a normal commercial +relationship between her department and the rest of the company. +She felt that decision-making was driven by the technology and that there was +an investment cycle or spiral. She further commented that it was difficult +to find and then to retain trained staff. Colleagues at John~Wiley \& Sons +needed to recognise the change in working practices. + +\heading{Peter~Robinson and Stephen~Miller}{Oxford University} + +Peter~Robinson is from the Computer and Manuscripts Project and Stephen~Miller +is a member of the Computing Service, both at the University of Oxford. +They used a Macintosh to demonstrate a program and a set of macros that +together can be used to produce critical editions. Stephen illustrated +what a critical edition is by showing some lines of Shakespeare's +{\it Hamlet}. The top part of the page contained the text according to a +particular edition. In the bottom part of the page were notes on +various differences between the chosen edition and other +editions. These can include different use of upper or lower case, different +forms or spellings, and commentary on the text. + +The traditional process of making a critical edition involves visiting +a great many libraries and using index cards to note all the variations. +Peter has developed a program, {\sc collate}, which will put all this into +computer files. Having sorted the text using {\sc collate}, it is then +possible to include \TeX\ markup commands so that the output can be processed +by Dominik~Wujastyk's {\em edmac} macros to produce a typeset critical edition. + +The {\sc collate} program can be obtained from Peter~Robinson, email: +{\tt peterr@uk.ac.ox.vax} and the {\em edmac} macros can be obtained +from Dominik~Wujastyk, Wellcome Institute for the History of Medicine, +183, Euston Road, London, NW1~2BN; email: {\tt d.wujastyk@uk.ac.ucl} +% +\heading{Christina~Thiele}{Carleton University Press}% +Christina~Thiele +said that her work was virtually all in the humanities --- and that she +used \TeX\ for it all. The Carleton University Press published in various +languages, principally English and French. \TeX\ was used in-house, not by +their authors. There was about 80\% electronic submission of manuscripts. +Authors were given a form to complete. Christina always included a +log of the file's history at the start of each \TeX\ file. The publishers +made any necessary corrections to the text, as they can't fix the errors +that the authors introduce. With this particular work, Christina uses +some 20--30 basic \TeX\ commands and modifies existing macros. She +usually starts by coding the text and writes the macros later. They mainly +use IBMs on which to run \TeX . She does 12--14\% of the University Press's +output; previously all the typesetting was farmed out. + +She emphasized how important it was to document your own work and +reminded us that \TeX\ was for humanities as well as maths. +% +\heading{Malcolm Clark}{Polytechnic of Central London}% +The final speaker of the conference was Malcolm Clark of the +Polytechnic of Central London and current President of TUG. His talk +described the problems he had faced when producing the proceedings +of the \TeX88 conference at Exeter, and how he had solved them. + +Malcolm started by giving the history of his previous +experience of producing books with \TeX. He then discussed how +he had chosen the papers to appear in the Proceedings. His basic +idea was to print the papers that had actually been given, but +the editor's decision was final and he did include one paper that +had not been given -- and had to omit papers that had been given +but had not achieved any permanent form. He pointed out the choices +facing an editor where not all the authors were writing their +native language: he liked to edit the work enough for the meaning +to be clear but so as to preserve the author's voice. He said that +it is not possible to achieve uniformity of texture over a multi-author work as +styles varied too much. +He told of his difficulties of finding a +publisher, and his determination to do so -- if only for the +warehousing. +He had chosen to use Computer Modern typeface, and pointed that +at 1270 dpi resolution it was excellent. +Malcolm had used a professional indexer to compile the index for the +book but he was not entirely happy with the result. + +His conclusions were that this kind of publishing was time consuming. +The book needed `objective' +editing and copy editing was also essential. He had discovered that +publishing is more than just assembling the papers. +He pointed out that it was tempting to keep refining, but that the temptation +should be resisted. He reminded us that other amateurs (his authors) had their +own priorities and so didn't keep to Malcolm's timetable. And finally he said +don't expect thanks, but it is fun. +% +\vskip30pt +The Conference ended with a general forum. Three main points were raised. +The first one was that there was a +need for a common set of tfms for PostScript. (These are the font +metrics that determine how much horizontal space each character occupies.) + +The second was the availability of publisher's +style files. Geeti~Granger said that John~Wiley's style files were available +only to intending authors. Rod~Mulvey said that this was for the publishers +to decide; +some of the style files that he uses are in the Aston Archive +and others are on the Cambridge University computer. The question +of out-of-date style files was mentioned, but there is no easy or +complete answer. + +The third point was to do with the potential archival nature of the +electronic manuscript. On the whole, the publishers represented by the +speakers did keep the electronic manuscripts, but only Geeti~Granger said +that as a matter of course she made all late corrections to the electronic +manuscript. + +Reference was made to the work done by Jane~Dorner on the arrangements +(or the lack of them) +between authors and publishers for dealing with electronic manuscripts. +Her report is called {\it Authors and Information Technology. New +Challenges in Publishing}, BNB Research Fund Report 52, published by The +British Library 1991 and available from Publications Sales Unit, The +British Library, Boston Spa, Wetherby, West~Yorkshire, LS23~7BQ. +This book was reviewed in the Newsletter of the British Computer Society +Electronic Publishing Specialist Group, volume 7, number 1, December 1991, +which contains a further article by Ms~Dorner. + +\end{article} + diff --git a/usergrps/uktug/baskervi/3_1/archive.tex b/usergrps/uktug/baskervi/3_1/archive.tex new file mode 100644 index 0000000000..59ea092243 --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/archive.tex @@ -0,0 +1,54 @@ +\newpage +\author{} +\title{Disk and tape \TeX\ distributions in the UK} +\begin{article} +For a complete Unix \TeX\ distribution, a +1/4 inch cartridge, QIC-120 or QIC-150 format (DC600A or DC6150) +can sent with envelope {\em and} stamps for return postage to: +\begin{quote} + David Osborne\\ + Cripps Computing Centre, \\ + University of Nottingham, \\ + Nottingham NG7 2RD +\end{quote} +Due to currency exchange, this service is offered only within the UK. + +For copies of em\TeX\ (for OS/2, PC-DOS and MS-DOS), and a free +catalogue detailing other disk formats, precompiled fonts and lots of +other goodies, you can also contact: Eigen PD Software, P.O. Box 722, +Swindon SN2 6YB (tel: 0793-611270) (JANET e-mail address: {\tt +kellett@uk.ac.cran.rmcs}) + +Enquiries for \TeX\ for the Atari ST etc. can be directed to: +The South West Software Library, P.O. Box 562, Wimborne, Dorset BH21 2YD +(JANET e-mail address: {\tt mdryden@uk.co.compulink.cix}) + +The international \TeX\ Users Group can also supply many \TeX\ +materials on disk. Contact: +\begin{quote} + \TeX\ Users Group\\ + PO Box 869\\ + Santa Barbara, CA 93102\\ + USA\\ + {\em Phone:} 805-899-4673 {\em E-mail}: {\tt tug@tug.org} +\end{quote} +\end{article} + +\title{Distribution of \TeX\ materials from Aston University} +\author{Peter Abbott} +\begin{article} +We regret to have to announce that due to the planned closure of the +University VAX service at the end of the 1993, Aston University will +no longer be able to supply magnetic tapes containing archive +material. Neither will we be able to supply backup copies of the +current working \TeX\ system. + +Changes in workload and resources mean that Aston will also be +unable to supply copies of em\TeX or Oz\TeX\ on disc. The committee of +the \ukt\ is actively investigating alternatives ways of supplying +members with \TeX\ discs and tapes. + +{\em ftp}, mail and {\em gopher} access to the archives is {\em not} +affected by these changes and will continue to be available until further +notice. +\end{article} diff --git a/usergrps/uktug/baskervi/3_1/bask3_1.brf b/usergrps/uktug/baskervi/3_1/bask3_1.brf new file mode 100644 index 0000000000..e69de29bb2 diff --git a/usergrps/uktug/baskervi/3_1/bask3_1.rep b/usergrps/uktug/baskervi/3_1/bask3_1.rep new file mode 100644 index 0000000000..1a18cc3828 --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/bask3_1.rep @@ -0,0 +1,36 @@ +(newarticle.1) +(newarticle.2) +(newarticle.3) +(section.3.1) +(section.3.2) +(section.3.3) +(section.3.4) +(section.3.5) +(section.3.6) +(newarticle.4) +(newarticle.5) +(newarticle.6) +(section.6.1) +(section.6.2) +(section.6.3) +(section.6.4) +(section.6.5) +(newarticle.7) +(newarticle.8) <\ptextlogo {META}\discretionary {-}{}{}\ptextlogo {FONT}\ for Beginners> +(section.8.1) +(section.8.2) +(section.8.3) +(section.8.4) +(section.8.5) +(section.8.6) +(section.8.7) <\ptextlogo {META}\discretionary {-}{}{}\ptextlogo {FONT}{} Mail List> +(section.8.8) +(newarticle.9) +(newarticle.10) +(newarticle.11) +(newarticle.12) +(section.12.1) +(section.12.2) +(section.12.3) +(section.12.4) +(newarticle.13) diff --git a/usergrps/uktug/baskervi/3_1/bask3_1.tex b/usergrps/uktug/baskervi/3_1/bask3_1.tex new file mode 100644 index 0000000000..151f81ecaa --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/bask3_1.tex @@ -0,0 +1,49 @@ +\documentclass{baskrep} +\usepackage{shapepar} + +\BASKvol{3} +\BASKno{1} +\def\editor{Sebastian Rahtz\\ArchaeoInformatica, York} + +\begin{document} + +\makeBSKtitle + +\tableofcontents + +\title{Editorial} +\author[\mbox{}]{Sebastian Rahtz \\ ArchaeoInformatica\\York} +\begin{article} +This issue of \BV\ was largely developed by Sue Brooks, but pressure of work +forced her to hand over the final production to the current editor. +Many thanks to Sue for her work over the last year on this project. + +The \ukt\ committee is very aware of the fact that \BV\ has not +been issued as regularly or frequently as the members deserve, and +from this autumn it is planned to produce \BV\ six times a year on +fixed dates. It is also planned to regularly publish articles on +common \TeX\ questions in \BV, and make these available as technical +notes to new members in the future. Members are urged to contribute +short (one side of A4) `topical tips' from which we can start to build +a library to answer the many queries from those who do not +participate in academic electronic network discussions. + +This isssue of the journal was created entirely with \LaTeX\ +and printed on a Linotronic 300 at Aston +University. It was set in ITC New Baskerville Roman, with Computer +Modern Typewriter for literal text. + +\end{article} +\input{latex2e} +\input{tug93} +\input{reviews} +\input{a-fine} +\input{a-murphy} +\input{mfbeg} +\input{shape} +\input{a-soas} +\input{a-agm} +\input{facts} +\input{archive} + +\end{document} diff --git a/usergrps/uktug/baskervi/3_1/diag.sty b/usergrps/uktug/baskervi/3_1/diag.sty new file mode 100644 index 0000000000..dbc3d9b4bb --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/diag.sty @@ -0,0 +1,895 @@ +% This is diagram.sty, intended for drawing commuting diagrams as PS \specials +% in LaTeX. Original author Sean Bechhofer. +% Improved, modified to use Rokiki's dvips 5.4.7 and generally crapped around with +% by David Murphy. +% This is version 1.0\beta + +% diagram.sty and associated files is copyright (c) 1991 David Murphy and Sean +% Bechhofer. Please note the following conditions: +% +% 1. You can compile, use, copy and distribute this software without fee +% provided that this copyright notice and permissions are preserved. +% +% 2. You can modify this software provided (a) you make no deletions; (b) +% you mark all changes clearly (including the version number message); and +% (c) if you distribute it, you change the name. +% +% 3. This software is provided for free, on an "as-is" basis, without +% express or implied warranty. + +% The intention of (2) is to prevent a proliferation of incompatable +% versions with the same name. Commenting out code does not count as a +% deletion. If you have improvements or bug fixes, please forward them to +% me rather than distributing a new version. +\message{This is not Paul Taylor's commuting diagrams package;} +\message{please do not acknowledge him. Version 1.0, 1991.} + +% This file depends on pspicture.ps and pspicture-dvips.sty. +% The latter follows in this version. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% pspicture.sty Version 2.0 +% +% Originally by D. P. Carlisle (carlisle@uk.ac.man.cs) +% Computer Science Department, Manchester University +% Heavily modified by David Murphy (david@gmdzi.gmd.de) +% +% A style file to redefine picture mode commands to use +% postscript \special's rather than the circle and line fonts. +% The \put and \multiput commands are not changed, ie +% picture objects are positioned by TeX not by PS moveto. +% The \framebox \makebox and \shortstack commands are unchanged. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +%\circle and \circle*. +% Use as in LaTeX book but with no maximum diameter. +% The thickness of the circle is altered by the \linethickness command. +% +%\oval. +% Use as in LaTeX book, but as there is no maximum diameter for +% the circular arcs, the oval (in the absence of the optional [tr] etc) +% always consists of two semi-circular arcs joined by a pair of parallel +% lines. To obtain a `rectangle with rounded corners' the oval command +% has a second optional argument (given first pspicmac). +% \oval[20](100,200)[t] +% Produces the top half of an oval with quarter circles of radius +% 20*unitlength. +% If unitlength = 1pt then this is equivalent to the standard oval command. +% In general \oval[R](x,y) uses circular arcs of radius max(R,min(x/2,y/2)). +% +%\line and \vector. +% Use as in LaTeX book but with no restriction on the available slopes. +% The thickness of a sloping line is altered by the \linethickness command. +% +%\Line and \Vector. +% New forms of the line and vector commands. +% \put(x1,y1){\Line(x2,y2)} +% produces a line from (x1,y1) to (x1+x2,y1+y2) and similarly for \Vector. +% +%\Curve +% Like \Line except that it produce a curve pspicmac +% \put(x1,y1){\Curve(x2,y2){m}} +% produces a curve from (x1,y1) to (x1+x2,y1+y2). the amount of curvature +% is controlled by m but try 1 or -1 first. m does not have to be an integer. +% negative numbers curve the opposite way to positive numbers. +% +%\thinlines, \thicklines and \linethickness. +% These commands alter the thickness of ALL lines including +% slanted lines and circular arcs. +% +%\arrowlength. +% A new command which specifies the size of the arrowhead drawn by the +% \vector and \Vector commands. Like \linethickness it does not get +% multiplied by \unitlength. At present the arrowhead is triangular. +% If a head with curved sides more like the standard LaTeX head is required +% the definition of pspicmacA in pspicture.ps should be altered. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% if for dashes +\newif\ifdashed \dashedfalse + +% strip the final `pt' off string returned by \the +{\catcode`t=12\catcode`p=12\gdef\noPT#1pt{#1}} +\def\strippt#1{\expandafter\noPT\the#1\space} + +\def\@circle#1{% + \@tempdimb #1\unitlength + \special{" + \strippt\@wholewidth + \strippt\@tempdimb + pspicmacC}} + +\def\@dot#1{% + \@tempdimb #1\unitlength + \special{" + \strippt\@tempdimb + pspicmacD}} + +\def\line(#1,#2)#3{\ifdashed + \@linelen=#3\unitlength + \special{" + \strippt\@wholewidth + #1 + #2 + \strippt\@linelen + pspicmacdL}\else + \@linelen=#3\unitlength + \special{" + \strippt\@wholewidth + #1 + #2 + \strippt\@linelen + pspicmacL}\fi} + +\def\vector(#1,#2)#3{\ifdashed + \@linelen=#3\unitlength + \special{" + \strippt\@arrowlength + \strippt\@wholewidth + #1 + #2 + \strippt\@linelen + pspicmacdV}\else + \@linelen=#3\unitlength + \special{" + \strippt\@arrowlength + \strippt\@wholewidth + #1 + #2 + \strippt\@linelen + pspicmacV}\fi} + +\def\@FlArrow(#1,#2)(#3,#4)(#5,#6)(#7,#8){% + \@headlen=0.06\unitlength + \@headwid=0.03\unitlength + \@xa=#1\unitlength \@ya=#2\unitlength + \@xb=#3\unitlength \@yb=#4\unitlength + \@dxa=#5\unitlength \@dya=#6\unitlength + \@dxb=#7\unitlength \@dyb=#8\unitlength + \special{" + \strippt\@dxa + \strippt\@dya + \strippt\@dxb + \strippt\@dyb + \strippt\@xa + \strippt\@ya + \strippt\@xb + \strippt\@yb + \strippt\@wholewidth + \strippt\@headwid + \strippt\@headlen + arrowfl}} + +\def\oval{\@ifnextchar[{\@ov@l}% + {\count@=\maxdimen \divide\count@ by \unitlength \@ov@l[\count@]}}% +\def\@ov@l[#1](#2,#3){\@ifnextchar[{\@oval[#1](#2,#3)}{\@oval[#1](#2,#3)[]}}% +\def\@oval[#1](#2,#3)[#4]{\begingroup + \@tempdimb #1\unitlength + \@ovxx #2\unitlength + \@ovyy #3\unitlength + \def\r{\def\TL{0 }\def\BL{0 }}% + \def\l{\def\TR{0 }\def\BR{0 }}% + \def\t{\def\BL{0 }\def\BR{0 }}% + \def\b{\def\TL{0 }\def\TR{0 }}% + \def\TL{1 }\def\BL{1 }\def\TR{1 }\def\BR{1 }% + \@tfor\@tempa :=#4\do{\csname\@tempa\endcsname}% + \special{" + \BR\BL\TR\TL + \strippt\@wholewidth + \strippt\@tempdimb + \strippt\@ovxx + \strippt\@ovyy + pspicmacO}% + \endgroup} + +\def\Line(#1,#2){% + \@ovxx #1\unitlength + \@ovyy #2\unitlength + \special{" + \strippt\@wholewidth + \strippt\@ovxx + \strippt\@ovyy + pspicmacL2}} + +\def\Curve(#1,#2)#3{\ifdashed + \@ovxx #1\unitlength + \@ovyy #2\unitlength + \special{" + \strippt\@wholewidth + \strippt\@ovxx + \strippt\@ovyy + #3 + pspicmacdC2}\else + \@ovxx #1\unitlength + \@ovyy #2\unitlength + \special{" + \strippt\@wholewidth + \strippt\@ovxx + \strippt\@ovyy + #3 + pspicmacC2}\fi} + +\def\Vector(#1,#2){% + \@ovxx #1\unitlength + \@ovyy #2\unitlength + \special{" + \strippt\@arrowlength + \strippt\@wholewidth + \strippt\@ovxx + \strippt\@ovyy + pspicmacV2}} + +\newdimen\@arrowlength +\def\arrowlength#1{\@arrowlength #1} +\arrowlength{4pt} + +% A few dimensions that count... +\newdimen\@headwid \newdimen\@headlen +\newdimen\@xa \newdimen\@ya \newdimen\@xb \newdimen\@yb +\newdimen\@dxa \newdimen\@dya \newdimen\@dxb \newdimen\@dyb +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%% Top level environments. +% First, set-up a length to keep the external value of \unitlength in it. +\newlength{\externalunitlength} +\newdimen\diagramcellsize +\diagramcellsize=8em + +% Now deal with diagrams with numbering. +\newcounter{diagram} +\def\thediagram{\arabic{diagram}} +\newsavebox{\diagramlabel} + +% Now the unnumbered version +\newenvironment{diagram*}{\refstepcounter{diagram}% + \savebox{\diagramlabel}[0pt]{}\@diagram}{\end@diagram} +\newenvironment{diagram}{\refstepcounter{diagram}% + \savebox{\diagramlabel}{\hbox{\rm (\thediagram)}}\@diagram}{\end@diagram} + +\def\@diagram{\[ + \unitlength\diagramcellsize% + \vcenter\bgroup\hbox to \displaywidth\bgroup\hfil\picture} +\def\end@diagram{\endpicture\hfil\egroup\egroup\llap{\usebox{\diagramlabel}}\]} + +%%%%%%%%% Directions +\def\north{0} +\def\neast{1} +\def\east{2} +\def\seast{3} +\def\south{4} +\def\swest{5} +\def\west{6} +\def\nwest{7} +\def\nneast{8} +\def\eneast{9} +\def\eseast{10} +\def\sseast{11} +\def\sswest{12} +\def\wswest{13} +\def\wnwest{14} +\def\nnwest{15} +\def\po{0} +\def\st{1} + +\def\clock{0} +\def\anti{1} + +\def\near{0} +\def\far{1} + +%%%%%%%%% Positioning +% Command to position an object; puts #3 in math mode at coords. (#1,#2). +\def\object(#1,#2)#3{\put(#1,#2){\makebox(0,0){$#3$}}} + +% !!! This use of absolute coordinates is dreadful. We should work in +% multiples of \unitlength (DVJM). +\def\leftobject(#1,#2)#3{\put(#1,#2){\makebox(0,0) + {\makebox(0.3,0)[r]{$#3$}}}} +\def\rightobject(#1,#2)#3{\put(#1,#2){\makebox(0,0) + {\makebox(0.3,0)[l]{$#3$}}}} + +%%%%%%%%% Short Arrows +% Drawing short arrow bodies for tailed arrows; +\def\arrshbdne{\put ( 0.15, 0.15){\line( 1, 1){0.75}}} +\def\arrshbdnw{\put (-0.15, 0.15){\line(-1, 1){0.75}}} +\def\arrshbdse{\put ( 0.15,-0.15){\line( 1,-1){0.75}}} +\def\arrshbdsw{\put (-0.15,-0.15){\line(-1,-1){0.75}}} +\def\arrshbdn{\put ( 0, 0.15){\line( 0, 1){0.75}}} +\def\arrshbde{\put ( 0.25, 0 ){\line( 1, 0){0.55}}} +\def\arrshbds{\put ( 0, -0.15){\line( 0,-1){0.75}}} +\def\arrshbdw{\put (-0.25, 0 ){\line(-1, 0){0.55}}} + +% Drawing normal sized arrow bodies; +\def\arrbdne{\put ( 0.1, 0.1){\line( 1, 1){0.8}}} +\def\arrbdse{\put ( 0.1,-0.1){\line( 1,-1){0.8}}} +\def\arrbdnw{\put (-0.1, 0.1){\line(-1, 1){0.8}}} +\def\arrbdsw{\put (-0.1,-0.1){\line(-1,-1){0.8}}} +\def\arrbdn{\put ( 0, 0.1){\line( 0, 1){0.8}}} +\def\arrbde{\put ( 0.2, 0 ){\line( 1, 0){0.6}}} +\def\arrbds{\put ( 0, -0.1){\line( 0,-1){0.8}}} +\def\arrbdw{\put (-0.2, 0 ){\line(-1, 0){0.6}}} + +% !!! This bit's a special that might need further touching up (SB) +\def\arrbdnne{\put ( 0.05, 0.1 ){\line( 1, 2){0.4}}} +\def\arrbdene{\put ( 0.15, 0.075){\line( 2, 1){0.7}}} +\def\arrbdese{\put ( 0.15,-0.075){\line( 2,-1){0.7}}} +\def\arrbdsse{\put ( 0.05,-0.1 ){\line( 1,-2){0.4}}} +\def\arrbdssw{\put (-0.05,-0.1 ){\line(-1,-2){0.4}}} +\def\arrbdwsw{\put (-0.15,-0.075){\line(-2,-1){0.7}}} +\def\arrbdwnw{\put (-0.15, 0.075){\line(-2, 1){0.7}}} +\def\arrbdnnw{\put (-0.05, 0.11 ){\line(-1, 2){0.4}}} + +\def\arrhdnne(#1,#2){\put(#1,#2){\line(0,-1){0.056}}\put(#1,#2){\line(-3,-2){0.046}}} +\def\arrhdene(#1,#2){\put(#1,#2){\line(-1,0){0.056}}\put(#1,#2){\line(-2,-3){0.031}}} +\def\arrhdese(#1,#2){\put(#1,#2){\line(-1,0){0.056}}\put(#1,#2){\line(-2, 3){0.031}}} +\def\arrhdsse(#1,#2){\put(#1,#2){\line( 0,1){0.056}}\put(#1,#2){\line(-3, 2){0.046}}} +\def\arrhdssw(#1,#2){\put(#1,#2){\line( 0,1){0.056}}\put(#1,#2){\line( 3, 2){0.046}}} +\def\arrhdwsw(#1,#2){\put(#1,#2){\line( 1,0){0.056}}\put(#1,#2){\line( 2, 3){0.031}}} +\def\arrhdwnw(#1,#2){\put(#1,#2){\line( 1,0){0.056}}\put(#1,#2){\line( 2,-3){0.031}}} +\def\arrhdnnw(#1,#2){\put(#1,#2){\line(0,-1){0.056}}\put(#1,#2){\line( 3,-2){0.046}}} + +%%%%%%%%% Long arrows +\def\longarrbdne{\put( 0.1, 0.1){\line( 1, 1){1.8}}} +\def\longarrbdse{\put( 0.1,-0.1){\line( 1,-1){1.8}}} +\def\longarrbdnw{\put(-0.1, 0.1){\line(-1, 1){1.8}}} +\def\longarrbdsw{\put(-0.1,-0.1){\line(-1,-1){1.8}}} +\def\longarrbdn{\put( 0, 0.1){\line( 0, 1){1.8}}} +\def\longarrbde{\put( 0.2, 0 ){\line( 1, 0){1.6}}} +\def\longarrbds{\put( 0, -0.1){\line( 0,-1){1.8}}} +\def\longarrbdw{\put(-0.2, 0 ){\line(-1, 0){1.6}}} + +\def\longarrbdnne{\put( 0.05, 0.1 ){\line( 1, 2){0.9}}} +\def\longarrbdene{\put( 0.15, 0.075){\line( 2, 1){1.7}}} +\def\longarrbdese{\put( 0.15,-0.075){\line( 2,-1){1.7}}} +\def\longarrbdsse{\put( 0.05,-0.1 ){\line( 1,-2){0.9}}} +\def\longarrbdssw{\put(-0.05,-0.1 ){\line(-1,-2){0.9}}} +\def\longarrbdwsw{\put(-0.15,-0.075){\line(-2,-1){1.7}}} +\def\longarrbdwnw{\put(-0.15, 0.075){\line(-2, 1){1.7}}} +\def\longarrbdnnw{\put(-0.05, 0.11 ){\line(-1, 2){0.9}}} + +%%%%%%%%% Dotted Arrows +\def\arrddbdne{\multiput( 0.15, 0.15)( 0.1, 0.1){8}{\line( 1, 1){0.05}}} +\def\arrddbdse{\multiput( 0.15,-0.15)( 0.1,-0.1){8}{\line( 1,-1){0.05}}} +\def\arrddbdnw{\multiput(-0.15, 0.15)(-0.1, 0.1){8}{\line(-1, 1){0.05}}} +\def\arrddbdsw{\multiput(-0.15,-0.15)(-0.1,-0.1){8}{\line(-1,-1){0.05}}} +\def\arrddbdn{\multiput( 0, 0.15)( 0, 0.1){8}{\line( 0, 1){0.05}}} +\def\arrddbde{\multiput( 0.2, 0 )( 0.1, 0 ){6}{\line( 1, 0){0.05}}} +\def\arrddbds{\multiput( 0, -0.15)( 0, -0.1){8}{\line( 0,-1){0.05}}} +\def\arrddbdw{\multiput( -0.2, 0 )(-0.1, 0 ){6}{\line(-1, 0){0.05}}} + +%%%%%%%%% Heads and tails. +% Heads; the argument determines where the apex of the arrow head lies. +\def\arrhdne(#1,#2){\put(#1,#2){\line(-1,-2){0.025}}\put(#1,#2){\line(-2,-1){0.05 }}} +\def\arrhdse(#1,#2){\put(#1,#2){\line(-1, 2){0.025}}\put(#1,#2){\line(-2, 1){0.05 }}} +\def\arrhdnw(#1,#2){\put(#1,#2){\line( 2,-1){0.05 }}\put(#1,#2){\line( 1,-2){0.025}}} +\def\arrhdsw(#1,#2){\put(#1,#2){\line( 2, 1){0.05 }}\put(#1,#2){\line( 1, 2){0.025}}} +\def\arrhdn(#1,#2){\put(#1,#2){\line( -1,-2){0.025}}\put(#1,#2){\line( 1,-2){0.025}}} +\def\arrhde(#1,#2){\put(#1,#2){\line( -2, 1){0.05 }}\put(#1,#2){\line(-2,-1){0.05 }}} +\def\arrhds(#1,#2){\put(#1,#2){\line( -1, 2){0.025}}\put(#1,#2){\line( 1, 2){0.025}}} +\def\arrhdw(#1,#2){\put(#1,#2){\line( 2, 1){0.05 }}\put(#1,#2){\line( 2,-1){0.05 }}} + +% Drawing inclusion tails +\def\intaile{\put ( 0.2, 0.015){\oval(0.03,0.03)[l]}} +\def\intailn{\put (-0.015, 0.1 ){\oval(0.03,0.03)[b]}} +\def\intails{\put ( 0.015,-0.1 ){\oval(0.03,0.03)[t]}} +\def\intailw{\put (-0.2, 0.015){\oval(0.03,0.03)[r]}} + +%%%%%%%%% Arrow Bodies, Heads and Tails +% The arguments are position (of the object from which to draw the arrow +% and the direction. + +\def\body(#1,#2)#3{\put(#1,#2){\ifcase #3 {\arrbdn} + \or {\arrbdne} \or {\arrbde} \or {\arrbdse} + \or {\arrbds} \or {\arrbdsw} \or {\arrbdw} + \or {\arrbdnw} \or {\arrbdnne} \or {\arrbdene} + \or {\arrbdese} \or {\arrbdsse} \or {\arrbdssw} + \or {\arrbdwsw} \or {\arrbdwnw} \or {\arrbdnnw} \fi}} + +% General long arrow body command. The arguments are as above. +\def\longbody(#1,#2)#3{\put(#1,#2){\ifcase #3 {\longarrbdn} + \or {\longarrbdne} \or {\longarrbde} \or {\longarrbdse} + \or {\longarrbds} \or {\longarrbdsw} \or {\longarrbdw} + \or {\longarrbdnw} \or {\longarrbdnne} \or {\longarrbdene} + \or {\longarrbdese} \or {\longarrbdsse} \or {\longarrbdssw} + \or {\longarrbdwsw} \or {\longarrbdwnw} \or {\longarrbdnnw} \fi}} + +% General short body. Arguments as above. +\def\shbody(#1,#2)#3{\put(#1,#2){\ifcase #3 {\arrshbdn} + \or {\arrshbdne} \or {\arrshbde} \or {\arrshbdse} + \or {\arrshbds} \or {\arrshbdsw} \or {\arrshbdw} + \or {\arrshbdnw} \fi}} + +% General dotted body. +\def\ddbody(#1,#2)#3{\put(#1,#2){\ifcase #3 {\arrddbdn} + \or {\arrddbdne} \or {\arrddbde} \or {\arrddbdse} + \or {\arrddbds} \or {\arrddbdsw} \or {\arrddbdw} + \or {\arrddbdnw} \fi}} + +% General plain head. Two arguments, postion and direction. The position is +% the object position from which the arrow emanates. +\def\plhead(#1,#2)#3{\put(#1,#2){\ifcase #3 {\arrhdn(0,0.9)} + \or {\arrhdne(0.9,0.9)} \or {\arrhde(0.8,0)} + \or {\arrhdse(0.9,-0.9)} \or {\arrhds(0,-0.9)} + \or {\arrhdsw(-0.9,-0.9)} \or {\arrhdw(-0.8,0)} + \or {\arrhdnw(-0.9,0.9)} \or {\arrhdnne(0.45,0.9)} + \or {\arrhdene(0.85,0.425)} \or {\arrhdese(0.85,-0.425)} + \or {\arrhdsse(0.45,-0.9)} \or {\arrhdssw(-0.45,-0.9)} + \or {\arrhdwsw(-0.85,-0.425)} \or {\arrhdwnw(-0.85,0.425)} + \or {\arrhdnnw(-0.45,0.9)} \fi}} + +% General long head. Two arguments, postion and direction. The position is +% the object position from which the arrow emanates. +\def\longplhead(#1,#2)#3{\put(#1,#2){\ifcase #3 {\arrhdn(0,1.9)} + \or {\arrhdne(1.9,1.9)} \or {\arrhde (1.8,0)} + \or {\arrhdse(1.9,-1.9)} \or {\arrhds(0,-1.9)} + \or {\arrhdsw(-1.9,-1.9)} \or {\arrhdw(-1.8,0)} + \or {\arrhdnw(-1.9,1.9)} \or {\arrhdnne(0.95,1.9)} + \or {\arrhdene(1.85,0.925)} \or {\arrhdese(1.85,-0.925)} + \or {\arrhdsse(0.95,-1.9)} \or {\arrhdssw(-0.95,-1.9)} + \or {\arrhdwsw(-1.85,-0.925)} \or {\arrhdwnw(-1.85,0.925)} + \or {\arrhdnnw(-0.95,1.9)} \fi}} + +% General double head. Arguments as above. +\def\dbhead(#1,#2)#3{\put(#1,#2){\ifcase #3 {\arrhdn(0,0.85)} + \or {\arrhdne(0.85,0.85)} \or {\arrhde(0.75,0)} + \or {\arrhdse(0.85,-0.85)} \or {\arrhds(0,-0.85)} + \or {\arrhdsw(-0.85,-0.85)} \or {\arrhdw(-0.75,0)} + \or {\arrhdnw(-0.85,0.85)} \fi}\plhead(#1,#2)#3} + +% General tail. Arguments as above. +\def\tail(#1,#2)#3{\put(#1,#2){\ifcase #3 {\arrhdn(0,0.15)} + \or {\arrhdne(0.15,0.15)} \or {\arrhde(0.25,0)} + \or {\arrhdse(0.15,-0.15)} \or {\arrhds(0,-0.15)} + \or {\arrhdsw(-0.15,-0.15)} \or {\arrhdw(-0.25,0)} + \or {\arrhdnw(-0.15,0.15)} \fi}} + +% !!! What the fuck is going on here ? (DVJM) +% General inclusion tail. Arguments as above. +\def\intail(#1,#2)#3{\put(#1,#2){\ifcase #3 {\intailn} + \or \or {\intaile} + \or \or {\intails} + \or \or {\intailw} \fi}} + +%%%%%%%%% Arrow labels. +% General "right hand" arrow labelling. Arguments are position, direction and label. +\def\arrlabelr(#1,#2)#3#4{\put(#1,#2){\ifcase #3 + {\put ( 0.05, 0.5 ){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 0.5, 0.4 ){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 0.5, -0.1 ){\makebox (0,0){$#4$}}} + \or {\put ( 0.4, -0.5 ){\makebox (0,0)[r]{$#4$}}} + \or {\put (-0.05,-0.5 ){\makebox (0,0)[r]{$#4$}}} + \or {\put (-0.5,- 0.4 ){\makebox (0,0)[r]{$#4$}}} + \or {\put (-0.5, 0.1 ){\makebox (0,0){$#4$}}} + \or {\put (-0.4, 0.5 ){\makebox(0,0)[l]{$#4$}}} + \or {\put ( 0.3, 0.5 ){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 0.55, 0.175){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 0.5, -0.325){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 0.15,-0.55 ){\makebox (0,0)[r]{$#4$}}} + \or {\put (-0.3, -0.525){\makebox (0,0)[r]{$#4$}}} + \or {\put (-0.55,-0.175){\makebox (0,0)[r]{$#4$}}} + \or {\put (-0.5, 0.3 ){\makebox (0,0)[l]{$#4$}}} + \or {\put (-0.15, 0.55 ){\makebox (0,0)[l]{$#4$}}} \fi}} + +% General "left hand" arrow labelling. Arguments are position, direction +% and label. +\def\arrlabell(#1,#2)#3#4{\put(#1,#2){\ifcase #3 + {\put (-0.05, 0.5 ){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 0.4, 0.5 ){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 0.5, 0.1 ){\makebox (0,0){$#4$}}} + \or {\put ( 0.5, -0.4 ){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 0.05,-0.5 ){\makebox (0,0)[l]{$#4$}}} + \or {\put (-0.4, -0.5 ){\makebox (0,0)[l]{$#4$}}} + \or {\put (-0.5, -0.1 ){\makebox (0,0){$#4$}}} + \or {\put (-0.5, 0.4 ){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 0.15, 0.55 ){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 0.5, 0.325){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 0.55,-0.175){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 0.3, -0.5 ){\makebox (0,0)[l]{$#4$}}} + \or {\put (-0.15,-0.575){\makebox (0,0)[l]{$#4$}}} + \or {\put (-0.5, -0.325){\makebox (0,0)[l]{$#4$}}} + \or {\put (-0.55, 0.15 ){\makebox (0,0)[r]{$#4$}}} + \or {\put (-0.3, 0.5 ){\makebox (0,0)[r]{$#4$}}} \fi}} + +% General "right hand" long arrow labelling. +\def\longarrlabelr(#1,#2)#3#4{\put(#1,#2){\ifcase #3 + {\put ( 0.05, 1 ){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 1.1, 1 ){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 1, -0.1 ){\makebox (0,0){$#4$}}} + \or {\put ( 0.9, -1 ){\makebox (0,0)[r]{$#4$}}} + \or {\put (-0.05,-1 ){\makebox (0,0)[r]{$#4$}}} + \or {\put (-1, -0.9 ){\makebox (0,0)[r]{$#4$}}} + \or {\put (-1, 0.1 ){\makebox (0,0){$#4$}}} + \or {\put (-0.9, 1 ){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 0.55, 1 ){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 1.05, 0.4 ){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 1, -0.55){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 0.4, -1.05){\makebox (0,0)[r]{$#4$}}} + \or {\put (-0.55,-1 ){\makebox (0,0)[r]{$#4$}}} + \or {\put (-1.05,-0.4 ){\makebox (0,0)[r]{$#4$}}} + \or {\put (-1, 0.55){\makebox (0,0)[l]{$#4$}}} + \or {\put (-0.4, 1.05){\makebox (0,0)[l]{$#4$}}} \fi}} + +% General "left hand" long arrow labelling. +\def\longarrlabell(#1,#2)#3#4{\put(#1,#2){\ifcase #3 + {\put (-0.05, 1 ){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 0.9, 1 ){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 1, 0.1 ){\makebox (0,0){$#4$}}} + \or {\put ( 1, -0.9 ){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 0.05,-1 ){\makebox (0,0)[l]{$#4$}}} + \or {\put (-0.9, -1 ){\makebox (0,0)[l]{$#4$}}} + \or {\put (-1, -0.1 ){\makebox (0,0){$#4$}}} + \or {\put (-1, 0.9 ){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 0.4, 1.05){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 1, 0.55){\makebox (0,0)[r]{$#4$}}} + \or {\put ( 1.05,-0.4 ){\makebox (0,0)[l]{$#4$}}} + \or {\put ( 0.55,-1 ){\makebox (0,0)[l]{$#4$}}} + \or {\put (-0.4, -1.05){\makebox (0,0)[l]{$#4$}}} + \or {\put (-1, -0.55){\makebox (0,0)[l]{$#4$}}} + \or {\put (-1.05, 0.4 ){\makebox (0,0)[r]{$#4$}}} + \or {\put (-0.55, 1 ){\makebox (0,0)[r]{$#4$}}} \fi}} + +%%%%%%%%% Parallel and Antiparallel Arrows. +\def\prarrowe(#1,#2)#3#4{\put(#1,#2){\@plarrow( 0, 0.05){\east}[#3][\po] + \@plarrow( 0, -0.05){\east}[#4][\st]}} +\def\prarrown(#1,#2)#3#4{\put(#1,#2){\@plarrow(-0.05, 0 ){\north}[#3][\po] + \@plarrow( 0.05, 0 ){\north}[#4][\st]}} +\def\prarroww(#1,#2)#3#4{\put(#1,#2){\@plarrow( 0, -0.55){\west}[#3][\po] + \@plarrow( 0, 0.55){\west}[#4][\st]}} +\def\prarrows(#1,#2)#3#4{\put(#1,#2){\@plarrow( 0.05, 0 ){\south}[#3][\po] + \@plarrow(-0.05, 0 ){\south}[#4][\st]}} + +\def\prarrone(#1,#2)#3#4{\put(#1,#2){\@plarrow(-0.03, 0.03){\neast}[#3][\po] + \@plarrow( 0.03,-0.03){\neast}[#4][\st]}} +\def\prarronw(#1,#2)#3#4{\put(#1,#2){\@plarrow(-0.03,-0.03){\nwest}[#3][\po] + \@plarrow( 0.03, 0.03){\nwest}[#4][\st]}} +\def\prarrose(#1,#2)#3#4{\put(#1,#2){\@plarrow( 0.03, 0.03){\seast}[#3][\po] + \@plarrow(-0.03,-0.03){\seast}[#4][\st]}} +\def\prarrosw(#1,#2)#3#4{\put(#1,#2){\@plarrow( 0.03,-0.03){\swest}[#3][\po] + \@plarrow(-0.03, 0.03){\swest}[#4][\st]}} + +% Command for anti-parallel arrows. Arguments are position and labels. +\def\anprarrowe(#1,#2)#3#4{\put(#1,#2){\@plarrow( 0, 0.05){\east}[#3][\po] + \@plarrow( 1, -0.05){\west}[#4][\po]}} +\def\anprarrown(#1,#2)#3#4{\put(#1,#2){\@plarrow(-0.05, 0 ){\north}[#3][\po] + \@plarrow( 0.05, 1 ){\south}[#4][\po]}} +\def\anprarroww(#1,#2)#3#4{\put(#1,#2){\@plarrow( 0, -0.55){\west}[#3][\po] + \@plarrow(-1, 0.55){\east}[#4][\po]}} +\def\anprarrows(#1,#2)#3#4{\put(#1,#2){\@plarrow( 0.05, 0 ){\south}[#3][\po] + \@plarrow(-0.05,-1 ){\north}[#4][\po]}} + +\def\prarrone(#1,#2)#3#4{\put(#1,#2){\@plarrow(-0.03, 0.03){\neast}[#3][\po] + \@plarrow( 0.03,-0.03){\neast}[#4][\po]}} +\def\prarronw(#1,#2)#3#4{\put(#1,#2){\@plarrow(-0.03,-0.03){\nwest}[#3][\po] + \@plarrow( 0.03, 0.03){\nwest}[#4][\po]}} +\def\prarrose(#1,#2)#3#4{\put(#1,#2){\@plarrow( 0.03, 0.03){\seast}[#3][\po] + \@plarrow(-0.03,-0.03){\seast}[#4][\po]}} +\def\prarrosw(#1,#2)#3#4{\put(#1,#2){\@plarrow( 0.03,-0.03){\swest}[#3][\po] + \@plarrow(-0.03, 0.03){\swest}[#4][\po]}} +% Main arrow drawing commands. +\def\plarrow(#1,#2)#3{\@ifnextchar[{\@plarrow(#1,#2){#3}}% + {\@plarrow(#1,#2){#3}[][\po]}} +\def\@plarrow(#1,#2)#3[#4][#5]{\body(#1,#2){#3}\plhead(#1,#2){#3} + {\ifodd #5 {\arrlabelr(#1,#2){#3}{#4}} + \else {\arrlabell(#1,#2){#3}{#4}}\fi}} + +\def\longplarrow(#1,#2)#3{\@ifnextchar[{\@longplarrow(#1,#2){#3}}% + {\@longplarrow(#1,#2){#3}[][\po]}} +\def\@longplarrow(#1,#2)#3[#4][#5]{\longbody(#1,#2){#3}\longplhead(#1,#2){#3} + {\ifodd #5 {\longarrlabelr(#1,#2){#3}{#4}} + \else {\longarrlabell(#1,#2){#3}{#4}}\fi}} + +\def\sharr(#1,#2)#3{\@ifnextchar[{\@sharr(#1,#2){#3}}% + {\@sharr(#1,#2){#3}[][\po]}} +\def\@sharr(#1,#2)#3[#4][#5]{\shbody(#1,#2){#3}\plhead(#1,#2){#3} + {\ifodd #5 {\arrlabelr(#1,#2){#3}{#4}} + \else {\arrlabell(#1,#2){#3}{#4}}\fi}} + +\def\tlarrow(#1,#2)#3{\@ifnextchar[{\@tlarrow(#1,#2){#3}}% + {\@tlarrow(#1,#2){#3}[][\po]}} +\def\@tlarrow(#1,#2)#3[#4][#5]{\shbody(#1,#2){#3}\plhead(#1,#2){#3}\tail(#1,#2){#3} + {\ifodd #5 {\arrlabelr(#1,#2){#3}{#4}} + \else {\arrlabell(#1,#2){#3}{#4}}\fi}} + +\def\dbarrow(#1,#2)#3{\@ifnextchar[{\@dbarrow(#1,#2){#3}}% + {\@dbarrow(#1,#2){#3}[][\po]}} +\def\@dbarrow(#1,#2)#3[#4][#5]{\body(#1,#2){#3}\dbhead(#1,#2){#3} + {\ifodd #5 {\arrlabelr(#1,#2){#3}{#4}} + \else {\arrlabell(#1,#2){#3}{#4}}\fi}} + +\def\ddarrow(#1,#2)#3{\@ifnextchar[{\@ddarrow(#1,#2){#3}}% + {\@ddarrow(#1,#2){#3}[][\po]}} +\def\@ddarrow(#1,#2)#3[#4][#5]{\ddbody(#1,#2){#3}\plhead(#1,#2){#3} + {\ifodd #5 {\arrlabelr(#1,#2){#3}{#4}} + \else {\arrlabell(#1,#2){#3}{#4}}\fi}} + +\def\inarrow(#1,#2)#3{\@ifnextchar[{\@inarrow(#1,#2){#3}}% + {\@inarrow(#1,#2){#3}[][\po]}} +\def\@inarrow(#1,#2)#3[#4][#5]{\body(#1,#2){#3}\plhead(#1,#2){#3}\intail(#1,#2){#3} + {\ifodd #5 {\arrlabelr(#1,#2){#3}{#4}} + \else {\arrlabell(#1,#2){#3}{#4}}\fi}} +\def\prarrow(#1,#2)#3{\@ifnextchar[{\@prarrow(#1,#2){#3}}% + {\@prarrow(#1,#2){#3}[][\po]}} +\def\@prarrow(#1,#2)#3[#4][#5]{\ifcase #3 {\prarrown(#1,#2){#4}{#5}} + \or {\prarrowne(#1,#2){#4}{#5}} \or {\prarrowe(#1,#2){#4}{#5}} + \or {\prarrowse(#1,#2){#4}{#5}} \or {\prarrows(#1,#2){#4}{#5}} + \or {\prarrowsw(#1,#2){#4}{#5}} \or {\prarroww(#1,#2){#4}{#5}} + \or {\prarrownw(#1,#2){#4}{#5}} \fi} + +\def\sharrow(#1,#2)#3{\@ifnextchar[{\@sharrow(#1,#2){#3}}% + {\@sharrow(#1,#2){#3}[][\po]}} +\def\@sharrow(#1,#2)#3[#4][#5]{\ifcase #3 + {\put( 0, -0.05){\sharr(#1,#2){#3}[#4][#5]}} + \or {\put(-0.05,-0.05){\sharr(#1,#2){#3}[#4][#5]}} + \or {\put(-0.05, 0 ){\sharr(#1,#2){#3}[#4][#5]}} + \or {\put(-0.05, 0.05){\sharr(#1,#2){#3}[#4][#5]}} + \or {\put( 0, 0.05){\sharr(#1,#2){#3}[#4][#5]}} + \or {\put( 0.05, 0.05){\sharr(#1,#2){#3}[#4][#5]}} + \or {\put( 0.05, 0 ){\sharr(#1,#2){#3}[#4][#5]}} + \or {\put( 0.05,-0.05){\sharr(#1,#2){#3}[#4][#5]}} \fi} + +\def\anprarrow(#1,#2)#3{\@ifnextchar[{\@anprarrow(#1,#2){#3}}% + {\@anprarrow(#1,#2){#3}[][]}} +\def\@anprarrow(#1,#2)#3[#4][#5]{\ifcase #3 {\anprarrown(#1,#2){#4}{#5}} + \or {\@warning{Arrow style not available}} + \or {\anprarrowe(#1,#2){#4}{#5}} + \or {\@warning{Arrow style not available}} + \or {\anprarrows(#1,#2){#4}{#5}} + \or {\@warning{Arrow style not available}} + \or {\anprarroww(#1,#2){#4}{#5}} + \or {\@warning{Arrow style not available}} \fi} + +%%%%%%%%% Curved arrow bodies and labels +\def\curvepoarrbdn#1{\put(-0.1, 0.1 ){\Curve(0,0.8){-5}} + \put(-0.3, 0.5 ){\makebox(0,0)[r]{$#1$}}} +\def\curvestarrbdn#1{\put( 0.1, 0.1 ){\Curve(0,0.8){5}} + \put( 0.3, 0.5 ){\makebox(0,0)[l]{$#1$}}} +\def\curvepoarrbde#1{\put( 0.2, 0.1 ){\Curve(0.6,0){-5}} + \put( 0.5, 0.3 ){\makebox(0,0.1){$#1$}}} +\def\curvestarrbde#1{\put( 0.2,-0.1 ){\Curve(0.6,0){5}} + \put( 0.5,-0.35){\makebox(0,0){$#1$}}} + +\def\curvepoarrbds#1{\put( 0.1,-0.1){\Curve(0,-0.8){-5}} + \put( 0.3,-0.5){\makebox(0,0)[l]{$#1$}}} +\def\curvestarrbds#1{\put(-0.1,-0.1){\Curve(0,-0.8){5}} + \put(-0.3,-0.5){\makebox(0,0)[r]{$#1$}}} +\def\curvestarrbdw#1{\put(-0.2, 0.1){\Curve(-0.6,0){5}} + \put(-0.5, 0.3){\makebox(0,0.1){$#1$}}} +\def\curvepoarrbdw#1{\put(-0.2,-0.1){\Curve(-0.6,0){-5}} + \put(-0.5,-0.35){\makebox(0,0){$#1$}}} + +% Long curved arrow bodies +\def\longcurvepoarrbdn#1{\put(-0.1, 0.1 ){\Curve(0,1.8){-5}} + \put(-0.6, 1 ){\makebox(0,0)[r]{$#1$}}} +\def\longcurvestarrbdn#1{\put( 0.1, 0.1 ){\Curve(0,1.8){5}} + \put( 0.6, 1 ){\makebox(0,0)[l]{$#1$}}} +\def\longcurvepoarrbde#1{\put( 0.2, 0.1 ){\Curve(1.6,0){-5}} + \put( 1, 0.55){\makebox(0,0){$#1$}}} +\def\longcurvestarrbde#1{\put( 0.2,-0.1 ){\Curve(1.6,0){5}} + \put( 1, -0.6 ){\makebox(0,0){$#1$}}} +\def\longcurvepoarrbds#1{\put( 0.1,-0.1 ){\Curve(0,-1.8){-5}} + \put( 0.6,-1 ){\makebox(0,0)[l]{$#1$}}} +\def\longcurvestarrbds#1{\put(-0.1,-0.1 ){\Curve(0,-1.8){5}} + \put(-0.6,-1 ){\makebox(0,0)[r]{$#1$}}} +\def\longcurvestarrbdw#1{\put(-0.2, 0.1 ){\Curve(-1.6,0){5}} + \put(-1, 0.55){\makebox(0,0){$#1$}}} +\def\longcurvepoarrbdw#1{\put(-0.2,-0.1 ){\Curve(-1.6,0){-5}} + \put(-1., -0.6 ){\makebox(0,0){$#1$}}} + +% Arrow heads for curved arrows +\let\curvepoarrhdn=\arrhdne +\let\curvestarrhdn=\arrhdnw +\let\curvepoarrhde=\arrhdse +\let\curvestarrhde=\arrhdne +\let\curvepoarrhds=\arrhdsw +\let\curvestarrhds=\arrhdse +\let\curvepoarrhdw=\arrhdsw +\let\curvestarrhdw=\arrhdnw + +% General curved body +\def\curvepobody(#1,#2)#3#4{\put(#1,#2){\ifcase #3 {\curvepoarrbdn{#4}} + \or {\@warning{Arrow style not available}} + \or {\curvepoarrbde{#4}} + \or {\@warning{Arrow style not available}} + \or {\curvepoarrbds{#4}} + \or {\@warning{Arrow style not available}} + \or {\curvepoarrbdw{#4}} + \or {\@warning{Arrow style not available}} \fi}} +\def\curvestbody(#1,#2)#3#4{\put(#1,#2){\ifcase #3 {\curvestarrbdn{#4}} + \or {\@warning{Arrow style not available}} + \or {\curvestarrbde{#4}} + \or {\@warning{Arrow style not available}} + \or {\curvestarrbds{#4}} + \or {\@warning{Arrow style not available}} + \or {\curvestarrbdw{#4}} + \or {\@warning{Arrow style not available}} \fi}} +\def\longcurvepobody(#1,#2)#3#4{\put(#1,#2){\ifcase #3 {\longcurvepoarrbdn{#4}} + \or {\@warning{Arrow style not available}} + \or {\longcurvepoarrbde{#4}} + \or {\@warning{Arrow style not available}} + \or {\longcurvepoarrbds{#4}} + \or {\@warning{Arrow style not available}} + \or {\longcurvepoarrbdw{#4}} + \or {\@warning{Arrow style not available}} \fi}} + +\def\longcurvestbody(#1,#2)#3#4{\put(#1,#2){\ifcase #3 {\longcurvestarrbdn{#4}} + \or {\@warning{Arrow style not available}} + \or {\longcurvestarrbde{#4}} + \or {\@warning{Arrow style not available}} + \or {\longcurvestarrbds{#4}} + \or {\@warning{Arrow style not available}} + \or {\longcurvestarrbdw{#4}} + \or {\@warning{Arrow style not available}} \fi}} + +\def\curvepohead(#1,#2)#3{\put(#1,#2) {\ifcase #3 {\curvepoarrhdn(-0.1,0.9)} + \or {\@warning{Arrow style not available}} + \or {\curvepoarrhde(0.8,0.1)} + \or {\@warning{Arrow style not available}} + \or {\curvepoarrhds(0.1,-0.9)} + \or {\@warning{Arrow style not available}} + \or {\curvepoarrhdw(-0.8,-0.1)} + \or {\@warning{Arrow style not available}} \fi}} + +\def\curvesthead(#1,#2)#3{\put(#1,#2) {\ifcase #3 {\curvestarrhdn(0.1,0.9)} + \or {\@warning{Arrow style not available}} + \or {\curvestarrhde(0.8,-0.1)} + \or {\@warning{Arrow style not available}} + \or {\curvestarrhds(-0.1,-0.9)} + \or {\@warning{Arrow style not available}} + \or {\curvestarrhdw(-0.8,0.1)} + \or {\@warning{Arrow style not available}} \fi}} + +\def\longcurvepohead(#1,#2)#3{\put(#1,#2) {\ifcase #3 {\curvepoarrhdn(-0.1,1.9)} + \or {\@warning{Arrow style not available}} + \or {\curvepoarrhde(1.8,0.1)} + \or {\@warning{Arrow style not available}} + \or {\curvepoarrhds(0.1,-1.9)} + \or {\@warning{Arrow style not available}} + \or {\curvepoarrhdw(-1.8,-0.1)} + \or {\@warning{Arrow style not available}} \fi}} + +\def\longcurvesthead(#1,#2)#3{\put(#1,#2) {\ifcase #3 {\curvestarrhdn(0.1,1.9)} + \or {\@warning{Arrow style not available}} + \or {\curvestarrhde(1.8,-0.1)} + \or {\@warning{Arrow style not available}} + \or {\curvestarrhds(-0.1,-1.9)} + \or {\@warning{Arrow style not available}} + \or {\curvestarrhdw(-1.8,0.1)} + \or {\@warning{Arrow style not available}} \fi}} + +\def\curvepoarrow(#1,#2)#3#4{\curvepobody(#1,#2){#3}{#4}\curvepohead(#1,#2){#3}} +\def\curvestarrow(#1,#2)#3#4{\curvestbody(#1,#2){#3}{#4}\curvesthead(#1,#2){#3}} + +\def\longcurvepoarrow(#1,#2)#3#4{\longcurvepobody(#1,#2){#3}{#4}% + \longcurvepohead(#1,#2){#3}} +\def\longcurvestarrow(#1,#2)#3#4{\longcurvestbody(#1,#2){#3}{#4}% + \longcurvesthead(#1,#2){#3}} + +\def\curvearrow(#1,#2)#3{\@ifnextchar[{\@curvearrow(#1,#2){#3}}% + {\@curvearrow(#1,#2){#3}[]}} +\def\@curvearrow(#1,#2)#3[#4]#5{\ifodd #5 {\curvestarrow(#1,#2){#3}{#4}} + \else {\curvepoarrow(#1,#2){#3}{#4}} \fi} + +\def\longcurvearrow(#1,#2)#3{\@ifnextchar[{\@longcurvearrow(#1,#2){#3}}% + {\@longcurvearrow(#1,#2){#3}[]}} +\def\@longcurvearrow(#1,#2)#3[#4]#5{\ifodd #5 {\longcurvestarrow(#1,#2){#3}{#4}} + \else {\longcurveporrow(#1,#2){#3}{#4}} \fi} + +%%%%%%% Two cells +\def\twocellup(#1,#2){\put(#1,#2){{\put( 0.02,-0.1) {\line( 0, 1) {0.16}}} + {\put(-0.02,-0.1) {\line( 0, 1) {0.16}}} + {\put( 0, 0.1) {\line( 1,-2) {0.05}}} + {\put( 0, 0.1) {\line(-1,-2) {0.05}}}}} + +\def\twocelldown(#1,#2){\put(#1,#2){{\put( 0.02, 0.1) {\line( 0,-1) {0.16}}} + {\put(-0.02, 0.1) {\line( 0,-1) {0.16}}} + {\put( 0, -0.1) {\line( 1, 2) {0.05}}} + {\put( 0, -0.1) {\line(-1, 2) {0.05}}}}} + +\def\twocellright(#1,#2){\put(#1,#2){{\put(-0.1, 0.02) {\line( 1, 0){0.16}}} + {\put(-0.1,-0.02) {\line( 1, 0){0.16}}} + {\put( 0.1, 0 ) {\line(-2, 1){0.1 }}} + {\put( 0.1, 0 ) {\line(-2,-1){0.1 }}}}} + +\def\twocellleft(#1,#2){\put(#1,#2){{\put( 0.1,-0.02) {\line(-1, 0) {0.16}}} + {\put( 0.1, 0.02) {\line(-1, 0) {0.16}}} + {\put(-0.1, 0 ) {\line( 2,-1) {0.1 }}} + {\put(-0.1, 0 ) {\line( 2, 1) {0.1 }}}}} + +\def\twocellclock(#1,#2)#3{\put(#1,#2){\ifcase #3 {\twocellright(0, 0.5)} + \or \or {\twocelldown( 0.5, 0 )} + \or \or {\twocellleft( 0, -0.5)} + \or \or {\twocellup( -0.5, 0 )} + \or \or {\twocellright(0.25,0.6)} + \or {\twocelldown( 0.6, 0.25)} + \or {\twocelldown( 0.6, -0.25)} + \or {\twocellleft( 0.25,-0.6 )} + \or {\twocellleft( -0.25,-0.6 )} + \or {\twocellup( -0.6, -0.25)} + \or {\twocellup (-0.6, 0.25)} + \or {\twocellright(-0.25, 0.6 )} \fi}} + +\def\twocellanti(#1,#2)#3{\put(#1,#2){\ifcase #3 {\twocellleft( 0, 0.5)} + \or \or {\twocellup( 0.5, 0 )} + \or \or {\twocellright(0, -0.5)} + \or \or {\twocelldown(-0.5, 0 )} + \or \or {\twocellleft( 0.25,0.6)} + \or {\twocellup( 0.6, 0.25)} + \or {\twocellup( 0.6, -0.25)} + \or {\twocellright( 0.25,-0.6)} + \or {\twocellright(-0.25,-0.6)} + \or {\twocelldown( -0.6, -0.25)} + \or {\twocelldown( -0.6, 0.25)} + \or {\twocellleft( -0.25, 0.6)} \fi}} + +\def\twocelllabelfar(#1,#2)#3#4{\put(#1,#2){\ifcase #3 + {\put( 0, 0.65){\makebox(0,0){$#4$}}} + \or \or {\put( 0.6, 0 ){\makebox(0,0)[l]{$#4$}}} + \or \or {\put( 0, -0.65){\makebox(0,0){$#4$}}} + \or \or {\put(-0.6, 0 ){\makebox(0,0)[r]{$#4$}}} + \or \or {\put( 0.25, 0.75){\makebox(0,0){$#4$}}} + \or {\put( 0.7, 0.25){\makebox(0,0)[l]{$#4$}}} + \or {\put( 0.7, -0.25){\makebox(0,0)[l]{$#4$}}} + \or {\put( 0.25,-0.75){\makebox(0,0){$#4$}}} + \or {\put(-0.25,-0.75){\makebox(0,0){$#4$}}} + \or {\put(-0.7, -0.25){\makebox(0,0)[r]{$#4$}}} + \or {\put(-0.7, 0.25){\makebox(0,0)[r]{$#4$}}} + \or {\put(-0.25, 0.75){\makebox(0,0){$#4$}}} \fi}} + +\def\twocelllabelnear(#1,#2)#3#4{\put(#1,#2){\ifcase #3 + {\put( 0, 0.35){\makebox(0,0){$#4$}}} + \or + \or {\put( 0.4, 0 ){\makebox(0,0)[r]{$#4$}}} + \or + \or {\put( 0, -0.35){\makebox(0,0){$#4$}}} + \or + \or {\put(-0.4, 0 ){\makebox(0,0)[l]{$#4$}}} + \or + \or {\put( 0.25, 0.45){\makebox(0,0){$#4$}}} + \or {\put( 0.5, 0.25){\makebox(0,0)[r]{$#4$}}} + \or {\put( 0.5, -0.25){\makebox(0,0)[r]{$#4$}}} + \or {\put( 0.25,-0.45){\makebox(0,0){$#4$}}} + \or {\put(-0.25,-0.45){\makebox(0,0){$#4$}}} + \or {\put(-0.5, -0.25){\makebox(0,0)[l]{$#4$}}} + \or {\put(-0.5, 0.25){\makebox(0,0)[l]{$#4$}}} + \or {\put(-0.25, 0.45){\makebox(0,0){$#4$}}} \fi}} + +\def\twocell(#1,#2)#3#4{\@ifnextchar[{\@twocell(#1,#2){#3}{#4}}% + {\@twocell(#1,#2){#3}{#4}[][\far]}} +\def\@twocell(#1,#2)#3#4[#5][#6]{{\ifcase #4 {\twocellclock(#1,#2){#3}} + \or {\twocellanti(#1,#2){#3}} \fi} + {\ifcase #6 {\twocelllabelnear(#1,#2){#3}{#5}} + \or {\twocelllabelfar(#1,#2){#3}{#5}} \fi}} + + +%%%%%%% The flexi--arrow routines +\def\Farrow(#1,#2)(#3,#4){\@ifnextchar[{\@Garrow(#1,#2)(#3,#4)}% + {\@Farrow(#1,#2)(#3,#4)[][\po]}} + +% Note (1) that the \put(0,0) really is necessary, and (2) that +% the overhead of doing the trig. means it really is worth avoiding for G +\def\@Farrow(#1,#2)(#3,#4)[#5][#6]{\put(0,0){\@GenLab{#1}{#2}{#3}{#4}{#5}{#6}} + \put(0,0){\@FlArrow(#1,#2)(#3,#4)(0.15,0.15)(0.15,0.15)}} +\def\@Garrow(#1,#2)(#3,#4)[#5][#6]{% + \put(0,0){\@FlArrow(#1,#2)(#3,#4)(0.15,0.15)(0.15,0.15)}} +% In the course of time, @GenLab will label an arrow at arbitrary slope. +\def\@GenLab#1#2#3#4#5#6{} +% \dimen0 = #1pt +% \dimen1 = #2pt +% \dimen3 = #3pt +% \dimen4 = #4pt +% \advance \dimen3 by -\dimen1 +% \advance \dimen4 by -\dimen2 + +% Essentially, we need to work out dx + h sin p, dy + h cos p, where dx +% is x1 - x0, dy similarly, p is atan (dy/dx) and h is about 10pt. +% The arguments are: #1 = x0, #2 = y0, #3 = x1, #4 = y1, #5 = label, #6 = direction +% One for \po first. + +% \input ArcTan.tex +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +\endinput +% +% end of diagram.sty diff --git a/usergrps/uktug/baskervi/3_1/facts.tex b/usergrps/uktug/baskervi/3_1/facts.tex new file mode 100644 index 0000000000..5356fc4bad --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/facts.tex @@ -0,0 +1,115 @@ +\title{The Comprehensive \TeX\ Archive Network} +\author[Sebastian Rahtz]{Sebastian Rahtz\\ArchaeoInformatica, York} +\begin{article} + +\section{Introduction} +This article briefly describes the UK \TeX\ Archive +(Internet `Daughter' archive) on {\tt ftp.tex.ac.uk} for the benefit of +\ukt\ members. This archive is part of a collaborating network +of archives known as CTAN (Comprehensive \TeX\ Archive Network). This +is the creation of a \TeX\ Users Group working party on archives +chaired by George Greenwade which discussed the issue by electronic +mail during 1992. Following an initial implementation on {\tt +ftp.tex.ac.uk} in July 1992, the three main archives now follow the +same structure and have identical files ({\tt ftp.tex.ac.uk}, {\tt +ftp.shsu.edu} and {\tt ftp.uni-stuttgart.de}). + +The preferred access method to the UK \TeX\ Archive is using the {\em +gopher} program which has a set of useful indexes to help you locate +what you are looking for, but Internet {\em ftp} access is also very +common. JANET users may only access the machine using the {\tt +ftp-relay} site, as it has no X25 connection. The `Father' archive +on {\tt uk.ac.tex} remains open for JANET X25 access, and is regularly +updated from the `Daughter'.\footnote{Access the machine (DTE +000020120091) with username {\em public\/} and password {\em public.}} + +\section{FTP access} +The CTAN archives all run an enhanced {\em ftp} server, which may +possibly confuse your client. If your {\em ftp} client crashes or +hangs shortly after login please try using a dash (-) as the first +character of your password. This {\em ftp} server supports dynamic +compression, uncompression, and archive creation options. Fetch the +top-level file {\tt README.archive-features} for information. The +server also supports site-defined commands to assist you. Please read +{\tt README.site-commands} for a brief overview. + +On Aston and SHSU servers, you can go to the top of the +archive tree using the alias {\tt CTAN:} --- type {\tt cd CTAN:} ({\em +with} the colon). + +Please report any problems via e-mail to {\tt ctan-mgr@shsu.edu}. + +\section{Submitting material to the CTAN archives} +To submit a file to CTAN using {\em ftp} +to {\tt ftp.tex.ac.uk} or {\tt ftp.shsu.edu} as your point of entry, +please go to the {\tt /incoming} directory at the root level where you +entered this host. {\tt cd /incoming} from any {\em ftp} prompt should get +you there. + +Once in the {\tt /incoming} directory, please do one of the following: +\begin{enumerate} +\item if you are submitting a single file, simply put it in the {\tt + /incoming} directory; or +\item if you are submitting a set of files intended to be used + together as a package, please create a directory within {\tt + /incoming} with: {\tt mkdir your\_name} (replace the string + {your\_name} with the directory name you wish to use), then: {\tt cd + your\_name}, then put your files in this directory. + \end{enumerate} +Be sure to use the proper mode (ascii or binary) +when you put your files into this directory. Following this, please +send an electronic mail message to: {\tt ctan-mgr@shsu.edu} with the +suggested subject of: {\em CTAN Submission}. Your message should (a) +state what file(s) you have put where, (b) include a brief overview +of what the file(s) is/are intended to do, and (c) [optionally] +where you recommend placing your submission within the CTAN +directory hierarchy. + +Once classified and moved into the CTAN directory hierarchy, your +submission will automatically be propagated to the other CTAN hosts. + +Please do not abuse your privilege to access the {\tt /incoming} directory +by placing unauthorized files in it or for purposes of making your +files accessible to another site without the prior knowledge and consent +of the host university. All {\em ftp} transactions to the host are +logged. Abuse of this service will very likely result in complete loss +of {\em ftp} access to the host from your site until your system administrators +have been notified and appropriate intervention is made on their behalf. + +Please forward any inquiries about this service to {\tt ctan-mgr@shsu.edu}. + +\section{Archive hierarchy description} +We now describe the main directories which make up +CTAN; readers are referred to David Jones' {\em Index of \TeX\ +Styles and Macros} for details of macro packages and +individual style files. + +{\small +\begin{description} +\item[archive-tools] contains the various archiving tools which users + may find useful. +\item[bibliography] contains bibliography-related files, such as + \BibTeX. +\item[digests] contains back issues of \TeX-related periodicals. +\item[documentation] contains files and tutorials which document + various aspect of \TeX. +\item[dviware] contains the various dvi-to-whatever filters and drivers. +\item[fonts] contains a collection of fonts, both sources and + pre-compiled. +\item[graphics] contains utilities and macros related to graphics. +\item[help] contains files which provide an overview to the archive + and the \TeX\ system. +\item[indexing] contains utilities and related files for indexing + documents. +\item[languages] contains non-English related implementations of \TeX. +\item[macros] contains macros for \TeX\ and its derivatives in unique + subdirectories. +\item[support] contains files and programs which can be used in + support of \TeX. +\item[systems] contains complete system setups, organized by operating + system. +\item[web] contains WEB-related files and utilities. +\end{description} +} +\end{article} + diff --git a/usergrps/uktug/baskervi/3_1/latex2e.tex b/usergrps/uktug/baskervi/3_1/latex2e.tex new file mode 100644 index 0000000000..9a46c5ecf0 --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/latex2e.tex @@ -0,0 +1,90 @@ +\title{\LaTeX2e -- A New Version of \LaTeX} +\author{Leslie Lamport and the \LaTeX3 project team} +\begin{article} + +An important announcement was made on July 27th at the Annual meeting of +the \TeX\ User's Group (TUG) at Aston University, Birmingham, UK; there +will be a new, standardised version of \LaTeX\ (working name: \LaTeX2e) +to be released before the end of 1993. + +\section*{Reasons For \LaTeX2e} + +There are two primary reasons for introducing a new version of \LaTeX: +\begin{itemize} +\item Standardisation: a single format incorporating NFSS2, to replace + present multiplicity of incompatible formats (NFSS, lfonts, + pslfonts, etc.) +\item Maintenance: a standardised system is essential to a reliable + maintenance policy. +\end{itemize} +Note that \LaTeX2e is only a ``working name''---thus +this may change. + +\section*{Guiding Principles} + +The following two guiding principles are to be followed: +\begin{enumerate} +\item Unmodified version 2.09 input files will produce the same + output with \LaTeX2e as with version 2.09. +\item All new features of \LaTeX2e will conform to the conventions + of version 2.09, making it as easy as possible for current + users to learn to use them. +\end{enumerate} + +\section*{Preamble Commands} + +In order to distinguish old (2.09) documents from those using +facilities from the new version, \LaTeX2e documents will use a +different command on the first line: +\begin{verbatim} + \documentclass[options]{class} +\end{verbatim} + The \verb|documentclass| command specifies what kind of document +this is---for example, article, book, letter, slide. There is a second command: +\begin{verbatim} + \includepackage[options]{package} +\end{verbatim} +Including a package adds new commands and/or redefines +existing commands to provide additional functionality. +The \LaTeX2.09 compatibility mode is invoked by +\begin{verbatim} + \documentstyle[options]{style} +\end{verbatim} + + +\section*{Documentation} + +The new version will be described in a new edition of {\em \LaTeX: +A document preparation system} by Leslie Lamport and in {\em The +\LaTeX\ Companion} by Goossens, Mittelbach and Samarin (both to be +published by Addison-Wesley). The {\em Companion} will also contain a +complete description of NFSS2. + + +\section*{Distribution Policy} + +Maintenance of the new system will be undertaken by the \LaTeX3\ +project team. + +A complete distribution of all files, incorporating corrections of +errors, will be made available twice a year on fixed dates. This will +happen even if there were no changes to the files, and hence only the +release dates have to be updated. + +We are currently looking into the possibility of additionally +distributing `diff' files. + +\section*{Error Reports} + +Error reports can be made using a report generating program +{\tt latexbug.tex}. This will be part of the main distribution. + +Error reports will be accepted only if the version of \LaTeX2e +that produces the error is not older than one year. Error +reports can be sent to the following mail address: +\begin{verbatim} + latex-bugs@rus.uni-stuttgart.de +\end{verbatim} +or a postal address that is to be announced. +\end{article} +\endinput diff --git a/usergrps/uktug/baskervi/3_1/mfbeg.tex b/usergrps/uktug/baskervi/3_1/mfbeg.tex new file mode 100644 index 0000000000..4fba53351b --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/mfbeg.tex @@ -0,0 +1,859 @@ +\bgroup +\arraycolsep3pt +% A way to get a hyphen, courtesy of Karl Berry. +\newcommand{\MFbook}{{\em The \MF book\/}} +\newcommand{\TeXbook}{{\em The \TeX{}book\/}} +\newcommand{\ttbsl}{{\tt \char`\\\/}} % typewriter type backslash. + +% gt: employing usual title font for "METAFONT" here. +\title{\MF\ for Beginners} +\author[Geoffrey Tobin]{Geoffrey Tobin\\{\tt ecsgrt@luxor.latrobe.edu.au}} +\begin{article} +\section*{Scope}% + +This is not a tutorial on \MF{}.\footnote{This article is a +trimmed version of the tutorial file made available on +\TeX\ archives; a current full version can be obtained +from the {\em documentation} directory on any CTAN archive (see +elsewhere in this issue of \BV\ for more details of CTAN).} It is an +attempt to describe how some of the pitfalls in running the +program may, hopefully, be avoided. + +It is a common experience to have initial (and medial and final) +difficulty with running \MF{}, and not all `\TeX{}nicians' +are as familiar with \MF{} as they are with \TeX{}. Still, nothing +ventured, nothing gained. So let's be of good cheer, and get down to +work. + + +\section{What is \MF{}?} + +\MF{} is a program for making bitmap fonts for use by \TeX{}, its +viewers, printer drivers, and related programs. It interprets a +drawing language with a syntax apparently derived in part from the +Algol family of programming languages, of which C, C++, Pascal and +Modula-2 are members. + +The input can be interactive, or from a source file. +\MF{} source files are usually suffixed `{\tt .mf}'. + +\MF{} sources can utilize scaling, rotation, reflection, skewing and shifting, +and other complex transformations in obvious and intuitive ways. +But that is another story, told (in part) by \MFbook{}. + +\MF{}'s bitmap output is a {\sc gf} ({\em generic font\/}) file. +This may be compressed to an equivalent {\sc pk} ({\em packed\/}) font +by the auxiliary program {\em GFtoPK}. + +Why doesn't \MF{} output {\sc pk} fonts directly? Firstly, Tomas +{\sc Rokicki} had not invented {\sc pk} at the time Donald +Knuth was writing \MF{}. Secondly, to change \MF{} now +would be too big a change in Knuth's opinion. (Knuth +is a very conservative programmer; this fact is a two-sided coin.) + +{\sc gf} and {\sc pk} files are suffixed `{\tt .*gf}' and `{\tt .*pk}' +respectively, where, in a typical {\sc unix} installation, the +`{\tt *}' stands for the font resolution. +(Resolution will be explained below.) +{\sc ms-dos} truncates file name suffixes to three characters, so a +font suffix `{\tt .1200gf}' becomes `{\tt .120}' --- beware of this! + +A bitmap is all that's needed for large-scale {\em proofs}, +as produced by the {\em GFtoDVI} utility, +but for \TeX{} to typeset a font it needs a {\sc tfm} +({\em \TeX{} Font Metric\/}) file to describe the dimensions, ligatures +and kerns of the font. \MF{} can be told to make a {\sc tfm} file, +by making the internal variable `{\tt fontmaking}' positive. Most +output device modes (see below) do this. + +Remember that \TeX{} reads only the {\sc tfm} files. +The {\em glyphs}, or forms of the characters, as stored in {\sc gf} +or {\sc pk} font files, do not enter the picture +(I mean, are not read) +until the {\sc dvi} drivers are run. + +\TeX{} can scale {\sc tfm} files. Unfortunately, bitmaps such as {\sc +gf} and {\sc pk} are not scalable. However, \MF{} files can be +compiled into fonts of arbitrary scale by \MF{}, even by +non-programmers. + +Incidentally, properly constructed {\sc tfm} files are +device-independent, so running \MF{} with different modes normally +produces the identical {\sc tfm}. +Dimensions in {\sc tfm} files are specified to \MF{} in device +independent `sharped' dimensions (commonly suffixed by \#), where +a value of 1 corresponds to the dimension of {\tt 1pt} (typographical +point). Most of \MF{}'s calculations are done with (resolution and +device dependent) pixels as units. Care must be taken by font +designers to {\em always\/} calculate unsharped dimensions from sharped +ones, and never the other way round, so as to keep roundoff errors or +similar effects from influencing the {\sc tfm} files to depend on +resolution or device. Although type quality will be influenced only in +minuscule ways, this is one of the more common reasons for checksum +errors reported by printer drivers. +Note that the only way to be sure that a {\sc tfm} file is device-independent +is to create the font in different modes and compare the resulting +{\sc tfm}'s, perhaps using {\em tftopl}. + +More detailed descriptions of {\sc tfm} and {\sc gf} files, and of +{\em proof\/} mode, are found in Appendices F, G, and H, respectively +of \MFbook{}. + + +\section{Getting \MF{}'s Attention}\label{sec:typing} + + +\subsection{Typing at \MF{}'s `{\tt **}' prompt}\label{sub:starstar} + +If you type the name of the \MF{} program alone on the command line: +\begin{verbatim} + mf +\end{verbatim} +then {\tt mf} displays a `{\tt **}' prompt, +which +`is \MF{}'s way of asking you for an input file name'. +(See \MFbook{}, Chapter 5: `Running \MF{}'.) +Thus, to process a \MF{} file named {\tt fred.mf}, you may type: +\begin{verbatim} + fred +\end{verbatim} + +A backslash (`\ttbsl') can also be typed here. +This causes all subsequent commands at the prompt line to be +interpreted as in a \MF{} file. +(Concerning the backslash, see \MFbook{}, Chapter 20: +`More About Macros', pages 179 and 180 in the 1986 edition.) +Thus we can respond to the {\tt **} prompt with: +\begin{verbatim} + \ input fred +\end{verbatim} +or even: +\begin{verbatim} + \ ; input fred +\end{verbatim} + +The backslash is useful because +certain commands are often executed before a \MF{} file is input. +In particular, quality printing +requires the \MF{} command {\tt mode}, +and output magnification +employs the {\tt mag} command. +For example: +\begin{verbatim} + \mode=localfont; mag=magstep(1); input fred +\end{verbatim} + +To read {\sc ms-dos} pathnames at the {\tt **} prompt, +this satisfies \MF{}: +\begin{verbatim} + \ input \seldom\fred.mf +\end{verbatim} +as does: +\begin{verbatim} + d:\seldom\fred.mf +\end{verbatim} + + +\subsection{Typing on the Command Line}\label{sub:cmdline} + +Most \MF{} implementations permit you to type \MF{} commands on the +command line, instead of at the {\tt **} prompt. (Rather, it is +automatically passed to that prompt.) + +On {\sc ms-dos}, type commands as at the {\tt **} prompt: +\begin{verbatim} + mf \mode=localfont; input myfont10 +\end{verbatim} + +On {\sc unix}, command shells typically interpret semicolons, +backslashes and parentheses specially, unless they are `quoted'. +So, when typing those characters as part of instructions to \MF{} +on the {\sc unix} command line, it is wise to accustom +yourself to protecting them with {\em apostrophes\/}: +\begin{verbatim} + mf '\mode=localfont; input myfont10' +\end{verbatim} +If {\tt localfont} makes fonts for a 300 dots per inch (dpi) device, +this should produce a {\sc tfm} file, `{\tt myfont10.tfm}', +and a 300 dpi {\sc gf} font file, `{\tt myfont10.300gf}'. +Almost all of the following will presume a 300 dpi device, and other +resolution devices will have appropriately different font file names. + +These command lines are a bit long, very often used, and rather +intolerant of mistakes so you might type the repetitive parts into a +{\sc unix} shell script or an {\sc ms-dos} batch file, as appropriate. + +In {\sc unix}, the {\tt **} prompt has the advantage that those pesky +apostrophes are not needed. (Indeed, those apostrophes are always +wrong at the {\tt **} prompt --- \MF{} doesn't understand them. +It would not understand them on the command line either---it is just +that the shell does not hand them over to \MF{}.) +However, for shell scripts (and for batch files in {\sc ms-dos}), +the command line is a boon. + + +\subsection{`{\tt Please type another input file name: }'}% +\label{sub:another} + +When \MF{} cannot find the main source file, it doesn't quit. +For example, when I typed {\tt mf fred}, \MF{} said: +\begin{verbatim} + This is METAFONT ... + **fred + ! I can't find file `fred.mf'. + <*> fred + + Please type another input file name: +\end{verbatim} +The usual program interrupts (eg, Control-C) don't work here, +and the `{\tt Please type ...}' prompt does not understand +\MF{} commands: it will read only the first word, and insist on +interpreting this as a file name. + +Beginners faced with this often wonder how to avoid an endless loop +or a reboot, or try to think of a \MF{} file that they do have +in \MF{}'s path. In the latter case, the canonical name to use +is `{\tt null}', standing for the file `{\tt null.mf}'. + +In fact, the solution is much easier: on the +systems that I have tried, a simple end of file marker +(`control-Z' in {\sc ms-dos}, `control-D' in {\sc unix}) +stops \MF{} in its tracks: +\begin{verbatim} + ! Emergency stop. + <*> fred + + End of file on the terminal! +\end{verbatim} + + +\section{Base files}\label{sec:base} + +In versions 2.7 and 2.71, the \MF{} language contains 224 +(previous versions had fewer) primitives, +which are the commands preceded by an asterisk in the Index (Appendix I) +to \MFbook{}. From these we can build more complex operations, +using macros. In \MF{} macros have some of the desirable +characteristics of functions in other languages. Collections of +macros can be stored in \MF{} source files. + +{\em Base\/} files are {\em precompiled internal tables\/} that \MF{} +loads faster than it loads the original \MF{} source files. +Thus, they are closely analogous to \TeX{}'s {\em format\/} files. + + +\subsection{The {\tt plain} base}\label{sub:plain} + +The {\tt plain} base provides the commands that \MFbook{} +describes. (See Appendix B of \MFbook{}, if you have it around +--- maybe a library has it --- I'm learning from a copy borrowed from the +local university's library.) + +When it starts, \MF{} automatically loads\footnote {There are releases + of \MF{} that contain the {\tt plain} base, and so don't have to + load it. However, on most computers, including personal computers, + reading bases is so fast that such a {\em preloaded\/} base is + unnecessary.} the {\tt plain} base. This is usually called {\tt + plain.base}, or sometimes only {\tt mf.base}, although for those +systems concerned (such as {\sc unix}), both file names should really +be present. + +Em\TeX{} for {\sc ms-dos} calls the plain base {\tt plain.bas}, +due to filename truncation. + + +\subsection{Loading a Different Base}\label{sub:loading} + +Suppose that you have a base named {\tt joe.base}. +Typing +\begin{verbatim} + mf &joe +\end{verbatim} +or (on unix, where we must either quote or escape the ampersand) +\begin{verbatim} + mf \&joe +\end{verbatim} +or responding +\begin{verbatim} + &joe +\end{verbatim} +to the {\tt **} prompt, +omits loading {\tt plain} base, and loads the {\tt joe} base instead. +Typically, however, the {\tt joe.mf} file which originally produced +the {\tt joe} base will have included {\tt plain.mf}, because working +without the {\tt plain} base macros would be too cumbersome. +(Refer to \MFbook{} (1986), Chapter 5: `Running \MF{}', page 35, +`dangerous bend' number two.) + +The `{\tt cm}' base, for making the Computer Modern fonts, +can be loaded in that way: +\begin{verbatim} + mf &cm +\end{verbatim} +Remember to quote the ampersand under {\sc unix}! + + +\subsection{The Linkage Trick}\label{sub:link} + +On systems such as {\sc unix} where programs can read their own +command line name, and where files may be linked to two or more +names, then programs can modify their behavior according to the +name by which they are called. Many {\sc unix} \TeX{} and \MF{} +installations exploit this in order to load different {\em format\/} +and {\em base\/} files, one for each of the various names to which +\TeX{} and \MF{} are linked. Such installations can often +be recognized by the presence of the executable `{\tt virmf}' +in one of the directories in the {\tt PATH}. + +For example, if a base file called `{\tt third.base}' resides where +\MF{} can find it, then {\tt virmf} can be linked to {\tt third}. In +{\sc unix}, a {\em hard link\/} is formed by +\begin{verbatim} + ln virmf third +\end{verbatim} + +On systems supporting {\em symbolic links\/}, you should make all of +these links symbolic, rather than hard, or else you will have to redo +them every time you install a new copy of~{\tt virmf}; see below. +In {\sc unix}, this is done by +\begin{verbatim} + ln -s virmf third +\end{verbatim} + +Normally one wants {\tt mf} to load the {\tt plain} base, +so in such installations one links {\tt plain.base} to {\tt mf.base}: +\begin{verbatim} + ln plain.base mf.base +\end{verbatim} +Again, you'd best make that link symbolic. This comment applies for +the rest of this section as well. + +As another example, take the `{\tt cm}' base. In {\em web2c}: +\begin{verbatim} + ln virmf cmmf + ln cm.base cmmf.base +\end{verbatim} +so that `{\tt cmmf}' automatically loads `{\tt cm.base}'. + +This applies equally to \TeX{}, which is why {\tt tex} and {\tt latex} +are then links to {\tt virtex}, {\tt tex.fmt} is a link to +{\tt plain.fmt}, and {\tt latex.fmt} is a link to {lplain.fmt}: +\begin{verbatim} + ln virtex tex + ln plain.fmt tex.fmt + + ln virtex latex + ln lplain.fmt latex.fmt +\end{verbatim} + +Karl Berry's {\em web2c} distribution for {\sc unix} uses +this `{\em linkage trick\/}'. + +If you used symbolic links, you can laugh off the following + +{\sc Warning:} +This linkage is convenient, but watch out during updates! +If {\tt mf.base} is a {\em hard link\/} +to {\tt plain.base}, then replacing {\tt plain.base} with its +new version severs the link: {\tt mf} will still load {\tt mf.base}, +but it will be the old version! The proper procedure is to remove +the old {\tt mf.base}, and relink. On {\sc unix}: +\begin{verbatim} + rm mf.base + ln plain.base mf.base +\end{verbatim} +On most {\sc unix\/} systems, {\tt ln -f} will automatically remove +the second file (if present) --- in this case, mf.base --- before linking. + +Alternatively, {\em web2c} will update `{\tt plain.base}' +(and `{\tt plain.fmt}', and so on) for you, +if you tell {\em web2c\/}'s {\tt Makefile} to +\begin{verbatim} + make install +\end{verbatim} +Symbolic links, on systems that have them, are probably the best +method of handling updates, at least when doing them manually. +(Consult your system administrator for details.) + + +\subsection{Making a Base; the Local Modes file}\label{sub:modes} + +The {\tt plain} base is made from a \MF{} file named +{\tt plain.mf} and, commonly, from some other file, often called +{\tt local.mf} or {\tt modes.mf}. + +The {\tt local}/{\tt modes} file lists printers (and monitors), giving +each output device a font-making {\em mode\/}, containing a +description of some refinements that must be made in order to produce +good-looking output. For instance, how to make the characters just +dark enough, and how to make diagonal lines come out sharply. + +If you want to make a base, you need a variant of the \MF{} program +called `{\tt inimf}'. (See \MFbook{}, p 279.) For example, +{\tt plain.base} can be made in {\sc unix} by typing: +\begin{verbatim} + inimf 'plain; input local; dump' +\end{verbatim} +If using the em\TeX{} version of \MF{} for a {\sc pc}, type: +\begin{verbatim} + mf/i plain; input local; dump +\end{verbatim} + + +\section{Fonts}\label{sec:fonts} + + +\subsection{Proof Mode}\label{sub:proof} + +The purpose of \MF{} is to make fonts. For \ae{}sthetically pleasing +{\sc pk} bitmaps, the correct device mode must be selected. + +An obstacle to beware of is that {\tt plain} \MF{} uses +{\em proof\/} mode by default. +(\MFbook{}, page 270, defines this mode.) +That means writing unmagnified font files with a resolution of +2601.72 dots per inch (dpi); that's 36 pixels per point. (One +point is 1/72.27 of an inch.) Proof mode does {\bf not} produce a +{\sc tfm} file. + +What good is proof mode, and why is it the default? +{\em Proofs\/} are blown up copies of characters used by font +designers to judge whether they like the results of their work. +Naturally, proofs come first, and normal sized character production +later --- if you're a font designer. + +So there are two clues that proof mode is on: font files with +extensions like `{\tt .2602gf}' (or on {\sc ms-dos}, `{\tt .260}'), +and the `failure' to produce any {\sc tfm} file. + +On some systems, such as {\sc X11}, a third clue is that the proof +font may be drawn on the screen --- it is so large, you can't miss it! + + +\subsection{Localfont Mode}\label{sub:localfont} + +When using a stable font, or when testing the output of a new font, +we {\em don't\/} want proof mode, +we want our local output device's mode. +Usually, \MF{} is installed with a `{\tt localfont}' +assigned in the {\tt local}/{\tt modes} file. +On our department's Sun Network, we have assigned +\begin{verbatim} + localfont:=CanonCX +\end{verbatim} +We use Karl Berry's `{\tt modes.mf}'\footnote +{Available at {\tt ftp.cs.umb.edu} in the {\tt pub/tex} directory.}, +which contains modes for many, many devices. We chose the +{\tt CanonCX} mode because `{\tt modes.mf}' recommends it for Apple +Laserwriters and HP Laserjet~II printers, which we use. + +To process a \MF{} source file named `{\tt myfont10.mf}' for the most +usual local device, specify the local mode to {\tt mf} before +inputting the font name: +\begin{verbatim} + \mode=localfont; input myfont10 +\end{verbatim} +This should produce a {\sc gf} font file, `{\tt myfont10.300gf}' +(`{\tt myfont10.300}' in {\sc ms-dos}), +and a {\sc tfm} file, `{\tt myfont10.tfm}'. + + +\subsection{Font Naming}\label{sub:naming} + +By the way, if you modify an existing, say a Computer +Modern (cm), font, you must give it a new name. This is an honest +practice, and will avoid confusion. + + +\subsection{Magnification (and Resolution)}\label{sub:mag} + +Now suppose that you want {\tt myfont10} to be magnified, +say to magstep 1 (magnified by 1.2), for a `jumbo' printer. +Assuming that the {\tt local}/{\tt modes} file has a mode +for the jumbo printer, +you may then run \MF{} with the following three commands: +\begin{verbatim} + \mode=jumbo; mag=magstep(1); input myfont10 +\end{verbatim} +to produce `{\tt myfile10.tfm}' (again!) +and a {\sc gf} font, `{\tt myfile10.360gf}'. +On {\sc ms-dos}, the file names will be truncated; +for example, `{\tt myfile10.360}'. + +The `{\tt 360}' is `300 {\tt *} 1.2', indicating the magnification. +A 360 dpi font can be used either as a magnification 1.2 font on +a 300 dpi printer or as a normal sized font on a 360 dpi printer. + +Note, however, that the \MF{} language includes special hints for +each output device which clue \MF{} as to the reactions of the +output device to pixel-sized minuscule changes. + +So for highest quality, you would not even want to mix the fonts for +two 300~dpi printers, unless they share the same mode and most probably +the same print engine. + + +\subsection{{\em GFtoPK}}\label{sub:gftopk} + +\TeX{} uses only the {\sc tfm} file, which \MF{} +will produce if it is in a font-making mode. +(\MFbook{}, Appendix F.) +Most {\sc dvi} drivers read the {\sc pk} font format, +but \MF{} makes a {\sc gf} (Generic Font) file. +So we need also to apply the {\em GFtoPK} utility: +\begin{verbatim} + gftopk myfile10.300gf +\end{verbatim} +to produce the wanted `{\tt myfile.300pk}' +(or, on {\sc ms-dos}, `{\tt myfile.pk}') +{\sc pk} font. + + +\subsection{Storing the Fonts}\label{sub:store} + +Now we have the fonts, where do we store them? \TeX{}, \MF{} and +the various driver programs are compiled with default locations +written in. +These can be overridden by certain environment variables. +The names of these variables differ between systems, +but on {\sc unix} they might, for example, be `TEXFONTS' for the +{\sc tfm} files, and either `PKFONTS' or `TEXPKS' (or both of those) +--- before searching `TEXFONTS' --- for {\sc pk} fonts. +You can find out what environment variables you now have +by typing `{\tt set}' in {\sc ms-dos} and `{\tt env}' in the Bourne shell, sh, +in {\sc unix}. In the {\sc unix} C shell, {\tt csh}, type +`{\tt setenv}'. + + +If you want \TeX{} and \MF{} to find files in the current directory +(as you almost certainly do!), then one way is to put `{\tt .}' into +their search paths. +(Both {\sc unix} and {\sc ms-dos} accept the {\tt .} notation +for the current directory.) +Default search paths are compiled into \TeX{} and \MF{}, but users +can customise the environment variables +that the programs read, to override the defaults. + +\MF{} as well as the {\sc dvi} drivers, can also be given full path +specifications for input files. + +On the other hand, you may be content with your new font, and you may +have write access to the place where most of the fonts are stored. In +that case, copy your font to there. There will be a place for the +{\sc tfm} files, and another for the {\sc pk} files. It is up to you +or your local system administrator(s) to know where these directories +are, because their names are very locale dependent. + + +\section{Some Limitations of \MF{}}\label{sec:limit} + +\MF{} contains some builtin limitations, some obvious, others +less so. + +Parts of the following list are most useful to budding programmers, +though casual users may wish to read it to learn whether +an error message produced by somebody else's \MF{} file is very +serious or not. + +\begin{enumerate} +\item +All valid numbers are strictly less than 4096. + +\item +\MFbook{}, in `Appendix F: Font Metric Information', +warns of one limitation that I've met when processing some fonts. + +`At most 15 different nonzero heights, 15 different nonzero depths, +and 63 different nonzero italic corrections\footnote{Respectively, +{\tt charht}, {\tt chardp} and {\tt charic} values.} +may appear in a single font. if these limits are exceeded, +\MF{} will change one or more values, by as little as possible, +until the restriction holds. A warning message is issued if such +changes are necessary; for example + +{\small\tt (some charht values had to be adjusted by as much as 0.12pt)} + +means that you had too many different nonzero heights, but \MF{} +found a way to reduce the number to at most 15 by changing some of them; +none of them had to be changed by more than 0.12 points. +No warning is actually given unless the maximum amount of perturbation +exceeds $\frac{1}{16}$ pt.' + +Every correct implementation of \MF{} will adjust character box +dimensions by the same amount, giving the same {\sc tfm} files, so we +ignore small perturbations in other people's fonts. When designing +your own fonts, however, I think it is courteous to keep within the +limits, so as not to worry inexperienced users. + +\item +In the {\tt addto} picture command, {\tt withweight} only accepts +values that round to {\tt -3}, {\tt -2}, {\tt -1}, {\tt +1}, {\tt +2}, +or {\tt +3}. To obtain other pixel weights, you can apply further +{\tt addto} commands. + +\item +The memory size of the version of \MF{} you use is an evident, +implementation dependent restriction, but it may be, as in \TeX{}, +that memory is not enough simply because, if you'll pardon my saying +so, some of your coding may be seriously inefficient or logically +invalid. +\end{enumerate} + +\section{What Went Wrong?} + +The complexity of wrong things far exceeds that of things intended. +\MFbook{}, chapter 5, `Running \MF{}', contains +instructive examples, and supposedly `dangerous', but actually basic +and useful, notes. + +In that chapter, and in chapter 27, `Recovery from Errors', Knuth +discusses the diagnosis of \MF{}'s error messages. I find this +perhaps the hardest part of the book --- if not of using \MF{}. + +Incidentally, \MF{}'s error messages are contained in an ASCII +file called `{\tt mf.pool}'. Reading the {\tt pool} file can be +entertaining. + + +\subsection{Big fonts, but Unwanted}\label{sec:proof} + +Recently, I found myself accidentally producing fonts with extensions +like `{\tt 3122gf}'. How? + +{\em \MF{} will take\/ {\bf anything} as an excuse to revert +to\/ {\bf proof mode}.} + +The `{\tt 3122}' is a magstep 1 proof mode. It is +\begin{verbatim} + (1.2)^1 * 2601.72 = 3122.164 dots per inch. +\end{verbatim} + +My intention was for \MF{} on a PC to use an HP Laserjet mode in +place of proof mode. However, \MF{}'s command line resembles +the law: {\em every stroke of the pen is significant}. What I had +forgotten was that on my setup, `{\tt localfont}' must be explicitly +requested. + +Em\TeX{}'s \MF{}, with {\tt plain.mf}, defaults to proof mode. +However, I usually want a local printer's font-making mode. +So to process {\tt pics.mf} correctly, I need to say: +\begin{verbatim} + mf '\mode=localfont; input pics' +\end{verbatim} + + +\subsection{Consequences of Some Typing Errors on \MF{}'s + command line}\label{sub:typo} + +Small typing errors are so common, and yet undocumented (why are +common mistakes not documented?), that I thought I'd list several that +have tripped me up on innumerable occasions. After all, why reinvent +the car crash? + +Consider a source file `{\tt pics.mf}' that contains `{\tt mag=1200/1000;}', +so it is automatically scaled by 1.2 (ie, by magstep 1). If the target +printer has 300 dpi, then a 360 dpi {\sc gf} font is wanted. + +Here is the gist of what happens for various typing errors, when using +em\TeX{}'s `{\tt mf186}' on a 286 {\sc pc} to process `{\tt pics.mf}'. + +\begin{enumerate} +\item +\verb+mf186+ $\Longrightarrow$ \MF{} will keep prompting for arguments: +\begin{verbatim} + ** +\end{verbatim} + +We can type the contents of the command line here; for example, I can +now type `{\tt pics}'. In fact, even if you use the command line, +the {\tt .log} (`transcript') file shows \MF{} echoing its +interpretation of the command line to a ** prompt. + +\item \verb+mf186 pics+ $\Longrightarrow$ proof mode: + +\begin{verbatim} + ! Value is too large (5184) +\end{verbatim} + +No {\sc tfm} is produced, and the {\sc gf} file has resolution 3122 dpi. +(3121.72 dpi, to be precise.) + +\item \verb+mf186 mode=localfont; input pics+ $\Longrightarrow$ misinterpretation: +\begin{verbatim} + ! I can't find file `modes=localfont.mf'. +\end{verbatim} + +So, `{\tt modes}' needs that backslash, otherwise \MF\ thinks it is +the start of a source font's filename. Backslash (`$\backslash$') and +ampersand (`\&') are escapes from this standard interpretation by +\MF{} of the first argument. (Ampersand is in fact only a temporary +escape, as \MF{} resumes the {\tt mf} filename prompting attitude as +soon as a base is read.) + +\item \verb+mf186 \mode=localfont input pics+ $\Longrightarrow$ + weird effect: +\begin{verbatim} + >> unknown string mode_name1.2 + ! Not a string + + ; + mode_setup-> ...ode)else:mode_name[mode]fi; + l.6 mode_setup + ; +\end{verbatim} + +Wow! What a difference a semicolon can make! + +\item \verb+mf186 \mode=localfont pics+ $\Longrightarrow$ + almost nothing happens: +\begin{verbatim} + ** \mode=localfont pics + + * +\end{verbatim} + +There's the echo I mentioned. From the lack of activity, {\tt pics} +evidently needs to be `{\tt input}'. + +\item \verb+mf186 \mode=localfont; pics+ $\Longrightarrow$ + + Same as 5. + +So, yes, when the mode is specified, we need `{\tt input}' +before `{\tt pics}'. + +\item \verb+mf186 &plain \mode=localfont; input pics+ $\Longrightarrow$ + + Works. + +Just as without the `{\tt \&plain}', it writes a {\sc gf} file, +`{\tt pics.360gf}', which is correct. +({\sc ms-dos} truncates the name to `{\tt pics.360}'.) +So, redundancy seems okay. Does it waste time, though? +\end{enumerate} + + +\subsection{Finding the Fonts}\label{sub:finding} + +Finding the fonts ({\tt *.mf}, {\tt *.tfm}, {\tt *.gf}, and {\tt *.pk}) +trips up \TeX{}, \MF{}, {\em GFtoPK} and the output drivers continually. +`{\tt pics.tfm}' needs to be put where \TeX{} will look for {\sc tfm\/}s, +so I needed to ensure that `{\tt .}' was in the appropriate path environment +variable. Similarly for the \MF{}, {\sc gf} and {\sc pk} font files. + +Environment variables can be tricky. For instance, em\TeX{}'s font-making +automation program `{\em MFjob}' cannot make fonts in the current directory +unless both `{\tt .}' and `{\tt ..}' are added to {\tt MFINPUT}. +This was not documented. + +Also, some popular \TeX{} output drivers, such as the em\TeX{} drivers +on {\sc ms-dos} and {\sc os/2}, and Tomas Rokicki's `{\tt dvips}' +which has been ported to many systems, make missing fonts automatically +--- provided that they can find the necessary \MF{} source files. +Again, making fonts in the current directory can require some +tweaking. + + +\subsection{Strange Paths} + +\MF{} satisfactorily fills simple closed curves, like `{\tt O}' +and `{\tt D}', but filling a figure eight, `{\tt 8}', causes a +complaint: +\begin{verbatim} + Strange path (turning number is zero) +\end{verbatim} +because \MF{}'s rules for distinguishing inside from outside +might or might not give what you want for an `{\tt 8}', as there is +more than one conceivable answer. You can use the `positive turning +rule' for all cases, and also turn off complaints, by setting +\begin{verbatim} + turningcheck := 0; +\end{verbatim} +Chapter 13: `Drawing, Filling, and Erasing', and Chapter 27: +`Recovery from Errors', discuss {\tt strange paths} in greater +depth. + + +Sometimes, when making a perfectly valid font, but in {\em low\/} +resolutions, as for previewers (eg, VGA has 96 dpi), one may get +flak about a `{\tt Strange path}' or `{\tt Not a cycle}' or +something similar. Don't be alarmed. Fonts for previewing will +still be OK even if not perfect. + +Consequently, it is an idea to make low resolution fonts in +\MF{}'s \hbox{\tt nonstopmode}. + +Examples of fonts that give messages of this nature are the pleasant +Pandora, and --- from memory --- the commendable Ralf Smith's +Formal Script ({\tt rsfs}). Everything is fine at higher resolutions. + +Mind you, some fonts provoke sporadic +(that is, design size dependent) +strange path messages at 300 dpi +(photo-typesetter users would consider that low resolution), +yet the printed appearance showed no visible defect. + +Why do strange paths occur? +One cause is rounding error on relatively coarse grids. + +To summarize, if your viewed or printed bitmaps are fine, +then you are OK. + + +\section{\MF{} Mail List} + +Since 10 December 1992, there has been an e-mail discussion list +for \MF{}, created: + +\begin{enumerate} +\item as a means of communication between hooked \MF{}ers; + +\item as a way to bring the ``rest of us'' closer to them; + +\item as a means to get quick and efficient answers to questions + such as: + +\begin{itemize} + \item[$\circ$] why do I always get a ``.2602gf'' file? + \item[$\circ$] what is a ``strange path'', + and what can I do to avoid it? + \item[$\circ$] is there a way to go from \MF{} to PostScript + and vice-versa? + \item[$\circ$] where can I find a Stempel Garamond font + written in \MF{}? + \item[$\circ$] what is metaness? +\end{itemize} + +\item and finally, as a first step to encourage people to undertake + \MF{}ing, and start a new post-Computer Modern era of \MF{}! +\end{enumerate} + +To subscribe to this list, send the following two lines to +{\tt listserv@ens.fr} on the Internet: + \begin{quote} + \tt + SUBSCRIBE METAFONT $<$Your name$>$\\ + SET METAFONT MAIL ACK + \end{quote} +The address of the list is {\tt metafont@ens.fr} (at + the notorious Ecole Normale Superieure de~Paris). Owner of the list + is Jacques Beigbeder ({\tt beig@ens.fr}), coordinator is Yannis + Haralambous ({\tt yannis@gat.citilille.fr}). Language of the list + is English; intelligent mottos are encouraged. + + +\section{Conclusion} + +\MF{}, like \TeX{} and many another `portable' program of any +complexity, merits the warning: `{\em Watch out for the first step\/}'. + +I hope that a document like this may help to prevent domestic +accidents involving \MF{}, and so contribute to making the task +of using and designing meta-fonts an enjoyable one. My brief +experience with \MF{} suggests that it can be so. + + +All the Best! + +\end{article} +\egroup diff --git a/usergrps/uktug/baskervi/3_1/pspic.pro b/usergrps/uktug/baskervi/3_1/pspic.pro new file mode 100644 index 0000000000..d1529048be --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/pspic.pro @@ -0,0 +1,227 @@ +%pspicmac + +% arrow head +% pspicmacA +/pspicmacA{ +newpath +0 0 moveto +dup neg dup .4 mul rlineto +.8 mul 0 exch rlineto +closepath +fill +} def + +% vector +% pspicmacV +/pspicmacV{ +/X exch def +/y exch def +/x exch def +newpath +0 0 moveto +x 0 eq {0 y 0 lt {X neg}{X} ifelse} + {x 0 lt {X neg}{X}ifelse X y mul x abs div} ifelse +lineto +setlinewidth % @wholewidth +currentpoint +stroke +translate +y x atan +rotate +pspicmacA % @arrowlength +}def + +% line +% pspicmacL +/pspicmacL{ +/X exch def +/y exch def +/x exch def +newpath +0 0 moveto +x 0 eq {0 y 0 lt {X neg}{X} ifelse} + {x 0 lt {X neg}{X}ifelse X y mul x abs div} ifelse +lineto +setlinewidth % @wholewidth +stroke +}def + +% dashed vector +% pspicmacdV +/pspicmacdV{[3] 0 setdash +/X exch def +/y exch def +/x exch def +newpath +0 0 moveto +x 0 eq {0 y 0 lt {X neg}{X} ifelse} + {x 0 lt {X neg}{X}ifelse X y mul x abs div} ifelse +lineto +setlinewidth % @wholewidth +currentpoint +stroke +translate +y x atan +rotate +pspicmacA % @arrowlength +}def + +% dashed line +% pspicmacdL +/pspicmacdL{[3] 0 setdash +/X exch def +/y exch def +/x exch def +newpath +0 0 moveto +x 0 eq {0 y 0 lt {X neg}{X} ifelse} + {x 0 lt {X neg}{X}ifelse X y mul x abs div} ifelse +lineto +setlinewidth % @wholewidth +stroke +}def + +% circle +% pspicmacC +/pspicmacC{ +0 0 3 2 roll +2 div 0 360 arc +setlinewidth % @wholewidth +stroke +}def + +% dot aka circle* +% pspicmacD +/pspicmacD{ +0 0 3 2 roll +2 div 0 360 arc fill +}def + +% oval +% <0|1> <0|1> <0|1> <0|1> pspicmacO +/pspicmacO{ +/y exch 2 div def +/x exch 2 div def +/R exch def +x y lt + {R x lt {/r R def}{/r x def} ifelse} + {R y lt {/r R def}{/r y def} ifelse} ifelse +setlinewidth % @wholewidth +1 eq +{newpath + x neg 0 moveto + x neg y 0 y r arcto 4 {pop} repeat + 0 y lineto + stroke}if +1 eq +{newpath + x 0 moveto + x y 0 y r arcto 4 {pop} repeat + 0 y lineto + stroke}if +1 eq +{newpath + x neg 0 moveto + x neg y neg 0 y neg r arcto 4 {pop} repeat + 0 y neg lineto + stroke}if +1 eq +{newpath + x 0 moveto + x y neg 0 y neg r arcto 4 {pop} repeat + 0 y neg lineto + stroke}if +}def + + +% Vector +% pspicmacV2 +/pspicmacV2{ +2 copy exch +atan +/a exch def +2 copy +newpath +0 0 moveto +lineto % +3 2 roll +setlinewidth % @wholewidth +stroke +translate % +a rotate +pspicmacA % @arrowlength +}def + +% A rather flexible arrow routine. First, some arithmetic, called: x phi h theta +/mvwd{ cos mul mul 2 div add } def +/mvht{ sin mul mul 2 div add } def + +% Called: dx0 dy0 dx1 dy1 x0 y0 x1 y1 linethickness headwidth headlength arrowfl +/arrowfl +{ newpath gsave + /headlength exch def + /halfheadthickness exch 2 div def /thickness exch def + /tipy exch def /tipx exch def /taily exch def /tailx exch def + /tipoffy exch def /tipoffx exch def /tailoffy exch def /tailoffx exch def + /dx tipx tailx sub def /dy tipy taily sub def + /arrowlength dx dx mul dy dy mul add sqrt def + /angle dy dx atan def + /halfthickness thickness 2 div def + + /tailx tailx 1.4 tailoffx angle mvwd def + /taily taily 1.4 tailoffy angle mvht def + /tipx tipx -1.4 tipoffx angle mvwd def + /tipy tipy -1.4 tipoffy angle mvht def + /dx tipx tailx sub def /dy tipy taily sub def + /arrowlength dx dx mul dy dy mul add sqrt def + /base arrowlength headlength sub def + + tailx taily translate angle rotate + 20 setmiterlimit 1 setlinecap thickness setlinewidth + arrowlength 0 moveto base halfheadthickness lineto + arrowlength 0 moveto base halfheadthickness neg lineto + arrowlength 0 moveto 0 0 lineto stroke grestore newpath} def + +% Line +% pspicmacL2 +/pspicmacL2{ +newpath +0 0 moveto +lineto % +setlinewidth % @wholewidth +stroke +}def + +% Curve +% <+/-> pspicmacL2 +/pspicmacC2{ +/s exch def +/y exch def +/x exch def +newpath +0 0 moveto +0 0 +x 2 div y 10 div s mul add +y 2 div x 10 div s mul sub +x y +curveto +setlinewidth % @wholewidth +stroke +}def + +% dashed Curve +% <+/-> pspicmacL2 +/pspicmacdC2{[3] 0 setdash +/s exch def +/y exch def +/x exch def +newpath +0 0 moveto +0 0 +x 2 div y 10 div s mul add +y 2 div x 10 div s mul sub +x y +curveto +setlinewidth % @wholewidth +stroke +}def diff --git a/usergrps/uktug/baskervi/3_1/reviews.tex b/usergrps/uktug/baskervi/3_1/reviews.tex new file mode 100644 index 0000000000..ca6412ee52 --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/reviews.tex @@ -0,0 +1,97 @@ +\title{Book review --- `How to run a paper mill'} +\author[Allan Reese]{Allan Reese\\University of Hull} +\begin{article} + +\noindent +{\em `How to run a paper mill', \bf John Woodwark}, Information +Geometers, Winchester (1992), ISBN 1-874728-00-3, xv + 111 +pages.\footnote{This review is reproduced from the TUG'93 {\em TUGly + Telegraph}} + +\bigskip +\noindent Not a manual on processing lumber into landfill. The sub-title is +explanatory: {\it Writing technical papers and getting them +published}. This slim volume will interest all members as it +describes scientific progress in the modern context. Papers are +currency; they are the tickets to attend \TeX\ conferences; +they earn kudos, preferment and promotion. The approach is realistic +and entertainingly cynical --- thought-provoking whether you have +``played the system'' and published many papers, or are about to +embark on your first. + +Woodwark considers the reasons and methods for research, writing and +publishing --- and all the permutations for ordering those three +phrases! He gives pithy practical advice to the aspiring author; this +covers the text, and the use of graphics, algebraic notations and +modern conventions like pseudo-code. + +Woodwark himself used \TeX\ for his work, and gives credits on pages +xiv, 77 and 99. + +An unreserved recommendation to read. +\end{article} + + +\author[Malcolm Clark]{Malcolm Clark\\University of Warwick} +\title{Book review -- `Handbook on Writing for the Mathematical Sciences'} +\begin{article} +\bigskip +\noindent SIAM, the Society for Industrial and Applied Mathematics +recently published the {\it `Handbook on Writing for the Mathematical +Sciences'}\/ by {\bf\em Nicholas J Higham}.\footnote{This review is +reproduced from the TUG'93 {\em TUGly Telegraph}} The first thing +which the reader notices is the delightful use of the very fine +Computer Modern typeface. There can be no doubt that for mathematical +compuscripts, Computer Modern has no rival. In fact, as the author +notes, the book was typeset using \LaTeX\ with the {\it book} document +style and the {\it jeep} option. I think it looks pretty good. + +It contains a lot of good advice for those who +want to typeset maths. It firmly acknowledges +a debt to a large number of other writers on +mathematical writing, and more generally on +a wide variety of others who have contributed +to editing, writing, language usage and all the +other things we tend to take for granted. Having said +that, it is clear that Don Knuth is among those acknowledged. + +Much of the book is directed at those mathematicians +who would write for SIAM, and emphasizes their +own publications, stressing their particular style +(available from your friendly Aston Archive), +but much else is applicable widely. In fact, I would +tend to see the whole book as `A handbook of writing' +which just uses mathematics, and sciences, for +illustration. There is so much good sense here +that it would be a real pity if non-mathematicians +ignored it because they thought it in some +way irrelevant. So many of his examples +are not only thoughtful, but also clear +and apposite. + +There is also much useful trivia. I was unaware +that Euler had `invented' the notation for $e$, +although I did have a clue that Kronecker had +introduced Kronecker's delta, $\delta_{ij}$! +There are lots of other little gems hidden away +in the text. + +But perhaps the main reason for recommending this +book is the stress which Higham lays on the use of +\TeX\ and its tools. Chapter 10 `Computer aids for +writing and research' is the second longest chapter in the +book (after `Writing a paper'), and discusses +the use of \TeX\ and its variants, as well as spelling +checkers, citation services, and the Internet. +It is an extremely useful resource just for this +chapter. Obviously it cannot be an in-depth +treatment, but it says enough to whet the appetite +and send the curious in the right direction. Excellent! +A warning however: Higham's world is the world +of Unix and PostScript. In my view, the correct world +to be in if you don't happen to have a Mac. +He does point to the use of Ghostscript for +printing and previewing { PostScript} files on non-PostScript +output devices (available for Unix, MS DOS and Macintosh). +With that one small proviso --- recommended. +\end{article} diff --git a/usergrps/uktug/baskervi/3_1/shape.tex b/usergrps/uktug/baskervi/3_1/shape.tex new file mode 100644 index 0000000000..88d9b21c2a --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/shape.tex @@ -0,0 +1,314 @@ +\title{Typesetting paragraphs of a specified shape} +\author[Donald Arseneau]{Donald Arseneau\\{\tt asnd@reg.triumf.ca}} +\begin{article} +\noindent ({\em Editor's note}: This description of an unusual macro +file, {\tt shapepar.sty}, is taken from the documentation; +the full style file can be +found in CTAN archives.) + +\medskip + +\noindent \verb|\shapepar| is a macro to typeset paragraphs of a +specified shape. The total size is adjusted automatically so that the +entire shape is filled with text. This is distinct from the normal +\verb|\parshape| command which specifies a shape {\em and} a size, +which may be only partially filled, or over-filled, from top to +bottom. In a \verb|\shapepar| there can be no displayed math, and no +\verb|\vadjust| material, (including \verb|\vspace|). +\verb|\Shapepar| (capital S) is just like \verb|\shapepar| except the +paragraph is boxed so it cannot be split over two pages. Shaping +paragraphs this way is a slow process, so this style is mainly +intended for cards, invitations etc., not for whole books! Although +short paragraphs process much faster, only long paragraphs accurately +fill complex shapes. + +These macros work for both \LaTeX\ and plain \TeX. For \LaTeX, +specify \verb|\documentstyle[...shapepar...]|, or for either, +\verb|\input shapepar.sty|. + +The command \verb|\shapepar| should be used at the beginning of a paragraph, +and it applies to the entire paragraph. There is one parameter: a +description of the shape, <{\em shape\_spec}>. +\begin{verbatim} + \shapepar {} Text of para... +\end{verbatim} +The syntax rules for <{\em shape\_spec}> are very +specific, and must be followed closely. (In these rules, \verb|{ }| +mean explicit braces, \verb|[ ]| denote optional parts, \verb|< >| +surround a keyword that is defined (perhaps loosely), and \verb@|@ +means ``or''; do not type \verb|[ ] < >| or \verb@|@, only \verb|{}|.) + +\begin{footnotesize} +\begin{verbatim} + = {} + = [\\] +\end{verbatim} +\end{footnotesize} + +That is, the shape is specified as a single number in braces, followed +by the specifications for the lines, with the lines separated by +\verb|\\|. The final paragraph will have its <{\em h\_center}> +position centered on the page. <{\em h\_center}> is a number +(like 10.5) of arbitrary units; whatever units are used for lengths +and positions in the <{\em lines}>, they just need to be consistent. + +The lines in the spec are not lines of text; nor are they the lines +that you would use to draw the shape itself. They are horizontal +scans across the shape at irregular intervals. Curved shapes need +many scan lines for accurate rendering while simple shapes need few. +Draw a shape on paper, then draw a series of horizontal lines across +the shape, including lines that just touch the top and the bottom of +the figure. Each line crosses over pieces of the figure in some region. +These intersections of line and figure define a <{\em line\_spec}>. + +\begin{footnotesize} +\begin{verbatim} + = {} [ other s ] +\end{verbatim} +\end{footnotesize} + +The <{\em v\_pos}> is the vertical position of the line. Each +<{\em line\_spec}> must have a position greater than or equal to +that of the previous line, and with all <{\em v\_pos}> $> -1000$. +Position is measured from top to bottom, and always moving down. Each +<{\em segment}> represents a region where text will go in the final +paragraph; it is the segment of the horizontal scan line that overlaps +the body of the figure. There are five types of segment: + +\begin{footnotesize} +\begin{verbatim} + = t{pos}{len} | b{pos} | e{pos} | s | j +\end{verbatim} +\begin{tabular}{lp{5.5cm}} +\verb|b{pos}| &begin text at a point at horizontal position pos\\ +\verb|e{pos}| &end text at a point at horizontal position pos\\ +\verb|t{pos}{len}|&make a block of text at position pos with length len\\ +\verb|s| &split text (begin whitespace)\\ +\verb|j| &join two text blocks (end a gap)\\ +\end{tabular} +\end{footnotesize} + +The most common type of segment is $t$ (text). The other types are +degenerate in that they are single points rather than finite segments. +Types $s$ and $j$ have no explicit position, but they must appear between +text segments, and those texts should abut; e.g., \verb|t{3}{2}st{5}{4}| +(text from 3 to 5 and text from 5 to 9). + +Let's jump right into a simple example, and the meanings will be +clearer. A ``diamond'' shape can have the four vertices: + +\begin{verbatim} + (x=1,y=0) + . + +---> x + ! (0,1) . . (2,1) + ! + V y . + (1,2} +\end{verbatim} + +This shape can be exactly specified by just three scan lines passing +through the vertices. The specification is: + +\begin{footnotesize} +\noindent\begin{tabular}{lp{5.5cm}} +\verb|{1}%|& {\em h\_center}: $x$ = 1\\ +\verb|{0}b{1}\\%|& text block begins at point $y$=0, $x$=1\\ +\verb|{1}t{0}{2}\\%|& this scan (at $y$=1) crosses text (len=2) starting at $x$=0\\ +\verb|{2}e{1}|& text block ends at point $y$=2, $x$=1\\ +\end{tabular} +\end{footnotesize} + +Other specification lines, like +\verb|{1.5}t{0.5}{1}\\%| +could be inserted, but would make no difference--the shape is +interpolated linearly between scan lines. + +Every block of text must start with a $b$ specifier and end with an $e$ +spec. on some line below. Every segment specified by $t$ must have a +length greater than zero. If two blocks of text merge to form one (like +at the top of a heart shape) there should be a $j$ spec at the point of +junction. If one block bifurcates (like at the top of a hole in a +doughnut) there should be an $s$ spec. + +Thus, the first line for any valid shape description must consist +of only $b$ segment descriptors; the last line can only have $e$ type +descriptors. Although the definition of the units is arbitrary, the +numbers should range in magnitude from \verb|~|$.1 - 100$ to avoid numeric +overflows and underflows. + +If there are errors in the format of the specification, +\verb|\shapepar| might complain with the error message ``Shaped +Paragraph Error: Error in specification. Check carefully!'' At this +point you may as well type {\tt x} or {\tt e}, as there is very little +chance that \TeX\ will continue successfully. You might also get one +of \TeX's regular error messages, like ``Illegal unit of measure (pt +inserted).'' or `` Missing number, treated as zero.'' or you might +get no error message at all, just ridiculous formatting. Check shape +syntax carefully against the rules and the examples before running +them through \TeX. + +What to do if the figure does not start at a point--if it has a flat +top? It can start at a single point, but have the next scan line at +the same vertical position! A square paragraph is specified by: + +\begin{footnotesize} +\begin{tabular}{ll} +\verb|{1} %|& centerline at $x$=1 \\ +\verb| %|& ($x$=1 is horizontally centered on page)\\ +\verb|{0}b{0}\\%|& begin at (0,0)\\ +\verb|{0}t{0}{2}\\%|& text at $y$=0, width=2\\ +\verb|{2}t{0}{2}\\%|& text at $y$=2, width=2\\ +\verb|{2}e{1}%|& end at (1,2)\\ +\end{tabular} +\end{footnotesize} + + +Both \verb|\diamondpar| and \verb|\squarepar| are defined as +paragraphs with these shapes. + +\begin{small} +\Shapepar{\diamondshape} +Sit at word processor for two hours composing title for new book. +Head for tea room at 11 0'clock where six colleagues are sitting +round walls in silence. Reminds me of mental hospital day room but +no strait jackets, except perhaps intellectual. Make coffee with +back to them in order to surreptitiously use someone else's milk +from fridge. Wonder why no one ever asks me what I have been doing +in the department for the last three years. Listen to sudden burst +of animated conversation about new Mac software, and realise that my +social isolation is due to the fact that I have an Amstrad. + +\end{small} + +Now let's get more ambitious. A heart shape must have two simultaneous +beginnings, a short stretch of separate text, ending with a join, +thereafter there is just one stretch of text leading to the final +bottom point. This shape has many scan lines so that the smooth +flowing curves are preserved. + +\begin{footnotesize} +\begin{verbatim} +\def\heartshape{% +{20}{0}b{13.32}b{26.68}% +\\{.14}t{10.12}{4.42}t{25.46}{4.42}% +\\{.7}t{9.14}{7.16}t{23.7}{7.16}% +\\{1.4}t{8.4}{9.02}t{22.58}{9.02}% +\\{2.1}t{7.82}{10.42}t{21.76}{10.42}% +\\{2.8}t{7.36}{11.58}t{21.06}{11.58}% +\\{3.5}t{6.98}{12.56}t{20.46}{12.56}% +\\{4.2}t{6.68}{13.32}jt{20}{13.32}% +\\{4.9}t{6.48}{27.04}% +\\{5.6}t{6.34}{27.32}% +\\{6.3}t{6.28}{27.44}% +\\{7}t{6.26}{27.48}% +\\{7.7}t{6.27}{27.46}% +\\{8.4}t{6.32}{27.36}% +\\{9.1}t{6.4}{27.2}% +\\{9.8}t{6.52}{26.96}% +\\{10.5}t{6.68}{26.64}% +\\{11.9}t{7.12}{25.76}% +\\{13.3}t{7.72}{24.56}% +\\{14.7}t{8.51}{22.98}% +\\{16.1}t{9.5}{21}% +\\{17.5}t{10.69}{18.62}% +\\{18.9}t{12.08}{15.84}% +\\{20.3}t{13.7}{12.6}% +\\{21.7}t{15.62}{8.76}% +\\{22.4}t{16.7}{6.6}% +\\{23.1}t{17.87}{4.26}% +\\{24.6}e{20}% +} +\end{verbatim} +\end{footnotesize} + +\begin{small} +\Shapepar{\heartshape} +Sit at word processor for two hours composing title for new book. +Head for tea room at 11 0'clock where six colleagues are sitting +round walls in silence. Reminds me of mental hospital day room but +no strait jackets, except perhaps intellectual. Make coffee with +back to them in order to surreptitiously use someone else's milk +from fridge. Wonder why no one ever asks me what I have been doing +in the department for the last three years. Listen to sudden burst +of animated conversation about new Mac software, and realise that my +social isolation is due to the fact that I have an Amstrad. + +\end{small} + +Look at \verb|\heartshape| and find the two $b$ specifiers at the +beginning; find the $j$ a few lines below. Notice that above the $j$ +there are two segments per line, but only one below it; the text to +the left and right of the join meet at the join point: 20. I drew +this heart freehand, and measured lengths from the sketch, so you +should be able to do better! + +Text can have holes. For example, a doughnut-shape would have a $b$ on +the first line, followed by some lines with a single $t$, then a line with +$t$ $s$ $t$ at the start of the hole. The hole is represented by lines with two +$t$ specs--the gap between them is the hole. A line with $t$ $j$ $t$ ends the +hole. There are more lines with single $t$, and then an $e$ line to end +with. Our final example is a nut. Not a doughnut, but a hex-nut (for a +machine screw) --- a regular hexagon with a circular hole in the center. +The hexagon is flat on top and bottom so the specification begins and +ends like the square shape. The circle is rendered as a 24-gon, beginning +with a split ($s$) of the surrounding text and ending with a join ($j$). If +the spacing of the scan lines looks odd, it is because the hexagon alone +would need few scans, but the circle needs many; the points on the circle +are at 15 degree intervals. + +\begin{footnotesize} +\begin{verbatim} +\def\nutshape{% +{0}% +{0}b{0}\\% +{0}t{-12.5}{25}\\% +{11.65}t{-19.23}{19.23}st{0}{19.23}\\% +{11.99}t{-19.42}{16.835}t{2.59}{16.835}\\% +{12.99}t{-20}{15}t{5}{15}\\% +{14.58}t{-20.92}{13.85}t{7.07}{13.85}\\% +{16.65}t{-22.11}{13.45}t{8.66}{13.45}\\% +{19.06}t{-23.51}{13.85}t{9.66}{13.85}\\% +{21.65}t{-25}{15}t{10}{15}\\% +{24.24}t{-23.51}{13.85}t{9.66}{13.85}\\% +{26.65}t{-22.11}{13.45}t{8.66}{13.45}\\% +{28.72}t{-20.92}{13.85}t{7.07}{13.85}\\% +{30.31}t{-20}{15}t{5}{15}\\% +{31.31}t{-19.42}{16.835}t{2.59}{16.835}\\% +{31.65}t{-19.23}{19.23}jt{0}{19.23}\\% +{43.3}t{-12.5}{25}\\% +{43.3}e{0}% +} +\end{verbatim} +\end{footnotesize} + +\begin{small} +\Shapepar{\nutshape} +Sit at word processor for two hours composing title for new book. +Head for tea room at 11 0'clock where six colleagues are sitting +round walls in silence. Reminds me of mental hospital day room but +no strait jackets, except perhaps intellectual. Make coffee with +back to them in order to surreptitiously use someone else's milk +from fridge. Wonder why no one ever asks me what I have been doing +in the department for the last three years. Listen to sudden burst +of animated conversation about new Mac software, and realise that my +social isolation is due to the fact that I have an Amstrad. + +\end{small} + +\verb|\shapepar| cheats a bit when the horizontal gap between two bits of text +is small (like down in the notch of \verb|\heartpar|). When the gap is less +than an inter-word space it is eliminated, and the texts are joined; when +it is somewhat larger it is expanded to give it more visibility. + +Since the processing is slow, there are some messages to say how +things are going. These can be eliminated to save space (Put a \% at +the start of every \verb|\message| line.) Or you can get even more +verbose messages by {\em removing} the \% that precedes many other +\verb|\message| commands. + +There are also a number of parameters which can be changed to affect +the size-optimization procedure. Search for the word {\em optimize} in +the source. + +\end{article} diff --git a/usergrps/uktug/baskervi/3_1/shapepar.sty b/usergrps/uktug/baskervi/3_1/shapepar.sty new file mode 100644 index 0000000000..a477683c99 --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/shapepar.sty @@ -0,0 +1,828 @@ +% S H A P E P A R . S T Y +% +% Typeset paragraphs in various shapes. +% +% Version 1.0 (March 1993) +% +% Copyright (c) 1993 Donald Arseneau +% These definitions may be freely transmitted, reproduced, or modified for +% non-commercial purposes provided that this notice is left intact. +% +% \shapedpar: a macro to typeset paragraphs in a specific shape. The +% size is adjusted automatically so that the entire shape is filled +% with text. There can be no displayed math, and no "\vadjust" +% material (no "\vspace"). These macros work for both LaTeX and plain +% TeX. For LaTeX, specify \documentstyle[...shapepar...], or for +% either, \input shapepar.sty . Instructions for use are given after +% \endinput below. +% +%--------------------- +% make file load whatever status of @ +\expandafter\edef\csname SH@catcode\endcsname + {\catcode`\noexpand\@=\the\catcode`\@ + \catcode`\noexpand\$=\the\catcode`\$ + \let \csname SH@catcode\endcsname \noexpand\UnDefinedButNoAt} +\catcode`\@=11 \catcode`\$=11 + +% Define variables. Use LaTeX names for some. + + +\def\@empty{} +\ifx\@tempdima\@und@fined \csname newdimen\endcsname \@tempdima \fi +\ifx\@tempdimb\@und@fined \csname newdimen\endcsname \@tempdimb \fi +\ifx\@tempcnta\@und@fined \csname newcount\endcsname \@tempcnta \fi +\ifx\@tempcntb\@und@fined \csname newcount\endcsname \@tempcntb \fi +\ifx\@tempboxa\@und@fined \csname newbox\endcsname \@tempboxa \fi + +% Most are defined as aliases for previously-allocated registers. +% In the future, the descriptive names may disappear altogether. + +\def\@tempa#1#2#3{% {"count"|"dimen"|"box"|"skip"}{\myname}{\realname} + \ifx\@und@fined#3\csname new#1\endcsname#2% allocate new one + \else\let#2#3\fi % alias is defined, so use it + } + +\@tempa{box}\SH@boxa\rootbox +\newbox\SH@boxb % global +\@tempa{dimen}\SH@pd\@savsk +\@tempa{count}\SH@ntries\@cla % global +\@tempa{dimen}\spec@bot\p@renwd +\@tempa{dimen}\spec@top\jot +\@tempa{dimen}\spec@height\@wholewidth +\@tempa{dimen}\spec@incr\@halfwidth +\@tempa{dimen}\spec@position\@picht +\@tempa{dimen}\spec@nextpos\@ovxx +\@tempa{dimen}\spec@prevpos\@ovyy +\@tempa{dimen}\spec@hcenter\@xdim +\@tempa{dimen}\SH@scale\@ydim +\@tempa{dimen}\SH@dscale\dimen@i % global +\@tempa{dimen}\SH@tottext\@toproom % global +\@tempa{dimen}\SH@posseg\@ovro +\@tempa{dimen}\SH@widseg\@ovri +\@tempa{dimen}\SH@posold\@ovdx +\@tempa{dimen}\SH@widold\@ovdy +\@tempa{dimen}\SH@weight\@dashdim +\@tempa{count}\SH@npslines\interdisplaylinepenalty +\@tempa{count}\SH@nline\@savsf + +% How many times will \shapepar try to get the size of the paragraph? +\chardef\SH@maxtries=10 % Must be an even number % optimise +% if \rightskip stretch is to be increased. + +\def\Shapepar{\let\SH@usebox\box \shapepar} +\let\SH@usebox\unvbox + +\def\shapepar#1{% #1 = shape specification. May be a macro. + \begingroup + \par \endgraf + \edef\SH@restog{\global\SH@ntries\the\SH@ntries + \global\SH@dscale\the\SH@dscale \global\SH@tottext\the\SH@tottext} + \SH@pd\prevdepth + \let\\\relax \edef\SH@spec{#1}% + \hfuzz3\p@ \adjdemerits\z@ + \setbox\SH@boxa\vbox\bgroup % set whole text on one line + \parindent\z@ \leftskip\z@skip % \rightskip set below + \spaceskip .333333emplus1emminus.15em % optimise stretch + \parfillskip\z@ plus1fil + \hyphenpenalty1 \exhyphenpenalty1 % optimise + \begingroup + \linepenalty\@m + \def\\{\unskip\penalty-100 \hskip1em plus\@m\p@ \penalty-60 }% + \let\par\SH@endpar \hsize\maxdimen \rightskip\spaceskip + \pretolerance\m@ne \hyphenpenalty 9000 % make discretionaries, but don't use. + \ifx\textwidth\@undefined\else \textwidth\hsize + \linewidth\hsize \columnwidth\hsize \fi + \def\vadjust{{\def\SH@dm{special vertical material}\the\everydisplay}}% + \everydisplay{\errhelp{Press RETURN, and hope.}\errmessage + {Shaped Paragraph Error: \SH@dm\space is illegal in a shaped paragraph}}% + \noindent \penalty\@M \hskip\z@skip % allow hyphenation of first word + \ignorespaces} + +\def\SH@endpar{% + \endgraf \endgroup % still inside \vbox and \begingroup + \global\SH@dscale\z@ + \expandafter\SH@checkspec\SH@spec $% check height of spec. +% get tottext = total length / 256 because total length may be > \maxdimen + \setbox\@tempboxa\box\voidb@x \global\SH@tottext\z@ + \SH@sumlines % combine multiple lines -> \@tempboxa; width/256 ->\SH@tottext +%%%\message{total length = 256 * \the\SH@tottext; \string\baselineskip=\the\baselineskip; +%%%and spec height = \pointless\spec@height. }% + \unskip\unkern\unpenalty\unskip\unkern\unpenalty + \setbox\SH@boxa\box\@tempboxa % all the text + \@tempdima1.4\SH@tottext % optimise + \@tempdima\pointless\@tempdima\baselineskip + \sqrtcount\@tempdima \sqrtofcount + \multiply\sqrtcount 4096 % * sqrt(256) * 256 +% scale_guess = sqrt(2 * 256*[text_length/256] * baselineskip) / spec_ht + \SH@scale\sqrtcount sp \fpdivide\SH@scale\spec@height + \global\SH@ntries\z@ % real initialization + \lineskiplimit-99\p@ \linepenalty\thr@@ + \ifx\emergencystretch\@undefined \tolerance9999 %\@M % TeX 2 + \else \tolerance900 \emergencystretch 1cm\relax % TeX 3 + \fi \pretolerance\m@ne \hbadness\@MM % avoid error messages + \rightskip\z@ plus.2emminus.3em % optimise stretch/shrink + \SH@tryparshape} + +% \tryparshape: try a parshape with scale factor \SH@scale for \SH@spec +% For a given scale, it would take x lines of text to cover the shape, +% but only an integer number of lines (counted by \SH@nline) will be +% used. The excess is evenly distributed at the top and bottom to preserve +% the symmetry of shapes. The starting point is thus: +% +% spec_top + 1/2 * { spec_height - floor[ (spec_height-delta)/incr ]*incr } +% +\def\SH@tryparshape{% + \advance\SH@scale\SH@dscale % shift scale factor by delta + \message{(\the\SH@ntries) Try shape with scale \pointless\SH@scale\space + (Delta = \pointless\SH@dscale).}%% <--more \message + \def\SH@parshape{}\def\SH@lines{}\let\@elt\relax \SH@npslines\z@ + \spec@incr\baselineskip \fpdivide\spec@incr\SH@scale + \spec@position\spec@height \advance\spec@position-.4\spec@incr % height-delta + \SH@nline\spec@position \divide\SH@nline\spec@incr % number of lines + \spec@position-\SH@nline\spec@incr % - height of n lines + \advance\spec@position\spec@height % difference from desired height + \divide\spec@position\tw@ % half the excess + \advance\spec@position\spec@top % starting position + \advance\spec@position-\spec@incr % pre-decrement + \SH@nline\z@ % initialize counter for lines +%%\message{Parsing spec.}% + \expandafter \SH@doaline \SH@spec \\$} +% this macro ends instead of continuing with \SH@done so TeX will use +% tail-recursion as \SH@tryparshape is iterated. + +\def\SH@doaline{\SH@updps \SH@widold-\maxdimen + \advance\SH@nline\@ne \advance\spec@position\spec@incr + \ifdim\spec@position<\spec@bot + \let\\\SH@findpos + \else + \let\\\SH@dopara + \fi \\} + +\def\SH@findpos#1#2\\{\ifdim#1\p@>\spec@position + \def\SH@nextspec{#2{}}\spec@nextpos#1\p@ \def\\{\SH@found{#1}#2\\}% + \expandafter\def\expandafter\SH@prevspec\expandafter{\SH@Prevspec}% + \else + \def\SH@Prevspec{#2{}}\spec@prevpos#1\p@ + \fi \\} + +\def\SH@found{% calculate weights to interpolate + \SH@weight\spec@position \advance\SH@weight-\spec@prevpos + \@tempdimb\spec@nextpos \advance\@tempdimb-\spec@prevpos + \fpdivide\SH@weight\@tempdimb % weight = interpolation factor + \let\next \SH@dosegment \SH@dosegment} + +% Get the position and width of a segment of text by taking the weighted +% average of the specifications from above and below (weighted by nearness). +% Most of the confusing bits here are hueristics to deal with narrow gaps. +% If a gap between two texts is less than a space, the texts are joined +% over the gap. If the gap is less than 1em, the gap is increased to the +% average of 1em and the given gap. + +\def\SH@dosegment{% do a segment of text on this line + \SH@posseg\z@ \SH@widseg\z@ + \advance\SH@weight-\p@ \SH@weight-\SH@weight % w1 = 1 - w2 + \SH@getseg A\SH@prevspec % Above + \advance\SH@weight-\p@ \SH@weight-\SH@weight % w2 = 1 - w1 + \SH@getseg B\SH@nextspec % Below + \ifdim\SH@widseg>\z@ + \SH@widseg\pointless\SH@scale\SH@widseg + \advance\SH@posseg-\spec@hcenter + \SH@posseg\pointless\SH@scale\SH@posseg + \advance\SH@posseg.5\hsize +% Here are the small-gap heuristics. \@tempdima is the gap and the shift + \ifdim\SH@widold>\z@ + \@tempdima\SH@posseg + \advance\@tempdima-\SH@posold \advance\@tempdima-\SH@widold %gap + \ifdim\@tempdima<\spaceskip % gap too small; eliminate +%%%% \message{Gap is \the\@tempdima--eliminate. }% + \advance\SH@widold\@tempdimb \advance\SH@widold\SH@widseg % no update + \else + \ifdim\@tempdima<1em % gap small; enlarge it if text not too small + \ifdim\SH@widold>1em \ifdim\SH@widseg>1em +%%%% \message{Gap is \the\@tempdima--enlarge}% + \@tempdima-.25\@tempdima \advance\@tempdima.25em +%%%% \message{by 2 x \the\@tempdima. }% + \advance\SH@widold-\@tempdima + \advance\SH@widseg-\@tempdima + \advance\SH@posseg \@tempdima + \fi\fi\fi + \SH@updps + \fi + \else % no previous, so no update. Just hold. + \SH@widold\SH@widseg \SH@posold\SH@posseg + \fi\fi + \ifx\SH@prevspec\@empty \let\next\SH@doaline \fi + \ifx\SH@nextspec\@empty \let\next\SH@doaline \fi + \next} + +\def\SH@updps{% Update parshape with `new' info +\ifdim\SH@widold>\z@ +%%\message{.}% + \edef\SH@parshape{\SH@parshape\the\SH@posold\the\SH@widold\space}% + \edef\SH@lines{\@elt{\the\SH@nline}{\the\SH@posold}{\the\SH@widold}\SH@lines}% + \advance\SH@npslines\@ne +\fi \SH@widold\SH@widseg \SH@posold\SH@posseg} + +\def\SH@getseg#1#2{% A/B, spec + \ifx#2\@empty \SH@specerror \fi + \expandafter \SH@GetseG #2$#1#2} + +\def\SH@GetseG#1#2$#3#4{% command, rest of spec, $, A/B, spec + \expandafter \ifx\csname spec#3$#1\endcsname \relax + \SH@specerror + \else + \csname spec#3$#1\endcsname #2$#4% + \fi} + +\def\SH@redefine#1$#2{\def#2{#1}} + +\def\SH@dopara#1\\${% eat remaining spec and test parshape +\global\setbox\SH@boxb\vbox{% + \advance\SH@npslines\@ne + \parshape\the\SH@npslines\space \SH@parshape \z@ \maxdimen + \advance\SH@npslines\m@ne +%%\message{Formatting. }% + \noindent \unhcopy\SH@boxa \endgraf + \message{Expected \the\SH@npslines\space lines; + got \the\prevgraf\space lines}% <--more \message + \ifnum\prevgraf=\SH@npslines % maybe right size; check last line + \ifdim\SH@widseg>\z@ % yes, we can check + \ifnum\SH@ntries<\SH@maxtries % safe to screw around with \SH@npslines + \SH@grablast \@tempdima\wd\SH@boxa \advance\@tempdima 20\p@ + \ifdim\@tempdima<.8\SH@widseg % final line underfull % optimise + \message{but the last line is too empty. }% + \advance\SH@npslines\@ne % flag underfullness + \fi\fi\fi\fi + \ifnum\prevgraf=\SH@npslines % right size, done + \aftergroup\SH@done \global\SH@dscale\z@ + \else % Try a new scale factor + \ifdim\SH@dscale=\z@ % no previous step. Try to guess a good one + \ifnum\prevgraf<\SH@npslines % underfull +%%% \message{First underfull. }% + \@tempdima\prevgraf\p@ + \divide\@tempdima\SH@npslines + \else % overfull +%%% \message{First overfull. }% + \SH@grablast + \@tempdimb-\wd\SH@boxa \advance\@tempdimb-20\p@ + \divide\@tempdimb\@cclvi + \@tempdima\SH@tottext \advance\@tempdimb\@tempdima + \fpdivide\@tempdima\@tempdimb +%%% \message{overfullness: \the\wd\SH@boxa; ratio: \pointless\@tempdima}% + \fi + \sqrtcount\@tempdima \sqrtofcount \multiply\sqrtcount\@cclvi + \@tempdima\sqrtcount sp + \advance\@tempdima-\p@ + \global\SH@dscale\pointless\@tempdima\SH@scale + \gdef\SH@fac{1}% % optimise + \else % Not first step, scale from previous + \ifnum\prevgraf>\SH@npslines % overflow now + \ifdim\SH@dscale>\z@ % previous Overflow + \global\SH@dscale \SH@fac\SH@dscale + \else % overflow now, but previous underflow + \gdef\SH@fac{.51}% % optimise + \global\SH@dscale -\SH@fac\SH@dscale + \fi + \else % underflow now + \ifdim\SH@dscale>\z@ % previous Overflow + \gdef\SH@fac{.51}% % optimise + \global\SH@dscale -\SH@fac\SH@dscale + \else % overflow now, but previous underflow + \global\SH@dscale \SH@fac\SH@dscale + \fi + \fi + \fi + \ifdim-\SH@dscale>.6\SH@scale + \global\SH@dscale -.6\SH@scale % avoid scale --> 0 ! + \fi + \global\advance\SH@ntries\@ne + \ifdim\AbsVal\SH@dscale <.005\p@ \global\SH@ntries\@cclv \fi + \ifnum \SH@ntries>\SH@maxtries + \aftergroup\SH@done + \else + \multiply\SH@ntries\tw@ % local change! + \ifnum \SH@ntries=\SH@maxtries + \aftergroup\multiply\aftergroup\rightskip\aftergroup\thr@@ % optimise + \fi \aftergroup\SH@tryparshape + \fi\fi +}}% end \vbox, end macro. Must not insert anything between + +% Get last hbox off list; rebox it into \SH@boxa, omitting final glue +% +\def\SH@grablast{\unskip\unkern\unskip\unpenalty + \setbox\SH@boxa\lastbox + \ifhbox\SH@boxa + \setbox\SH@boxa\hbox{\unhbox\SH@boxa\unskip\unskip\unpenalty}% + \fi} + + +\def\SH@done{\skip@1sp plus\p@ minus\p@ + \rightskip\z@ plus.2emminus.3em % optimise, but should be same as above + \parfillskip.5\maxdimen % this will drag text to the bottom point. + \advance\SH@npslines\@ne + \SH@reform % reformat paragraph with new parfillskip + \SH@nline\m@ne \let\@elt\SH@restack + \message{Restacking.}% + \global\setbox\SH@boxb\vbox{% % re-stack segments and re-justify lines. + \setbox\SH@boxa\vbox{}\leftskip\z@ plus55sp minus5\p@ % optimise + \unvbox\SH@boxb + \SH@lines \unvbox\SH@boxa}% + \egroup % end original \setbox\SH@boxa\vbox\bgroup; but \SH@boxa is useless + \SH@restog % restore global registers + \SH@pd\dp\SH@boxb \SH@usebox\SH@boxb \prevdepth\SH@pd + \endgroup % \prevdepth is global +\let\SH@usebox\unvbox % completely finished! +} + +\def\SH@reform{\global\setbox\SH@boxb\vbox\bgroup + \message{Reformat paragraph with \string\rightskip = \the\rightskip.}% + \advance\parfillskip-\rightskip \advance\parfillskip-\leftskip + \parshape\the\SH@npslines\space \SH@parshape \z@ .5\maxdimen + %% get prevdepth from outside, penalty puts \parskip and favors breaks + \prevdepth\SH@pd \ifdim\SH@pd>-\@m\p@ \penalty-50 \fi + \noindent \unhcopy\SH@boxa \unskip\unskip\unpenalty\strut + \penalty-\@M\hbox{\kern\hfuzz}\endgraf + \ifnum\prevgraf=\SH@npslines % good, it worked. + \setbox\SH@boxa\lastbox \unskip\unpenalty % remove mongo last box + \egroup + \else % should never be necessary, but do anyway + \egroup % + \ifnum\skip@<64 % try again + \advance\rightskip\skip@ + \multiply\skip@\tw@ + \expandafter\expandafter\expandafter \SH@reform + \fi\fi} + +\def\SH@restack#1#2#3{% line num, shift, width + \skip@\lastskip \unskip \advance\skip@\lastskip \unskip + \@tempcnta\lastpenalty \unpenalty\unpenalty + \setbox\@tempboxa\lastbox +%%\message{.}% + \setbox\SH@boxa\vbox{% + \ifhbox\@tempboxa + \moveright#2\hbox to#3{\hskip\leftskip \unhbox\@tempboxa + \unskip \hskip\leftskip}% + \fi + \ifnum\@tempcnta=\z@\else \penalty\@tempcnta \fi + \vskip\skip@ + \ifnum\SH@nline=#1\relax \vskip-\baselineskip \fi + \unvbox\SH@boxa}% + \SH@nline#1\relax} + +\def\SH@checkspec#1#2#3#4${% h-center, v-origin, "b", rest of spec + \ifx b#3\else \SH@specerror \fi + \spec@hcenter#1\p@ \spec@top#2\p@ \spec@bot-\maxdimen + \def\SH@spec{{#2}b#4}% + \let\\\SH@CheckSpec + \\{#2}b#4\\{-1234.5}\\[$% + \ifdim\spec@bot<-\@m\p@ \SH@specerror \fi + \spec@height\spec@bot \advance\spec@height-\spec@top +} + +\def\SH@CheckSpec#1#2\\{\ifdim#1\p@<-\@m\p@ % finished + \def\\[${}% + \else \ifdim#1\p@<\spec@bot \SH@specerror + \spec@bot-\p@ \def\\##1[${}%eat rest + \else \spec@bot#1\p@ + \fi \fi \\} + +% b{pos} begin text at a point at horizontal position pos. +% e{pos} end text at a point at horizontal position pos. +% t{pos}{len} make a block of text at position pos with length len +% s split text (begin whitespace) +% j join two text blocks (end a gap) + +% Behavior of specs above: +\def\specA$b#1{\specA$t{#1}{0}}% b(pos) -> t(pos)(0) +\def\specA$e#1#2{\csname specA$#2\endcsname}% e(pos) ignore +\def\specA$s#1{\csname specA$#1\endcsname}% s ignore % should never happen +\def\specA$t#1{\advance\SH@posseg#1\SH@weight \@spec$t jt{#1}} + +\def\specB$e#1{\specB$t{#1}{0}} +\def\specB$b#1#2{\csname specB$#2\endcsname} +\def\specB$j#1{\csname specB$#1\endcsname} +\def\specB$t#1{\advance\SH@posseg#1\SH@weight \@spec$t st{#1}} + +\def\@spec$t#1#2#3#4#5{% j|s t pos wid next + \if t#2\else \SH@specerror \fi + \advance\SH@widseg#4\SH@weight + \if#1#5\relax % next is s (below) or j (above): unite two t + \let\@tempa\@spec$t \else \let\@tempa\SH@redefine \fi + \@tempa #5} + +% Grab all the hboxes in the preceding list, combine their contents in +% \@tempboxa (removing \rightskip, separating with space), and give +% SH@tottext = total_width / 256 (note that the total width may be +% greater than \maxdimen) +% +\def\SH@sumlines{\SH@grablast +\ifhbox\SH@boxa + \@tempdima\wd\SH@boxa \divide\@tempdima\@cclvi + \global\advance\SH@tottext\@tempdima + \setbox\@tempboxa\hbox{% + \ifvoid\@tempboxa\else \unhbox\@tempboxa\space \fi + \unhbox\SH@boxa}% + \expandafter\SH@sumlines +\fi} + +\def\SH@specerror{\errhelp{It would be amazing if you can continue after + this error.}\errmessage + {Shaped Paragraph Error: Error in specification. Check carefully! }}% + + +% Take a square root of counter \sqrtcount using Newton's method. +% Assign a count to \sqrtcount, then do \sqrtofcount. +% To take sqrt of a dimen, do: +% \sqrtcount=\thedimen \sqrtofcount +% \multiply\sqrtcount by 256 \thedimen=\sqrtcount sp +\newcount\sqrtcount +\def\sqrtofcount{\ifnum\sqrtcount>\z@ + \@tempcnta\sqrtcount \sqrtcount\@ne + \expandafter\squinitial\the\@tempcnta\relax\relax\relax + \squiterate +\else + \sqrtcount\@ne +\fi} +\def\squinitial#1#2{\ifx#1\relax \else + \ifx #2\relax \multiply\sqrtcount 3 + \else \multiply\sqrtcount 10 + \fi \expandafter \squinitial + \fi} +\def\squiterate{\@tempcntb\@tempcnta \divide\@tempcntb\sqrtcount +%%%\message{sqrt(\the\@tempcnta) guess: \the\sqrtcount. }% + \advance\sqrtcount\@tempcntb \divide\sqrtcount\tw@ + \advance \@tempcntb -\sqrtcount + \ifnum \AbsVal\@tempcntb>\thr@@ % approximate, use 1 for exact + \expandafter \squiterate \fi}% expandafter to avoid stack overflows + +\newcount\FPD@hi \FPD@hi=67108863 + +% Approximate Fixed Point Division of two dimensions +% 3.14159/2.71828 = 1.15573 +% Two parameters: Numerator and denominator. The answer is returned +% in the numerator (which must be a register). The denominator is +% unchanged (it may be a numeric string, "123"). +% \@tempcntb is used and altered. +% +\def\fpdivide#1#2{\let\FPD@nume#1\@tempcntb#2\relax + \FPD@scale\FPD@scale\FPD@scale\FPD@scale + \divide#1\@tempcntb} + +% Rescale numbers to preserve accuracy. The number 16 is the level of +% uncertainty. Use a lower power of 2 for more accuracy (2 is most precise). +% But if you change it, you must change the repetions of \FPD@scale in +% \fpdivide above: magic_number^repetitions = 65536 (16^4 = 65536). +% +\def\FPD@scale{\ifnum\AbsVal\FPD@nume<\FPD@hi + \multiply\FPD@nume\sixt@@n + \else + \divide\@tempcntb\sixt@@n + \fi} + +% take absolute value of TeX number or dimension +\def\AbsVal#1{\ifnum#1<\z@-\fi#1} + +\def\pointless#1{\expandafter\remove@PT\the#1} +{\catcode`p=12 \catcode`t=12 \gdef\remove@PT#1pt{#1}} + +\SH@catcode % restore catcodes + +% If you have (computer) memory problems, the following shape +% definitions can be eliminated. + +\def\diamondpar#1{\shapepar\diamondshape $\diamondsuit$ #1 $\diamondsuit$\par} +\def\diamondshape{{1}{0}b{1}\\{1}t{0}{2}\\{2}e{1}} + +\def\squarepar#1{\shapepar{% + {1}% centerline at x=1 + {0}b{0}\\% begin at (0,0) + {0}t{0}{2}\\% text at y=0, width=2 + {2}t{0}{2}\\% text at y=2, width=2 + {2}e{1}% end at (1,2) +}#1\par} + +\def\heartpar#1{\shapepar\heartshape #1\unskip\unskip\penalty-300 +\ \ $\heartsuit$\par} + +\def\heartshape{% +{20}{0}b{13.32}b{26.68}% +\\{.14}t{10.12}{4.42}t{25.46}{4.42}% +\\{.7}t{9.14}{7.16}t{23.7}{7.16}% +\\{1.4}t{8.4}{9.02}t{22.58}{9.02}% +\\{2.1}t{7.82}{10.42}t{21.76}{10.42}% +\\{2.8}t{7.36}{11.58}t{21.06}{11.58}% +\\{3.5}t{6.98}{12.56}t{20.46}{12.56}% +\\{4.2}t{6.68}{13.32}jt{20}{13.32}% +\\{4.9}t{6.48}{27.04}% +\\{5.6}t{6.34}{27.32}% +\\{6.3}t{6.28}{27.44}% +\\{7}t{6.26}{27.48}% +\\{7.7}t{6.27}{27.46}% +\\{8.4}t{6.32}{27.36}% +\\{9.1}t{6.4}{27.2}% +\\{9.8}t{6.52}{26.96}% +\\{10.5}t{6.68}{26.64}% +\\{11.9}t{7.12}{25.76}% +\\{13.3}t{7.72}{24.56}% +\\{14.7}t{8.51}{22.98}% +\\{16.1}t{9.5}{21}% +\\{17.5}t{10.69}{18.62}% +\\{18.9}t{12.08}{15.84}% +\\{20.3}t{13.7}{12.6}% +\\{21.7}t{15.62}{8.76}% +\\{22.4}t{16.7}{6.6}% +\\{23.1}t{17.87}{4.26}% +\\{24.6}e{20}% +} + +\def\nutshape{% +{0}% +{0}b{0}\\% +{0}t{-12.5}{25}\\% +{11.65}t{-19.23}{19.23}st{0}{19.23}\\% +{11.99}t{-19.42}{16.835}t{2.59}{16.835}\\% +{12.99}t{-20}{15}t{5}{15}\\% +{14.58}t{-20.92}{13.85}t{7.07}{13.85}\\% +{16.65}t{-22.11}{13.45}t{8.66}{13.45}\\% +{19.06}t{-23.51}{13.85}t{9.66}{13.85}\\% +{21.65}t{-25}{15}t{10}{15}\\% +{24.24}t{-23.51}{13.85}t{9.66}{13.85}\\% +{26.65}t{-22.11}{13.45}t{8.66}{13.45}\\% +{28.72}t{-20.92}{13.85}t{7.07}{13.85}\\% +{30.31}t{-20}{15}t{5}{15}\\% +{31.31}t{-19.42}{16.835}t{2.59}{16.835}\\% +{31.65}t{-19.23}{19.23}jt{0}{19.23}\\% +{43.3}t{-12.5}{25}\\% +{43.3}e{0}% +} +\endinput +%------------------------------------------------------------------- + + S H A P E P A R . S T Y -- Instructions + +\shapepar is a macro to typeset paragraphs of a specified shape. +The total size is adjusted automatically so that the entire shape is +filled with text. This is distinct from the normal \parshape command +which specifies a shape *and* a size, which may be only partially +filled, or over-filled, from top to bottom. In a \shapepar there +can be no displayed math, and no "\vadjust" material, (including +"\vspace"). \Shapepar (capital S) is just like \shapepar except the +paragraph is boxed so it cannot be split over two pages. Shaping +paragraphs this way is a slow process, so this style is mainly +intended for cards, invitations etc., not for whole books! Although +short paragraphs process much faster, only long paragraphs accurately +fill complex shapes. + +These macros work for both LaTeX and plain TeX. For LaTeX, specify +\documentstyle[...shapepar...], or for either, \input shapepar.sty. + +The command \shapepar should be used at the beginning of a paragraph, +and it applies to the entire paragraph. There is one parameter: a +description of the shape, . + + \shapepar {} Text of the paragraph... + +The syntax rules for are very specific, and must be +followed closely. (In these rules, { } mean explicit braces, [ ] +denote optional parts, < > surround a keyword that is defined (perhaps +loosely), and | means "or"; do not type [ ] < > or |, only { }.) + + = {} + + = [\\] + +That is, the shape is specified as a single number in braces, followed +by the specifications for the lines, with the lines separated by \\. The +final paragraph will have its position centered on the page. + is a number (like 10.5) of arbitrary units; whatever units +are used for lengths and positions in the , they just need to be +consistent. + +The lines in the spec are not lines of text; nor are they the lines +that you would use to draw the shape itself. They are horizontal +scans across the shape at irregular intervals. Curved shapes need +many scan lines for accurate rendering while simple shapes need few. +Draw a shape on paper, then draw a series of horizontal lines across +the shape, including lines that just touch the top and the bottom of +the figure. Each line crosses over pieces of the figure in some region. +These intersections of line and figure define a . + + = {} [ other s ] + +The is the vertical position of the line. Each must +have a position greater than or equal to that of the previous line, and +with all > -1000. Position is measured from top to bottom, and +always moving down. Each represents a region where text will +go in the final paragraph; it is the segment of the horizontal scan line +that overlaps the body of the figure. There are five types of segment: + + = t{pos}{len} | b{pos} | e{pos} | s | j + + b{pos} begin text at a point at horizontal position pos + e{pos} end text at a point at horizontal position pos + t{pos}{len} make a block of text at position pos with length len + s split text (begin whitespace) + j join two text blocks (end a gap) + +The most common type of segment is t (text). The other types are +degenerate in that they are single points rather than finite segments. +Types s and j have no explicit position, but they must appear between +text segments, and those texts should abut; e.g., t{3}{2}st{5}{4} +(text from 3 to 5 and text from 5 to 9). + +Let's jump right into a simple example, and the meanings will be +clearer. A "diamond" shape can have the four vertices: + + (x=1,y=0) + . + +---> x + ! (0,1) . . (2,1) + ! + V y . + (1,2} + + +This shape can be exactly specified by just three scan lines passing +through the vertices. The specification is: + +{1}% h_center: x = 1 +{0}b{1}\\% text block begins at point y=0, x=1 +{1}t{0}{2}\\% this scan (at y=1) crosses text (len=2) starting at x=0 +{2}e{1} text block ends at point y=2, x=1 + +Other specification lines, like + +{1.5}t{0.5}{1}\\% + +could be inserted, but would make no difference--the shape is +interpolated linearly between scan lines. + +Every block of text must start with a b specifier and end with an e +spec. on some line below. Every segment specified by t must have a +length greater than zero. If two blocks of text merge to form one (like +at the top of a heart shape) there should be a j spec at the point of +junction. If one block bifurcates (like at the top of a hole in a +doughnut) there should be an s spec. + +Thus, the first line for any valid shape description must consist +of only b segment discriptors; the last line can only have e type +discriptors. Although the definition of the units is arbitrary, the +numbers should range in magnitude from ~.1 - 100 to avoid numeric +overflows and underflows. + +If there are errors in the format of the specification, \shapepar +might complain with the error message + + Shaped Paragraph Error: Error in specification. Check carefully! + +At this point you may as well type x or e, as there is very little +chance that TeX will continue successfully. You might also get one +of TeX's regular error messages, like + + Illegal unit of measue (pt inserted). +or + Missing number, treated as zero. + +or you might get no error message at all, just ridiculous formatting. +Check shape syntax carefully against the rules and the examples before +running them through TeX. + +What to do if the figure does not start at a point--if it has a flat +top? It can start at a single point, but have the next scan line at +the same vertical position! A square paragraph is specified by: + + {1}% centerline at x=1 (x=1 is horizontally centered on page) + {0}b{0}\\% begin at (0,0) + {0}t{0}{2}\\% text at y=0, width=2 + {2}t{0}{2}\\% text at y=2, width=2 + {2}e{1}% end at (1,2) + +Both \diamondpar and \squarepar are defined above as paragraphs with +these shapes. + +Now let's get more ambitious. A heart shape must have two simultaneous +beginnings, a short stretch of separate text, ending with a join, +whereafter there is just one stretch of text leading to the final +bottom point. This shape has many scan lines so that the smooth +flowing curves are preserved. + +\def\heartshape{% +{20}{0}b{13.32}b{26.68}% +\\{.14}t{10.12}{4.42}t{25.46}{4.42}% +\\{.7}t{9.14}{7.16}t{23.7}{7.16}% +\\{1.4}t{8.4}{9.02}t{22.58}{9.02}% +\\{2.1}t{7.82}{10.42}t{21.76}{10.42}% +\\{2.8}t{7.36}{11.58}t{21.06}{11.58}% +\\{3.5}t{6.98}{12.56}t{20.46}{12.56}% +\\{4.2}t{6.68}{13.32}jt{20}{13.32}% +\\{4.9}t{6.48}{27.04}% +\\{5.6}t{6.34}{27.32}% +\\{6.3}t{6.28}{27.44}% +\\{7}t{6.26}{27.48}% +\\{7.7}t{6.27}{27.46}% +\\{8.4}t{6.32}{27.36}% +\\{9.1}t{6.4}{27.2}% +\\{9.8}t{6.52}{26.96}% +\\{10.5}t{6.68}{26.64}% +\\{11.9}t{7.12}{25.76}% +\\{13.3}t{7.72}{24.56}% +\\{14.7}t{8.51}{22.98}% +\\{16.1}t{9.5}{21}% +\\{17.5}t{10.69}{18.62}% +\\{18.9}t{12.08}{15.84}% +\\{20.3}t{13.7}{12.6}% +\\{21.7}t{15.62}{8.76}% +\\{22.4}t{16.7}{6.6}% +\\{23.1}t{17.87}{4.26}% +\\{24.6}e{20}% +} + +Look at \heartshape and find the two b specifiers at the beginning; find +the j a few lines below. Notice that above the j there are two segments +per line, but only one below it; the text to the left and right of the +join meet at the join point: 20. I drew this heart freehand, and measured +lengths from the sketch, so you should be able to do better! + +Text can have holes. For example, a doughnut-shape would have a b on +the first line, followed by some lines with a single t, then a line with +t s t at the start of the hole. The hole is represented by lines with two +t specs--the gap between them is the hole. A line with t j t ends the +hole. There are more lines with single t, and then an e line to end +with. Our final example is a nut. Not a doughnut, but a hex-nut (for a +machine screw) -- a regular hexagon with a circular hole in the center. +The hexagon is flat on top and bottom so the specification begins and +ends like the square shape. The circle is rendered as a 24-gon, beginning +with a split (s) of the surrounding text and ending with a join (j). If +the spacing of the scan lines looks odd, it is because the hexagon alone +would need few scans, but the circle needs many; the points on the circle +are at 15 degree intervals. + +\def\nutshape{% +{0}% +{0}b{0}\\% +{0}t{-12.5}{25}\\% +{11.65}t{-19.23}{19.23}st{0}{19.23}\\% +{11.99}t{-19.42}{16.835}t{2.59}{16.835}\\% +{12.99}t{-20}{15}t{5}{15}\\% +{14.58}t{-20.92}{13.85}t{7.07}{13.85}\\% +{16.65}t{-22.11}{13.45}t{8.66}{13.45}\\% +{19.06}t{-23.51}{13.85}t{9.66}{13.85}\\% +{21.65}t{-25}{15}t{10}{15}\\% +{24.24}t{-23.51}{13.85}t{9.66}{13.85}\\% +{26.65}t{-22.11}{13.45}t{8.66}{13.45}\\% +{28.72}t{-20.92}{13.85}t{7.07}{13.85}\\% +{30.31}t{-20}{15}t{5}{15}\\% +{31.31}t{-19.42}{16.835}t{2.59}{16.835}\\% +{31.65}t{-19.23}{19.23}jt{0}{19.23}\\% +{43.3}t{-12.5}{25}\\% +{43.3}e{0}% +} + +\shapepar cheats a bit when the horizontal gap between two bits of text +is small (like down in the notch of \heartpar). When the gap is less +than an interword space it is eliminated, and the texts are joined; when +it is somewhat larger it is expanded to give it more visibility. If you +want to eliminate this behavior, move the following definitions up into +the main part of the file. + +%---- cut ---- + +\def\SH@dosegment{% do a segment of text on this line + \SH@posseg\z@ \SH@widseg\z@ + \advance\SH@weight-\p@ \SH@weight-\SH@weight % w1 = 1 - w2 + \SH@getseg A\SH@prevspec % Above + \advance\SH@weight-\p@ \SH@weight-\SH@weight % w2 = 1 - w1 + \SH@getseg B\SH@nextspec % Below + \ifdim\SH@widseg>\z@ + \SH@widseg\pointless\SH@scale\SH@widseg + \advance\SH@posseg-\spec@hcenter + \SH@posseg\pointless\SH@scale\SH@posseg + \advance\SH@posseg.5\hsize + \edef\SH@parshape{\SH@parshape\the\SH@posseg\the\SH@widseg\space}% + \edef\SH@lines{\@elt{\the\SH@nline}{\the\SH@posseg}{\the\SH@widseg}\SH@lines}% + \advance\SH@npslines\@ne + \fi + \ifx\SH@prevspec\@empty \let\next\SH@doaline \fi + \ifx\SH@nextspec\@empty \let\next\SH@doaline \fi + \next} + + \let\SH@updps\relax + +%---- cut ---- + +Since the processing is slow, there are some messages to say how +things are going. These can be eliminated to save space (Put a % at +the start of every \message line.) Or you can get even more verbose +messages by *removing* the % that precedes many other \message commands. + +There are also a number of parameters which can be changed to affect +the size-optimisation procedure. Search for the word "optimise" + +%----------------------------------------- +Version 1.0 (March 1993) Initial release. + +% +% Test integrity of file: +% brackets: round, square, curly, angle: () [] {} <> +% backslash, slash, vertical, at, dollar, and: \ / | @ $ & +% hat, grave, acute (apostrophe), quote, tilde: ^ ` ' " ~ diff --git a/usergrps/uktug/baskervi/3_1/tug93.tex b/usergrps/uktug/baskervi/3_1/tug93.tex new file mode 100644 index 0000000000..01d3892944 --- /dev/null +++ b/usergrps/uktug/baskervi/3_1/tug93.tex @@ -0,0 +1,161 @@ +\title{An Informal Review of TUG '93: July 26th--30th, Aston, Birmingham UK} +\author[Kees van der Laan]{Kees van der Laan\\Dutch \TeX\ Users Group} +\begin{article} + + +\section{Highlights} +\begin{itemize} +\item Announcement of \LaTeX2.9e; the {\em \LaTeX\ Companion} book + will be available in the fall, which contains among other items, the + NFSS2 documentation +\item NTS: organizational and technical issues were surveyed +\item Y\&Y's scalable outline fonts +\item Adobe's Acrobat, and PDF (portable document format), + demoed by Doug Henderson (Blue Sky Research, and Adobe $\beta$-tester) +\item Tutorials: What is \LaTeX?, Flavours of \TeX, Virtual fonts, + all for free +\item Greenwade's CTAN: Comprehensive \TeX\ Archive Network, released +\item The {\sl TUGly Telegraph\/} spread the news (a mini + conference newspaper) +\end{itemize} + +This report\footnote{Cut down for inclusion in \BV; a fuller version +will be published in MAPS, the journal of the Dutch \TeX\ Users +Group.} contains the main issues as perceived by the author. The +idea is to get the flavour and my view of the good items across, at +the expense of completeness. + +\section{Introduction} +The meeting of the organized \TeX\ Users of the year was TUG '93 at +Aston. It attracted some 165 participants, with a few from +financially diasadvantaged countries, thanks to a bursary fund. Aston +campus is pleasantly located near the centre of Birmingham, Brum for +short. A rich variety of courses was offered before and after the +conference. In general the program offered nice presentations, +workshops, panels and the like, with the vendor booths fewer in number +than usual, Blue Sky Research being sadly absent because of being +informed too late. Despite this, to attend the conference was a real +thrill. Much attention was paid to details; for example every badge +contained a nice proverb, not forgetting the superb logo. In general +all was done by creative and playful minds. Next to the lecture room +there was a discussion lounge---with among other things some computers +with e-mail and FTP facilities, such that participants could read +their e-mail and exchange files---and a vendor booth, alias lounge, +for display of materials brought along by TUG and the various LUGs. + +\section{Conference} +For the most it was a one-stream schedule. Along with the program we +obtained a copy of the pre-proceedings, which be published in \TUB\ +14.3. Prior to the conference there were the free tutorials: `What is +\LaTeX\ all about?', `Flavours of \TeX', and `Virtual fonts'. During +the conference we had workshops about MakeIndex, \BibTeX, and virtual +fonts. And there were ample course offerings before and after the +conference. + +In the next section attention is paid to the highlights neglecting +the day-to-day sequence of events as well as the session titles. + +\subsection{Keynotes} +The keynotes were: Jackowski and Ry\'cko---detailing what happens at +the beginning and at the end of a paragraph; Christina Thiele---about +the future of \TeX\ and TUG; and Joachim Lammarsch---presenting his +view on the historical and organisational issues related to NTS, the +New Typesetting System. Later Phil Taylor---the technical director of +the project---aptly complemented this with the technical aspects. A +nice example of international cooperation. + +\subsection{Presentations} +\begin{itemize} +\item Michael Doob's paper about the practical use of virtual fonts + was very illuminating. Related to this was the work of + Alan Jeffrey for manipulating {\em vpl\/} files. + +\item It was rumoured that John Plaice's $\Omega$-\TeX\ will be a nice + extension of \TeX. It is difficult to overlook its virtues or its + impact. + +\item Derick Wood's theoretical model of tables was very intriguing. + The burning question in here is whether we can develop something + like normal specification and transformation to the clearest + formatted represention (semi)automatically. + +\item Daniel Taupin surprised us all with a new aspect of his \TeX\ + work: \TeX\ and Metafont working together to produce maps. Later, + and separately, he also reported about new developments in + Music\TeX. + +\item Martin Bryan's Guide to DSSSL was a bit too theoretical. Upon + request he assured us that this extension is there mainly to handle + so-called active documents. + +\item Michel Lavaud preceded his As\TeX\ lecture by some analogies of + the \TeX\ language with natural language---both ambiguous and + `dangerous'---and with the FORTRAN language---both stable, but + deficient. The latter has gained a firm place within the scientific + work desk, despite its deficiences and other imperfections. + +\item Laurent Siebenmann in one of his papers proposed a new method for + handling the spacing around in-line math. + +\item Roger Hunter discussed {\em Scientific Word} and + emphasized that the future of \TeX\ has all to do + with better user interfaces. It is fun to remember all the + various items people have prophesied to be essential for the + future of \TeX. At the user as well as the language level. + +\item W\l odek Bzyl lectured about the use of literate programming + tools to build upon other work: \TUB\ style customization via change + files and pretty printing of \TeX\ code, along with providing an + index. By this approach the styles of the GUST bulletin make use of + the experience embodied in the \TUB\ style files, with GUST's + modifications easily added. Really a sensible approach and worthy of + being studied and followed by other editors. + +\item Berthold Horn dwelled upon the paucity of math fonts ready for + use with \TeX, and a checklist to counteract this phenomenon. + A very lucid and scholarly paper. + +\item George Greenwade made the CTAN (Comprehensive \TeX\ Archive + Network) go public. A quantum leap! + +\item At the macro writing level we had Jonathan Fine's ``Finite + State Automata in \TeX'' and my ``Syntactic Sugar'', and ``Sorting + within \TeX''. The syntactic sugar paper also touches upon the + software engineering aspects of \TeX\ macro writing. + + \item Very intriguing was Mary Dyson's paper about teaching + typography, as a spin-off of the DIDOT project. It has + all to do with getting your priorities right; don't sub-optimize! + In essence the issues relevant to Electronic Publishing were + presented in the right order. +\item Richard Southall elaborated on his `buses and weirdness' effects +when using \TeX, naively. I'm hoping that this paper will finally +appear in print. +\end{itemize} + +\section{LUGs} +Only CyrTUG and Ukraine TUG (officially to be founded in the + autumn) talked in public about their history and revealed their +plans. Both will have autumn meetings, open for the \TeX\ community at +large to attend. + +\section{Upcoming, or go where the action is} +For next year the working idea is to have Euro\TeX\ '94 organized by +GUST in Poland. TUG '94 will be in Santa Barbara, TUG '95 in Florida, +and TUG '96 in Europe again. And in the meantime the autumn is crowded +with meetings: Ukraine TUG,\footnote{At the moment of writing this +report we received the sad news that their leader Yuri Melnichuk has +passed away, due to a heart attack.} CyrTuG (early October), the +Nordic and NTG's November meetings, next to DANTE's regular and cosy +Stammtisch, \ldots, and GUST in the spring: watch out for the calendar +in TUGboat. + + +\section{Conclusion} +Meeting people and stimulating each other---that is what +conferences are for. This was a particularly good one. + +Thanks to you all! +\end{article} + + -- cgit v1.2.3