* Problem with placing a float and a tab
@ 2017-08-22 16:00 Fabrice Couvreur
0 siblings, 0 replies; only message in thread
From: Fabrice Couvreur @ 2017-08-22 16:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 3069 bytes --]
Hello,
How should the table be placed correctly ?
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=2cm,align={right}]
\setupTABLE[1][1][frame=off]
\setupTABLE[row][7][frame=off,align={left}]
\stopsetups
\definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
\definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00]
\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p := textext.rt("\bf\tfx\white\framedtextparameter{Title}") ;
p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight) ;
b := boundingbox p enlarged .3EmWidth ;
fill OverlayBox withcolor \MPcolor{MyColorA} ;
fill b withcolor \MPcolor{MyColorB} ;
draw p ;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm ;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\defineframedtext
[MyFrame]
[frame=off,
foregroundstyle={\switchtobodyfont[8pt]},
background=MyFrame,
align={verytolerant},
height=fit]
\definefloat
[recipe]
[figure]
\setupfloat
[recipe]
[default={right,none}]
\showframe
\starttext
\placerecipe{}
{\startMyFrame[Title=Info,width=5cm]
L'équivalent vingt pieds (EVP) est une unité de mesure de conteneurs
(de longueur courante 20 pieds, soit environ \unit{6,1 meter}).
1 EVP représente environ \unit{38,5 cubic meter}.
\stopMyFrame
}
Le tableau ci-dessous dresse le bilan du transport combiné fluvial en
France pour l'activité de conteneurs entre 2010 et 2012, en équivalents
vingt pieds (EVP).
\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: 4230 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] only message in thread
only message in thread, other threads:[~2017-08-22 16:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-22 16:00 Problem with placing a float and a tab 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).