diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /systems/tex-extensions/clasen/math/math.tex |
Initial commit
Diffstat (limited to 'systems/tex-extensions/clasen/math/math.tex')
-rw-r--r-- | systems/tex-extensions/clasen/math/math.tex | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/systems/tex-extensions/clasen/math/math.tex b/systems/tex-extensions/clasen/math/math.tex new file mode 100644 index 0000000000..1ce32accbc --- /dev/null +++ b/systems/tex-extensions/clasen/math/math.tex @@ -0,0 +1,130 @@ +\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&|\mathstyle|\\ + \midrule + none& \llap{${}<{}$}0\\ + D&0\\ + D'&1\\ + T&2\\ + T'&3\\ + S&4\\ + S'&5\\ + SS&6\\ + SS'&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} + |