Quantcast
Channel: The Sagittal forum
Viewing all articles
Browse latest Browse all 2

Re: James algebra provides a clever notation for elementary functions

$
0
0
How to typeset the James algebra expressions
The enclosures shown in the preceding post are provided by the <menclose> element of the MathML web standard. They are accessed via the \enclose macro in the MathJax dialect of the LaTeX mathematical typesetting language.

MathJax is installed on this forum. To use LaTeX expressions in posts on this forum, place inline expressions between [latex]...[/latex] or between \(...\). Place display expressions between $$...$$.

Here are the LaTeX definitions used for the four kinds of enclosure in the preceding post:

\def \ex #1{\enclose{top left}{#1} \, }
\def \lo #1{\enclose{bottom left}{#1} \, }
\def \re #1{\enclose{angletop}{#1} \, }
\def \no #1{\enclose{top right}{#1} \, }
\(
\def\ex#1{\enclose{top left}{#1}\,}
\def\lo#1{\enclose{bottom left}{#1}\,}
\def\re#1{\enclose{angletop}{#1}\,}
\def\no#1{\enclose{top right}{#1}\,}
\)

Following those definitions:
\ex{x} gives \( \ex{x} \) for the (natural) exponential of x.
\lo{x} gives \( \lo{x} \) for the (natural) logarithm of x.
\re{x} gives \( \re{x} \) for the reciprocal of x.
\no{p} gives \( \no{p} \) for NOT p.

You can nest and juxtapose them to your heart's content.

To arrange expressions one above the other, like \frac and \dfrac, but with no line, I used \fracnl and \dfracnl, defined as follows:

\def \fracnl #1#2{\genfrac{}{}{0pt}{1}{#1}{#2}}
\def \dfracnl #1#2{\genfrac{}{}{0pt}{0}{#1}{#2}}
\(
\def \fracdl #1#2{\rlap{\raise{.75pt}{\frac{#1}{\phantom{#2}}}}\lower{.75pt}{\frac{\phantom{#1}}{#2}}}\def \dfracdl #1#2{\rlap{\raise{1pt}{\dfrac{#1}{\phantom{#2}}}}\lower{1pt}{\dfrac{\phantom{#1}}{#2}}}\)

You may occasionally need to add space with \, (slosh comma) or \␣ (slosh space), or subtract it with \! (slosh bang). You can add line breaks with \\\\ (slosh slosh). The parenthesised notes were added with {\small\text{(this is a note)}}.

Statistics: Posted by Dave Keenan — Wed Dec 06, 2023 3:11 pm



Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images