* alignment problem in a table
@ 2016-07-19 13:19 Fabrice Couvreur
2016-07-19 15:02 ` Wolfgang Schuster
2016-07-19 15:04 ` Alan BRASLAU
0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Couvreur @ 2016-07-19 13:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2203 bytes --]
Hello,
The third column of matrix is not centered vertically and horizontally.
thank you,
Fabrice
\setupbodyfont[pagella,11pt]
\definemathmatrix
[pmatrix]
[left={\left(\,},right={\,\right)}]
\define[3]\coef{\math{#1_{#2, #3}}\autoinsertnextspace}
\startsetups[table:initialize]
\setupTABLE[offset=0.8ex,width=0.25\textwidth]
\setupTABLE[row][first]
[background=color,backgroundcolor=lightgray]
\setupTABLE[start][align={middle,lohi}]
\stopsetups
\starttext
{\bf Matrices particulières}
\startlinecorrection[blank]
\startmidaligned
\switchtobodyfont[10pt]
\bTABLE[setups=table:initialize]
\bTR
\bTD {\bf Matrice ligne} \\ Dimension \math{\left(1\times p\right)}
\eTD
\bTD {\bf Matrice colonne} \\ Dimension \math{\left(n\times 1\right)}
\eTD
\bTD {\bf Matrice carrée} \\ Dimension \math{\left(n\times n\right)}
\eTD
\bTD {\bf Matrice unité \math{\bi I_n}} \\ Dimension
\math{\left(n\times n\right)} \eTD
\eTR
\bTR
\bTD \startformula
\startpmatrix
\NC \coef{a}{1}{1} \NC \coef{a}{1}{2} \NC \dots \NC
\coef{a}{1}{p}
\stoppmatrix
\stopformula
\eTD
\bTD \startformula
\startpmatrix
\NC \coef{a}{1}{1} \NR
\NC \coef{a}{2}{1} \NR
\NC \dots \NR
\NC \coef{a}{n}{1}
\stoppmatrix
\stopformula
\eTD
\bTD \startformula
\startpmatrix
\NC \coef{a}{1}{1} \NC \coef{a}{1}{2} \NC \dots \NC
\coef{a}{1}{n}\NR
\NC \coef{a}{2}{1} \NC \coef{a}{2}{2} \NC \dots \NC
\coef{a}{2}{n}\NR
\NC \dots \NC \dots \NC \dots \NC \dots \NR
\NC \coef{a}{n}{1} \NC \coef{a}{n}{2} \NC \dots \NC \coef{a}{n}{n}
\stoppmatrix
\stopformula
\eTD
\bTD \startformula
\startpmatrix
\NC 1 \NC 0 \NC \dots \NC 0 \NR
\NC 0 \NC 1 \NC \dots \NC 0 \NR
\NC \dots \NC \dots \NC \dots \NC \dots \NR
\NC 0 \NC 0 \NC \dots \NC 1
\stoppmatrix
\stopformula
\eTD
\eTR
\eTABLE
\stopmidaligned
\stoplinecorrection
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 3041 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: alignment problem in a table
2016-07-19 13:19 alignment problem in a table Fabrice Couvreur
@ 2016-07-19 15:02 ` Wolfgang Schuster
2016-07-19 15:04 ` Alan BRASLAU
1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2016-07-19 15:02 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 513 bytes --]
> Fabrice Couvreur <mailto:fabrice1.couvreur@gmail.com>
> 19. Juli 2016 um 15:19
> Hello,
> The third column of matrix is not centered vertically and horizontally.
Add the following two lines to your example
\setupformula [option=frame]
\setupformulaframed[offset=0pt]
and you can see the third matrix isn’t centered (the small gab on the
left side is the cell offset)
because it’s too wide for the cell.
BTW: It’s good style to end *each* matrix line with \NR.
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 1852 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: alignment problem in a table
2016-07-19 13:19 alignment problem in a table Fabrice Couvreur
2016-07-19 15:02 ` Wolfgang Schuster
@ 2016-07-19 15:04 ` Alan BRASLAU
1 sibling, 0 replies; 4+ messages in thread
From: Alan BRASLAU @ 2016-07-19 15:04 UTC (permalink / raw)
To: Fabrice Couvreur; +Cc: mailing list for ConTeXt users
On Tue, 19 Jul 2016 15:19:11 +0200
Fabrice Couvreur <fabrice1.couvreur@gmail.com> wrote:
> The third column of matrix is not centered vertically and
> horizontally.
You should note that it is NECESSARY to present a MINIMAL Working
Example, that is stripped-down to ONLY the minimum necessary to show a
problem, if you want anyone to look at it. This sometimes takes a bit of
work, but the process can also be revealing of errors that one might
make and not see in a more complicated example.
I am pointing this out as I have seen many non-minimal questions posted.
Alan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Alignment problem in a table
@ 2017-08-22 13:37 Fabrice Couvreur
0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Couvreur @ 2017-08-22 13:37 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1767 bytes --]
Hello,
How to align the text of the seventh line to the left ?
Thanks
Fabrice
\unexpanded\def\pcent#1{\math{#1\,\%}}
\startsetups [table:one]
\setupTABLE[start][align={middle,lohi},width=2.2cm,offset=0.8ex]
\setupTABLE[column][first][width=2.5cm,align={right}]
\setupTABLE[1][1][frame=off]
\setupTABLE[row][7][frame=off,align={left}]
\stopsetups
\starttext
\startmidaligned
\bTABLE[setups=table:one]
\bTR
\bTD \eTD
\bTD 2010 \eTD
\bTD 2011 \eTD
\bTD 2012 \eTD
\bTD 2011/2010 \eTD
\bTD 2012/2011 \eTD
\eTR
\bTR
\bTD Rhône \eTD
\bTD 61\,633 \eTD
\bTD 69\,637 \eTD
\bTD 77\,314 \eTD
\bTD \pcent{+13,0} \eTD
\bTD \pcent{+11,0} \eTD
\eTR
\bTR
\bTD Seine \eTD
\bTD 195\,467 \eTD
\bTD 237\,400 \eTD
\bTD 241\,004 \eTD
\bTD \pcent{+21,5} \eTD
\bTD \pcent{+5,7} \eTD
\eTR
\bTR
\bTD Nord \eTD
\bTD 50\,483 \eTD
\bTD 68\,145 \eTD
\bTD 67\,835 \eTD
\bTD \pcent{+35,0} \eTD
\bTD \pcent{-0,5} \eTD
\eTR
\bTR
\bTD Rhin \eTD
\bTD 182\,478 \eTD
\bTD 156\,818 \eTD
\bTD 164\,017 \eTD
\bTD \pcent{-14,1} \eTD
\bTD \pcent{+4,6} \eTD
\eTR
\bTR
\bTH Total \eTH
\bTH 490\,061 \eTH
\bTH 532\,000 \eTH
\bTH 560\,170 \eTH
\bTH \pcent{+8,6} \eTH
\bTH \pcent{+5,3} \eTH
\eTR
\bTR
\bTD [nc=4] \tfx\bf Source : Voies navigables de France (VNF)\eTD
\eTR
\eTABLE
\stopmidaligned
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 2762 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-22 13:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-19 13:19 alignment problem in a table Fabrice Couvreur
2016-07-19 15:02 ` Wolfgang Schuster
2016-07-19 15:04 ` Alan BRASLAU
2017-08-22 13:37 Alignment " Fabrice Couvreur
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).