\input blue.tex \loadindexmacros \report \font\grkop=cmr12 scaled\magstep3 \bluechapter Mathematics \beginsummary On top of plain \TeX{} \bluetex{} provides facilities for: automatic numbering, cross-referencing for formulas, matrix icons, multi-alignment points in eqalign, primed summation symbols, arrows for commutative diagrams, and some special symbols. Examples borrowed from literature are incfluded to illustrate how \TeX{} can be used to mark up mathematics. This anthology shows that many details have to be prescribed. To give a math manuscript to a keyboarder without markup guidance is doomed to yield mediocre results. \endsummary \noindent^{Swanson} {\oldstyle1986} is a good source for what math should look like in print. Very nice is also `^{Mathematical Writing},' a report from a Stanford Workshop organized by Knuth. \TeX{} is already very rich for math markup, because in his Preface to \TB{} Knuth states \beginquote \noindent\llap`\dots \TeX, a new typesetting system intended for the creation of beautiful books\Dash and especially for books that contain a lot of mathematics.' \endquote \bluehead What's the problem, Doc? If we assume that mathematicians write math manuscripts in the classical sense, then there is a problem when those mathematicians wish to have their work formatted via computer-assisted document-preparation tools like \TeX. What has to be keyboarded looks much different from the manuscript. Examples of this phenomenon are omni-present in this work. \blueexample Disparity math notation and markup notation \thisverbatim{\catcode`!=12 \catcode`~=0 } \begindemo x=1+\left({y^2\over k+1} \right)^{\!\!1/3} ~yields $$x=1+\left({y^2\over k+1}\right)^ {\!\!1/3}$$ \enddemo Because of this disparity, the problem is how to get a correct\ftn{Not only in the sense that the \TeX{} formatter does not complain, no, correct in the sense of complying with tradition of mathematical typesetting.} \TeX script, starting from a mathscript. This is difficult\ftn{In the example at hand the keyboarder has to be aware of \cs{over} and $/$ respectively, and when to use which. Moreover, the correct size of the parentheses must be supplied, and some kernings have to be inserted!} due to the inherent complexity of math typesetting, and due to the unusual nature of \TeX, if not because of the bewildering and confusing flavours of \TeX-based products. Even a fancy and friendly, {\smc wysiwyg} user-interface is not enough. Optical scanners of math\Dash or systems which understand spoken mathematics\Dash are still science fiction. \bluehead The extras \bluetex{} provides as extras to plain {\TeX} facilities for: automatic numbering, cross-referencing for (display) formulas, macros for ^{matrix icons}, an extension of ^|\eqalign| with respect to multi-alignment points, primed summation symbols, arrows for commutative diagrams, ^|\beginmathdemo| and |\endmathdemo| from manmac, and poor man's ^{blackboard bold} and some other special symbols. These extras are introduced via examples. \blueexample Automatic numbering and cross-referencing ^^{formula,\ cross-referencing} ^^{formula,\ automatic numbering} ^^{formula,\ labeled} This is a compatible extension. For the markup of math ^{cross-referencing} insert instead of plain's explicit (reference) number \bitem \noindent^|\ref|, for creation of the number, and \thisverbatim{\emc}|\ref\|, for attaching a name to the automatically generated number, and \bitem ^|\crsref||\|, for cross-referencing. \smallbreak \begindemo %Automatic numbering $$a+b\eqno\ref$$ !yields $$a+b\eqno\ref$$ \enddemo \begindemo %Automatic numbering, and %symbolic cross-referencing $$c*d\eqno\ref\cgl$$ Text, \crsref\cgl !yields $$c*d\eqno\ref\cgl$$ Text, \crsref\cgl \par\noindent \enddemo \exercise And what about forward referencing? \answer This is not possible in a one-pass job. Therefore a note is printed in the margin while proofing. The correct number has to be filled in ultimately. %end answer Handy token variables are ^|\prenum| and ^|\postnum|.\ftn{Courtesy Michael Spivak.} Their contents is inserted before, respectively after, the automatically generated number in \cs{ref} and \cs{crsref}. Because of this one can get labels and crossrefs like {\oldstyle13}a, or enclosing numbers by parenthesis. The latter are the defaults of these token variables. If in such a case the formula counter must keep its value, provide |\advancefalse|. \exercise How can we retain the number, and suffix a letter, as label of a formula to come? \answer Provide \cs{advancefalse}, and |\postnum{a)}|. \blueexample Matrix icons Useful icons concern the matrices: rectangular, via ^|\icmat|, triangular (lower left and upper right), via ^|\icllt| or ^|\icurt|, and upper Hessenberg, via ^|\icuh|. The arguments are dimensionless numbers. The first argument reflects the vertical size, and the second the horizontal size. In case of \cs{icuh} the second argument is the Hessenberg bandwidth and the third is the difference between the first and the second. \begindemo \unitlength1ex $$\icmat44\kern\unitlength\icllt44= \icllt44\icuh413\qquad \hbox{AL}=\hbox{LH}$$ !yields \unitlength1ex $$\icmat44\kern\unitlength\icllt44= \icllt44\icuh413\qquad \hbox{AL}=\hbox{LH}$$ \enddemo \exercise Another matrix factorization reads \begincenterverbatim $$\icmat63=\icmat63\kern\unitlength \icurt63\qquad\hbox{A}=\hbox{QR}$$ !endcenterverbatim When used together with the example above, align on the =-signs, that is, on the =-sign in the icons and on the =-sign in the formulas. \answer Use \cs{eqalign} as follows. \beginverbatim $$\unitlength1ex \eqalign{ \icmat44\kern\unitlength\icllt44={}& \icllt44\icuh413& \qquad \hbox{AL${}={}$LH}\cr \icmat63={}& \icmat63\kern\unitlength\icurt63& \qquad \hbox{\phantom{A}A${}={}$QR}} $$ !endverbatim \blueexample Compatible extension of eqalign % with multiple alignment points ^^|\eqalign| \begindemo $$\eqalign{ \cos(z\sin\theta)={}& J_0(z)& {}+2\sum_{n=1}^\infty J_{2n}(z)\cos2n\theta\cr \sin(z\sin\theta)={}& & {}+2\sum_{n=1}^\infty J_{2n+1}(z)\sin(2n+1)\theta\cr }$$ !yields $$\eqalign{ \cos(z\sin\theta)={}&J_0(z)& {}+2\sum_{n=1}^\infty J_{2n}(z)\cos2n\theta\cr \sin(z\sin\theta)={}& & {}+2\sum_{n=1}^\infty J_{2n+1}(z)\sin(2n+1)\theta\cr }$$ \enddemo \exercise Why is the empty formula used in the markup? \answer The empty formula $\{\}$ is used to coerce the + to behave as a dyadic operator, and the = to behave similarly. In other words to yield the correct spacing. \blueexample Macros for showing math markup and the result ^|\beginmathdemo| (and variants) and |\endmathdemo|, are used in the \TB{} script, {\oldstyle444}--{\oldstyle466}, for indented display Math, see \TB{} chapters {\oldstyle16}--{\oldstyle19}.\ftn{There is only one second part macro for all these cases. Its replacement text is modified into \cs{crcr}\cs{egroup}\$\$.} ^^|\begindemo|^^|\yields| They are used to typeset the marked up copy and the typeset result side-by-side. The user does not have to bother about the template for the alignment display used. The functionality provided is similar, but a little restricted, to the (\LaTeX) styles for switching from one-column to two-column format and vice versa. But, \dots\thinspace it is much simpler and more efficient\Dash IMHO with all respect\Dash because it does not entail OTR processing. \thisverbatim{\catcode`\|=12 } \begindemo %TeXbook 128 \beginmathdemo \it Input&\it Output\cr \noalign{\vskip2pt} |$x^2$|&x^2\cr \endmathdemo !yields \beginmathdemo \it Input&\it Output\cr \noalign{\vskip2pt} |$x^2$|&x^2\cr \endmathdemo \enddemo \thisverbatim{\catcode`\|=12 } \begindemo %TeXbook 139 \begindisplaymathdemo |$$x+y^2\over k+1$$|& x+y^2\over k+1\cr \noalign{\vskip2pt} |$${x+y^2\over k}+1$$|& {x+y^2\over k}+1\cr \endmathdemo !yields \begindisplaymathdemo |$$x+y^2\over k+1$$|& x+y^2\over k+1\cr \noalign{\vskip2pt} |$${x+y^2\over k}+1$$|& {x+y^2\over k}+1\cr \noalign{\vskip-1pt} \endmathdemo \enddemo Remark. Note that we have to supply the input and the output, due the \TeX's rigidness of the category codes once assigned. \blueexample Poor man's blackboard bold and some special symbols ^^{blackboard bold} Now and then other symbols than those provided in the font tables of Appendix~F of \TB{} are needed.\ftn{Generally, non-standard fonts are already available somewhere. For math consult AMS.} These can be constructed approximately. {\gutter4em \def\boxit#1{\vbox{\hrule\hbox{\vrule #1\vrule}\hrule}} \begindemo $$\halign{#\hfil\quad& \hfil#\hfil\cr natural numbers &$\IN$ \cr integers &$\Z$ \cr rational numbers &$\Q$ \cr reel numbers &$\R$ \cr and complex numbers&$\C$ \cr next to\cr greater or less &$\gtrless$\cr external tensor product& $\boxtimes$\cr}$$ !yields $$\def\IN{{\rm I\kern-.5ex N}} \halign{#\hfil\quad&\hfil#\hfil\cr natural numbers &$\IN$ \cr integers &$\Z$ \cr rational numbers &$\Q$ \cr reel numbers &$\R$ \cr and complex numbers&$\C$ \cr next to\cr greater or less &$\gtrless$\cr external tensor product& $\boxtimes$\cr}$$ \enddemo} \cs{IN}, \cs{Z}, et cetera are incorporated in \bluetex. \exercise On the \TeX-NL network there was a request for the pro mille token. How to get it? \answer It is in the wasy font. A poor man's version is an open problem as yet, because the lower 0 is neither 5pt, nor 6pt, and therefore the symbol can't be built from \% and an appropriate sized 0. A very, very poor man's version reads |\%\lower.2ex\hbox{\fiverm 0}|, in fact unacceptible. Building it from \cs{frac}, |\frac0/{00}|, is different from \%. \bluehead Use Many ingredients are supplied by plain. It is just a matter of what-and-how, what to use from the wealth offered. It has all to do with what the script should look like in print {\em within the context}. In the sequel some more math markup will be shown, not restricted to markup tags from \bluetex{}. A classical example is the markup for the various uses of O. Noteworthy is further that punctuation symbols are also used with spacing before them, ditto for the vertical bars and the backslash. The size of delimiters is dependent on the context, which can't be completely automated. The variants can be obtained via special markup, for example via \bitem ^{coercion macro}s (to guide \TeX{} with respect to spacing before and after, for example via \cs{mathdelimiter}, or to positioning of embellishments below and on top, for example via \cs{mathop}) \bitem the use of the ^{empty formula}, $\{\}$, to coerce binary behaviour of the operator \bitem macros to impose the size of delimiters (\cs{biggl} et cetera) \bitem special control sequences (like \cs{colon}). \smallbreak \bluesubhead Plain's display maths Most displays belong to one of the categories given below. \blueexample A labeled formula in display Spaces are neglected in math mode. ^^{formula,\ labeled} The kern |\,| is needed to coerce the correct spacing. \begindemo $$\sin2x=2\sin x\,\cos x \eqno({\rm TB186})$$ !yields $$\sin2x=2\sin x\,\cos x \eqno({\rm TB186})$$ \enddemo \blueexample Formula hyphenation; shifting of lines A hyphenated formula via \cs{displaylines}. ^^{formula,\ hyphenation} With the use of \cs{hfill} we can shift lines to the left or right. \begindemo $$\displaylines{F(z)= a_0+{a_1\over z}+{a_2\over z^2} +\cdots+{a_{n-1}\over z^{n-1}} +R_n(z),\hfill\cr \hfill n=0,1,2,\dots\,,\cr F(z)\sim\sum_{n=0}^\infty a_nz^{-n},\quad z\to\infty \hfill\llap{(TB ex19.16)}}$$ !yields $$\displaylines{F(z)= a_0+{a_1\over z}+{a_2\over z^2} +\cdots+{a_{n-1}\over z^{n-1}} +R_n(z),\hfill\cr \hfill n=0,1,2,\dots\,,\cr F(z)\sim\sum_{n=0}^\infty a_nz^{-n},\quad z\to\infty \hfill\llap{(TB ex19.16)}}$$ \enddemo \blueexample Alignment and centered labeling \begindemo $$\eqalign{\cos2x &=2\cos^2x-1\cr &=\cos^2x-\sin^2x} \eqno({\rm TB193})$$ !yields $$\eqalign{\cos2x &=2\cos^2x-1\cr &=\cos^2x-\sin^2x} \eqno({\rm TB193})$$ \enddemo \blueexample Alignment and labels per line \begindemo $$\eqalignno{\cosh2x &=2\cosh^2x-1&({\rm TB192})\cr &=\cosh^2x+\sinh^2x}$$ !yields $$\eqalignno{\cosh2x &=2\cosh^2x-1&({\rm TB192})\cr &=\cosh^2x+\sinh^2x}$$ \enddemo Remark. %In not too narrow columns the last formulas %are both centered. If one wants \cs{eqalignno} to behave like \cs{displaylines}\Dash that is, left-justified\Dash then modify in \cs{eqalignno} the first \cs{tabskip}=\cs{centering} assignation into \cs{tabskip}= \cs{z@skip}. \blueexample Subscripts The depth of a ^{subscript} depends on whether there is a superscript. With a superscript a subscript sinks a little. In order to obtain uniformly placed subscripts the solution is to adjust the following font dimension parameters, see \TB{} {\oldstyle179}. \begindemo \fontdimen16\textfont2=2.7pt \fontdimen17\textfont2=2.7pt $$X_1+Y_1^2=1$$ !yields \fontdimen16\textfont2=2.7pt \fontdimen17\textfont2=2.7pt $$X_1+Y_1^2=1$$ \enddemo \thissubhead{\runintrue} \bluesubhead A snapshot of examples\par borrowed from \TB, to illustrate the need for extra markup. \TB{} chapters {\oldstyle16}\dash{\oldstyle19} contain many examples, well-ordered and appropriately explained. \blueexample Dots and the comma after ^^{dots and the comma after} \begindemo $${\bf S^{\rm-1}TS=dg}(\lambda_1, \ldots\,,\lambda_n)=\bf\Lambda$$ !yields $${\bf S^{\rm-1}TS=dg}(\lambda_1, \ldots\,,\lambda_n)=\bf\Lambda$$ \enddemo \blueexample Summation with limits \begindemo $$\sum_{k=1}^\infty{1\over2^k}=1$$ !yields $$\sum_{k=1}^\infty{1\over2^k}=1$$ \enddemo \exercise In line we usually have subscripts and superscripts. How can we get those? \answer Automatically! \TB{} 144: ` A displayed sum usually occurs with `limits,' i.e., with subformulas that are to appear above and below it. \dots\thinspace According to the normal conventions of mathematical typesetting, \TeX{} will change this to `$\sum_{k=1}^\infty{1\over2^k}=1$' (i.e., without limits) if it occurs in text style rather than in displaystyle.' Explicit control is possible via the control sequences \cs{limits}, respectively \cs{nolimits}. %end answer \blueexample Overlining; accents If there is an example with various markup possibilities, this is the one, although the various O-s comes close. ^^{overlining}^^{accents in math} \begindemo $$\bar z,\ \overline z,\ \bar P,\ \overline P,\ \bar h,\ \hbar,\ \overline{AB}$$ !yields $$\bar z,\ \overline z,\ \bar P,\ \overline P,\ \bar h,\ \hbar,\ \overline{AB}$$ \enddemo \blueexample Square roots \begindemo $$\sqrt{1+\sqrt{1+\sqrt{1+x}}}$$ !yields $$\sqrt{1+\sqrt{1+\sqrt{1+x}}}$$ \enddemo \blueexample Roman texts in math, \TB~{\oldstyle163}; accents ^^{roman texts in math} \begindemo $${f(x+\Delta x)-f(x)\over \Delta x}\to f'(x)\quad {\rm as}\quad\Delta x\to0$$ !yields $${f(x+\Delta x)-f(x)\over \Delta x}\to f'(x)\quad {\rm as}\quad\Delta x\to0$$ \enddemo Remark. \TeX{} uses special conventions for accents in formulas, so the accents in ordinary text and the ^{accents in math} have different markup, \TB~{\oldstyle135}. \blueexample Kerning; positive and negative ^^{kerning; positive and negative} \thisverbatim{\catcode`\!=12 \catcode`\~=0 } \begindemo $$ \int\!f(x)\,dx, \quad \Gamma_{\!2}+\Delta^{\!2},\quad \sum^\infty_{n=-\infty}\! \!\!\cos nt$$ ~yields $$ \int\!f(x)\,dx, \quad \Gamma_{\!2}+\Delta^{\!2}, \quad \sum^\infty_{n=-\infty}\!\!\!\cos nt$$ \enddemo \blueexample Empty formula and subscripting ^^{empty formula and subscripting} \begindemo (\lambda)_2\,{}_2F_1 !yields $$(\lambda)_2\,{}_2F_1$$ \enddemo \blueexample Math operator ^^{math\ operator} \begindemo $$\mathop{\hbox{\rm Res}}_ {s=e^{i\pi}}f(s)=-e^{i\pi z}$$ !yields $$\mathop{\hbox{\rm Res}}_ {s=e^{i\pi}}f(s)=-e^{i\pi z}$$ \enddemo \blueexample Colon markup; punctuation vs.\ operator ^^{colon markup} \begindemo $$f\colon A\to B,\quad \{x:x>5\}$$ !yields $$f\colon A\to B,\quad \{x:x>5\}$$ \enddemo \blueexample Context-dependent size \begindemo $$\bigl\!vrt\,\alpha(\sqrt {\mathstrut a}+\sqrt {\mathstrut b}\,)\, \bigr\!vrt \leq!vrt\alpha!vrt\, \bigl\!vrt\sqrt {\mathstrut a}+\sqrt {\mathstrut b}\, \bigr\!vrt$$ !yields $$\bigl\Vert\,\alpha(\sqrt{\mathstrut a}+ \sqrt{\mathstrut b}\,)\,\bigr\Vert \leq\vert\alpha\vert\, \bigl\Vert\sqrt{\mathstrut a}+ \sqrt{\mathstrut b}\,\bigr\Vert$$ \enddemo It is tempting to insert a multiplication dot. Don't! \blueexample Vertical bars, \TB{} {\oldstyle146}, {\oldstyle147}, ex{\oldstyle18}.{\oldstyle21} \begindemo $$\big\{\,x^3\bigm\vert h(x)\in \{-1,0,+1\}\,\bigr\}$$ !yields $$\bigl\{\,x^3\,\bigm\vert\,h(x)\in \{-1,0,+1\}\,\bigr\}$$ \enddemo \blueexample Halves variety \TB{} ex{\oldstyle11}.{\oldstyle6}, ex{\oldstyle19}.{\oldstyle2} Essential is the use of \cs{textstyle}. \begindemo $$D^\lambda_0(z)= 4a_\lambda\, z\,{}_2F_1(% \textstyle \lambda+{1\over2},{1\over2}; {3\over2};z)$$ %Typographer's 1/2 Typographer's $\fracdek1/2$, (recipes), which works better than a mathematician's $1\over2$ !yields $$D^\lambda_0(z)= 4a_\lambda\, z\,{}_2F_1(\textstyle\lambda+{1\over2},{1\over2}; {3\over2};z)$$ Typographer's $\fracdek1/2$, (recipes), which works better than a mathematician's $1\over2$ \enddemo \blueexample Under and overbraces Subtle use of fonts, and \cs{mathstrut} to enforce size. For under and over parentheses see TTN 3.4. ^^{underbraces}^^{overbraces} \begindemo $$\{\underbrace{\overbrace {\mathstrut a,\ldots,a}^ {k\;a\mathchar`'\rm s}, \overbrace{\mathstrut b,\ldots ,b}^{l\;b\mathchar`'\rm s}} _{k+l\rm\;elements}\}$$ !yields $$\{\underbrace{\overbrace{\mathstrut a, \ldots,a}^{k\;a\mathchar`'\rm s}, \overbrace{\mathstrut b,\ldots,b} ^{l\;b\mathchar`'\rm s}} _{k+l\rm\;elements}\}$$ \enddemo \blueexample Diagonal dots, coercions, \TB{} ex{\oldstyle18}.{\oldstyle45} ^^{diagonal dots} \begindemo $$2\uparrow\uparrow k \mathrel{\mathop=^{\rm def}} 2^{2^{2^{\cdot^{\cdot^ {\cdot^2}}}}}\vbox {\hbox{$\Big\}\scriptstyle k$} \kern0pt}$$ !yields $$2\uparrow\uparrow k\mathrel{\mathop= ^{\rm def}} 2^{2^{2^{\cdot^{\cdot^{\cdot^2}}}}} \vbox{\hbox{$\Big\}\scriptstyle k$} \kern0pt}$$ \enddemo \exercise What is the function of the \cs{kern}0pt? \answer To set the curly brace on the baseline. \exercise Can the \cs{cdot} be replaced by just a period? \answer It looks like it. Used within the picture environment I stumbled on lack of scaling invariance for the latter case?!? As far as I see it now the \cs{cdot} yields nicer result anyway. Because of the explicit \cs{Big} the above markup is not scaling invariant. \blueexample Undoing mathsurround space \begindemo $2{\times}3$-matrix !yields \hfil$2{\times}3$-matrix \enddemo \blueexample All those O-s \begindemo $\emptyset$, (the empty set) $f\circ g\colon x\mapsto f\bigl(g(x)\bigr)$, (composition), and order symbols $o(h^2)$, $O(h^2)$. !yields \par $\emptyset$, {(the empty set)}, \par $f\circ g\colon x\mapsto f\bigl(g(x)\bigr)$ (composition), \par and the order symbols $o(h^2)$ and $O(h^2)$ \enddemo \blueexample Set difference vs.\ cosets ^^{set difference}^^{cosets} \begindemo $A\setminus A=\emptyset, \hbox{and the cosets of $G$ by $H$:\ }G\backslash H$ !yields $A\setminus A=\emptyset, \hbox{and the cosets of $G$ by $H$:\ } G\backslash H$ \enddemo \blueexample The Cardano solution to third-order equation \begindemo %x^3+px=q, p,q\ge0 $$\root3\of{\sqrt{p^3/27-q^2/4}+ q/2}-\root3\of{\sqrt{p^3/27+ q^2/4}-q/2}$$ !yields $$\root3\of{\sqrt{p^3/27-q^2/4}+q/2}- \root3\of{\sqrt{p^3/27+q^2/4}-q/2}$$ \enddemo \blueexample Derivatives The problem is the three dotted derivative, ^^{derivatives} \TB~{\oldstyle136}. \begindemo $$\dot y\,\ddot y\, \skew3\dot{\ddot y}\quad y'\,y''\,y''' \quad \partial_xy\,\partial_x^2y\, \partial_x^3y$$ !yields $$\dot y\,\ddot y\, \dot{\ddot y\kern2pt}\quad y'\,y''\,y''' \quad \partial_xy\,\partial_x^2y\, \partial_x^3y$$ \enddemo \blueexample Bessel equation ^^{Bessel equation} \begindemo $$z^2w''+zw'+(z^2-\nu^2)w=0$$ solutions: $J_{\pm\nu}(z)$, $Y_{\pm\nu}(z)$, $H_\nu^{(1)}(z)$, $H_\nu^{(2)}(z)$ !yields $$z^2w''+zw'+(z^2-\nu^2)w=0$$ solutions: $J_{\pm\nu}(z)$, $Y_{\pm\nu}(z)$, $H_\nu^{(1)}(z)$, $H_\nu^{(2)}(z)$ \enddemo \blueexample Primed summation symbols and split formula Subtle use of the prime and the right font. Nice is the nested use of the coercions \cs{mathop} and \cs{mathrel}. A minor detail is to preserve the dyadic character of the + in the last term. \cs{acclap} is incorporated in \bluetex. See \TB{} ex{\oldstyle18}.{\oldstyle44}. \begindemo $$\displaylines{ \mathop{{\sum}\acclap'}_{k=0}^n a_kT_k(x) \mathrel{\mathop=^{\rm def}} .5\kern1pt a_0+a_1 x+a_2T_2(x)+ \cdots \hss\cr \hfill{}+a_nT_n(x)}$$ !yields $$\displaylines{ \mathop{{\sum}\acclap'}_{k=0}^n a_kT_k(x)\mathrel{\mathop=^{\rm def}} .5\kern1pt a_0+a_1 x+a_2T_2(x)+\cdots \hss\cr \hfill{}+a_nT_n(x)}$$ \enddemo \exercise How can we prevent the line distance from growing larger than the regular value? \answer Give the summation symbol depth 0. \blueexample Hypergeometric function ^^{hypergeometric function} Subtle subscripting, size of parentheses, and positioning of arguments. \begindemo $$M_n(z)={}_{n+1}F_n\Bigl({k+a_0, \atop\phantom{kc_1}} {k+a_1,\dots,k+a_n \atop k+c_1,\dots,k+c_n};z\Bigr) $$ !yields $$M_n(z)={}_{n+1}F_n\Bigl({k+a_0, \atop\phantom{kc_1}} {k+a_1,\dots,k+a_n \atop k+c_1,\dots,k+c_n};z\Bigr) $$ \enddemo \exercise Why has the \cs{phantom} argument |kc_1|? \answer It could have been anything representative for the lower part. With the k and the subscript in the \cs{phantom} we are sure that the vertical positioning will be OK. %end answer \blueexample From \TB{} {\oldstyle177}, (p)matrix as formula part. % proclaim is used too \begindemo \proclaim Definition. $x$ is called an eigenvector with eigenvalue $\lambda$ of the matrix $$A=\pmatrix{ a_{11}&a_{12}&\ldots&a_{1n}\cr a_{21}&a_{22}&\ldots&a_{2n}\cr \vdots&\vdots&\ddots&\vdots\cr a_{n1}&a_{n2}&\ldots&a_{nn}\cr}$$ if $Ax=\lambda x$. \par !yields \proclaim Definition. $x$ is called an eigenvector with eigenvalue $\lambda$ of the matrix $$A=\pmatrix{ a_{11}&a_{12}&\ldots&a_{1n}\cr a_{21}&a_{22}&\ldots&a_{2n}\cr \vdots&\vdots&\ddots&\vdots\cr a_{n1}&a_{n2}&\ldots&a_{nn}\cr}$$ if $Ax=\lambda x$. \enddemo%blank line is necessary \blueexample Split equation and context-sized delimiters \begindemo From Swanson (1986, Section 3.3 Math in Display) Because it is a large formula I used \displaylines. For the integral we need \nolimits to inactivate the default placement of limits. Furthermore, there is subtle use of subscripting and delimiters of varying sizes. Finally the shifting of parts has to handled corrrectly. See the script for the details. !yields $$\displaylines{ \int\nolimits_U\delta(I)\mu(I) \leq{}\hfill\cr \quad{}\sum_{{\cal D}} \sum_{{\cal D}_{I'}} \biggl[\int\nolimits_J \alpha(J')\mu(J')-\alpha(J)\mu(J) \hfill\cr \hfill {}-\int\nolimits_J [\{s(\alpha\eta)(J')\} /\eta(J')]\mu(J')\biggr]\cr \quad{}+\biggl[ \sum_{{\cal D}} \sum_{{\cal D}_{I'}} |\alpha(J)-[\{s(\alpha\eta)(J)\} /\eta(J)]|\mu(J)\biggr]\hfill\cr \hfill {}\times\biggl[ \sum_{{\cal D}} \sum_{{\cal D}_{I'}} |\alpha(J)-[\{s(\alpha\eta)(J)\} /\eta(J)]|\eta(J)\biggr] \cr} $$ \enddemo \blueexample Rhombus scheme ^^{rhombus\ scheme} \begindemo The idea is to align vertically. Pseudo markup reads \setbox\ru={} \setbox\rl={<\ line>} $$\halign{