here is an example of mine

\startsetups table:width
  \setupTABLE[align={hyphenated,normal}]
  \setupTABLE[column][1][width=0.3\textwidth]
  \setupTABLE[column][2][width=0.4\textwidth]
  \setupTABLE[column][3][width=0.3\textwidth]
\stopsetups
% table des patients
\startsetups table:style
\setupTABLE[frame=off]
\setupTABLE[r][1][style=\ss]
\setupTABLE[r][2][style=\tfa\bf]
\setupTABLE[r][3][style=\ss]
\setupTABLE[c][3][align=left]
\setupTABLE[c][2][align=center]
\setupTABLE[r][4][style=\bf] % how to override the \tt in the second column?
\stopsetups
%protocole du stress
\startsetups table:protocole
\setupTABLE[frame=off,option=stretch]
      \setupTABLE[row][odd][background=color, backgroundcolor=lightgreen]
      \setupTABLE[row][1][style={\ss\bf}, background=color,
                             backgroundcolor=cyan, foregroundcolor=white]
      \setupTABLE[column][1][style={\ssx\bf}]
      \setupTABLE[column][5][align=right]
      \setupTABLE[column][3][align=center]

\stopsetups

\starttext

.....

 {\bTABLE[setups={table:style, table:width}]
   \bTR
   \bTD nom \& prénoms \eTD
   \bTD date de naissance \eTD
   \bTD Adresse \eTD
   \eTR
   \bTR
   \bTD  patient.name  \eTD
   \bTD  patient.birth  \eTD
   \bTD  patient.adresse \eTD
   \eTR
   \bTR
   \bTD motif d'admission \eTD
   \bTD médecin correspondant\eTD
   \bTD assurance \eTD
   \eTR
\bTR
   \bTD  sortie.motif
   \eTD
   \bTD patient.correspondant    \eTD
   \bTD CNAS
        \eTD
   \eTR
\eTABLE}

\stoptext



On Sat, Jul 28, 2018 at 2:36 AM Henri Menke <henrime...@gmail.com> wrote:

> On 07/28/2018 07:38 AM, Henning Hraban Ramm wrote:
> > Ahoi,
> >
> > I need a few different table styles and don’t think it makes sense to
> setup them every single time.
> >
> > Is there a \defineTABLE[mystyle], and then \setupTABLE[mystyle][...] ?
> >
> > Or can I go via setups like \bTABLE[setups=mystyle] ?
>
> \startsetups mystyle
>   \setupTABLE[frame=off]
>   \setupTABLE[row][first][topframe=on,bottomframe=on,style=bold]
>   \setupTABLE[row][last] [bottomframe=on]
> \stopsetups
> \starttext
>
> \bTABLE[setups=mystyle]
>   \bTR
>     \bTD Hello \eTD \bTD Hraban \eTD
>   \eTR
>   \bTR
>     \bTD Hello \eTD \bTD Hraban \eTD
>   \eTR
>   \bTR
>     \bTD Hello \eTD \bTD Hraban \eTD
>   \eTR
>   \bTR
>     \bTD Hello \eTD \bTD Hraban \eTD
>   \eTR
> \eTABLE
>
> \stoptext
>
> >
> >
> > Greetlings, Hraban
> > ---
> > https://www.fiee.net
> > http://wiki.contextgarden.net
> > https://www.dreiviertelhaus.de
> > GPG Key ID 1C9B22FD
> >
> >
> ___________________________________________________________________________________
> > 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://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki     : http://contextgarden.net
> >
> ___________________________________________________________________________________
> >
>
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________



-- 
Dr YAHYAOUI Mohamed Kaddour, cardiologue -- Clinique KARDIA.
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to