Re: [NTG-context] TABLE setups

2018-07-30 Thread Henning Hraban Ramm
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


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

Re: [NTG-context] TABLE setups

2018-07-30 Thread kaddour kardio
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  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
___

Re: [NTG-context] TABLE setups

2018-07-29 Thread Henning Hraban Ramm
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

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

Re: [NTG-context] TABLE setups

2018-07-29 Thread 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.
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

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

Re: [NTG-context] TABLE setups

2018-07-29 Thread Hans Hagen

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

Re: [NTG-context] TABLE setups

2018-07-28 Thread Henning Hraban Ramm
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


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

Re: [NTG-context] TABLE setups

2018-07-27 Thread 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
___

[NTG-context] TABLE setups

2018-07-27 Thread Henning Hraban Ramm
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

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

Re: [NTG-context] Table setups interfering with another table?

2015-09-03 Thread Mari Voipio
On Tue, Sep 1, 2015 at 2:43 PM, Procházka Lukáš Ing. - Pontex s. r. o.
 wrote:
>
> 2. Perform all setups right after \bTABLE (table_test2.mkiv). This is not
> applicable in all cases (e.g. \bTABLE[width=\textwidth] must be done here,
> not later) but in you case - you just setup specific columns and row, which
> can be done after \bTABLE safely. I deduce that each \bTABLE  \eTABLE
> creates a group, so all initializations done within remain local.

This solved the problem. Once I'd moved all \bTABLE commands up above
the setups, all tables behaved as intended.

Thank you very much!

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

[NTG-context] Table setups interfering with another table?

2015-09-01 Thread Mari Voipio
Hello!

I have a bit of a table mystery. It seems that the setups of an
earlier table interfere with the table coming after it (in the real
thing there's text between the tables, but the behaviour is the same).
Each table looks fine by itself, but if I compile a file with both,
the second one looks weird. What is it that I don't see or understand?

And yes, the tables really need to look like that. I'm recreating from
a pdf a document that is probably made with Word and this is how
they've done their tables in the original.

I admit that my ConTeXt version isn't exactly the newest available, it
is dated 2015.02.03. If the combination of tables works in newer
versions, I'll update, otherwise I'm not keen to fiddle with a working
combo.


As always, I'll be grateful for any help I can get,


Mari


table_test_both.pdf
Description: Adobe PDF document


table_test_first.pdf
Description: Adobe PDF document


table_test_second.pdf
Description: Adobe PDF document


table_test.tex
Description: TeX document
___
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] Table setups interfering with another table?

2015-09-01 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello Mari,

I can see two ways:

1. Enclose each table into \bgroup ... \egroup scope, so all \setupTABLE will 
be treated local (table_test.mkiv).

2. Perform all setups right after \bTABLE (table_test2.mkiv). This is not 
applicable in all cases (e.g. \bTABLE[width=\textwidth] must be done here, not 
later) but in you case - you just setup specific columns and row, which can be 
done after \bTABLE safely. I deduce that each \bTABLE  \eTABLE creates a 
group, so all initializations done within remain local.

See my attempts.

Best regards,

Lukas



On Tue, 01 Sep 2015 12:25:03 +0200, Mari Voipio  wrote:


Hello!

I have a bit of a table mystery. It seems that the setups of an
earlier table interfere with the table coming after it (in the real
thing there's text between the tables, but the behaviour is the same).
Each table looks fine by itself, but if I compile a file with both,
the second one looks weird. What is it that I don't see or understand?

And yes, the tables really need to look like that. I'm recreating from
a pdf a document that is probably made with Word and this is how
they've done their tables in the original.

I admit that my ConTeXt version isn't exactly the newest available, it
is dated 2015.02.03. If the combination of tables works in newer
versions, I'll update, otherwise I'm not keen to fiddle with a working
combo.


As always, I'll be grateful for any help I can get,


Mari




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

table_test.mkiv
Description: Binary data


table_test.pdf
Description: Adobe PDF document


table_test2.mkiv
Description: Binary data


table_test2.pdf
Description: Adobe PDF document
___
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
___