Subject: mailing-list for TeXmacs Users
List archive
From : Michael Shea <address@hidden>- To: Rudolf Sykora <address@hidden>
- Cc: texmacs-users <address@hidden>
- Subject: Re: [TeXmacs] equivalent to kbordermatrix?
- Date: Tue, 5 Dec 2017 15:38:01 -0600
Here is a first approximation solution for you.
- Create a centered table (alt-t) inside a math environment . For reference I label the cells of this table as below.
- Cell 1 will be left blank, put you matrix in cell 4. If your matrix has dimensions , then put a centered table in cell 2 for your column labels and a centered table in cell 3 for your row labels.
- Notice the row labels are no problem, but the column labels are not aligned with the matrix. This is because the two tables have differing automatically generated column widths. If we set the cell width for all cells in the matrix to 1.5fn we can get them aligned
- This method has the disadvantage of the user having to experiment with cell widths in the matrix or the column label table. For instance below, the matrix cells widths are set to automatic and the column label table widths to 2.5fn.
I am not sure if there is a way to write a macro of this. I am not sure if there is a way to determine and store the max cell width in a table and use that info to set the cell widths in another table.
Any ideas out there?
On Tue, Dec 5, 2017 at 8:37 AM, Rudolf Sykora <address@hidden> wrote:
Hello,
is there a reasonably easy way to typeset a matrix with a "border" like this:
https://tex.stackexchange.com/questions/59517/label-rows-of-a-matrix-by-characters
?
Thanks
Ruda
<TeXmacs|1.99.5> <style|generic> <\body> Original <math|5\<times\>5.> <\equation*> <tabular*|<tformat|<table|<row|<cell|>|<cell|<tabular*|<tformat|<table|<row|<cell|c<rsub|1>>|<cell|c<rsub|2>>|<cell|c<rsub|3>>|<cell|c<rsub|4>>|<cell|c<rsub|5>>>>>>>>|<row|<cell|<tabular*|<tformat|<table|<row|<cell|r<rsub|1>>>|<row|<cell|r<rsub|2>>>|<row|<cell|r<rsub|3>>>|<row|<cell|r<rsub|4>>>|<row|<cell|r<rsub|5>>>>>>>|<cell|<tabular*|<tformat|<table|<row|<cell|<matrix|<tformat|<table|<row|<cell|1>|<cell|0>|<cell|0>|<cell|0>|<cell|0>>|<row|<cell|0>|<cell|1>|<cell|0>|<cell|0>|<cell|0>>|<row|<cell|0>|<cell|0>|<cell|1>|<cell|0>|<cell|0>>|<row|<cell|0>|<cell|0>|<cell|0>|<cell|1>|<cell|0>>|<row|<cell|0>|<cell|0>|<cell|0>|<cell|0>|<cell|1>>>>>>>>>>>>>>> </equation*> Matrix cell widths set to 1.5fn, column table widths automatic. <\equation*> <tabular*|<tformat|<table|<row|<cell|>|<cell|<tabular*|<tformat|<table|<row|<cell|c<rsub|1>>|<cell|c<rsub|2>>|<cell|c<rsub|3>>|<cell|c<rsub|4>>|<cell|c<rsub|5>>>>>>>>|<row|<cell|<tabular*|<tformat|<table|<row|<cell|r<rsub|1>>>|<row|<cell|r<rsub|2>>>|<row|<cell|r<rsub|3>>>|<row|<cell|r<rsub|4>>>|<row|<cell|r<rsub|5>>>>>>>|<cell|<tabular*|<tformat|<table|<row|<cell|<matrix|<tformat|<cwith|1|-1|1|-1|cell-width|1.5fn>|<cwith|1|-1|1|-1|cell-hmode|exact>|<table|<row|<cell|1>|<cell|0>|<cell|0>|<cell|0>|<cell|0>>|<row|<cell|0>|<cell|1>|<cell|0>|<cell|0>|<cell|0>>|<row|<cell|0>|<cell|0>|<cell|1>|<cell|0>|<cell|0>>|<row|<cell|0>|<cell|0>|<cell|0>|<cell|1>|<cell|0>>|<row|<cell|0>|<cell|0>|<cell|0>|<cell|0>|<cell|1>>>>>>>>>>>>>>> </equation*> \; Matrix cell widths set to automatic, column table widths set to 2.5fn. <\equation*> <tabular*|<tformat|<table|<row|<cell|>|<cell|<tabular*|<tformat|<cwith|1|-1|1|-1|cell-width|2.5fn>|<cwith|1|-1|1|-1|cell-hmode|exact>|<table|<row|<cell|c<rsub|1>>|<cell|c<rsub|2>>|<cell|c<rsub|3>>>>>>>>|<row|<cell|<tabular*|<tformat|<table|<row|<cell|r<rsub|1>>>|<row|<cell|r<rsub|2>>>|<row|<cell|r<rsub|3>>>>>>>|<cell|<tabular*|<tformat|<table|<row|<cell|<matrix|<tformat|<cwith|1|-1|1|-1|cell-width|>|<cwith|1|-1|1|-1|cell-hmode|auto>|<cwith|1|3|1|3|cell-width|>|<cwith|1|3|1|3|cell-hmode|auto>|<table|<row|<cell|100>|<cell|100>|<cell|2343>>|<row|<cell|23>|<cell|10>|<cell|300>>|<row|<cell|51>|<cell|0>|<cell|200>>>>>>>>>>>>>>> </equation*> \; \; \; \; \; <\equation*> \; </equation*> </body> <\initial> <\collection> <associate|page-type|letter> <associate|preamble|false> </collection> </initial>
- [TeXmacs] equivalent to kbordermatrix?, Rudolf Sykora, 12/05/2017
- Re: [TeXmacs] equivalent to kbordermatrix?, Michael Shea, 12/05/2017
Archive powered by MHonArc 2.6.19.