[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
14.6 @math
: Inserting Mathematical Expressions
You can write a short mathematical expression with the @math
command. Write the mathematical expression between braces, like this:
@math{(a + b)(a + b) = a^2 + 2ab + b^2}
This produces the following in Info and HTML:
(a + b)(a + b) = a^2 + 2ab + b^2
The @math
command has no special effect on the Info and HTML
output. makeinfo
expands any @-commands as usual,
but it does not try to produce good mathematical formatting in any
way.
However, as far as the TeX output is concerned, plain TeX
mathematical commands are allowed in @math
, starting with
‘\’, and the plain TeX math characters like ‘^’ and
‘_’ are also recognized. In essence, @math
drops you
into plain TeX math mode.
This allows you to conveniently write superscripts and subscripts (as in the above example), and also to use all the plain TeX math control sequences for symbols, functions, and so on, and thus get proper formatting in the TeX output, at least.
It’s best to use ‘\’ instead of ‘@’ for any such
mathematical commands; otherwise, makeinfo
will complain.
On the other hand, makeinfo
allows input with matching (but
unescaped) braces, such as ‘k_{75}’, although it complains
about such bare braces in regular input.
Here’s an example:
@math{\sin 2\pi \equiv \cos 3\pi}
which looks like the input in Info and HTML:
\sin 2\pi \equiv \cos 3\pi
Since ‘\’ is an escape character inside @math
, you can
use @\
to get a literal backslash (\\
will work in
TeX, but you’d get the literal two characters ‘\\’ in Info).
@\
is not defined outside of @math
, since a ‘\’
ordinarily produces a literal (typewriter) ‘\’. You can also use
@backslashchar{}
in any mode to get a typewriter backslash.
See section Inserting ‘\’ with @backslashchar{}
.
For displayed equations, you must at present use TeX directly (see section Raw Formatter Commands).
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on October 2, 2013 using texi2html 5.0.