ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: kaddour kardio <kaddourkardio@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: TABLE setups
Date: Mon, 30 Jul 2018 15:22:28 +0100	[thread overview]
Message-ID: <CAL7_PC791sJULH3huqbAfBtA2HUoPMsFH5wvjyEz46m-3fwafg@mail.gmail.com> (raw)
In-Reply-To: <07f734e4-8f8f-0475-b368-d12ef972f596@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3780 bytes --]

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 <henrimenke@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.

[-- Attachment #1.2: Type: text/html, Size: 9792 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2018-07-30 14:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 19:38 Henning Hraban Ramm
2018-07-28  1:35 ` Henri Menke
2018-07-28  9:09   ` Henning Hraban Ramm
2018-07-29  9:16     ` Hans Hagen
2018-07-29 11:36     ` Henning Hraban Ramm
2018-07-29 12:43       ` Henning Hraban Ramm
2018-07-30 14:22   ` kaddour kardio [this message]
2018-07-30 15:41     ` Henning Hraban Ramm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL7_PC791sJULH3huqbAfBtA2HUoPMsFH5wvjyEz46m-3fwafg@mail.gmail.com \
    --to=kaddourkardio@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).