Re: [NTG-context] Need help with \definetabulate

2012-10-17 Thread Malte Stien
Thank you. Yes, that helps.

Regards,
Malte.

On 16/10/2012, at 20:21, Malte Stien wrote:

 Any pointers anyone? I need to get this working and am running out of ideas.
 
 Thank you,
 Malte.
 
 
 Begin forwarded message:
 
 From: Malte Stien ma...@stien.de
 Date: 15 October 2012 17:03:42
 To: ntg-context@ntg.nl
 Subject: Re: [NTG-context] Need help with \definetabulate
 
 Marco,
 
 \definetabulate [alpha] [|l|l|l|]
 \setuptabulate  [alpha] [bodyfont=small]
 
 This does not work for me quite the way I need it to. I am really just after 
 defining the font-size, but I would like to leave the column setup to the 
 user (I am building an environment and that I would like everyone in my team 
 to use to ensure a consistent look-and-feel or all documents). So, ideally, 
 I would like to do this:
 
 \definetabulate [alpha]
 \setuptabulate  [alpha] [bodyfont=small]
 \starttext[|l|l|l|]
 \startalpha
  \NC first \NC second \NC third \NC\NR
 \stopalpha
 
 \stoptext
 
 ...but that does not seem to work. Any way I can achieve this?
 
 Feel free to add an example. It's a wiki!
 
 Sure. Will do, once I have this working.
 
 Thank you,
 Malte.
 
 
 Hi Malte
 
 I am trying to define two tabulate styles as follows:
 
 - \setuptabulate[split=yes, bodyfont=small]
 - \setuptabulate[split=yes]
 
 \definetabulate [alpha] [|l|l|l|]
 \setuptabulate  [alpha] [bodyfont=small]
 
 \definetabulate [beta] [|l|l|]
 \setuptabulate  [beta] [bodyfont=small, split=yes]
 
 \starttext
 \startalpha
  \NC first \NC second \NC third \NC\NR
 \stopalpha
 
 \startbeta
  \NC lorem \NC ipsum \NC\NR
 \stopbeta
 \stoptext
 
 ...such that I can just refer to them when I
 \starttabulate...\stoptabulate somewhere.
 
 To refer to a table, you place it as a float and use the
 `reference=tab:alphatable` key. Then in the text you refer to the
 table, see \in{table}[tab:alphatable].
 
 I thought, the command \definetabulate would come in handy here,
 but I can't work it out and it appears the documentation on that
 command is pretty scarce.
 
 http://wiki.contextgarden.net/Command/definetabulate
 
 Feel free to add an example. It's a wiki!
 
 
 Marco
 
 

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


Re: [NTG-context] Need help with \definetabulate

2012-10-16 Thread Wolfgang Schuster

Am 16.10.2012 um 11:21 schrieb Malte Stien ma...@stien.de:

 Any pointers anyone? I need to get this working and am running out of ideas.

\def\startalpha
  {\dosingleempty\dostartalpha}

\def\dostartalpha[#1]#2\stopalpha
  {\iffirstargument
 \starttabulate   [#1]#2\stoptabulate
   \else
 \starttabulate[|l|p|]#2\stoptabulate
   \fi}

\def\startbeta
  {\dosingleempty\dostartbeta}

\def\dostartbeta[#1]#2\stopbeta
  {\iffirstargument
 \starttabulate   [#1][bodyfont=small]#2\stoptabulate
   \else
 \starttabulate[|l|p|][bodyfont=small]#2\stoptabulate
   \fi}

\starttext

\startalpha
\NC 1 \NC 2 \NC\NR
\stopalpha

\startalpha[|l|l|l|]
\NC 1 \NC 2 \NC 3 \NC\NR
\stopalpha

\startbeta
\NC 1 \NC 2 \NC\NR
\stopbeta

\startbeta[|l|l|l|]
\NC 1 \NC 2 \NC 3 \NC\NR
\stopbeta

\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
___


Re: [NTG-context] Need help with \definetabulate

2012-10-15 Thread Malte Stien
Marco,

 \definetabulate [alpha] [|l|l|l|]
 \setuptabulate  [alpha] [bodyfont=small]

This does not work for me quite the way I need it to. I am really just after 
defining the font-size, but I would like to leave the column setup to the user 
(I am building an environment and that I would like everyone in my team to use 
to ensure a consistent look-and-feel or all documents). So, ideally, I would 
like to do this:

 \definetabulate [alpha]
 \setuptabulate  [alpha] [bodyfont=small]
 \starttext[|l|l|l|]
  \startalpha
\NC first \NC second \NC third \NC\NR
  \stopalpha

 \stoptext

...but that does not seem to work. Any way I can achieve this?

 Feel free to add an example. It's a wiki!

Sure. Will do, once I have this working.

Thank you,
Malte.


 Hi Malte
 
 I am trying to define two tabulate styles as follows:
 
 - \setuptabulate[split=yes, bodyfont=small]
 - \setuptabulate[split=yes]
 
 \definetabulate [alpha] [|l|l|l|]
 \setuptabulate  [alpha] [bodyfont=small]
 
 \definetabulate [beta] [|l|l|]
 \setuptabulate  [beta] [bodyfont=small, split=yes]
 
 \starttext
  \startalpha
\NC first \NC second \NC third \NC\NR
  \stopalpha
 
  \startbeta
\NC lorem \NC ipsum \NC\NR
  \stopbeta
 \stoptext
 
 ...such that I can just refer to them when I
 \starttabulate...\stoptabulate somewhere.
 
 To refer to a table, you place it as a float and use the
 `reference=tab:alphatable` key. Then in the text you refer to the
 table, see \in{table}[tab:alphatable].
 
 I thought, the command \definetabulate would come in handy here,
 but I can't work it out and it appears the documentation on that
 command is pretty scarce.
 
  http://wiki.contextgarden.net/Command/definetabulate
 
 Feel free to add an example. It's a wiki!
 
 
 Marco

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


Re: [NTG-context] Need help with \definetabulate

2012-10-08 Thread Marco Patzer
2012-10-08 Malte Stien:

Hi Malte

 I am trying to define two tabulate styles as follows:
 
 - \setuptabulate[split=yes, bodyfont=small]
 - \setuptabulate[split=yes]

\definetabulate [alpha] [|l|l|l|]
\setuptabulate  [alpha] [bodyfont=small]

\definetabulate [beta] [|l|l|]
\setuptabulate  [beta] [bodyfont=small, split=yes]

\starttext
  \startalpha
\NC first \NC second \NC third \NC\NR
  \stopalpha

  \startbeta
\NC lorem \NC ipsum \NC\NR
  \stopbeta
\stoptext

 ...such that I can just refer to them when I
 \starttabulate...\stoptabulate somewhere.

To refer to a table, you place it as a float and use the
`reference=tab:alphatable` key. Then in the text you refer to the
table, see \in{table}[tab:alphatable].

 I thought, the command \definetabulate would come in handy here,
 but I can't work it out and it appears the documentation on that
 command is pretty scarce.
 
   http://wiki.contextgarden.net/Command/definetabulate

Feel free to add an example. It's a wiki!


Marco

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