\input blue.tex \loadindexmacros \loadsmileys \report \hfuzz=25pt\vbadness=1000 \bluechapter Text \beginsummary An introduction to the markup of text has been given. BLUe's format structure of text is nested to three levels, each preceded by a title. The building block is a paragraph. The markup for \TeX's standard paragraph shape, the markup for the headings and the markup for some special text elements have been given. Examples of the latter are: items, quotations, display text, centering, text to be set apart preceded and followed by lines, PASCAL programs, verbatims, exercises and answers, and footnotes. \endsummary \bluehead Introduction Let us assume that we have ordinary text, to be typeset by computer. What to do? Let us begin by the beginning and write it down. \begincenterverbatim An unexpected party In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole filled with the ends of worms and an oozy smell, nor yet a dry, bare sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole and that means comfort. It had a perfectly round door like a porthole, painted green,... !endcenterverbatim We must instruct the computer\Dash that is, supply markup\Dash to make something nice out of it. How? As far as I understand it, ^{Knuth's\ markup} comes down to just preceding the title by \cs{beginchapter}?!? That is all. He makes use of the already available visual markup of blank lines. These blank lines separate document parts, be it a title from the text or paragraphs from each other. Is that all? Essentially, yes. But\Dash there is always a but\Dash the role which \cs{beginchapter} has to play is not simple. Happily, that is not our concern. That is the job of the book designer in cooperation with the programmer. I take for granted the niceties of \TeX's text processing\Dash and which a regular user tends to forget\Dash such as automatic handling of ligatures, justification and hyphenation over paragraphs, and ignoring of superfluous blanks (spaces and lines) in text. All this is not necessarily restricted to English. However, to quote {\TB} `and when you are using plain {\TeX} format, you need to know that the ten characters \begincenterverbatim \ { } $ & # ^ _ % ~ !endcenterverbatim cannot be used in the ordinary way when you are typing; each of them will cause {\TeX} to do something special, \dots' After this oversimplification let us go back to BLUe scripts, full of the right spirit. \bluehead BLUe script BLUe's format allows text in print to be nested up to {\oldstyle3} levels deep. The layout of the titles and the shapes of the paragraphs contribute much to the look-and-feel. The nesting is reflected in the markup tags \cs{head}, \cs{subhead} and \cs{subsubhead}. Also \cs{title} and \cs{subtitle} are there. The tag \cs{author} has been filled-in by default, meaning that you don't have to pay attention to it. It's {\em your\/} format. You are Ben Lee User. \bluehead Headings As a tribute to ^{manmac}, BLUe's format provides the following outer level markup tags as an extra user-interface on top of the rigorous two-part macros. \begincenterverbatim \blue(sub)title <(sub)titletext> \bluekeywords \blue(sub(sub))head <(sub(sub))sectionheadtext> \blueexample !endcenterverbatim A handful, but\Dash there is always a but\Dash the ^{processing on the fly} has been lost. Note that all have a blank line\Dash implicit markup\Dash or \cs{par} as end separator. Reread page {\oldstyle202} of \TB, please. I used them in this script, because they counter the ^{curly braces mania}, or to put it in Knuth's words \displaycenterline{`\dots you needn't always enclose arguments in braces.'} ^^{heading,\ markup} The regular markup for headings reads as follows.\ftn{Of course the long forms |\begin| and |\end| can be used too.} \displaycenterline{|\head{}|} Similar for \cs{subhead} and \cs{subsubhead}. No terminating periods are automatically typeset. \bluesubhead Parameterization The text of a heading is preceded by \cs{prehead} and followed by \cs{posthead}. Again, similarly for \cs{subhead} and \cs{subsubhead}. By default the placement within context\Dash that is, the tokens contained in |\pre| and |\post|\Dash is determined by the following, apart from (stretchable) glue.\ftn{See for those \TB{}{\oldstyle355}, especially \cs{beginsection}. `The macro first emits glue and penalties designed to start a new page if the present page is nearly full, \dots' This mechanism has been borrowed for the various |\pre(sub(sub))head|-s.} The latter fills up the page by a page break to prevent an underfull \cs{vbox} message. {\let\css\cs \def\rowstblst{{\css{head}}{\css{sh}}{\css{ssh}}} \def\data{\css{bigskip} \cs\css{nobreak}\css{medskip}\css{noindent}\rs \css{medbreak}\css{noindent}\css{shindent} \cs\css{quad}\rs \css{smallbreak}\css{noindent}\css{sshindent}\cs\css{quad}\rs} \def\rowstbsep{\quad} \def\tag{${<}tag{>}$} \def\first{\css{}\tag} \def\header{\css{}pre\tag\cs \css{}post\tag} \def\footer{{\small*sh stands for subhead, ssh for subsubhead}} \def\headersep{\kern.5ex\hrule\kern.75ex} $$\fll\btable\data$$} With defaults \cs{subheadindent}{\oldstyle0}pt and \cs{subsubheadindent}\cs{generalindent}. I used to mark up headings by the short form, i.e., by |\head{...}| instead of ^|\beginhead| \dots \cs{endhead}. From now on\Dash back to the roots\Dash I will use manmac's minimal forms. In headings I don't need much processing on the fly. Automatic numbering is provided in the \cs{report} format. The idea is to use |\numbering| token variables. The above is only part of the story, just the top of the iceberg In a document we also like to reuse the head titles for table of contents, the index, and undoubtedly we need the head numbers sooner or later, whether they are hidden or not. So on the one hand we like to process a title on the fly, and on the other hand we like to store head information, as general as possible, for reuse. In the \cs{report} format I had to face the music and deal with those issues. Happily, the {\bluetex} kernel could do without it. ^^{heading,\ automatic numbering} \bluehead Paragraphs \TeX's building block is the ^{paragraph}. This unit is split up into lines to be mapped on pages. The markup for a paragraph is minimal, i.e., it is generally implicit and near to natural. An occasional user is hardly aware of the markup. In most cases \begincenterblock a paragraph starts by the first letter, and ends by a blank line. \endcenterblock The blank line is substituted by \cs{par} automatically. Explicit markup for a paragraph reads \begincenterverbatim \indent %starts a paragraph, an empty box (size \parindent) is inserted %or \noindent, which just starts a paragraph \par %ends the paragraph, and resets defaults of par shape pars %\hangindent and \hangafter !endcenterverbatim On encountering a vertical command in a paragraph, like \cs{smallskip} and its ilks, \TeX{} automatically inserts \cs{par}, and because of this the paragraph is ended. Each script, and this one is no exception, contains a lot of ordinary paragraphs.\ftn{For an extensive treatment of paragraphs see {\TB} chapter~{\oldstyle14}.} \bluesubhead Parameterization The parameters which govern the standard paragraph shape are given in the following model.\ftn{Courtesy David Salomon. (A white lie, any migrated vertical material has been omitted.)} \def\Xfil{\xleaders\hbox{X}\hfil} \beginquote\advance\leftskip.25\hsize \advance\rightskip.25\hsize\small\noindent \hfil\cs{parskip}\\\null \hfil\cs{(base)lineskip}\\\null \cs{parindent}\Xfil\break\null \hfil\cs{clubpenalty}\\\null \hfil\cs{(base)lineskip}\\\null \Xfil\break\null \hfil\cs{interlinepenalty}\\\null \hfil\cs{(base)lineskip}\\\null \hfil$\vdots$\\\null \Xfil\break\null \hfil\cs{widowpenalty}\\\null \hfil\cs{(base)lineskip}\\\null \Xfil\cs{parfillskip}\break\null $\longleftarrow$\hfill\cs{hsize}\hfill$\longrightarrow$ \endquote The left margin is \cs{hoffset} from the left. The distance from the left side of the paragraph to the left margin is the glue \cs{leftskip}. At the right side the glue has the name \cs{rightskip}. Between words the glue is \cs{spaceskip} and between sentences \cs{xspaceskip}. The contents of the token variable \cs{everypar} is inserted before the paragraph text. \exercise How can the parameters be set such that the last line of a paragraph is centered\ftn{Courtesy Anne Br\"uggeman-Klein.}? \answer \cs{leftskip}0pt plus1fil, \cs{rightskip}0pt plus$-1$fil, and \cs{parfillskip}0pt plus2fil. End the paragraph with |\hskip0pt plus1fil|. \exercise One of the problems induced by paragraphs as building blocks is that it is not easy to provide for line numbering. How can we achieve this\ftn{Courtesy Jan Kybic.}? \answer Jan Kybic reported about the several ways he received as answers to this problem on comp.text.tex. Below is the solution due to Petr Olsak. Beware it is limited. The general idea in the solutions collected by Kybic is to take apart the lines set in a vbox either starting at the end via \cs{lastbox} or starting at the begin via \cs{vsplit}, collect these lines extended by their line numbers, and reinsert these later. \beginverbatim %Due to Petr Olsak %Disclaimer: Macros for plain prose line %numbering only for ordinary paragraphs %without display mathematics or other %specialities. %(Note added: no \footnote, \centerline.) \newcount\linenum \newcount\worknum \newbox\allparagraph \def\beginnum{\begingroup\linenum0 \def\par{\ifhmode\completepar\fi}% \setbox\allparagraph\vbox\bgroup} % \def\endnum{\par\egroup\endgroup} % \def\completepar{\endgraf \global \advance\linenum\prevgraf \worknum\linenum \setbox0\null \loop\unskip\unpenalty \setbox2\lastbox \ifhbox2 \global\setbox0\hbox {\llap{$\scriptstyle\the\worknum.$ }\box2\penalty0\unhbox0}% \advance\worknum-1 \repeat\egroup\noindent \unhbox0\unpenalty\endgraf \setbox\allparagraph\vbox\bgroup} !endverbatim The numbering of verbatim lines has been treated separately. Another variant is mentioned by Salomon to number the lines on {\it each page}. This is handy for proofers to indicate more precisely the commented parts. See his OTR articles as published in \TUB \Dash or his courseware `Insights \& Hindsights' MAPS Special {\oldstyle1992}\Dash for the modified OTR. Knuth in \tubissue8(2) {\oldstyle1987}\Dash about letting text flow around figures\Dash provided the basics for Hoenig's approach \tubissue{15}(3) {\oldstyle1994}, to let the OTR create one-line pages\Dash i.e., one can lay hands on each line\Dash and introduce a `mock'-\cs{everyline}. Promising. \bluesubhead Why a paragraph as unit for line breaking? Knuth did choose a paragraph as next larger unit than a line for line breaking, i.e., for mapping the horizontal list onto lines. This gives better results than using roughly a line. \exercise What happens to accented words? \answer They hyphenate, but only the part of the word up to the accent control sequence is subject to hyphenation as such. However, we can do much better and use \cs{allowhyphens}\Dash from Appendix~D {\sl Hanging punctuation}\Dash to be inserted after the place where the hyphenation stopped. The conclusion is that \TeX{} can hyphenate properly accented words. For example the Dutch word `|onge\"emancipeerde|' can better be input as `|onge\ee{}mancipeerde|' with\ftn{Courtesy Bernd Raichle and Bas Romeny, and a wink to dutch.sty.} \beginverbatim \def\ee{\nobreak\discretionary{e-}{e}{\"e}\allowhyphens} \newskip\zzz\def\allowhyphens{\nobreak\hskip\zzz} \hyphenation{man-ci-peer-de} !endverbatim Note that because of the Dutch rules with respect to a dieresis use has to be made of \cs{discretionary} as well. The explanation is that the search for hyphenation patterns is stopped when an explicit kern, induced by the accent, is encountered. To let \TeX{} resume hyphenation of the remainder the zero glue \cs{hskip} is inserted. A line break is inhibited by \cs{nobreak}. The first \cs{nobreak} is needed to isolate the effect of the \cs{discretionary}. Normally when a discretionary is encountered \TeX{} stops hyphenating the complete word. \exercise What is wrong with |pretext\par\llap`Quotation'|? \answer \cs{llap} does not start the horizontal mode. Insert \cs{leavevmode} after \cs{par}. \exercise What is the unexpected result of |\par{\bf New paragraph} blah blah| with |\everypar{\hang}| active\ftn{Courtesy Alan Reese}? And why?\ftn{Courtesy Jeremy Henty.} Note that \cs{bf} is only there to make the pitfall look realistic. \answer Without braces the text comes out as a block. With the braces at the beginning there is no effect of the automatically inserted \cs{hang}. The explanantion reads as follows. When processing ordinary text, \TeX{} does not enter horizontal mode until it encounters a letter. In the troublesome paragraph the first letter is inside a group. When the group ends all local assignments are undone, and the effect of the \cs{hang} instruction\Dash the contents of \cs{everypar} is inserted within the group\Dash is forgotten. A solution is to precede the group by \cs{leavevmode}, because the \cs{everypar} will be executed before the group then. \exercise How can we allow for hyphenation in teletype font? \answer This is handy when we set control sequences in \cs{tt} in two-column. Provide \beginverbatim \hyphenchar\tentt=`- !endverbatim \exercise And what about page breaks? \answer The fact is that Knuth did not implement a spread or a chapter as next larger unit than a little more than `a page' for page breaking, i.e., for mapping the main vertical list onto pages. Perhaps this was dictated by the status of the hardware technology when \TeX{} was designed. \noindent The ^{hyphenation} process can be customized by \beginverbatim \lefthyphenmin= \righthyphenmin= !endverbatim which are {\oldstyle2} and {\oldstyle3} by default, and via exceptions as argument to \cs{hyphenation}. For \TB{} Knuth used as exceptions \beginverbatim \hyphenation{man-u-script man-u-scripts ap-pen-dix} !endverbatim Hyphenation assignments are global and cumulative. For more details start with Appendix~H of \TB. \bluesubhead Special paragraphs \TeX{} provides \cs{parshape}, \cs{hangindent} and \cs{hangafter} for special paragraph shapes. A captivating example is provided in \TB{} {\oldstyle101}. \blueexample Miniature History has it to start the first paragraph of a chapter with a `Miniature.' ^^{miniature} Knuth in his `Preface' showed how to mark up such kinds of paragraphs. This is an illustration of the use of \cs{hangindent}\ftn{\cs{hang} assigns the value of \cs{parindent} to \cs{hangindent}.} and \cs{hangafter}, as well as of the use of \cs{smash} outside math mode. There is no need for a special `^{dropped capital}' macro, because it is really simple. \cs{cglpic} is the minitiature used from the picture database pic.dat. For an nice application\ftn{Courtesy Huub Mulders.} see the miniature in the NTG information, on the inside of the back cover.\ftn{Knuth in \tubissue8(2), {\oldstyle1987}, touched upon the general problem how to let text {\it flow around\/} figures. Hoenig \tubissue{15}(3), {\oldstyle1994}, provided user-friendly macros.} \begindemo \pictures{\gpic}%load gpic \parindent=24pt \noindent\hang\hangafter-2 \smash{\lower13pt\hbox to0pt{% \hskip-\hangindent\gpic \hfil}}{\smc entle Reader}: This is a handbook about \TeX, a new typesetting system intended for the creation of beautiful books\Dash and especially for books that containa lot of mathematics. !yields \pictures{\gpic} \parindent=24pt \noindent\hangindent\parindent \hangafter-2 \smash{\lower13pt\hbox to0pt{\hskip -\hangindent\gpic\hfil}}{\smc entle Reader}: This is a handbook about \TeX, a new typesetting system intended for the creation of beautiful books\Dash and especially for books that contain a lot of mathematics. \par\noindent \enddemo Remark. Realize that the reference point for the \cs{smash} is where the {\smc e} starts, and that the first ({\oldstyle2}) lines are indented. Within the \cs{smash} you can move around as you wish, leaving the reference point and the other things outside invariant. Note the use of \cs{smc} to smooth the transition from the miniature to the rest of the text. \exercise Compare the above simplified version of Knuth's opening sentence with the real one in \TB{} script. \exercise At the end of each paragraph \TeX{} resets the paragraph shape parameters. How can we retain these values\ftn{Courtesy Marek Ry\'cko and Bogus{\l}aw Jackowski.}? \answer Use |{\par}| instead of \cs{par}. See their article `From \cs{indent} to \cs{par},' MAPS{\oldstyle94}.{\oldstyle2}, among other things. The point is they are changed, but\Dash there is always a but\Dash on encountering a \cs{par} the paragraph shape parameters are reset {\sl locally}, within the group so to say. After the group closing, the right curly brace, the old values pop up again, which yields the effect. Note. This method was first elucidated by the author of \TeX{} and communicated in a private letter to Elizabeth Barnhart, of {\oldstyle1987}. \exercise Is the scope of \cs{leftskip} and \cs{rightskip} restricted to a paragraph? \answer No, it is not. \blueexample Flushed right paragraphs At the end of each chapter in \TB{} quotations are set as flushed paragraphs. ^^{paragraphs,\ flushed} A little simplified the following will do the job. The key issue is the use of \cs{leftskip} and the zero value of \cs{rightskip} and \cs{parfillskip}. \cs{manmacauthor} is the \cs{author} macro from manmac to set the author part in those quotations. \begindemo \leftskip0pt plus40pc minus\parindent \rightskip0pt\parfillskip0pt \everypar{\sl}\obeylines I got the BLUes, but I like it \manmacauthor{Anonymous} (20th Century) \bigskip It contains all \manmacauthor{DeK}(1978) \TB !yields \leftskip 0pt plus 40pc minus\parindent \rightskip0pt\parfillskip0pt \everypar{\sl}\obeylines I got the BLUes, but I like it \manmacauthor{Anonymous}(20th Century) \bigskip It contains all \manmacauthor{DeK}(1978) \TB \enddemo \exercise Why is |\everypar{\sl}| needed, instead of just \cs{sl}\ftn{Courtesy Staszek Wawrykiewicz}? \answer In \cs{manmacauthor} \cs{rm} is switched on for the special paragraph of the author line. The next quotation, if there is one, takes \cs{sl} again, automatically. Note that the \cs{noindent} in \cs{manmacauthor} is mandatory, because it starts the new paragraph and therefore \cs{rm} will be in effect. It will come after the automatically inserted \cs{sl}. \bluesubhead Customization The hook for customization of paragraphs is the token variable \cs{everypar}. A nice application of \cs{everypar}, next to \cs{sl} above, is to number lines automatically in verbatim texts. \bluehead Accents and ligatures Some ligatures come automatically while others have to marked up for. \begindemo TB ex9.2-3 {\AE}sop's {\OE}uvres en fran\c cais\\ p\^at\'es !yields $$\hbox{{\AE}sop's {\OE}uvres en fran\c cais}$$ $$\hbox{p\^at\'es}$$ \enddemo Remark. From \TB~{\oldstyle54}. \dots`It's important to remember that these conventions for ^{accents} and special letters are not built into {\TeX} itself; they belong to the plain {\TeX} format, which uses the Computer Modern fonts.' \bluehead Paragraphs with digits ^^{numbers in paragraphs} When numbers occur in paragraphs they look irregular, they exceed the size of lowercase letters. Typographers advise to use \cs{oldstyle}. Minimal markup can be achieved via \cs{on}, for example |\on3|.\ftn{When a space should follow the number end the number by |{}|{\tt\char32}.} \bluehead Use of special text elements Examples of special text elements are: items, labeled by a bullet, by a number, or alphabetically; centering, quotations; (non-centered) displays; text to be set apart, preceded and followed by a line; PASCAL text; syntax diagrams; verbatims; exercises and answers; and footnotes. The markup for these elements will be shown by examples. \bluesubhead Items At the basis are plain's one-parameter \cs{item} and \cs{itemitem}, which take as argument the item marker. The bulleted item, ^|\bitem|, comes from \TB{} ex{\oldstyle14}.{\oldstyle20}. ^|\nitem|\Dash numbered items\Dash ^|\aitem|\Dash alphabetically labeled items, lowercase\Dash ^|\Aitem|\Dash alphabetically labeled items, uppercase\Dash and ^|\eitem|\Dash enumerated items, are similar extensions. The extensions provide the marker automatically, no argument is needed. Note that the closing tag is \cs{smallbreak}.\ftn{Knuth advised \cs{medskip} before and after, \TB{} {\oldstyle102}. I sobered this and made use of \cs{smallbreak}'s paragraph terminating function.} \blueexample Items \begindemo \bitem first item \itemitem{--} subitem \bitem second item \smallbreak !yields {\parindent=1pc \bitem first item \itemitem{--} subitem \bitem second item \smallbreak} \enddemo \bluesubhead Quotations A special case of centering a block is the so-called quotation, indented on the left and the right by the same (fixed) amount, usually the value of \cs{parindent}. ^^|\beginquote| \blueexample Quotations \begindemo pretext \beginquote Some text to be set apart, indented on the left and on the right \endquote posttext !yields pretext \beginquote Some text to be set apart, indented on the left and on the right. \endquote posttext \enddemo Add a little to this to obtain \cs{beginsummary} and \cs{endsummary}, abstracting in the markup from formatting details. A step towards descriptive or functional markup. The summaries at the beginning of each chapter of PWT have been marked up in this way. Perhaps it is also good to mention here that accents don't start horizontal mode. If you like to quote then start with \cs{leavevmode}\Dash to enforce horizontal mode\Dash followed by |\llap`| or so. \bluesubhead Setting text apart ^|\beginlines| and |\endlines|, \TB{} {\oldstyle583}--{\oldstyle591}, is in display (zero-indented), which obeys the line structure and inserts a \cs{hrule} for and aft. For an example of use I borrowed the following from \TB, where it is used in combination with in-line verbatim. \cs{obeylines} is on.\ftn{Variant \cs{endlines} are \cs{weak\-end\-li\-nes}, \cs{fi\-nal\-end\-li\-nes}. The former uses a \cs{medskip} instead of a \cs{medbreak}.} \blueexample Setting text apart \thisverbatim{\catcode`\|=12 } \begindemo %TB 343 \beginlines |%This is the plain TeX format | |%that's described in The TeXbook.| \dots \endlines !yields \beginlines |%This is the plain TeX format| |%that's described in The TeXbook.| \dots \endlines \enddemo \bluesubhead Centering in display Plain \TeX{} provides \cs{centerline}. BLUe's format provides the extension ^|\displaycenterline|, to center a line with display glue for and aft, and ^|\begincenter| \dots \cs{endcenter}, and ^|\begincenterblock| \dots \cs{endcenterblock} to center each line of the block. ^^|\begincenterdisplay| \blueexample Centering in display \begindemo pretext \displaycenterline{I $\heartsuit$ \TeX{} \winksmiley} text in between \begincenterblock Sign of times? The extraordinary rate of change. \endcenterblock intermediate text \begincenter TLC tender loving care that is all there is \endcenter posttext !yields pretext \displaycenterline{I $\heartsuit$ \TeX{} \winksmiley} text in between \begincenterblock Sign of times? The extraordinary rate of change. \endcenterblock intermediate text \begincenter TLC tender loving care that is all there is \endcenter posttext \enddemo Remarks. Agreed, \cs{displaycenterline} is a special case and therefore superfluous. An alternative for centering of a block\Dash although a little different\Dash is \cs{raggedcenter} `that partitions the words of a paragraph into as few as possible lines of approximately equal size and centers each individual line. Hyphenation should be avoided if possible.' {\TB} ex{\oldstyle14}.{\oldstyle34}. \exercise Do |\begincenter...\endcenter| and |\begincenterblock...\endcenterblock| allow for page breaks? \answer |\begincenter...\endcenter| does. |\begincenterblock...\endcenterblock| does not, because it is a \cs{vbox}. \bluesubhead Non-centered displays: one-line, multi-lines and multi-columns ^|\begindisplay| and |\enddisplay|, \TB{} {\oldstyle434}--{\oldstyle439}, yields an indented display. Very powerful and user-friendly. \blueexample Non-centered displays: one-line, multi-lines and multi-columns \begindemo pretext %TB 3 \begindisplay ``I understand.'' \enddisplay posttext !yields pretext\begindisplay ``I understand.'' \enddisplay posttext \enddemo Multi-line displays can be handled by ending each line in the environment by the control sequence \cs{cr}. ^^{multi-line displays} The indentation is the value of \cs{displayindent}, default {\oldstyle0}pt, next to the |\hbox to\parindent{}| because of the \cs{indent} in the (hidden) template. \begindemo pretext %TB 4 \begindisplay a hyphen (-);\cr an en-dash (--);\cr an em-dash (---);\cr a minus sign ($-$).\cr \enddisplay posttext !yields pretext \begindisplay a hyphen (-);\cr an en-dash (--);\cr an em-dash (---);\cr a minus sign ($-$).\cr \enddisplay posttext \enddemo Another subtle point is that more-column copy can be displayed, because a repetitive template has been used. \begindemo pretext %TB 29 \begindisplay \hbadness10000 \hbox spread-.666667em{The badness of this line is 100.}& (very tight)\cr \hbox spread-.333333em{The badness of this line is 12.}& (somewhat tight)\cr ... \enddisplay posttext !yields pretext \begindisplay \hbadness10000 \hbox spread-.666667em{The badness of this line is 100.}& \ (very tight)\cr \hbox spread-.333333em{The badness of this line is 12.}& \ (somewhat tight)\cr ... \enddisplay posttext \enddemo \exercise How can we center a \cs{begindisplay}\dots \cs{enddisplay}? \answer Enclosing the construct with a \cs{vbox} in math display does not work, which is the usual way to center a \cs{halign}. This comes from the fact that the construct is recognized as an alignment display. A solution is \beginverbatim {\def\enddisplay{\crcr\egroup\egroup$$} \begindisplay\vbox\bgroup \enddisplay} !endverbatim Perhaps it is simpler for those cases to fall back on the following usual markup \beginverbatim $$\vbox{\halign{