texmacs-dev
[Top][All Lists]
Advanced

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

[Texmacs-dev] Prime problem


From: Nix N. Nix
Subject: [Texmacs-dev] Prime problem
Date: 14 Mar 2003 09:52:40 -0700

Consider the following sequence of events:

type 'X'
(make-rprime "<dag>")
^a

This results in a 'X' with a dag for a prime and an 'a' for an exponent.

Unfortunately, tmtex currently treats these 2 independently, and
produces:

$X^{\daga}$

instead of

$X^{\dag a}$

This is a very sticky problem.  The reason it does this is that the
resulting argument for the ^ operator is not assembled as one list.  For
example, on the main line, typing

\dag<enter>a

results in

$\dag a$

as it should.  The reason for this is that the list ((dag) a) gets sent
to "tmtex-math-spaces", which adds a space after the (dag).  This does
not happen with the exponent case, because the list ((dag) a) gets
assembled otherwise (with "tmtex-prime-list").

As a result, I would like to do the following:
Much the same way as with matching brackets, I would like to make
another pass over the tree before it is parsed.  During this pass, I
would like to concatenate all adjacent rprime and rsup trees into one:

... X (rprime <dag>) (rsup a) ...

becomes

... X (rsup <dag> a)

This is OK, because LaTeX doesn't have the concept of a prime anyway.

Currently, there's a kludge we can use. In the function
tmtex-prime-list, we call

(cons (list '!sup (list (string->symbol (list->string p))) ...

This can be changed to

(cons (list '!sup (list (string->symbol (string-append 
  (list->string p) " ")))

This works fine, except

... X (rprime <dag>) ...

becomes

X^{\dag }

instead of

X^{\dag}

LaTeX doesn't complain about the extra space, but it's unsightly.

If you can think of any other way to conglomerate rprime and rsup
subtrees during the tmtex process, instead of before, please let me
know.  Also, please let me know if you want me to submit the above
mentioned kludge as a patch on savannah.





reply via email to

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