align natural tables left and right
Hello list, please take a look at this: \setupbackgrounds[text][frame=on] \starttext Preceding text. \startplacetable[location={none,fit,force,here,middle}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable Following text. \page Preceding text. \startplacetable[location={none,fit,force,here,left}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable Following text. \page Preceding text. \startplacetable[location={none,fit,force,here,right}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable Following text. \stoptext It's the same table repeated on three pages, with some preceding text and some following text. Only the "location" option of \startplacetable is modified across pages: "middle" in page 1, "left" in page 2, "right" in page 3. When I use location=middle (page 1), the table is centered and the "Following text" goes after (under) the table. This is what I want to achieve: the following text should be under the table. Using location=left or location=right, the "Following text" is not placed under the table. How can I achieve that? Thanks in advance, Massi
On 2016-12-29 11:31, MF wrote:
Hello list, please take a look at this:
\setupbackgrounds[text][frame=on]
\starttext
Preceding text.
\startplacetable[location={none,fit,force,here,middle}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable
Following text.
\page
Preceding text.
\startplacetable[location={none,fit,force,here,left}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable
Following text.
\page
Preceding text.
\startplacetable[location={none,fit,force,here,right}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable
Following text.
\stoptext
It's the same table repeated on three pages, with some preceding text and some following text. Only the "location" option of \startplacetable is modified across pages: "middle" in page 1, "left" in page 2, "right" in page 3.
When I use location=middle (page 1), the table is centered and the "Following text" goes after (under) the table. This is what I want to achieve: the following text should be under the table.
Using location=left or location=right, the "Following text" is not placed under the table. How can I achieve that?
Thanks in advance, Massi Consider your third example, slightly modified:
\startplacetable[location={none,fit,force,here,right}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable Following text. Following text. Following text. Following text. And this example, with a frame around the table: \startframed[frame=off,align=right] \startplacetable[location={none,fit,force,here}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable \stopframed Following text. Following text. Following text. Following text. The float location left (right) allows flowing text around the float. You do not want that, so do not use it. -- Rik Kabel
On 2016-12-29 11:31, MF wrote:
Hello list, please take a look at this:
\setupbackgrounds[text][frame=on]
\starttext
Preceding text.
\startplacetable[location={none,fit,force,here,middle}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable
Following text.
\page
Preceding text.
\startplacetable[location={none,fit,force,here,left}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable
Following text.
\page
Preceding text.
\startplacetable[location={none,fit,force,here,right}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable
Following text.
\stoptext
It's the same table repeated on three pages, with some preceding text and some following text. Only the "location" option of \startplacetable is modified across pages: "middle" in page 1, "left" in page 2, "right" in page 3.
When I use location=middle (page 1), the table is centered and the "Following text" goes after (under) the table. This is what I want to achieve: the following text should be under the table.
Using location=left or location=right, the "Following text" is not placed under the table. How can I achieve that?
Thanks in advance, Massi
Consider your third example, slightly modified:
\startplacetable[location={none,fit,force,here,right}] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopplacetable
Following text.
Following text.
Following text.
Following text.
And this example, with a frame around the table:
\startframed[frame=off,align=right]
\startplacetable[location={none,fit,force,here}]
\bTABLE
\bTR
\bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD
\eTR
\bTR
\bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD
\eTR
\eTABLE
\stopplacetable
\stopframed
Following text.
Following text.
Following text.
Following text.
The float location left (right) allows flowing text around the float. You do not want that, so do not use it.
--
Rik Kabel
Thank you Rik, you solved my problem. I've realized that \startplacetable is not necessary: \starttext \startframed[frame=off, align=flushleft, % table aligned to the left width=broad, % the frame takes all the text width offset=overlay, % no space around the table ] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR\eTABLE\stopframed Following text. Following text. Following text. Following text. \stoptext Best greetings, Massi
On 2016-12-30 14:42, MF wrote:
I've realized that \startplacetable is not necessary:
\starttext \startframed[frame=off, align=flushleft, % table aligned to the left width=broad, % the frame takes all the text width offset=overlay, % no space around the table ] \bTABLE \bTR \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD \eTR \bTR \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD \eTR \eTABLE \stopframed Following text. Following text. Following text. Following text. \stoptext
Massi, Whether or not you need \startplacefloat (where the float can be a figure, graphic, intermezzo, or table, or a user-defined item) depends on the requirements of the document. Floats are typically separate entities that do not appear in the linear flow of the text, but instead appear in a convenient place close to where they are referenced by the text. In addition to providing suggestions to the placement algorithm for positioning the float and handling caption formatting, the \startplacefloat mechanism manages the generation of reference information. If your tables are always set inline and do not need to be referenced within the text or in lists of floats (via \placelist), then you do not need \startplacefloat. -- Rik
participants (2)
-
MF
-
Rik Kabel