fixed columns in math mode

karl at karl at
Sat Sep 18 20:47:10 CEST 2021

Michael Shell:
> On Fri, 10 Sep 2021 14:22:14 +0200 (CEST)
> karl at wrote:
> > Is there any \makebox-like thing that works in math mode so I can set the
> > contents width, or rather where the next thing will land?
> You are asking for a math mode equivalent of Scott Pakin's eqparbox package:
> i.e., "inter-alignment alignments"
> Using Pakin's approach with math mode (which I haven't actually tried
> myself) you would have to put everything back into math mode within the
> eqparbox's. The big benefit here is that eqparbox would autocalculate the
> reserved width (the maximum width) you need for a given column.

Wery nice, could be something, and running latex twice isn't a problem.
It's like a distributed tabular.

> Whether or not you use simple manual or Pakin-type automatic setting of the
> reserved widths,

Manual is fine for the momenent.

> there is a way to coax IEEEeqnarray to do as you need. The
> trick is to insert a phantom/strut row that reserves the needed width in
> the given columns without otherwise altering the formatting (i.e., we must
> remove any extra vertical spacing caused by this phantom row).

Didn't know about \hbox\hrule, never run tex as is, so I had to look
them up.

I tried your tip and got this result:

So, while the code is easier to read with IEEEeqnarray,
it introduces to much vertical space, and the fourth
column comes out differently, and I still want a tiny bit
more vertical space around the big sqrt.

So, in essence, I think, I guess what I want besides similar
column positions, is something between a $...$ and \[ ... \],
i.e. as in $...$, the math should be closer integrated with
the text, but presented one line a the time like \[...\].

/Karl Hammar

More information about the tex-live mailing list.