ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* simple graphics, Metafun vs. ConTeXt
@ 2012-03-22 14:09 S Barmeier
  2012-03-22 14:28 ` Wolfgang Schuster
  2012-03-22 21:41 ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: S Barmeier @ 2012-03-22 14:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 608 bytes --]

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

[-- Attachment #2: sg.png --]
[-- Type: image/png, Size: 14113 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: simple graphics, Metafun vs. ConTeXt
  2012-03-22 14:09 simple graphics, Metafun vs. ConTeXt S Barmeier
@ 2012-03-22 14:28 ` Wolfgang Schuster
  2012-03-22 21:41 ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2012-03-22 14:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: simple graphics, Metafun vs. ConTeXt
  2012-03-22 14:09 simple graphics, Metafun vs. ConTeXt S Barmeier
  2012-03-22 14:28 ` Wolfgang Schuster
@ 2012-03-22 21:41 ` Hans Hagen
  2012-03-25  2:41   ` S Barmeier
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2012-03-22 21:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: simple graphics, Metafun vs. ConTeXt
  2012-03-22 21:41 ` Hans Hagen
@ 2012-03-25  2:41   ` S Barmeier
  2012-03-25  7:50     ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: S Barmeier @ 2012-03-25  2:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: simple graphics, Metafun vs. ConTeXt
  2012-03-25  2:41   ` S Barmeier
@ 2012-03-25  7:50     ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2012-03-25  7:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-25  7:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-22 14:09 simple graphics, Metafun vs. ConTeXt S Barmeier
2012-03-22 14:28 ` Wolfgang Schuster
2012-03-22 21:41 ` Hans Hagen
2012-03-25  2:41   ` S Barmeier
2012-03-25  7:50     ` Wolfgang Schuster

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).