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] ? Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
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 ___________________________________________________________________________________
Am 2018-07-28 um 03:35 schrieb Henri Menke
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]
Thank you, that was what I wanted to know. A one-line answer would have been enough ;) Sorry, I was just too busy with other TeX issues to simply try it. Meanwhile I had a look into the manuals folder and found the xtables manual. Section 5 about \definextable and \starttexdefinition is especially interesting. I guess I need to try both. (My ConTeXt fu is always outdated, it seems...) Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
On 7/28/2018 11:09 AM, Henning Hraban Ramm wrote:
Meanwhile I had a look into the manuals folder and found the xtables manual. Section 5 about \definextable and \starttexdefinition is especially interesting. I guess I need to try both.
(My ConTeXt fu is always outdated, it seems...) not much has changed in TABLE in years so once you're up to date in that domain you're probbably ok for years to come (typically a mechanism that cannot change much as it's used in xml processing a lot which means fully unattended usage)
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Am 2018-07-28 um 11:09 schrieb Henning Hraban Ramm
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]
Thank you, that was what I wanted to know. A one-line answer would have been enough ;)
So finally I get the hang of setups, and natural tables do what I want, except: How can I convince my TABLEs, that there should be an empty line before them?? \setupTABLE[before={\blank[2*big]}] doesn’t do anything. I tried \vskip, but that somehow kills part of the setup. Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
Am 2018-07-29 um 13:36 schrieb Henning Hraban Ramm
Am 2018-07-28 um 11:09 schrieb Henning Hraban Ramm
: 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]
Thank you, that was what I wanted to know. A one-line answer would have been enough ;)
So finally I get the hang of setups, and natural tables do what I want, except:
How can I convince my TABLEs, that there should be an empty line before them??
\setupTABLE[before={\blank[2*big]}] doesn’t do anything.
Ok, seems like \setupTABLE doesn’t use before and after at all: \setupTABLE[ before=BEFORE, after=AFTER, ] \starttext \input tufte \bTABLE \bTR\bTD Heinz \eTD\bTD Drei \eTD\bTD Brei \eTD\eTR \eTABLE \input tufte \stoptext But the keys are in i-naturaltable.xml Might this be a bug? Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
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
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.
Am 2018-07-30 um 16:22 schrieb kaddour kardio
\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?
\setupTABLE[2][4][style=\ss\bf] i.e. \setupTABLE[column][row][...] Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
participants (4)
-
Hans Hagen
-
Henning Hraban Ramm
-
Henri Menke
-
kaddour kardio