I have leaved through the ConTeXt and MetaFun manuals on the search for examples of graphics resembling the attached file which I created in TikZ. I was wanting to switch to something more native to ConTeXt, but haven't quite found a way of realising it in ConTeXt or MetaFun. Maybe someone would be so kind as to point me to the right section in the manual. All I want is to define text boxes (of a fixed size) to fill them with a background colour and (centred, typeset) text. Do I need MetaFun for that, or should some table/framed text environment in ConTeXt be able to do that? Many thanks, Severin
Am 22.03.2012 um 15:09 schrieb S Barmeier:
I have leaved through the ConTeXt and MetaFun manuals on the search for examples of graphics resembling the attached file which I created in TikZ.
I was wanting to switch to something more native to ConTeXt, but haven't quite found a way of realising it in ConTeXt or MetaFun.
Maybe someone would be so kind as to point me to the right section in the manual.
All I want is to define text boxes (of a fixed size) to fill them with a background colour and (centred, typeset) text. Do I need MetaFun for that, or should some table/framed text environment in ConTeXt be able to do that?
You can use a table as seen in the example below but when you have many graphics in this form I would use layers and write a few commands to fill all fields with the information. \startsetups kanji \setupTABLE [frame=off] \setupTABLE[1][1][background=color,backgroundcolor=red,width=4cm,align={middle,lohi}] \setupTABLE[2][1][background=color,backgroundcolor=orange,width=6cm] \setupTABLE[1][2][background=color,backgroundcolor=yellow] \stopsetups \starttext \bTABLE[setups=kanji] \bTR \bTD A \eTD \bTD line 1\\ line 2\\ line 3 \eTD \eTR \bTR \bTD[nx=2] line 1\\ line 2\\ line 3 \eTD \eTR \eTABLE \stoptext Wolfgang
On 22-3-2012 15:09, S Barmeier wrote:
I have leaved through the ConTeXt and MetaFun manuals on the search for examples of graphics resembling the attached file which I created in TikZ.
I was wanting to switch to something more native to ConTeXt, but haven't quite found a way of realising it in ConTeXt or MetaFun.
Maybe someone would be so kind as to point me to the right section in the manual.
All I want is to define text boxes (of a fixed size) to fill them with a background colour and (centred, typeset) text. Do I need MetaFun for that, or should some table/framed text environment in ConTeXt be able to do that?
this can be done with \bTABLE .. \eTABLE ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 03/23/2012 03:11 AM, Hans Hagen wrote:
On 22-3-2012 15:09, S Barmeier wrote:
I have leaved through the ConTeXt and MetaFun manuals on the search for examples of graphics resembling the attached file which I created in TikZ.
I was wanting to switch to something more native to ConTeXt, but haven't quite found a way of realising it in ConTeXt or MetaFun.
Maybe someone would be so kind as to point me to the right section in the manual.
All I want is to define text boxes (of a fixed size) to fill them with a background colour and (centred, typeset) text. Do I need MetaFun for that, or should some table/framed text environment in ConTeXt be able to do that?
this can be done with \bTABLE .. \eTABLE
This works as expected, thank you Wolfgang and Hans. I am putting these tables in the margin, though, and neither stack=yes nor stack=continue prevent two of them from overlapping. Is there some casing for the table so that they won't overlap? Also, rather than the top, the bottom of the table is aligned with the line containing the \inmargin command... but maybe this will be fixed by a solution to the overlapping? Severin
Am 25.03.2012 um 04:41 schrieb S Barmeier:
On 03/23/2012 03:11 AM, Hans Hagen wrote:
On 22-3-2012 15:09, S Barmeier wrote:
I have leaved through the ConTeXt and MetaFun manuals on the search for examples of graphics resembling the attached file which I created in TikZ.
I was wanting to switch to something more native to ConTeXt, but haven't quite found a way of realising it in ConTeXt or MetaFun.
Maybe someone would be so kind as to point me to the right section in the manual.
All I want is to define text boxes (of a fixed size) to fill them with a background colour and (centred, typeset) text. Do I need MetaFun for that, or should some table/framed text environment in ConTeXt be able to do that?
this can be done with \bTABLE .. \eTABLE
This works as expected, thank you Wolfgang and Hans. I am putting these tables in the margin, though, and neither stack=yes nor stack=continue prevent two of them from overlapping. Is there some casing for the table so that they won't overlap? Also, rather than the top, the bottom of the table is aligned with the line containing the \inmargin command... but maybe this will be fixed by a solution to the overlapping?
You can fix the alignment of the table with the \toplinebox command. \starttext \dorecurse{4} {\inmargin[stack=continue]{\toplinebox{\bTABLE[height=12mm,width=10mm]\bTR\bTD 1\eTD\bTD 2\eTD\eTR\bTR\bTD 3\eTD\bTD 4\eTD\eTR\eTABLE}} \input ward\par} \stoptext Wolfgang
participants (3)
-
Hans Hagen
-
S Barmeier
-
Wolfgang Schuster