bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

real subscripts and superscripts?


From: Per Bothner
Subject: real subscripts and superscripts?
Date: Mon, 17 Nov 2014 15:47:35 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

Currently texinfo only supports subscripts and superscripts in @math,
which are only effective in tex mode.  This is unfortunate since both
HTML and DocBook support them.  Are real subcripts/superscripts planned?

I can see two ways to do it:

(1) Parse @math to extract the ^ and _ characters and turn them into the
correct HTML/DocBook elements. This requiring parsing tex math, which is 
non-trivial.
Also, the result is probably wrong if the raised/lowered text contains actual
text (as supposed to numbers or math symbols).

(2) Introduce new @sub and @sup commands (or @subscript/@superscript if you want
to be more verbose - and follow DocBook).  The effect of (say) @sup{TEXT} would 
be:

In info or plaintext: ^TEXT
In HTML: <sup>TEXT</sup>
In DocBook: <superscript>TEXT</superscript>
In XML: I suggest <sup>TEXT</sup>
In TeX inside @math: ^{TEXT}
In TeX otherwise: use a macro that raises the text and reduces the font-size
--
        --Per Bothner
address@hidden   http://per.bothner.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]