In latex, the \begin{align} accept multicolumn where “&” is used to separate each column. While in texmacs, I did find an insert column button, however, it does not work when I press it. I am using 2.1.2 in windows. Is it a bug?
How to add column in align?
Hi @Jie and welcome to the forum.
I looked at the definition of align
and it contains the table formatting
<twith|table-min-cols|2>|<twith|table-max-cols|2>
so this tells that it is intended behaviour.
The align
macro is below
<assign|align*|<\macro|body>
<\equations-base>
<tformat|<twith|table-hyphen|y>|<twith|table-width|1par>|<twith|table-min-cols|2>|<twith|table-max-cols|2>|<cwith|1|-1|1|1|cell-lsep|0spc>|<cwith|1|-1|1|1|cell-rsep|0.5spc>|<cwith|1|-1|-1|-1|cell-rsep|0spc>|<cwith|1|-1|-1|-1|cell-lsep|0spc>|<cwith|1|-1|1|-1|cell-bsep|0sep>|<cwith|1|-1|1|-1|cell-tsep|0sep>|<cwith|1|-1|1|1|cell-hpart|1>|<cwith|1|-1|-1|-1|cell-hpart|1>|<cwith|1|-1|1|1|cell-halign|r>|<cwith|1|-1|1|1|cell-hyphen|b>|<cwith|1|-1|-1|-1|cell-halign|l>|<cwith|1|-1|-1|-1|cell-hyphen|t>|<cwith|1|-1|1|-1|cell-block|no>|<arg|body>>
</equations-base>
</macro>>
Changing it to three or more columns by modifying <twith|table-max-cols|2>
into for example <twith|table-max-cols|3>
I think is easy if one fixes manually the alignment of the columns, a bit more complicated if one wants to automatically fix the alignment of the central columns as well.
May be I know how to do that, but let us first see if anyone else has better ideas.
Said this, I think the “preferred” way to align equations in TeXmacs is with eqnarray*
, but that also looks like to be able to have only one alignment point.
Using a tabular
or choice
inside an equation can create complex arrangement of equations. However, one can not number individual equations. One can do that in an eqnarray
or eqnarray*
.
BTW, anyone knows the difference of those two tags? From the source I see eqnarray
is defined from eqnarray*
like this
But there seems no difference in the final output.