Subject: mailing-list for TeXmacs Users
List archive
From : Chris Austin <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] tex export/import
- Date: Sat, 11 Feb 2012 21:50:28 +0000
On Tuesday 31 January 2012 14:39:00 François Poulain wrote:
> Hi,
>
> I just started working with Joris on the TeX/LaTeX import/export
> module, for a few weeks.
A very important point for working with tensors with both upper and lower
indices, is to be able to preserve the relative *horizontal* positions of the
indices. For example the Riemann tensor, which is ubiquitous in work on
Einstein gravity, has 4 indices, each of which, independently of the others,
can be either upper or lower, and swapping either its first two indices or
its last two indices is equivalent to multiplying it by -1. So it is
essential to maintain the gap above each lower index and the gap below each
upper index: if indices get swept to the left to fill these gaps, the
resulting expression is undefined.
Neither LaTeX nor TeXmacs has any built-in mechanism for dealing with this,
(so far as I know), so work-arounds have to be used. The standard
work-around in LaTeX, used for example by the Cadabra program, seems to be to
insert an empty pair of braces at each point where the index position has to
switch from upper to lower, or vice versa. For example, to write a Riemann
tensor whose 1st and 3rd indices are lower, and whose 2nd and 4th indices are
upper, we can write, in LaTeX: $ R_a{}^b{}_c{}^d $. However this does not
convert properly to TeXmacs, at least in 1.0.7.10 and earlier versions: the
gaps needed to define the horizontal positions of the indices just vanish.
A work-around I have been using for about 4 years now is, in TeXmacs, to put
\,\! at each point where the index position has to switch from upper to
lower, or vice versa. (\,\! is a space whose total length is 0.) This is
the simplest work-around which I found, after some experiments about 4 years
ago, was maintained uncorrupted on both conversions TeXmacs -> LaTeX and
LaTeX -> TeXmacs. This work-around fortunately still works in 1.0.7.10, but
while it is maintained uncorrupted in the TeXmacs -> LaTeX conversion, it now
gets changed to \hspace{0.25em} \hspace{-0.25em} in the LaTeX -> TeXmacs
conversion. This does no harm apart from lengthening the source file, and it
does not get altered any further on further conversions back to LaTeX then
back to TeXmacs and so on.
However I would like to mention that I am a bit concerned that if the TeXmacs
< - > LaTeX conversions were to become a bit more "intelligent", this very
important zero-length space might simply get deleted.
In general I would like to say that I think TeXmacs is a really wonderful
program that I use very heavily, and I very much appreciate the work of
Joris, François, and the other TeXmacs developers. I hope the forthcoming
TeXmacs meeting is a great success.
Best regards,
Chris
- Re: [TeXmacs] tex export/import, Chris Austin, 02/11/2012
- Re: [TeXmacs] tex export/import, Karl Hegbloom, 02/12/2012
- Re: [TeXmacs] tex export/import, François Poulain, 02/18/2012
Archive powered by MHonArc 2.6.19.