<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[preprint]{ltugboat}
\usepackage{shortvrb}
\usepackage{url}
\usepackage{booktabs}

\providecommand{\meta}[1]{\ensuremath{\langle\textit{#1}\rangle}}
\makeatletter
\providecommand{\eTeX}{$\m@th\varepsilon$-\TeX}
\makeatother
\hyphenation{pa-ra-me-ter}

\emergencystretch=4mm
\overfullrule=0pt
\title{Extending \TeX's mathematical typography}
\author{Matthias Clasen}
%\address{}
\netaddress{maclas@gmx.de}
\setcounter{page}{1}

\begin{document}
\maketitle
\MakeShortVerb{\|}

\section{Introduction}

One of the reasons why \TeX\ is still in use is that its abilities
in setting mathematical formulas are still unsurmounted. But there
are some nits to pick.

I propose a small set of extensions to \TeX\ to remove some deficiencies
in its handling of formulas.

\section{Implementation}

The implementation is split into a series of change files:

|accent.ch| implements three new primitives for nestable accents and
  under accents. To some extent these can be implemented in \TeX\ itself (see
  \AmSLaTeX), but macro solutions are complicated, slow and error-prone.
  \begin{description}
    \item[]|\mathaccent|\meta{15-bit number}\meta{math field} can now
      grok an extensible recipe at the end of a charlist. The extensible
      recipe is used to construct longer variants of an accent (in analogy
      to growing delimiters).
  \item[]|\nestingmathaccent|\meta{15-bit number}\meta{math field} is
    like |\math|\-|accent|, but it follows a chain of
    |\nesting|\-|math|\-|accent| or |\nesting|\-|math|\-|under|\-|accent|
    primitives to determine its accentee and the appropriate skew.
  \item[]|\mathunderaccent|\meta{15-bit number}\meta{math field}\\
    places an accent \emph{under} the \meta{math field}. It uses the
    \meta{accent}--\meta{accent} kerning to determine the vertical space
    between the \meta{math field} and the \meta{accent} and the
    \meta{skewchar}--\meta{accentee} kerning to determine the appropriate
    skew to the left.
    \item[]|\nestingmathunderaccent|\meta{15-bit number}%
      $\langle$\textit{math}\\\null\hfill\textit{field}$\rangle$\\
      is a variant of |\math|\-|under|\-|accent| which
      respects the nesting of accents.
  \end{description}

|cramp.ch| complements the |\display|\-|style|, \dots,
|\script|\-|script|\-|style| style-changing primitives by
|\cramped|\-|display|\-|style|, \dots, |\cramped|\-|script|\-|script|\-|style|
which change to the cramped styles.

|fraction.ch| continues to improve the math style-handling. It
      adds the following:
      \begin{description}
      \item[]|\mathstyle| is a special readonly integer parameter
        corresponding to the current math style according to the
        following table:

        \begin{tabular}{cc}
          \toprule
          math style&amp;|\mathstyle|\\
          \midrule
          none&amp; \llap{${}&lt;{}$}0\\
          D&amp;0\\
          D'&amp;1\\
          T&amp;2\\
          T'&amp;3\\
          S&amp;4\\
          S'&amp;5\\
          SS&amp;6\\
          SS'&amp;7\\
          \bottomrule
        \end{tabular}

      \item[]|\fraction|\{\meta{math field}\} can be used to surround
        fractions. Its sole purpose is that |\mathstyle| reports the correct
        values in a subformula like |\fraction{...\over...}| while it fails to
        do so in |{...\over...}|.
      \end{description}

|radical.ch| implements the following new primitive:
      \begin{description}
      \item[]|\genradical|\meta{27-bit number}\meta{27-bit number}%
      $\langle$\textit{math}\\\null\hfill\textit{field}$\rangle$\\
      creates a radical with delimiters on both sides. By
        specifiying a nonexisting left delimiter, you can also create a
        right radical.
      \end{description}

\section{Installation}

 The change files are written for \TeX~3.1459. But it should need only
 cosmetic changes to get them to work with other versions of \TeX3.

 To make the change files for \TeX{} work, you have to apply the change file
 |pre.ch| first. I have only tried these files with |web2c|, and
 for that you need to surround the |web2c| change file with |pre-web2c.ch| and
 |post-web2c.ch|.

 All this boils down to the command line

\begin{verbatim}
mv tex.ch tex.ch.orig
tie -c tex.ch tex.web pre.ch accent.ch \
       cramp.ch fraction.ch radical.ch \
       pre-web2c.ch tex.ch.orig \
       post-web2c.ch
\end{verbatim}

 \makesignature

 \bibliographystyle{plain}
 \bibliography{etex}

\end{document}

</pre></body></html>