[NTG-context] Alignment problem in a table

2017-08-22 Thread Fabrice Couvreur
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
___
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
___

Re: [NTG-context] alignment problem in a table

2016-07-19 Thread Alan BRASLAU
On Tue, 19 Jul 2016 15:19:11 +0200
Fabrice Couvreur  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
___

Re: [NTG-context] alignment problem in a table

2016-07-19 Thread Wolfgang Schuster

Fabrice Couvreur 
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
___
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
___

[NTG-context] alignment problem in a table

2016-07-19 Thread Fabrice Couvreur
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
___
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
___