[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A better @math ?
From: |
JT Williams |
Subject: |
A better @math ? |
Date: |
Tue, 27 Mar 2001 13:56:33 -0600 |
User-agent: |
Mutt/1.2.5i |
Hello, a question about @math:
For example, why does @math{h^2_a} generate the same output (`h^2_a')
in the .dvi file as it does in the .info file? The definition of
@math in texinfo.tex (see below) appears to switch in/out of math
mode, but it seems the `$' don't survive long enough to DTRT in TeX.
% @math means output in math mode.
% We don't use $'s directly in the definition of \math because control
% sequences like \math are expanded when the toc file is written. Then,
% we read the toc file back, the $'s will be normal characters (as they
% should be, according to the definition of Texinfo). So we must use a
% control sequence to switch into and out of math mode.
%
% This isn't quite enough for @math to work properly in indices, but it
% seems unlikely it will ever be needed there.
%
\let\implicitmath = $
\def\math#1{\implicitmath #1\implicitmath}
I've experimented with @macro to define my own version of address@hidden'
to DTRT, e.g., `\tex $mathstuff$ \end tex' for non-Info outputs,
but then
Macros containing a command which must be on
a line by itself, such as a conditional,
cannot be invoked in the middle of a line.
so that any replacement @math macro I write cannot be used in-line
as with address@hidden'. So I might as well use conditionals like @iftex
in the first place, and forget about @math.
Or what have I overlooked?
TIA/jt williams
- A better @math ?,
JT Williams <=