[Top][All Lists]

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

Re: real subscripts and superscripts?

From: Per Bothner
Subject: Re: real subscripts and superscripts?
Date: Fri, 28 Nov 2014 11:35:07 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 11/28/2014 11:01 AM, Karl Berry wrote:
Sure, sub/superscripts are most commonly used in math.  Thus @math, as
in @math{e=mc^2}.  I never expected anything else to be used, certainly
not clunky macros.  This is why @math was created in the first place.

Is your proposal really just working around makeinfo not recognizing ^
and _ in math in the first place?

My use case is primarily *not* math - I mainly want subscripts and superscripts.
For example function prototypes:
  (list address@hidden ... address@hidden)
Syntax descriptions:
  list = nil | (address@hidden)
Language names:
  Schema as specified by address@hidden

However, I do have some need for math:
  A quaternion is a number that can be expressed in the form ‘w+xi+yj+zk’,
  where w, x, y, and z are real, and i, j, and k are imaginary units satisfying
  @math{i^2 = j^2 = k^2 = ijk = -1}. The magnitude of a quaternion is defined 
to be its
  Euclidean norm when viewed as a point in @math{R^4}.

I want some sane way of writing i^2 and R^4 so I get tolerably-looking
expressions with superscripts in both TeX andDocBook/HTML.

Having been drafting the documentation, I can say that it feels quite
clean to say "use @sub/@sup for text, @math{^_...} for math".  It's no
problem to implement @sub/@sup being like ^ and _ in math mode and doing
text in text mode, etc., but, I don't know, usage doesn't seem as clear.

If I may dare to generalize a tiny bit -- in principle, I'd rather that
we recognize TeX math in the first place than invent new Texinfo
commands to do the same thing.

In the above example I don't care if I have to write @math{R^4} or 
as long as I don't have to use conditionals, and I get a <sup> when
emitting HTML.

        --Per Bothner
address@hidden   http://per.bothner.com/

reply via email to

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