Steven Harms (stharms) wrote:
Hello All,
LyX is great! It's helped me so much already! Regrettably, as you
learn the power of LyX, the more you can be obsessive about tiny little
details, so here's mine.
I'm doing some math homework and I've been laying out my homework
brilliantly with the Insert->Math->align. The two cool blue 'type-in'
areas pop up and I enter "x+y" in the first and "=z" in the 2nd. With
CTRL+M I can add more blue pairs and that's how I lay out my equations (
is that the LyX Way (tm) ? ).
But on some homework we're obligated to do a "check". What I would like
to do is have:
(it's painful to re-lay this out after having the power of LyX ;) )
14.
Problem Check {titles should be centered over coulmn}
__________________________________
|x+5=11 | x+5=11{underline} |
| x=11-5 | 6+5= |
| x=6 | 11 {underline} |
----------------------------------
Easy if you don't need it framed exactly like that:
Insert two minipages side by side. Each should be smaller than
50% of line width, obviously.
Use centered paragraphs in both minipages. On the first line,
put your title as standard text. Then press enter, and in the
next (centered) paragraph, insert your aligned math.
You will now have the word "Problem" nicely centered over
your math, and the word "Check" nicely centered over the check.
There are many ways to vary spacing between the minipages,
should you need that. Reasonably new versions of lyx also
allow a frame around the minipage if you want that.
Another way is to use a table, and insert the aligned
environment into that. Framing then becomes a matter of
getting the table borders right. Which is possible, but cumbersome
as it involves turning off the vertical borders as well as unwanted
horizontal borders, then turning "multicolumn" on for the "Problem"
and "Check" cells, and then turn the vertical borders on again to get
exactly the border layout in your example.
Lyx 1.5 had no problems putting an aligned environment in a table,
I got this latex code:
\begin{tabular}{|c|c|}
\multicolumn{1}{c}{Problem} & \multicolumn{1}{c}{Check}\tabularnewline
\hline
$\begin{aligned}x+5 & =11\\
x & =11-5\\
x & =6\end{aligned}
$ & $\begin{aligned}x+5 & =11\\
6+5 & =11\\
11 & =11\end{aligned}
$\tabularnewline
\hline
\end{tabular}
Helge Hafting