mailing-list for TeXmacs Users

Text archives Help


Re: Improving eqnarray


Chronological Thread 
  • From: Adam Warner <address@hidden>
  • To: address@hidden
  • Subject: Re: Improving eqnarray
  • Date: 22 Feb 2002 02:24:36 +1300

On Thu, 2002-02-21 at 11:11, David Allouche wrote:

Overall a fantastic reply thanks David.

> On Tuesday 19 February 2002 08:29, Adam Warner wrote:
>
> > So I set about editing eqnarray in basic.ts to eliminate this extra
> > spacing (trial and error at first and then I found this critical piece
> > of information: http://alqua.com/tmresources/internal%20table%20markup).
>
> Thanks. Actually I had to reverse engineer the source code to produce this
> doc.

Thanks. It's a pity that the source code isn't more liberally commented.
That minor point said after using TeXmacs for a number of days I think
many of the design decisions are amazing (it's a very efficient
environment) and it is one of the most stable programs I have come
across. To not have TeXmacs crash on me once is remarkable (particularly
since this is a pre-1.0 release).

I keep finding functionality. After squinting at the screen for a couple
of days I discovered the deceptively named "shrinking factor". Just a
couple of hours ago I found I could double click a footnote and return
to the text. And there are lots of additional minor florishes that make
it a pleasure to work with.

> > The result is an equation with spacing that looks very similar to a
> > standard non-tabular equation. This is the original piece of
> > <assign|eqnarray*>:
> >
> > <cwith|1|-1|1|1|cell lsep|0spc>|<cwith|1|-1|-1|-1|cell rsep|0spc>
> >
> > And this is the replacement:
> >
> > <cwith|1|-1|2|2|cell lsep|-0.15fn>|<cwith|1|-1|2|2|cell rsep|-0.15fn>
> >
> > What this does is reduce the left and right margins around the second
> > (centre) cell by -0.15fn.
> >
> > After this change you will not see the difference between a one line
> > equation and a one line eqnarray.
>
> I think what you actually want is more along the lines of
>
> <cwith|1|-1|1|-1|cell lsep|0>|<cwith|1|-1|1|-1|cell rsep|0>
>
> Even if that do not make any essential difference, it is more robust and
> more
> clean.

This "solution" is wrong David. If you can come up with a more robust
one then good. But you will find your cells are too close together
compared to a standard equation. It took trial and error to get the
spacing right.

If you check an `equation' and an `equations' with the same formula and
change their font sizes or even the fonts themselves you will see that
my modification appears to be robust (the equation spacing is virtually
indistinguishable).

Thanks for all the other tips (e.g. putting a custom menu in
~/.TeXmacs/...)

> The trick is to make columns 2 and 6 be decorations of columns 1 and 7
> (resp.) So they will not be editable.
>
> <assign|fivecoleqnarray*|<macro|body|\
> <with|\
> paragraph mode|center|\
> mode|math|\
> formula style|true|\
> <surround|\
> <format|no page break before><vspace*|0.5fn>|\
> <vspace|0.5fn><format|no indentation after>|\
> <tformat|\
> <twith|table hyphen|y>|\
> <twith|table width|1par>|\
> <twith|table min cols|5>|\
> <twith|table max cols|5>|\
> <cwith|1|-1|1|-1|cell bsep|0sep>|\
> <cwith|1|-1|1|-1|cell tsep|0sep>|\
> <cwith|1|-1|1|-1|cell lsep|0>|\
> <cwith|1|-1|1|-1|cell rsep|0>|\
> <cwith|1|-1|1|1|cell halign|l>|\
> <cwith|1|-1|1|1|cell width|0>|\
> <cwith|1|-1|1|1|cell decoration|<tformat|\
> <cwith|1|1|2|2|cell hpart|1>|\
> <table|<row|<tmarker>|<cell|>>>>>|\
> <cwith|1|-1|-1|-1|cell halign|r>|\
> <cwith|1|-1|-1|-1|cell width|0>|\
> <cwith|1|-1|-1|-1|cell decoration|<tformat|\
> <cwith|1|1|1|1|cell hpart|1>|\
> <table|<row|<cell|>|<tmarker>>>>>|\
> <cwith|1|-1|2|2|cell halign|r>|\
> <cwith|1|-1|3|-3|cell halign|c>|\
> <cwith|1|-1|-2|-2|cell halign|l>|\
> <arg|body>>>>>>

This is great thanks. The zero width middle cells appear to make it
difficult to navigate the middle cells. But I should be able to change
that. I really appreciated the help David.

Regards,
Adam





Archive powered by MHonArc 2.6.19.

Top of page