[NTG-context] Floating dimensions that adapts automaticall

Fabrice Couvreur fabrice1.couvreur at gmail.com
Mon Aug 3 20:02:43 CEST 2015


 Hi,
In the code below, we can see that the table overflows.
Of course, one can play on the table dimensions to adjust its position.
However it is possible to define a floating whose dimensions automatically
adapt to the available space ?
Thank you,
Fabrice

\definefloat
   [MyFloat]
   [figure]

\setupfloat
   [MyFloat]
   [default={right,none}]

\startsetups[table:initialize]
  \setupTABLE[start][align={middle,lohi},width=2cm,offset=1ex]
  \setupTABLE[column][first][width=4cm]
  \setupTABLE[row][first][background=color,backgroundcolor=lightgray]
\stopsetups

\showframe

\starttext
\placeMyFloat{}{\externalfigure[louvre.jpg][width=5cm]}
Le tableau ci-dessous indique le nombre d'entrées (en milliers) au musée du
Louvre :
\blank[medium]
\startmidaligned
\placeMyFloat{}{
\bTABLE[setups=table:initialize]
\bTR
    \bTH  \eTH
    \bTD  \eTD
    \bTD  \eTD
    \bTD  \eTD
    \bTD  \eTD
\eTR
\bTR
    \bTH  \eTH
    \bTD  \eTD
    \bTD  \eTD
    \bTD  \eTD
    \bTD  \eTD
\eTR
\eTABLE
\stopmidaligned}
\blank[medium]
\stoptext
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150803/55c0a9b0/attachment.html>


More information about the ntg-context mailing list