[NTG-context] Re: Table and rotation: push together 45 degree rotated cells

2024-09-19 Thread Gerion Entrup
Am Donnerstag, 19. September 2024, 16:44:31 MESZ schrieb Hans Hagen:
> On 9/19/2024 1:03 PM, Gerion Entrup wrote:
> 
> > What is the meaning of \hss here? It seems to work just fine without it.
> 
> a left over from trial and error

Thank you all! I have documented both solutions in the Wiki 
(https://wiki.contextgarden.net/TABLE#Rotated_headline).

Gerion



signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Table and rotation: push together 45 degree rotated cells

2024-09-19 Thread Hans Hagen

On 9/19/2024 1:03 PM, Gerion Entrup wrote:


What is the meaning of \hss here? It seems to work just fine without it.


a left over from trial and error

-
  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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Table and rotation: push together 45 degree rotated cells

2024-09-19 Thread Gerion Entrup
Am Donnerstag, 19. September 2024, 09:35:49 MESZ schrieb Hans Hagen via 
ntg-context:
> On 9/19/2024 7:54 AM, Mikael Sundqvist wrote:
> > Hi,
> > 
> > On Thu, Sep 19, 2024 at 12:23 AM Gerion Entrup  
> > wrote:
> >>
> >> Am Mittwoch, 18. September 2024, 22:53:55 MESZ schrieb Wolfgang Schuster:
> >>> Gerion Entrup schrieb am 18.09.2024 um 14:44:
> >>>> Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup:
> >>>>> Hi,
> >>>>>
> >>>>> I want to typeset a table where some of the column headings are really 
> >>>>> long, while in the columns itself consists only of numbers.
> >>>>> Therefore, my idea was to rotate the column headings but not 90 degrees 
> >>>>> (I found some solutions for that) but 45 degree.
> >>>>>
> >>>>> It then would be beneficial to push together the rotated cells, so the 
> >>>>> text of one cell actually starts above the previous cell.
> >>>>> Do you know, how to achieve that?
> >>>>>
> >>>>> Here is a minimal example:
> >>>>> ```
> >>>>> \startsetups[table:rotated]
> >>>>> \setupTABLE[frame=off]
> >>>>> \setupTABLE[row][first][bottomframe=on, style=bf, align={center, 
> >>>>> low}]
> >>>>> \setupTABLE[row][2][align=flushright]
> >>>>> \stopsetups
> >>>>>
> >>>>> \starttext
> >>>>> \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]}
> >>>>> \bTABLE[setups=table:rotated]
> >>>>> \bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD 
> >>>>> \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European 
> >>>>> turtle dove} \eTD \eTR
> >>>>> \bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} 
> >>>>> \eTD \bTD \digits{2} \eTD \eTR
> >>>>> \eTABLE
> >>>>> \stoptext
> >>>>> ```
> >>>>> I would like to achieve that the text "Mexican redknee tarantula" is 
> >>>>> typeset right and above of "Water buffalo" so that the single columns 
> >>>>> have a width that is similar to the width of the single digit coming in 
> >>>>> the second row.
> >>>>
> >>>> To visualize this, I patched the PDF of the above example to the desired 
> >>>> result. See the attachment.
> >>>
> >>> You can use Metapost.
> >>
> >> Thanks for this solution. It, however, seems to fail with any other angle 
> >> than 315° (I tested 305, 325 and 314).
> > 
> > Try
> > 
> >
> > xyscaled(\the\struttotal,abs(sind(\MPvar{rotation}))*\the\widthofstring{\MPvar{text}});
> > 
> > with sind instead of sin. And maybe with abs around it, but one can
> > think of improvements for smaller angles. It all depends on what one
> > wants.
> 
> here is an alternative
> 
> \bTABLE[frame=off]
>\bTR[align={middle,low}]
>  \bTH \eTH
>  \bTH 
> \dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut 
> Water buffalo}\hss} \eTH
>  \bTH 
> \dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut 
> Mexican redknee tarantula}\hss} \eTH
>  \bTH 
> \dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut 
> European turtle dove}\hss} \eTH
>\eTR
>\bTR[frame=on,align=middle]
>  \bTD Amount of legs \eTD
>  \bTD[width=3em] 4 \eTD
>  \bTD[width=3em] 8 \eTD
>  \bTD[width=3em] 2 \eTD
>\eTR
> \eTABLE

What is the meaning of \hss here? It seems to work just fine without it.

Gerion



signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Table and rotation: push together 45 degree rotated cells

2024-09-19 Thread Hans Hagen via ntg-context

On 9/19/2024 7:54 AM, Mikael Sundqvist wrote:

Hi,

On Thu, Sep 19, 2024 at 12:23 AM Gerion Entrup  wrote:


Am Mittwoch, 18. September 2024, 22:53:55 MESZ schrieb Wolfgang Schuster:

Gerion Entrup schrieb am 18.09.2024 um 14:44:

Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup:

Hi,

I want to typeset a table where some of the column headings are really long, 
while in the columns itself consists only of numbers.
Therefore, my idea was to rotate the column headings but not 90 degrees (I 
found some solutions for that) but 45 degree.

It then would be beneficial to push together the rotated cells, so the text of 
one cell actually starts above the previous cell.
Do you know, how to achieve that?

Here is a minimal example:
```
\startsetups[table:rotated]
\setupTABLE[frame=off]
\setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}]
\setupTABLE[row][2][align=flushright]
\stopsetups

\starttext
\define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]}
\bTABLE[setups=table:rotated]
\bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD 
\tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European turtle 
dove} \eTD \eTR
\bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD 
\bTD \digits{2} \eTD \eTR
\eTABLE
\stoptext
```
I would like to achieve that the text "Mexican redknee tarantula" is typeset right and 
above of "Water buffalo" so that the single columns have a width that is similar to the 
width of the single digit coming in the second row.


To visualize this, I patched the PDF of the above example to the desired 
result. See the attachment.


You can use Metapost.


Thanks for this solution. It, however, seems to fail with any other angle than 
315° (I tested 305, 325 and 314).


Try

   
xyscaled(\the\struttotal,abs(sind(\MPvar{rotation}))*\the\widthofstring{\MPvar{text}});

with sind instead of sin. And maybe with abs around it, but one can
think of improvements for smaller angles. It all depends on what one
wants.


here is an alternative

\bTABLE[frame=off]
  \bTR[align={middle,low}]
\bTH \eTH
\bTH 
\dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut 
Water buffalo}\hss} \eTH
\bTH 
\dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut 
Mexican redknee tarantula}\hss} \eTH
\bTH 
\dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut 
European turtle dove}\hss} \eTH

  \eTR
  \bTR[frame=on,align=middle]
\bTD Amount of legs \eTD
\bTD[width=3em] 4 \eTD
\bTD[width=3em] 8 \eTD
\bTD[width=3em] 2 \eTD
  \eTR
\eTABLE

and yes, i needed to trial and error a bit,

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Table and rotation: push together 45 degree rotated cells

2024-09-18 Thread Mikael Sundqvist
Hi,

On Thu, Sep 19, 2024 at 12:23 AM Gerion Entrup  wrote:
>
> Am Mittwoch, 18. September 2024, 22:53:55 MESZ schrieb Wolfgang Schuster:
> > Gerion Entrup schrieb am 18.09.2024 um 14:44:
> > > Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup:
> > >> Hi,
> > >>
> > >> I want to typeset a table where some of the column headings are really 
> > >> long, while in the columns itself consists only of numbers.
> > >> Therefore, my idea was to rotate the column headings but not 90 degrees 
> > >> (I found some solutions for that) but 45 degree.
> > >>
> > >> It then would be beneficial to push together the rotated cells, so the 
> > >> text of one cell actually starts above the previous cell.
> > >> Do you know, how to achieve that?
> > >>
> > >> Here is a minimal example:
> > >> ```
> > >> \startsetups[table:rotated]
> > >>\setupTABLE[frame=off]
> > >>\setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}]
> > >>\setupTABLE[row][2][align=flushright]
> > >> \stopsetups
> > >>
> > >> \starttext
> > >> \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]}
> > >> \bTABLE[setups=table:rotated]
> > >>\bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD 
> > >> \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European 
> > >> turtle dove} \eTD \eTR
> > >>\bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} 
> > >> \eTD \bTD \digits{2} \eTD \eTR
> > >> \eTABLE
> > >> \stoptext
> > >> ```
> > >> I would like to achieve that the text "Mexican redknee tarantula" is 
> > >> typeset right and above of "Water buffalo" so that the single columns 
> > >> have a width that is similar to the width of the single digit coming in 
> > >> the second row.
> > >
> > > To visualize this, I patched the PDF of the above example to the desired 
> > > result. See the attachment.
> >
> > You can use Metapost.
>
> Thanks for this solution. It, however, seems to fail with any other angle 
> than 315° (I tested 305, 325 and 314).

Try

  
xyscaled(\the\struttotal,abs(sind(\MPvar{rotation}))*\the\widthofstring{\MPvar{text}});

with sind instead of sin. And maybe with abs around it, but one can
think of improvements for smaller angles. It all depends on what one
wants.

/Mikael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Table and rotation: push together 45 degree rotated cells

2024-09-18 Thread Gerion Entrup
Am Mittwoch, 18. September 2024, 22:53:55 MESZ schrieb Wolfgang Schuster:
> Gerion Entrup schrieb am 18.09.2024 um 14:44:
> > Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup:
> >> Hi,
> >>
> >> I want to typeset a table where some of the column headings are really 
> >> long, while in the columns itself consists only of numbers.
> >> Therefore, my idea was to rotate the column headings but not 90 degrees (I 
> >> found some solutions for that) but 45 degree.
> >>
> >> It then would be beneficial to push together the rotated cells, so the 
> >> text of one cell actually starts above the previous cell.
> >> Do you know, how to achieve that?
> >>
> >> Here is a minimal example:
> >> ```
> >> \startsetups[table:rotated]
> >>\setupTABLE[frame=off]
> >>\setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}]
> >>\setupTABLE[row][2][align=flushright]
> >> \stopsetups
> >>
> >> \starttext
> >> \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]}
> >> \bTABLE[setups=table:rotated]
> >>\bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD 
> >> \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European 
> >> turtle dove} \eTD \eTR
> >>\bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD 
> >> \bTD \digits{2} \eTD \eTR
> >> \eTABLE
> >> \stoptext
> >> ```
> >> I would like to achieve that the text "Mexican redknee tarantula" is 
> >> typeset right and above of "Water buffalo" so that the single columns have 
> >> a width that is similar to the width of the single digit coming in the 
> >> second row.
> > 
> > To visualize this, I patched the PDF of the above example to the desired 
> > result. See the attachment.
> 
> You can use Metapost.

Thanks for this solution. It, however, seems to fail with any other angle than 
315° (I tested 305, 325 and 314).


> \startuseMPgraphic{tableheader}{text,rotation}
> 
>label.lft("\strut\bf\MPvar{text}",origin)
>  rotated \MPvar{rotation}
>  shifted (\the\strutht,0);

I guess, this one actually draws the text...


>setbounds currentpicture to unitsquare
>  
> xyscaled(\the\struttotal,sin(\MPvar{rotation})*\the\widthofstring{\MPvar{text}});

and this one calculates the faked width. Doesn't the sinus here calculate the 
height of the rotated text?

Beside from using Metapost (since I currently do not understand it and would 
only be able to copy paste your code), is there some kind of box construct 
which artificially reduces the width of the inner content?
I would have expected something like \fakewidth[width=1cm, 
align=flushright]{\rotate[rotation=-45, location=high]{A really long text, much 
longer than 1cm}}.
If I see it right, such a construct would also solve the problem, while less 
cleaner due to the fixed width.


Gerion




signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Table and rotation: push together 45 degree rotated cells

2024-09-18 Thread Hans Hagen

On 9/18/2024 10:53 PM, Wolfgang Schuster wrote:

Gerion Entrup schrieb am 18.09.2024 um 14:44:

Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup:

Hi,

I want to typeset a table where some of the column headings are 
really long, while in the columns itself consists only of numbers.
Therefore, my idea was to rotate the column headings but not 90 
degrees (I found some solutions for that) but 45 degree.


It then would be beneficial to push together the rotated cells, so 
the text of one cell actually starts above the previous cell.

Do you know, how to achieve that?

Here is a minimal example:
```
\startsetups[table:rotated]
\setupTABLE[frame=off]
\setupTABLE[row][first][bottomframe=on, style=bf, align={center, 
low}]

\setupTABLE[row][2][align=flushright]
\stopsetups

\starttext
\define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]}
\bTABLE[setups=table:rotated]
\bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD 
\tablerotate{Mexican redknee tarantula} \eTD \bTD 
\tablerotate{European turtle dove} \eTD \eTR
\bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD 
\digits{8} \eTD \bTD \digits{2} \eTD \eTR

\eTABLE
\stoptext
```
I would like to achieve that the text "Mexican redknee tarantula" is 
typeset right and above of "Water buffalo" so that the single columns 
have a width that is similar to the width of the single digit coming 
in the second row.


To visualize this, I patched the PDF of the above example to the 
desired result. See the attachment.


You can use Metapost.

\startuseMPgraphic{tableheader}{text,rotation}

   label.lft("\strut\bf\MPvar{text}",origin)
     rotated \MPvar{rotation}
     shifted (\the\strutht,0);

   setbounds currentpicture to unitsquare

xyscaled(\the\struttotal,sin(\MPvar{rotation})*\the\widthofstring{\MPvar{text}});

\stopuseMPgraphic

\starttext

\bTABLE[frame=off]
   \bTR[align={middle,low}]
     \bTH \eTH
     \bTH[width=3em] \dontleavehmode\useMPgraphic{tableheader} 
{text=Water buffalo,rotation=315} \eTH
     \bTH[width=3em] \dontleavehmode\useMPgraphic{tableheader} 
{text=Mexican redknee tarantula,rotation=315} \eTH
     \bTH[width=3em] \dontleavehmode\useMPgraphic{tableheader} 
{text=European turtle dove,rotation=315} \eTH

   \eTR
   \bTR[topframe=on,align=middle]
     \bTD Amount of legs \eTD
     \bTD 4 \eTD
     \bTD 8 \eTD
     \bTD 2 \eTD
   \eTR
\eTABLE

\stoptext


Neat. Added to the test suite.

-
  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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Table and rotation: push together 45 degree rotated cells

2024-09-18 Thread Wolfgang Schuster

Gerion Entrup schrieb am 18.09.2024 um 14:44:

Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup:

Hi,

I want to typeset a table where some of the column headings are really long, 
while in the columns itself consists only of numbers.
Therefore, my idea was to rotate the column headings but not 90 degrees (I 
found some solutions for that) but 45 degree.

It then would be beneficial to push together the rotated cells, so the text of 
one cell actually starts above the previous cell.
Do you know, how to achieve that?

Here is a minimal example:
```
\startsetups[table:rotated]
\setupTABLE[frame=off]
\setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}]
\setupTABLE[row][2][align=flushright]
\stopsetups

\starttext
\define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]}
\bTABLE[setups=table:rotated]
\bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD 
\tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European turtle 
dove} \eTD \eTR
\bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD 
\bTD \digits{2} \eTD \eTR
\eTABLE
\stoptext
```
I would like to achieve that the text "Mexican redknee tarantula" is typeset right and 
above of "Water buffalo" so that the single columns have a width that is similar to the 
width of the single digit coming in the second row.


To visualize this, I patched the PDF of the above example to the desired 
result. See the attachment.


You can use Metapost.

\startuseMPgraphic{tableheader}{text,rotation}

  label.lft("\strut\bf\MPvar{text}",origin)
rotated \MPvar{rotation}
shifted (\the\strutht,0);

  setbounds currentpicture to unitsquare

xyscaled(\the\struttotal,sin(\MPvar{rotation})*\the\widthofstring{\MPvar{text}});

\stopuseMPgraphic

\starttext

\bTABLE[frame=off]
  \bTR[align={middle,low}]
\bTH \eTH
\bTH[width=3em] 
\dontleavehmode\useMPgraphic{tableheader}{text=Water 
buffalo,rotation=315} \eTH
\bTH[width=3em] 
\dontleavehmode\useMPgraphic{tableheader}{text=Mexican redknee 
tarantula,rotation=315} \eTH
\bTH[width=3em] 
\dontleavehmode\useMPgraphic{tableheader}{text=European turtle 
dove,rotation=315} \eTH

  \eTR
  \bTR[topframe=on,align=middle]
\bTD Amount of legs \eTD
\bTD 4 \eTD
\bTD 8 \eTD
\bTD 2 \eTD
  \eTR
\eTABLE

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Table and rotation: push together 45 degree rotated cells

2024-09-18 Thread Gerion Entrup
Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup:
> Hi,
> 
> I want to typeset a table where some of the column headings are really long, 
> while in the columns itself consists only of numbers.
> Therefore, my idea was to rotate the column headings but not 90 degrees (I 
> found some solutions for that) but 45 degree.
> 
> It then would be beneficial to push together the rotated cells, so the text 
> of one cell actually starts above the previous cell.
> Do you know, how to achieve that?
> 
> Here is a minimal example:
> ```
> \startsetups[table:rotated]
>   \setupTABLE[frame=off]
>   \setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}]
>   \setupTABLE[row][2][align=flushright]
> \stopsetups
> 
> \starttext
> \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]}
> \bTABLE[setups=table:rotated]
>   \bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD 
> \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European 
> turtle dove} \eTD \eTR
>   \bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD 
> \bTD \digits{2} \eTD \eTR
> \eTABLE
> \stoptext
> ```
> I would like to achieve that the text "Mexican redknee tarantula" is typeset 
> right and above of "Water buffalo" so that the single columns have a width 
> that is similar to the width of the single digit coming in the second row.

To visualize this, I patched the PDF of the above example to the desired 
result. See the attachment.


> Another question in this context: Is is possible to specify a \setupTABLE 
> command that works for column 2-4 starting from row 2?
> Something like \setupTABLE[row][2-][column][2,3,4][background=color, 
> backgroundcolor=red].
> In this example this would cover all numbers but nothing else.
> 
> Best
> Gerion



mwe.fixed.pdf
Description: Adobe PDF document


signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Table and rotation: push together 45 degree rotated cells

2024-09-17 Thread Gerion Entrup
Hi,

I want to typeset a table where some of the column headings are really long, 
while in the columns itself consists only of numbers.
Therefore, my idea was to rotate the column headings but not 90 degrees (I 
found some solutions for that) but 45 degree.

It then would be beneficial to push together the rotated cells, so the text of 
one cell actually starts above the previous cell.
Do you know, how to achieve that?

Here is a minimal example:
```
\startsetups[table:rotated]
\setupTABLE[frame=off]
\setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}]
\setupTABLE[row][2][align=flushright]
\stopsetups

\starttext
\define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]}
\bTABLE[setups=table:rotated]
\bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD 
\tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European turtle 
dove} \eTD \eTR
\bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD 
\bTD \digits{2} \eTD \eTR
\eTABLE
\stoptext
```
I would like to achieve that the text "Mexican redknee tarantula" is typeset 
right and above of "Water buffalo" so that the single columns have a width that 
is similar to the width of the single digit coming in the second row.

Another question in this context: Is is possible to specify a \setupTABLE 
command that works for column 2-4 starting from row 2?
Something like \setupTABLE[row][2-][column][2,3,4][background=color, 
backgroundcolor=red].
In this example this would cover all numbers but nothing else.

Best
Gerion

signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: table float split behavior

2024-07-10 Thread Henning Hraban Ramm

Am 17.06.24 um 18:36 schrieb Henning Hraban Ramm:

Table floats split in odd places, independent of top/page/here location.

There’s always a first part, then some not-float text, then the other 
parts.


Even if the table would fit on two pages (with location=page), it always 
gets split into three.


Can I influence this anyhow?


Hans explained in today’s online meeting:

The float location "split" cannot be combined with other locations 
(here, top, bottom, page). "split" alone is like "here"; for "page", use


\startpostponing
\startplacetable[location=split]
\bTABLE
% long table
\eTABLE
\stopplacetable
\stoppostponing

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: table float split behavior

2024-07-08 Thread vm via ntg-context




On 08/07/2024 16:25, Henning Hraban Ramm wrote:

Try #1, it often works where \recurselevel fails.


That gives the intended numbers.
Thank you

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: table float split behavior

2024-07-08 Thread Henning Hraban Ramm

Am 08.07.24 um 15:48 schrieb vm via ntg-context:

There is a reason that the \recurselevel do not work in this context;
all \recurselevel show up as zero


   {\bTABLE
    \dorecurse{100}{
    \bTR \bTD \recurselevel \eTD \bTD one \eTD \eTR
    \bTR \bTD two \eTD \bTD \recurselevel \eTD \eTR
    }
    \eTABLE}


Any hint?


Something about expansion and maybe buffers.

Try #1, it often works where \recurselevel fails.

Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: table float split behavior

2024-07-08 Thread Henning Hraban Ramm

Am 08.07.24 um 14:39 schrieb Bruce Horrocks:




On 7 Jul 2024, at 19:34, Henning Hraban Ramm  wrote:

Am 07.07.24 um 20:22 schrieb Bruce Horrocks:

On 7 Jul 2024, at 10:51, Henning Hraban Ramm  wrote:

Also, is it possible to have different captions in first and other parts?

This previous thread might help.
<https://www.mail-archive.com/ntg-context@ntg.nl/msg102641.html>


Thank you, but that doesn’t fit my use case: In my ConTeXt book, there are many 
long tables of parameters. The caption says “Parameters of \setupsomething”, 
but I’d also give hints like “You can also use the parameters of \setupframed, 
see p.123.”. I’d like to have these hints only in the first caption, and 
they’re different for each table.

It’s not that important, I can move the text somewhere else, but often enough 
in ConTeXt there are obscure features for advanced stuff.


If I understand you correctly then this does what you want. It's a bit of a 
hack though.

\defineselector [caption] [max=2]

\starttext

\setupfloatsplitting [inbetween={\setupselector[caption][n=2]}]

\setupselector[caption][n=1]
\placetable[split]
   {\select{caption}
 {Parameters of \type{\setupsomething}. You can also use the parameters of 
\type{\setupframes}, see page. 123}
 {Parameters of \type{\setupsomething}.}
   }
   {\bTABLE
\dorecurse{100}{
\bTR \bTD One \eTD \bTD two \eTD \eTR
\bTR \bTD One \eTD \bTD two \eTD \eTR
}
\eTABLE}

\stoptext


Thank you, that’s a good idea. (Another mechanism in ConTeXt that I 
didn’t know and need to document…)


Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: table float split behavior

2024-07-08 Thread vm via ntg-context




On 08/07/2024 14:39, Bruce Horrocks wrote:

\defineselector [caption] [max=2]

\starttext

\setupfloatsplitting [inbetween={\setupselector[caption][n=2]}]

\setupselector[caption][n=1]
\placetable[split]
   {\select{caption}
 {Parameters of \type{\setupsomething}. You can also use the parameters of 
\type{\setupframes}, see page. 123}
 {Parameters of \type{\setupsomething}.}
   }
   {\bTABLE
\dorecurse{100}{
\bTR \bTD One \eTD \bTD two \eTD \eTR
\bTR \bTD One \eTD \bTD two \eTD \eTR
}
\eTABLE}

\stoptext



There is a reason that the \recurselevel do not work in this context;
all \recurselevel show up as zero


  {\bTABLE
   \dorecurse{100}{
   \bTR \bTD \recurselevel \eTD \bTD one \eTD \eTR
   \bTR \bTD two \eTD \bTD \recurselevel \eTD \eTR
   }
   \eTABLE}


Any hint?

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: table float split behavior

2024-07-08 Thread Bruce Horrocks


> On 7 Jul 2024, at 19:34, Henning Hraban Ramm  wrote:
> 
> Am 07.07.24 um 20:22 schrieb Bruce Horrocks:
>>> On 7 Jul 2024, at 10:51, Henning Hraban Ramm  wrote:
>>> 
>>> Also, is it possible to have different captions in first and other parts?
>> This previous thread might help.
>> <https://www.mail-archive.com/ntg-context@ntg.nl/msg102641.html>
> 
> Thank you, but that doesn’t fit my use case: In my ConTeXt book, there are 
> many long tables of parameters. The caption says “Parameters of 
> \setupsomething”, but I’d also give hints like “You can also use the 
> parameters of \setupframed, see p.123.”. I’d like to have these hints only in 
> the first caption, and they’re different for each table.
> 
> It’s not that important, I can move the text somewhere else, but often enough 
> in ConTeXt there are obscure features for advanced stuff.

If I understand you correctly then this does what you want. It's a bit of a 
hack though.

\defineselector [caption] [max=2]

\starttext

\setupfloatsplitting [inbetween={\setupselector[caption][n=2]}]

\setupselector[caption][n=1]
\placetable[split]
  {\select{caption}
{Parameters of \type{\setupsomething}. You can also use the parameters of 
\type{\setupframes}, see page. 123}
{Parameters of \type{\setupsomething}.}
  }
  {\bTABLE
   \dorecurse{100}{
   \bTR \bTD One \eTD \bTD two \eTD \eTR
   \bTR \bTD One \eTD \bTD two \eTD \eTR
}
\eTABLE}

\stoptext

—
Bruce Horrocks
Hampshire, UK

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: table float split behavior

2024-07-07 Thread Henning Hraban Ramm

Am 07.07.24 um 20:22 schrieb Bruce Horrocks:




On 7 Jul 2024, at 10:51, Henning Hraban Ramm  wrote:

Also, is it possible to have different captions in first and other parts?



This previous thread might help.
<https://www.mail-archive.com/ntg-context@ntg.nl/msg102641.html>


Thank you, but that doesn’t fit my use case: In my ConTeXt book, there 
are many long tables of parameters. The caption says “Parameters of 
\setupsomething”, but I’d also give hints like “You can also use the 
parameters of \setupframed, see p.123.”. I’d like to have these hints 
only in the first caption, and they’re different for each table.


It’s not that important, I can move the text somewhere else, but often 
enough in ConTeXt there are obscure features for advanced stuff.


Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: table float split behavior

2024-07-07 Thread Bruce Horrocks


> On 7 Jul 2024, at 10:51, Henning Hraban Ramm  wrote:
> 
> Also, is it possible to have different captions in first and other parts?


This previous thread might help.


—
Bruce Horrocks
Hampshire, UK

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: table float split behavior

2024-07-07 Thread Henning Hraban Ramm

This is a long-time open issue. Am I the only one affected by this?

Also, \bTABLEfoot doesn’t repeat – I’d like to use it e.g for a line (rule).

Also, is it possible to have different captions in first and other parts?

Hraban

Am 17.06.24 um 18:36 schrieb Henning Hraban Ramm:

Table floats split in odd places, independent of top/page/here location.

There’s always a first part, then some not-float text, then the other 
parts.


Even if the table would fit on two pages (with location=page), it always 
gets split into three.


Can I influence this anyhow?

Hraban


\usemodule[visual]

\starttext

\samplefile{tufte}

\startplacetable[location={top,split},title=table split test]
\bTABLE%[setups=twoparamstable]
\bTABLEhead
\bTR\bTH One \eTH\bTH Two\eTH\bTH Three \eTH\eTR
\eTABLEhead
\bTABLEbody
\dorecurse{60}{%
\bTR\bTD #1\eTD\bTD \fakewords{1}{10}\eTD\bTD \fakewords{1}{10}\eTD\eTR
}
\eTABLEbody
\eTABLE
\stopplacetable

\samplefile{knuth}

\stoptext


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to specify a default formatting for TABLE

2024-07-01 Thread Gerion Entrup
Am Dienstag, 2. Juli 2024, 00:17:36 MESZ schrieb Wolfgang Schuster:
> Gerion Entrup schrieb am 01.07.2024 um 23:56:
> > Hi,
> > 
> > I want to format a bunch a tables with the same formatting.
> > It seems that specifying the \setupTABLE commands as part of the preamble 
> > works.
> > 
> > However, I need some tables that are formatted in another way.
> > Is there a generic way to specify this?
> > 
> > Here is a MWE:
> > [...]
> > 
> > The last two tables should be formatted as if the four setupTABLE commands 
> > in the header are not existent.
> > My solution does not work, however.
> 
> 1. Put your table settings in a setups-block and load the one you want 
> at the start of your table.
> 
> 2. You don't need \setupcolors[state=start] because colors are enabled 
> by default (since a veee...eeery long time).
> 
> 3. You can replace \bTD ... \eTD with \bTH ... \eTH for table headers to 
> get bold text.
> 
>  begin example
> \startsetups[table:a]
>\setupTABLE [each] [frame=off,width=1cm,height=1cm,align={middle,lohi}]
>\setupTABLE [each] [background=color,backgroundcolor=lightgray]
> \stopsetups
> 
> \startsetups[table:b]
>\setupTABLE [each] 
> [frame=off,width=2cm,height=1.2\lineheight,align=middle]
>\setupTABLE [each] [topframe=on,bottomframe=on]
> \stopsetups
> 
> \starttext
> 
> \bTABLE
>\bTR
>  \bTD A \eTD
>  \bTD B \eTD
>\eTR
>\bTR
>  \bTD C \eTD
>  \bTD D \eTD
>\eTR
> \eTABLE
> 
> \blank
> 
> \bTABLE[setups=table:a]
>\bTR
>  \bTD A \eTD
>  \bTD B \eTD
>\eTR
>\bTR
>  \bTD C \eTD
>  \bTD D \eTD
>\eTR
> \eTABLE
> 
> \blank
> 
> \bTABLE[setups=table:b]
>\bTR
>  \bTD A \eTD
>  \bTD B \eTD
>\eTR
>\bTR
>  \bTD C \eTD
>  \bTD D \eTD
>\eTR
> \eTABLE
> 
> \stoptext
>  end example
> 
> Wolfgang

Thank you very much! That are a bunch of nice tricks. The setups environment is 
really powerful.
I will actively search for this keyword in the documentation next time.

Gerion





signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to specify a default formatting for TABLE

2024-07-01 Thread Wolfgang Schuster

Gerion Entrup schrieb am 01.07.2024 um 23:56:

Hi,

I want to format a bunch a tables with the same formatting.
It seems that specifying the \setupTABLE commands as part of the preamble works.

However, I need some tables that are formatted in another way.
Is there a generic way to specify this?

Here is a MWE:
[...]

The last two tables should be formatted as if the four setupTABLE commands in 
the header are not existent.
My solution does not work, however.


1. Put your table settings in a setups-block and load the one you want 
at the start of your table.


2. You don't need \setupcolors[state=start] because colors are enabled 
by default (since a veee...eeery long time).


3. You can replace \bTD ... \eTD with \bTH ... \eTH for table headers to 
get bold text.


 begin example
\startsetups[table:a]
  \setupTABLE [each] [frame=off,width=1cm,height=1cm,align={middle,lohi}]
  \setupTABLE [each] [background=color,backgroundcolor=lightgray]
\stopsetups

\startsetups[table:b]
  \setupTABLE [each] 
[frame=off,width=2cm,height=1.2\lineheight,align=middle]

  \setupTABLE [each] [topframe=on,bottomframe=on]
\stopsetups

\starttext

\bTABLE
  \bTR
\bTD A \eTD
\bTD B \eTD
  \eTR
  \bTR
\bTD C \eTD
\bTD D \eTD
  \eTR
\eTABLE

\blank

\bTABLE[setups=table:a]
  \bTR
\bTD A \eTD
\bTD B \eTD
  \eTR
  \bTR
\bTD C \eTD
\bTD D \eTD
  \eTR
\eTABLE

\blank

\bTABLE[setups=table:b]
  \bTR
\bTD A \eTD
\bTD B \eTD
  \eTR
  \bTR
\bTD C \eTD
\bTD D \eTD
  \eTR
\eTABLE

\stoptext
 end example

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] How to specify a default formatting for TABLE

2024-07-01 Thread Gerion Entrup
Hi,

I want to format a bunch a tables with the same formatting.
It seems that specifying the \setupTABLE commands as part of the preamble works.

However, I need some tables that are formatted in another way.
Is there a generic way to specify this?

Here is a MWE:
```
\setupTABLE[frame=off, offset=2pt]
\setupTABLE[row][first][topframe=on, bottomframe=on, style=bf]
\setupTABLE[row][last][bottomframe=on]
\setupTABLE[row][even][background=color,backgroundcolor=red]

\setupcolors[state=start]

\starttext

A table:\\
\bTABLE
\bTR \bTD head1 \eTD \bTD head2 \eTD \eTR
\bTR \bTD data1 \eTD \bTD data2 \eTD \eTR
\bTR \bTD data3 \eTD \bTD data4 \eTD \eTR
\eTABLE
\blank[line]

Another table with the same format:\\
\bTABLE
\bTR \bTD head1 \eTD \bTD head2 \eTD \eTR
\bTR \bTD data1 \eTD \bTD data2 \eTD \eTR
\bTR \bTD data3 \eTD \bTD data4 \eTD \eTR
\eTABLE
\blank[line]

This table should be formatted in another way (actually not formatted):\\
\bTABLE
\setupTABLE[row][each][topframe=off, bottomframe=off, style=, 
background=]
\bTR \bTD head1 \eTD \bTD head2 \eTD \eTR
\bTR \bTD data1 \eTD \bTD data2 \eTD \eTR
\bTR \bTD data3 \eTD \bTD data4 \eTD \eTR
\eTABLE
\blank[line]

This does not work either:\\
{
\setupTABLE[row][each][topframe=off, bottomframe=off, style=, background=]
% \setupTABLE[row][1,2,3][topframe=off, bottomframe=off, style=, background=] % 
this deactivates the color at least
\bTABLE
\bTR \bTD head1 \eTD \bTD head2 \eTD \eTR
\bTR \bTD data1 \eTD \bTD data2 \eTD \eTR
\bTR \bTD data3 \eTD \bTD data4 \eTD \eTR
\eTABLE
}

\stoptext
```

The last two tables should be formatted as if the four setupTABLE commands in 
the header are not existent.
My solution does not work, however.

Gerion

signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] table float split behavior

2024-06-17 Thread Henning Hraban Ramm

Table floats split in odd places, independent of top/page/here location.

There’s always a first part, then some not-float text, then the other parts.

Even if the table would fit on two pages (with location=page), it always 
gets split into three.


Can I influence this anyhow?

Hraban


\usemodule[visual]

\starttext

\samplefile{tufte}

\startplacetable[location={top,split},title=table split test]
\bTABLE%[setups=twoparamstable]
\bTABLEhead
\bTR\bTH One \eTH\bTH Two\eTH\bTH Three \eTH\eTR
\eTABLEhead
\bTABLEbody
\dorecurse{60}{%
\bTR\bTD #1\eTD\bTD \fakewords{1}{10}\eTD\bTD \fakewords{1}{10}\eTD\eTR
}
\eTABLEbody
\eTABLE
\stopplacetable

\samplefile{knuth}

\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: After using a custom command in the title, the table of contents is not generated properly

2024-06-05 Thread Wolfgang Schuster

ai2472206...@yeah.net schrieb am 05.06.2024 um 16:03:

As described, here is example:

%
\def\cmd#1{{\tt\textslash #1}}
\def\cmdii#1{\tt #1}
\def\cmdiii#1{\rm #1}


You can use \definehighlight to create a custom command for a style.

The case where you want a slash before the text you have to use 
\definestartstop which allows you to set something before and after


\definestartstop [cmdi]   [style=\tt,left=\textslash]
\definehighlight [cmdii]  [style=\tt]
\definehighlight [cmdiii] [style=\rm]

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: After using a custom command in the title, the table of contents is not generated properly

2024-06-05 Thread ai2472206007
I was careless. thank you
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: After using a custom command in the title, the table of contents is not generated properly

2024-06-05 Thread Henning Hraban Ramm

Am 05.06.24 um 16:03 schrieb ai2472206...@yeah.net:

As described, here is example:

%
\def\cmd#1{{\tt\textslash #1}}
\def\cmdii#1{\tt #1}
\def\cmdiii#1{\rm #1}

\starttext

\placecontent% if i dont place toc command , ConText can render it.

\chapter{anything else}
\section{\cmdi{with command} section}
\section{\cmdii{with command} section}
\section{\cmdiii{with command} section}
\section{{\rm with command} section} % only this one work well

\stoptext


Am I missing something important? If so, please tell me what to do. Thank you 
so much.


What do you mean with “not properly”?

\cmdi is not defined
Only \cmd has the necessary additional braces to contain the style switch.
But I don’t know if that’s your problem.

Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] After using a custom command in the title, the table of contents is not generated properly

2024-06-05 Thread ai2472206007
As described, here is example:

%
\def\cmd#1{{\tt\textslash #1}}
\def\cmdii#1{\tt #1}
\def\cmdiii#1{\rm #1}

\starttext

\placecontent% if i dont place toc command , ConText can render it.

\chapter{anything else}
\section{\cmdi{with command} section}
\section{\cmdii{with command} section}
\section{\cmdiii{with command} section}
\section{{\rm with command} section} % only this one work well

\stoptext


Am I missing something important? If so, please tell me what to do. Thank you 
so much.

Muyik
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: [ using horizontal table lines ]

2024-04-15 Thread Wolfgang Schuster

vm via ntg-context schrieb am 15.04.2024 um 13:15:

I'm probably using the \starttable incorrectly:

with this code I only get only *one* horizontal line in the header

[...]

with this code I get two horizontal lines, but the second is too short.

[...]

with this code I get two horizontal lines, with correct length, but 
above the wrong columns


[...]


diff:
\NC\DC\DC\DC\DL[4]\DL[4]\AR
\NC\DC\DC\DC\DL[4]\DL[3]\AR
\NC\DC\DC\DL[4]\DL[4]\AR

There is (probably) a correct way to solve this.


My suggestion is to switch to either natural table or extreme tables but 
it seems to me there is a problem with the division lines which always 
leave an empty column afterwards.


The following example should add horizontal lines above the first and 
third column but this setting results in an error. When I omit the last 
\DC the error disappears but as can be seen in the output the second 
line appears above the fourth column.


\starttext

\starttable[||]
%\DL  \DC  \DL  \DC  \DC \DR
\DL[red] \DC  \DL[red] \DC  \DR
\VL   01 \VL   02 \VL   03 \VL   04 \VL   05 \VL\SR
\stoptable

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] [ using horizontal table lines ]

2024-04-15 Thread vm via ntg-context

I'm probably using the \starttable incorrectly:

with this code I only get only *one* horizontal line in the header

\starttable[|r|r|r|r|r|r|r|l|r|r|r|r|][bodyfont=9pt]
\NC step\NC frac\NC ival\NC  \NC\Use{4}[cI]{freq 
(Hz)}\NC~\NC\Use{4}[cI]{wavelength (m)}\AR

\NC\DC\DC\DC\DL[4]\DL[4]\AR
\NC 0 \NC 0.00 \NC 0.000 \NC 12.50\NC 13.75\NC 15.00\NC 12.25\NC A\ \NC 
27.20\NC 24.73\NC 22.67\NC 27.76\AR
\NC 1 \NC 0.08 \NC 0.115 \NC 13.94\NC 15.34\NC 16.73\NC 13.66\NC A\#\NC 
24.38\NC 22.17\NC 20.32\NC 24.88\AR
\NC 2 \NC 0.17 \NC 0.222 \NC 15.28\NC 16.81\NC18.34\NC14.97\NC 
B\ \NC 22.25\NC 20.23\NC 18.54\NC 22.71\AR

\stoptable




with this code I get two horizontal lines, but the second is too short.

\starttable[|r|r|r|r|r|r|r|l|r|r|r|r|][bodyfont=9pt]
\NC step\NC frac\NC ival\NC  \NC\Use{4}[cI]{freq 
(Hz)}\NC~\NC\Use{4}[cI]{wavelength (m)}\AR

\NC\DC\DC\DC\DL[4]\DL[3]\AR
\NC 0 \NC 0.00 \NC 0.000 \NC 12.50\NC 13.75\NC 15.00\NC 12.25\NC A\ \NC 
27.20\NC 24.73\NC 22.67\NC 27.76\AR
\NC 1 \NC 0.08 \NC 0.115 \NC 13.94\NC 15.34\NC 16.73\NC 13.66\NC A\#\NC 
24.38\NC 22.17\NC 20.32\NC 24.88\AR
\NC 2 \NC 0.17 \NC 0.222 \NC 15.28\NC 16.81\NC18.34\NC14.97\NC 
B\ \NC 22.25\NC 20.23\NC 18.54\NC 22.71\AR

\stoptable


with this code I get two horizontal lines, with correct length, but 
above the wrong columns


\starttable[|r|r|r|r|r|r|r|l|r|r|r|r|][bodyfont=9pt]
\NC step\NC frac\NC ival\NC  \NC\Use{4}[cI]{freq 
(Hz)}\NC~\NC\Use{4}[cI]{wavelength (m)}\AR

\NC\DC\DC\DL[4]\DL[4]\AR
\NC 0 \NC 0.00 \NC 0.000 \NC 12.50\NC 13.75\NC 15.00\NC 12.25\NC A\ \NC 
27.20\NC 24.73\NC 22.67\NC 27.76\AR
\NC 1 \NC 0.08 \NC 0.115 \NC 13.94\NC 15.34\NC 16.73\NC 13.66\NC A\#\NC 
24.38\NC 22.17\NC 20.32\NC 24.88\AR
\NC 2 \NC 0.17 \NC 0.222 \NC 15.28\NC 16.81\NC18.34\NC14.97\NC 
B\ \NC 22.25\NC 20.23\NC 18.54\NC 22.71\AR

\stoptable


diff:
\NC\DC\DC\DC\DL[4]\DL[4]\AR
\NC\DC\DC\DC\DL[4]\DL[3]\AR
\NC\DC\DC\DL[4]\DL[4]\AR


There is (probably) a correct way to solve this.

.Floris___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Table of contents of unnumbered titles

2023-09-10 Thread Jim
Hi Lutz,

thanks very much for that example, it does show me a way to answer my
question.  Although the messages from Wolfgang had already solved my
problem, your solution in instructional in a different way, and so quite
helpful.

Cheers.

Jim

On Sat, Sep  9, 2023 at 21:38 (+0200), Lutz Haseloff wrote:

> Hi Jim,

> perhaps does this work for you?

> 
> \setuplist[chapter][headnumber=no]
> \setuphead[chapter][number=no]
> \starttext
> \completecontent
> \page
> \chapter{Chapter one}
> \input knuth
> \chapter{Chapter two}
> \input ward
> \stoptext
> 

> Greetings Lutz

> Am 9. September 2023 20:11:55 MESZ schrieb Jim :
>>Hi,

>>I am creating a document which is divided with the unnumbered levels
>>(\title, \subject, ...).

>>I would like a table of contents showing the names and page numbers,
>>something like

>>Blah blah blah2
>>Blah blah 4
>>...

>>However, notwithstanding what I see in
>>https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents
>>I can't get this to happen with unnumbered divisions.

>>The above wiki reference says "the following might do that trick" but I
>>think "might" is the keyword, since even the wiki doesn't show the "No
>>number" entry in the \completecontent.

>>I find it hard to imagine that I am the only Context user who wants to do
>>this.  Can anyone point me in the direction of a working example?

>>And am I misinterpreting the wiki, or is the wiki page broken?

>>Thanks.

>> Jim
>>___
>>If your question is of interest to others as well, please add an entry to the 
>>Wiki!

>>maillist : ntg-context@ntg.nl / 
>>https://www.ntg.nl/mailman/listinfo/ntg-context
>>webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
>>archive  : https://bitbucket.org/phg/context-mirror/commits/
>>wiki : https://contextgarden.net
>>___

> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!

> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Table of contents of unnumbered titles

2023-09-09 Thread Jim
Hi Wolfgang,

On Sat, Sep  9, 2023 at 23:12 (+0200), Wolfgang Schuster wrote:

> Jim schrieb am 09.09.2023 um 22:34:
>> Wolfgang,

>> thanks very much for your help.  As a long-time plain TeX user, but a
>> ConTeXt n00b, that would have taken me a long time to figure out.

>> Having said that (and not to be ungrateful), for both of your examples
>> below, in my tests only the subsubject shows up in the contents. I tried
>> this both with the context distribution (updated a few minutes ago) and
>> with the version that is in texlive (also updated a few minutes ago).  Do
>> all three items show up in your contents listing?

> Hi Jim,

> both examples worked for me without problems and even the online compiler
> on the wiki produces the expected result.  Are you sure all 3 \setuphead
> lines are in your document?

Argh.  Mea culpa.

My mail program did not show me that your first answer had non-breakable
spaces after '[title]' and '[subject]' (but not after '[subsubject]').  And
I quickly copied and pasted those into a file without checking the
character set.  Replacing those with ASCII spaces makes everything work
nicely, thanks very much.

Amusingly (sort of), there was a bun-fight on the texhax mailing list
recently when someone's message came across with non-breakable spaces in
it, causing the recipient to complain that something didn't work, when the
originator vehemently asserted that it did.  (I was neither of those two
people, although I did help the originator trace where the nbsp's got into
his message.)  It's like deja vu all over again.

Did you insert your helpful solution into the wiki somewhere, or just test
them in the wiki compiler?  I just reloaded
https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents
and don't see your code there, but since yours does work and those
(apparently) do not work, it would be nice to have your code there.

Cheers.

Jim
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Table of contents of unnumbered titles

2023-09-09 Thread Jim
Wolfgang,

thanks very much for your help.  As a long-time plain TeX user, but a
ConTeXt n00b, that would have taken me a long time to figure out.

Having said that (and not to be ungrateful), for both of your examples
below, in my tests only the subsubject shows up in the contents. I tried
this both with the context distribution (updated a few minutes ago) and
with the version that is in texlive (also updated a few minutes ago).  Do
all three items show up in your contents listing?

Thanks.
Jim


On Sat, Sep  9, 2023 at 21:17 (+0200), Wolfgang Schuster wrote:

> Jim schrieb am 09.09.2023 um 20:11:
>> Hi,

>> I am creating a document which is divided with the unnumbered levels
>> (\title, \subject, ...).

>> I would like a table of contents showing the names and page numbers,
>> something like

>> Blah blah blah2
>> Blah blah 4
>> ...

>> However, notwithstanding what I see in
>> https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents
>> I can't get this to happen with unnumbered divisions.

>> The above wiki reference says "the following might do that trick" but I
>> think "might" is the keyword, since even the wiki doesn't show the "No
>> number" entry in the \completecontent.

>> I find it hard to imagine that I am the only Context user who wants to do
>> this.  Can anyone point me in the direction of a working example?

>> And am I misinterpreting the wiki, or is the wiki page broken?

> 1. You have to change the value of the incrementnumber key for title,
> subject etc.

> 2. You have to specify which sections are shown in the table of content
> because by default only the numbered sections are listed.

>  begin example 1
> \setuphead [title]  [incrementnumber=list]
> \setuphead [subject]    [incrementnumber=list]
> \setuphead [subsubject] [incrementnumber=list]

> \definehead [contentstitle] [title]

> \setupcombinedlist [content]
> [list={chapter,title,section,subject,subsection,subsubject}]

> \starttext

> \completecontent

> \title{Title}

> \subject{Subject}

> \subsubject{Subsubject}

> \stoptext
>  end example 1

>  begin example 2
> \setuphead [title]  [incrementnumber=list]
> \setuphead [subject]    [incrementnumber=list]
> \setuphead [subsubject] [incrementnumber=list]

> \definehead [contentstitle] [title]

> \starttext

> \contentstitle{Contents}

> \placelist[chapter,title,section,subject,subsection,subsubject]

> \title{Title}

> \subject{Subject}

> \subsubject{Subsubject}

> \stoptext
>  end example 2

> Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Table of contents of unnumbered titles

2023-09-09 Thread Wolfgang Schuster

Jim schrieb am 09.09.2023 um 22:34:

Wolfgang,

thanks very much for your help.  As a long-time plain TeX user, but a
ConTeXt n00b, that would have taken me a long time to figure out.

Having said that (and not to be ungrateful), for both of your examples
below, in my tests only the subsubject shows up in the contents. I tried
this both with the context distribution (updated a few minutes ago) and
with the version that is in texlive (also updated a few minutes ago).  Do
all three items show up in your contents listing?


Hi Jim,

both examples worked for me without problems and even the online compiler
on the wiki produces the expected result. Are you sure all 3 \setuphead 
lines

are in your document?

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Table of contents of unnumbered titles

2023-09-09 Thread Lutz Haseloff
Hi Jim,

perhaps does this work for you?


\setuplist[chapter][headnumber=no]
\setuphead[chapter][number=no]
\starttext
\completecontent
\page
\chapter{Chapter one}
\input knuth
\chapter{Chapter two}
\input ward
\stoptext


Greetings Lutz

Am 9. September 2023 20:11:55 MESZ schrieb Jim :
>Hi,
>
>I am creating a document which is divided with the unnumbered levels
>(\title, \subject, ...).
>
>I would like a table of contents showing the names and page numbers,
>something like
>
>Blah blah blah2
>Blah blah 4
>...
>
>However, notwithstanding what I see in
>https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents
>I can't get this to happen with unnumbered divisions.
>
>The above wiki reference says "the following might do that trick" but I
>think "might" is the keyword, since even the wiki doesn't show the "No
>number" entry in the \completecontent.
>
>I find it hard to imagine that I am the only Context user who wants to do
>this.  Can anyone point me in the direction of a working example?
>
>And am I misinterpreting the wiki, or is the wiki page broken?
>
>Thanks.
>
>   Jim
>___
>If your question is of interest to others as well, please add an entry to the 
>Wiki!
>
>maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
>webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
>archive  : https://bitbucket.org/phg/context-mirror/commits/
>wiki : https://contextgarden.net
>___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Table of contents of unnumbered titles

2023-09-09 Thread Wolfgang Schuster

Jim schrieb am 09.09.2023 um 20:11:

Hi,

I am creating a document which is divided with the unnumbered levels
(\title, \subject, ...).

I would like a table of contents showing the names and page numbers,
something like

Blah blah blah2
Blah blah 4
...

However, notwithstanding what I see in
https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents
I can't get this to happen with unnumbered divisions.

The above wiki reference says "the following might do that trick" but I
think "might" is the keyword, since even the wiki doesn't show the "No
number" entry in the \completecontent.

I find it hard to imagine that I am the only Context user who wants to do
this.  Can anyone point me in the direction of a working example?

And am I misinterpreting the wiki, or is the wiki page broken?


1. You have to change the value of the incrementnumber key for title, 
subject etc.


2. You have to specify which sections are shown in the table of content 
because by default only the numbered sections are listed.


 begin example 1
\setuphead [title]  [incrementnumber=list]
\setuphead [subject]    [incrementnumber=list]
\setuphead [subsubject] [incrementnumber=list]

\definehead [contentstitle] [title]

\setupcombinedlist [content] 
[list={chapter,title,section,subject,subsection,subsubject}]


\starttext

\completecontent

\title{Title}

\subject{Subject}

\subsubject{Subsubject}

\stoptext
 end example 1

 begin example 2
\setuphead [title]  [incrementnumber=list]
\setuphead [subject]    [incrementnumber=list]
\setuphead [subsubject] [incrementnumber=list]

\definehead [contentstitle] [title]

\starttext

\contentstitle{Contents}

\placelist[chapter,title,section,subject,subsection,subsubject]

\title{Title}

\subject{Subject}

\subsubject{Subsubject}

\stoptext
 end example 2

Wolfgang


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Table of contents of unnumbered titles

2023-09-09 Thread Jim
Hi,

I am creating a document which is divided with the unnumbered levels
(\title, \subject, ...).

I would like a table of contents showing the names and page numbers,
something like

Blah blah blah2
Blah blah 4
...

However, notwithstanding what I see in
https://wiki.contextgarden.net/index.php?title=Titles&mobileaction=toggle_view_desktop#Unnumbered_titles_in_table_of_contents
I can't get this to happen with unnumbered divisions.

The above wiki reference says "the following might do that trick" but I
think "might" is the keyword, since even the wiki doesn't show the "No
number" entry in the \completecontent.

I find it hard to imagine that I am the only Context user who wants to do
this.  Can anyone point me in the direction of a working example?

And am I misinterpreting the wiki, or is the wiki page broken?

Thanks.

   Jim
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Adjust width of section part of table of contents

2023-09-04 Thread Jeroen
The following is a setuplist for the table of contents. Is there a way to
have the section part only go to 80% of the page width, similar to
width=0.8\textwidth

\setuplist
  [chapter]
  [style={\bf}]

\setuplist
  [section]
  [style={\tfx}]

\setuplist
  [chapter,section]
  [headnumber=no]

\setuplist
  [section]
  [alternative=d]

\placecontent
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Disable continued captions for table parts

2023-08-22 Thread Alexey Kryukov
Dear list,

probably a stupid question, but is it possible to have a table splitted
across pages without adding labels to all subsequent table parts except
the first one?

In my book I have captions above tables
(\setupcaption[table][location=top]), so they are expected to behave
like normal heading. With this type of formatting any "continued" marks
would look weird.

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Table head/body via lua

2023-08-18 Thread Alexey Kryukov
On Fri, 18 Aug 2023 21:11:38 +0200
Wolfgang Schuster wrote:

> What you can do here is to put the table together piece by piece with 
> the collecting
> mechanism which collect parts of the table until you flush the whole 
> collection
> at the end with the \stopcollecting command.

Many thanks, I'll try this.

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Table head/body via lua

2023-08-18 Thread Wolfgang Schuster

Alexey Kryukov schrieb am 18.08.2023 um 20:31:

On Fri, 18 Aug 2023 20:12:33 +0200
Wolfgang Schuster wrote:


Do you create the whole table with Lua? When this is the case a small
change to the table section
commands on the Lua side can fix your problems but otherwise a
different approach is needed.

Hi Wolfgang,

thanks for the answer. Basically I would like to typeset a document
represented as TEI xml. Unfortunately, TEI support for table typesetting
is rather limited: there are no tags corresponding to table head of
body. It is only possible to specify a specific role for some rows.
So I have to use lua code to add head/body markup where appropriate,
and that's exactly what I can't do due to the described problem.

If there is no better solution, I can simply extend my xml with custom
tags, but I would like to keep it as TEI compliant as possible.


What you can do here is to put the table together piece by piece with 
the collecting
mechanism which collect parts of the table until you flush the whole 
collection

at the end with the \stopcollecting command.

\starttext

\bTABLE
\startcollecting
\startcollect
\bTABLEbody
\stopcollect
\startcollect
\bTR
\bTD Cell 1\eTD
\bTD Cell 2\eTD
\eTR
\stopcollect
\startcollect
\eTABLEbody
\stopcollect
\stopcollecting
\eTABLE

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Table head/body via lua

2023-08-18 Thread Alexey Kryukov
On Fri, 18 Aug 2023 20:12:33 +0200
Wolfgang Schuster wrote:

> Do you create the whole table with Lua? When this is the case a small 
> change to the table section
> commands on the Lua side can fix your problems but otherwise a
> different approach is needed.

Hi Wolfgang,

thanks for the answer. Basically I would like to typeset a document
represented as TEI xml. Unfortunately, TEI support for table typesetting
is rather limited: there are no tags corresponding to table head of
body. It is only possible to specify a specific role for some rows.
So I have to use lua code to add head/body markup where appropriate,
and that's exactly what I can't do due to the described problem.

If there is no better solution, I can simply extend my xml with custom
tags, but I would like to keep it as TEI compliant as possible.

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: Table head/body via lua

2023-08-18 Thread Wolfgang Schuster

Alexey Kryukov schrieb am 18.08.2023 um 19:02:

Hi,

I am trying to generate a table representation for some xml source.
As the data structure doesn't directly correspond to the desired table
structure, some manipulations via lua are required. So far everything
works OK except table sectioning commands, like \bTABLEhead,
\eTABLEhead, bTABLEbody or \eTABLEbody: it seems impossible to
incapsulate them into lua functions. For example, the following is not
compiled:

\starttext
\bTABLE
\ctxlua{context.bTABLEbody()}
\bTR
\bTD Cell 1\eTD
\bTD Cell 2\eTD
\eTR
\ctxlua{context.eTABLEbody()}
\eTABLE
\stoptext

Can anybody suggest a workaround (except changing the source XML of
course)?


Do you create the whole table with Lua? When this is the case a small 
change to the table section
commands on the Lua side can fix your problems but otherwise a different 
approach is needed.


Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Table head/body via lua

2023-08-18 Thread Alexey Kryukov
Hi,

I am trying to generate a table representation for some xml source.
As the data structure doesn't directly correspond to the desired table
structure, some manipulations via lua are required. So far everything
works OK except table sectioning commands, like \bTABLEhead,
\eTABLEhead, bTABLEbody or \eTABLEbody: it seems impossible to
incapsulate them into lua functions. For example, the following is not
compiled:

\starttext
\bTABLE
\ctxlua{context.bTABLEbody()}
\bTR
\bTD Cell 1\eTD
\bTD Cell 2\eTD
\eTR
\ctxlua{context.eTABLEbody()}
\eTABLE
\stoptext

Can anybody suggest a workaround (except changing the source XML of
course)?

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Table of contents not appearing.

2023-04-21 Thread Fabrice Couvreur via ntg-context
An extra parenthesis in a section title seems to be the problem but I'm not
sure. I compiled the file line by line and it works now.
Thanks
Fabrice

Le ven. 21 avr. 2023 à 14:37, Hans Hagen via ntg-context 
a écrit :

> On 4/21/2023 5:05 PM, Fabrice Couvreur via ntg-context wrote:
> > It's chapter_5 that's the problem, but how do you know what's causing
> > the table of contents not to appear ?
> depends on the error : the toc comes from the tuc file so if that one is
> not made ...
>
> -
>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 /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Table of contents not appearing.

2023-04-21 Thread Hans Hagen via ntg-context

On 4/21/2023 5:05 PM, Fabrice Couvreur via ntg-context wrote:
It's chapter_5 that's the problem, but how do you know what's causing 
the table of contents not to appear ?
depends on the error : the toc comes from the tuc file so if that one is 
not made ...


-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Table of contents not appearing.

2023-04-21 Thread Fabrice Couvreur via ntg-context
It's chapter_5 that's the problem, but how do you know what's causing the
table of contents not to appear ?

Le ven. 21 avr. 2023 à 14:42, Fabrice Couvreur 
a écrit :

> Hi Hans,
> Alright, I'll compile by integrating one component at a time to figure out
> which one is causing the problem.
> Thanks.
> Fabrice
>
> Le jeu. 20 avr. 2023 à 15:52, Hans Hagen via ntg-context <
> ntg-context@ntg.nl> a écrit :
>
>> On 4/20/2023 6:59 PM, Fabrice Couvreur via ntg-context wrote:
>> > Hi,
>> > I don't see why the table of contents does not appear. On the other
>> > hand, the 12 chapters are present.
>>
>> \startproduct[terminale-manual]
>>
>>  \startfrontmatter
>>  \starttitle[title=Table des matières]
>>  \placelist
>> [chapter,section,subsection,subsubsection]
>> [criterium=all,
>> interaction=all,
>>  alternative=c]
>>  \stoptitle
>>  \stopfrontmatter
>>
>>  \startbodymatter
>>  \chapter{xxx}
>>  \stopbodymatter
>>
>> \stopproduct
>>
>> shows a table of contents so it must be something in your components
>>
>> > Fabrice
>> >
>> >
>> > \startproduct[terminale-manual]
>> >
>> >\project[terminale-environment]
>> >\startfrontmatter
>> >
>> >  \setuppagenumbering
>> > [location=]
>> >
>> >  \definefont
>> >[ChapterTextStyle]
>> >[SansBold*default sa 2.2]
>> >
>> >  \setuphead
>> >[title]
>> >[style=ChapterTextStyle,
>> > align=flushright]
>> >
>> >  \setuplist
>> > [chapter]
>> > [style=bold,
>> >  alternative=b,
>> >  width=1em]
>> >
>> >  \setuplist
>> > [section]
>> > [margin=1em,
>> >  width=1.75em]
>> >
>> >  \setuplist
>> > [subsection]
>> > [margin=2.75em,
>> >  width=2.25em,
>> > distance=\spaceamount]
>> >
>> >
>> >  \starttitle[title=Table des matières]
>> >
>> >   \placelist
>> > [chapter,section,subsection,subsubsection]
>> > [criterium=all,
>> > interaction=all,
>> >  alternative=c]
>> >
>> >\stoptitle
>> >
>> >  \stopfrontmatter
>> >
>> >  \startbodymatter
>> >\component[chapitre_1]
>> >\component[chapitre_2]
>> >\component[chapitre_3]
>> >\component[chapitre_4]
>> >\component[chapitre_5]
>> >\component[chapitre_6]
>> >\component[chapitre_7]
>> >\component[chapitre_8]
>> >\component[chapitre_9]
>> >\component[chapitre_10]
>> >\component[chapitre_11]
>> >\component[chapitre_12]
>> >  \stopbodymatter
>> >
>> > \stopproduct
>> >
>> >
>> >
>> ___
>> > If your question is of interest to others as well, please add an entry
>> to the Wiki!
>> >
>> > maillist : ntg-context@ntg.nl /
>> https://www.ntg.nl/mailman/listinfo/ntg-context
>> > webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
>> > archive  : https://bitbucket.org/phg/context-mirror/commits/
>> > wiki : https://contextgarden.net
>> >
>> ___
>>
>> --
>>
>> -
>>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 /
>> https://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : https://contextgarden.net
>>
>> ___
>>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Table of contents not appearing.

2023-04-21 Thread Fabrice Couvreur via ntg-context
Hi Hans,
Alright, I'll compile by integrating one component at a time to figure out
which one is causing the problem.
Thanks.
Fabrice

Le jeu. 20 avr. 2023 à 15:52, Hans Hagen via ntg-context 
a écrit :

> On 4/20/2023 6:59 PM, Fabrice Couvreur via ntg-context wrote:
> > Hi,
> > I don't see why the table of contents does not appear. On the other
> > hand, the 12 chapters are present.
>
> \startproduct[terminale-manual]
>
>  \startfrontmatter
>  \starttitle[title=Table des matières]
>  \placelist
> [chapter,section,subsection,subsubsection]
> [criterium=all,
> interaction=all,
>  alternative=c]
>  \stoptitle
>  \stopfrontmatter
>
>  \startbodymatter
>  \chapter{xxx}
>  \stopbodymatter
>
> \stopproduct
>
> shows a table of contents so it must be something in your components
>
> > Fabrice
> >
> >
> > \startproduct[terminale-manual]
> >
> >\project[terminale-environment]
> >\startfrontmatter
> >
> >  \setuppagenumbering
> > [location=]
> >
> >  \definefont
> >[ChapterTextStyle]
> >[SansBold*default sa 2.2]
> >
> >  \setuphead
> >[title]
> >[style=ChapterTextStyle,
> > align=flushright]
> >
> >  \setuplist
> > [chapter]
> > [style=bold,
> >  alternative=b,
> >  width=1em]
> >
> >  \setuplist
> > [section]
> > [margin=1em,
> >  width=1.75em]
> >
> >  \setuplist
> > [subsection]
> > [margin=2.75em,
> >  width=2.25em,
> > distance=\spaceamount]
> >
> >
> >  \starttitle[title=Table des matières]
> >
> >   \placelist
> > [chapter,section,subsection,subsubsection]
> > [criterium=all,
> > interaction=all,
> >  alternative=c]
> >
> >\stoptitle
> >
> >  \stopfrontmatter
> >
> >  \startbodymatter
> >\component[chapitre_1]
> >\component[chapitre_2]
> >\component[chapitre_3]
> >\component[chapitre_4]
> >\component[chapitre_5]
> >\component[chapitre_6]
> >\component[chapitre_7]
> >\component[chapitre_8]
> >\component[chapitre_9]
> >\component[chapitre_10]
> >\component[chapitre_11]
> >\component[chapitre_12]
> >  \stopbodymatter
> >
> > \stopproduct
> >
> >
> >
> ___
> > If your question is of interest to others as well, please add an entry
> to the Wiki!
> >
> > maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> > webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : https://contextgarden.net
> >
> ___
>
> --
>
> -
>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 /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Table of contents not appearing.

2023-04-20 Thread Hans Hagen via ntg-context

On 4/20/2023 6:59 PM, Fabrice Couvreur via ntg-context wrote:

Hi,
I don't see why the table of contents does not appear. On the other 
hand, the 12 chapters are present.


\startproduct[terminale-manual]

\startfrontmatter
\starttitle[title=Table des matières]
\placelist
   [chapter,section,subsection,subsubsection]
   [criterium=all,
   interaction=all,
alternative=c]
\stoptitle
\stopfrontmatter

\startbodymatter
\chapter{xxx}
\stopbodymatter

\stopproduct

shows a table of contents so it must be something in your components


Fabrice


\startproduct[terminale-manual]

   \project[terminale-environment]
   \startfrontmatter

     \setuppagenumbering
        [location=]

     \definefont
       [ChapterTextStyle]
       [SansBold*default sa 2.2]

     \setuphead
       [title]
       [style=ChapterTextStyle,
        align=flushright]

     \setuplist
        [chapter]
        [style=bold,
         alternative=b,
         width=1em]

     \setuplist
        [section]
        [margin=1em,
         width=1.75em]

     \setuplist
        [subsection]
        [margin=2.75em,
         width=2.25em,
        distance=\spaceamount]


     \starttitle[title=Table des matières]

          \placelist
            [chapter,section,subsection,subsubsection]
            [criterium=all,
            interaction=all,
             alternative=c]

       \stoptitle

     \stopfrontmatter

     \startbodymatter
       \component[chapitre_1]
       \component[chapitre_2]
       \component[chapitre_3]
       \component[chapitre_4]
       \component[chapitre_5]
       \component[chapitre_6]
       \component[chapitre_7]
       \component[chapitre_8]
       \component[chapitre_9]
       \component[chapitre_10]
       \component[chapitre_11]
       \component[chapitre_12]
     \stopbodymatter

\stopproduct


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


--

-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Table of contents not appearing.

2023-04-20 Thread Fabrice Couvreur via ntg-context
Hi,
I don't see why the table of contents does not appear. On the other hand,
the 12 chapters are present.
Thanks
Fabrice


\startproduct[terminale-manual]

  \project[terminale-environment]
  \startfrontmatter

\setuppagenumbering
   [location=]

\definefont
  [ChapterTextStyle]
  [SansBold*default sa 2.2]

\setuphead
  [title]
  [style=ChapterTextStyle,
   align=flushright]

\setuplist
   [chapter]
   [style=bold,
alternative=b,
width=1em]

\setuplist
   [section]
   [margin=1em,
width=1.75em]

\setuplist
   [subsection]
   [margin=2.75em,
width=2.25em,
   distance=\spaceamount]


\starttitle[title=Table des matières]

 \placelist
   [chapter,section,subsection,subsubsection]
   [criterium=all,
   interaction=all,
alternative=c]

  \stoptitle

\stopfrontmatter

\startbodymatter
  \component[chapitre_1]
  \component[chapitre_2]
  \component[chapitre_3]
  \component[chapitre_4]
  \component[chapitre_5]
  \component[chapitre_6]
  \component[chapitre_7]
  \component[chapitre_8]
  \component[chapitre_9]
  \component[chapitre_10]
  \component[chapitre_11]
  \component[chapitre_12]
\stopbodymatter

\stopproduct
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Table of contents in the middle of a document

2023-04-17 Thread Alan Braslau via ntg-context
Try:

\completecontent [criterium=all]

Alan


On Tue, 18 Apr 2023 01:06:02 +0200
Kalouguine Andre via ntg-context  wrote:

> Hi, 
> 
> I was trying to have my "Acknowledgements" section/chapter before the
> table of contents but be contained within it. 
> 
> Is it normal that the table of contents is empty if there is a chapter
> that begins before it? 
> 
> ``` 
> 
> \starttext
> \chapter{Acknowledgements}
> Thank you
> 
> \completecontent
> 
> \chapter{Intro}
> 
> \chapter{Problem}
> 
> \chapter{Solution}
> \stoptext 
> 
> ``` 
> 
> I'm mostly looking for an explanation rather than a direct solution,
> I'd like to understand why it's empty. It works when using sections
> instead of chapters. 
> 
> Best regards,
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Table of contents in the middle of a document

2023-04-17 Thread Kalouguine Andre via ntg-context
Hi, 

I was trying to have my "Acknowledgements" section/chapter before the
table of contents but be contained within it. 

Is it normal that the table of contents is empty if there is a chapter
that begins before it? 

``` 

\starttext
\chapter{Acknowledgements}
Thank you

\completecontent

\chapter{Intro}

\chapter{Problem}

\chapter{Solution}
\stoptext 

``` 

I'm mostly looking for an explanation rather than a direct solution, I'd
like to understand why it's empty. It works when using sections instead
of chapters. 

Best regards,

-- 
Kalouguine Andre___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] natural table oddities

2023-04-01 Thread Henning Hraban Ramm via ntg-context
[This mail sat in my drafts folder for days; wanted to research more 
first, well…]


Am 28.03.23 um 02:19 schrieb Bruce Horrocks:

If you're asking for comments with a view to making changes then...


I can’t make the changes myself, only suggest them to Hans.


On 27 Mar 2023, at 15:03, Henning Hraban Ramm via ntg-context 
 wrote:



* If I format a column, e.g. \setupTABLE[c][-1][color=red], body and foot are 
formatted, but not the same column in header. I couldn’t find how to format 
columns in header.


If you disregard the Wiki page instructions to use \bTH...\eTH then you can 
format the header using:

\bTD ... \eTD


but I'm not sure what the consequences might be, if any. You lose the default 
bold heading so maybe that's all /bTH.../eTH is adding?


Yes, I also found that out – either I sent an incomplete email, or I 
forgot to add my later “research”. 🤔


TH (table header, not Taco or Tomáš 😉) adds a separation between header 
and body cells, but setting up "header" affects both TD and TH within 
TABLEhead.



It would be nice to have a way of specifying the header explicitly. My 
suggestion would be to have:
- \setupTABLE[r][head][...] affect just the header
- \setupTABLE[r][next][...] affect the new page header
- \setupTABLE[r][first|last|body][...] affect the first, or last, or only the 
body rows (i.e. not the header or footer)
- \setupTABLE[r][foot][...] affect just the footer

[r][last] (and [r][-1]) would represent the last body row (but not the footer 
row if one has been requested).


I agree.


## Formatting
* maxwidth doesn’t seem to have an effect, neither on the whole table nor on a 
column.
* textwidth works only for the whole table.
* width gets stretched if option=stretch; i.e. I can’t fix the width of single 
cells or columns.


For me, \setupTABLE [c] [1] [width=3cm] fixes the width of column 1 and forces 
long text to wrap.


But the width of a column is not fixed if you set option=stretch, then 
*all* columns are stretched, not only the undefined.


Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] natural table oddities

2023-03-27 Thread Bruce Horrocks via ntg-context
If you're asking for comments with a view to making changes then...

> On 27 Mar 2023, at 15:03, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> I would be happy about some answers/comments.
> Hraban
> 
> Am 13.03.23 um 23:26 schrieb Henning Hraban Ramm:
>> Working on the documentation for “natural tables” in my book I stumbled upon 
>> a few oddities/problems:
>> ## Addressing cells:
>> * There’s \setupTABLE[header], but not "footer" (or "section"); since we 
>> have TABLEhead and TABLEfoot, IMO "head" and "foot" would make sense.

I'd be happy with that, especially as there is already headstyle and headcolor.

>> * Row 1 is the first row of TABLEbody. I couldn’t find how to address the 
>> first line of TABLEbody.
>> * If I format a column, e.g. \setupTABLE[c][-1][color=red], body and foot 
>> are formatted, but not the same column in header. I couldn’t find how to 
>> format columns in header.

If you disregard the Wiki page instructions to use \bTH...\eTH then you can 
format the header using:

  \bTABLEhead
\bTR \bTH Column 1 \eTH \bTD[color=blue] Column 2 \eTD \eTR
  \eTABLEhead

but I'm not sure what the consequences might be, if any. You lose the default 
bold heading so maybe that's all /bTH.../eTH is adding?

It would be nice to have a way of specifying the header explicitly. My 
suggestion would be to have:
- \setupTABLE[r][head][...] affect just the header
- \setupTABLE[r][next][...] affect the new page header
- \setupTABLE[r][first|last|body][...] affect the first, or last, or only the 
body rows (i.e. not the header or footer)
- \setupTABLE[r][foot][...] affect just the footer 

[r][last] (and [r][-1]) would represent the last body row (but not the footer 
row if one has been requested).

Extending to the formatting of header/footer/next etc columns is not quite so 
neat as an extra parameter is required, e.g. [c][][head][...] to reference 
column n in the header. For consistency the syntax [c][][body][...] could be 
an option.


>> * I don’t understand the addressing options "start" and "one".

Me neither. :)

>> ## Formatting
>> * maxwidth doesn’t seem to have an effect, neither on the whole table nor on 
>> a column.
>> * textwidth works only for the whole table.
>> * width gets stretched if option=stretch; i.e. I can’t fix the width of 
>> single cells or columns.

For me, \setupTABLE [c] [1] [width=3cm] fixes the width of column 1 and forces 
long text to wrap.

I'm not sure what your \textwidth comment relates to because \setupTABLE [c] 
[1] [width=.2\textwidth] works as expected for me.


>> ## Page breaking
>> * What’s the difference between split=repeat and header=repeat ?

\setupTABLE [split=repeat] % works as expected for me
\setupTABLE [header=repeat] % doesn't work for me


>> I’d like to know if there are misunderstandings / if the behavior is 
>> intentional.

—
Bruce Horrocks
Hampshire, UK

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] natural table oddities

2023-03-27 Thread Henning Hraban Ramm via ntg-context

I would be happy about some answers/comments.
Hraban

Am 13.03.23 um 23:26 schrieb Henning Hraban Ramm:
Working on the documentation for “natural tables” in my book I stumbled 
upon a few oddities/problems:


## Addressing cells:

* There’s \setupTABLE[header], but not "footer" (or "section"); since we 
have TABLEhead and TABLEfoot, IMO "head" and "foot" would make sense.


* Row 1 is the first row of TABLEbody. I couldn’t find how to address 
the first line of TABLEbody.


* If I format a column, e.g. \setupTABLE[c][-1][color=red], body and 
foot are formatted, but not the same column in header. I couldn’t find 
how to format columns in header.


* I don’t understand the addressing options "start" and "one".


## Formatting

* maxwidth doesn’t seem to have an effect, neither on the whole table 
nor on a column.

* textwidth works only for the whole table.
* width gets stretched if option=stretch; i.e. I can’t fix the width of 
single cells or columns.



## Page breaking

* What’s the difference between split=repeat and header=repeat ?



I’d like to know if there are misunderstandings / if the behavior is 
intentional.


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to rotate the caption of a table...

2023-03-25 Thread Willi Egger via ntg-context
Hello Hraban,

thank you! indeed the trick is to use \startplacetable[location=90]

Cheers

Willi

> On 25 Mar 2023, at 21:55, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Am 25.03.23 um 21:39 schrieb Willi Egger via ntg-context:
>> Hello everybody,
>> in my project is a table which does not fit the width of the page. Hence I 
>> need to rotate it. Rotating the table is ok, but the caption is not rotated. 
>> My question is how can I instruct ConTeXt to rotate the caption and place it 
>> on the right side?
>> My attempt:
>> \setupcaption[table][location=right,orientation=90]
>> \startplacetable
>>  [location=middle,
>>   reference=tab:papierformaten,
>>   title={Standaardformaten}]
>>   \rotate[rotation=90]{\externalfigure[Table1][type=buffer]}
>> \stopplacetable
> 
> I think \setupcaption[orientation=90] should work. Did you try different 
> locations?
> 
> But the problem might be your use of \rotation, since \startplacefloat as 
> well as \setupTABLE have options for rotation.
> Try \startplacetable[location=90]
> 
> Hraban
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to rotate the caption of a table...

2023-03-25 Thread Henning Hraban Ramm via ntg-context

Am 25.03.23 um 21:39 schrieb Willi Egger via ntg-context:

Hello everybody,


in my project is a table which does not fit the width of the page. Hence I need 
to rotate it. Rotating the table is ok, but the caption is not rotated. My 
question is how can I instruct ConTeXt to rotate the caption and place it on 
the right side?

My attempt:



\setupcaption[table][location=right,orientation=90]
\startplacetable
[location=middle,
 reference=tab:papierformaten,
 title={Standaardformaten}]
 \rotate[rotation=90]{\externalfigure[Table1][type=buffer]}
\stopplacetable


I think \setupcaption[orientation=90] should work. Did you try different 
locations?


But the problem might be your use of \rotation, since \startplacefloat 
as well as \setupTABLE have options for rotation.

Try \startplacetable[location=90]

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] How to rotate the caption of a table...

2023-03-25 Thread Willi Egger via ntg-context
Hello everybody,


in my project is a table which does not fit the width of the page. Hence I need 
to rotate it. Rotating the table is ok, but the caption is not rotated. My 
question is how can I instruct ConTeXt to rotate the caption and place it on 
the right side?

My attempt:


test.pdf
Description: Adobe PDF document

\setupcaption[table][location=right,orientation=90]
\startplacetable
[location=middle,
 reference=tab:papierformaten,
 title={Standaardformaten}]
 \rotate[rotation=90]{\externalfigure[Table1][type=buffer]}
\stopplacetable

Thank you for your support

Willi___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] The same Table, im Math Modus?

2023-03-23 Thread Ursula Hermann via ntg-context
Dear Yanrui,


many thanks, works great.


Uschi


Von: ntg-context  im Auftrag von Li Yanrui (李延瑞) 
via ntg-context 
Gesendet: Donnerstag, 23. März 2023 01:56:07
An: mailing list for ConTeXt users
Cc: Li Yanrui (李延瑞)
Betreff: Re: [NTG-context] The same Table, im Math Modus?



Ursula Hermann via ntg-context mailto:ntg-context@ntg.nl>> 
于2023年3月21日周二 20:45写道:

I’d like to do a Table lik this one
[enter image description here]
I have no example. How can I do that?


You can use xtable, e.g.

\startxtable[frame=off,width=1cm,align=center]
\startxrow[bottomframe=on,frameoffset=1pt]
\startxcell[rightframe=on,frameoffset=1pt] $1$ \stopxcell
\startxcell[leftframe=on,rightframe=on,frameoffset=1pt] $2$ \stopxcell
\startxcell[leftframe=on,frameoffset=1pt] $3$ \stopxcell
\stopxrow
\startxrow[topframe=on,bottomframe=on,frameoffset=1pt]
\startxcell[rightframe=on,frameoffset=1pt] $4$ \stopxcell
\startxcell[leftframe=on,rightframe=on,frameoffset=1pt] $5$ \stopxcell
\startxcell[leftframe=on,frameoffset=1pt] $6$ \stopxcell
\stopxrow
\startxrow[topframe=on,frameoffset=1pt]
\startxcell[rightframe=on,frameoffset=1pt] $7$ \stopxcell
\startxcell[leftframe=on,rightframe=on,frameoffset=1pt] $8$ \stopxcell
\startxcell[leftframe=on,frameoffset=1pt] $9$ \stopxcell
\stopxrow
\stopxtable

--
Best regards,

Li Yanrui
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] The same Table, im Math Modus?

2023-03-22 Thread 李延瑞
Ursula Hermann via ntg-context  于2023年3月21日周二 20:45写道:

>
>
> I’d like to do a Table lik this one
>
> [image: enter image description here]
>
> I have no example. How can I do that?
>
>
>
You can use xtable, e.g.

\startxtable[frame=off,width=1cm,align=center]
\startxrow[bottomframe=on,frameoffset=1pt]
\startxcell[rightframe=on,frameoffset=1pt] $1$ \stopxcell
\startxcell[leftframe=on,rightframe=on,frameoffset=1pt] $2$ \stopxcell
\startxcell[leftframe=on,frameoffset=1pt] $3$ \stopxcell
\stopxrow
\startxrow[topframe=on,bottomframe=on,frameoffset=1pt]
\startxcell[rightframe=on,frameoffset=1pt] $4$ \stopxcell
\startxcell[leftframe=on,rightframe=on,frameoffset=1pt] $5$ \stopxcell
\startxcell[leftframe=on,frameoffset=1pt] $6$ \stopxcell
\stopxrow
\startxrow[topframe=on,frameoffset=1pt]
\startxcell[rightframe=on,frameoffset=1pt] $7$ \stopxcell
\startxcell[leftframe=on,rightframe=on,frameoffset=1pt] $8$ \stopxcell
\startxcell[leftframe=on,frameoffset=1pt] $9$ \stopxcell
\stopxrow
\stopxtable

-- 
Best regards,

Li Yanrui
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] The same Table, im Math Modus?

2023-03-21 Thread Ursula Hermann via ntg-context
Von: Ursula Hermann
Gesendet: Montag, 13. März 2023 12:51
An: 'mailing list for ConTeXt users' 
Betreff: Table

I'd like to do a Table lik this one, is this possible with Math Modus?
[enter image description here]
I have no example. How can I do that?

Many thanks
Uschi


Von: Ursula Hermann
Gesendet: Montag, 13. März 2023 12:51
An: 'mailing list for ConTeXt users' 
Betreff: Table

I'd like to do a Table lik this one
[enter image description here]
I have no example. How can I do that?

Many thanks
Uschi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] natural table oddities

2023-03-14 Thread Henning Hraban Ramm via ntg-context
Working on the documentation for “natural tables” I stumbled upon a few 
oddities/problems.
I’d like to know if there are misunderstandings on my part or if the 
behavior is intentional.


BTW enattab.pdf is missing in the LMTX distribution.

## Options

* before/after/inbetween values don’t appear anywhere.
* spaceinbetween should insert between rows, but nothing happens.
* splitoffset doesn’t seem to change anything.
* What’s samepage for?


## Addressing cells

* It’s not possible to address single cells with \setupTABLE, or is it?

* There’s \setupTABLE[header], but not "footer" (or "section"); since we 
have TABLEhead and TABLEfoot, IMO "head" and "foot" would make sense.


* Row 1 is the first row of TABLEbody. I couldn’t find how to address 
the first line of TABLEbody.


* Is it possible, and how, to use odd/even only for the body?

* If I format a column, e.g. \setupTABLE[c][-1][color=red], body and 
foot are formatted, but not the same column in header. (I found out, if 
I use TD instead of TH in the header, it works.)


* I don’t understand the addressing options "start" and "one".


## Formatting

* maxwidth doesn’t seem to have an effect, neither on the whole table 
nor on a column.

* textwidth works only for the whole table.
* width gets stretched if option=stretch; i.e. you can’t fix the width 
of single cells or columns.



## Page breaking

* What’s the difference between [split=repeat] and 
[split=yes,header=repeat], i.e. which sense makes the header option)?


* Is there an option to repeat the footer (as the last line of each 
page)? (I’d imagine to use it in an invoice or similar calculation for a 
subtotal – that would imply some more magic…)



Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Table

2023-03-13 Thread Ursula Hermann via ntg-context
Dear Mikael!

Many thanks, that works great!

Uschi

Von: ntg-context  Im Auftrag von Mikael Sundqvist 
via ntg-context
Gesendet: Montag, 13. März 2023 14:16
An: mailing list for ConTeXt users 
Cc: Mikael Sundqvist 
Betreff: Re: [NTG-context] Table

Hi Uschi,

On Mon, Mar 13, 2023 at 1:03 PM Ursula Hermann via ntg-context 
mailto:ntg-context@ntg.nl>> wrote:
I’d like to do a Table lik this one
[enter image description here]
I have no example. How can I do that?

Many thanks
Uschi

There are probably better ways, but this seems to give something like what you 
look for:

\starttext

\setupTABLE[c][align=middle]
\setupTABLE[c][odd][width=2em]
\setupTABLE[c][even][width=1mm]
\setupTABLE[r][2][height=1mm]
\setupTABLE[c][1][leftframe=off]
\setupTABLE[c][5][rightframe=off]

\bTABLE
  \bTR
\bTD 1 \eTD \bTD \eTD \bTD 2 \eTD \bTD \eTD \bTD 3 \eTD
  \eTR
  \bTR
\bTD   \eTD \bTD \eTD \bTD   \eTD \bTD \eTD \bTD   \eTD
  \eTR
  \bTR
\bTD 4 \eTD \bTD \eTD \bTD 5 \eTD \bTD \eTD \bTD 6 \eTD
  \eTR
  \bTR
\bTD 7 \eTD \bTD \eTD \bTD 8 \eTD \bTD \eTD \bTD 9 \eTD
  \eTR
\eTABLE

\stoptext

/Mikael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Table

2023-03-13 Thread Mikael Sundqvist via ntg-context
Hi Uschi,

On Mon, Mar 13, 2023 at 1:03 PM Ursula Hermann via ntg-context <
ntg-context@ntg.nl> wrote:

> I’d like to do a Table lik this one
>
> [image: enter image description here]
>
> I have no example. How can I do that?
>
>
>
> Many thanks
>
> Uschi
>

There are probably better ways, but this seems to give something like what
you look for:

\starttext

\setupTABLE[c][align=middle]
\setupTABLE[c][odd][width=2em]
\setupTABLE[c][even][width=1mm]
\setupTABLE[r][2][height=1mm]
\setupTABLE[c][1][leftframe=off]
\setupTABLE[c][5][rightframe=off]

\bTABLE
\bTR
\bTD 1 \eTD \bTD \eTD \bTD 2 \eTD \bTD \eTD \bTD 3 \eTD
\eTR
\bTR
\bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD
\eTR
\bTR
\bTD 4 \eTD \bTD \eTD \bTD 5 \eTD \bTD \eTD \bTD 6 \eTD
\eTR
\bTR
\bTD 7 \eTD \bTD \eTD \bTD 8 \eTD \bTD \eTD \bTD 9 \eTD
\eTR
\eTABLE

\stoptext

/Mikael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Table

2023-03-13 Thread Ursula Hermann via ntg-context
I'd like to do a Table lik this one
[enter image description here]
I have no example. How can I do that?

Many thanks
Uschi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Changing the caption on a split table

2022-08-13 Thread Wolfgang Schuster via ntg-context

Bruce Horrocks via ntg-context schrieb am 13.08.2022 um 10:35:

On 3 Aug 2022, at 00:26, Bruce Horrocks via ntg-context  
wrote:

I have a 5-page table placed using

\setupcaption [table] [way=bytext,prefixsegments=none]
\placetable[split]{My long table}{...}

The caption for the first table page is "Table 1a  My Long table"; for the second table page it is 
"Table 1b  My long table" and so on. I'd like to change these to be "Table 1  My Long table" then 
"Table 1 (cont'd) My long table" for the remaining pages.

I've tried \setupcaption[table][suffix={(cont'd)] but that affects all the 
pages. How can I set it for the second and subsequent pages only, please?

The solution turned out to be really simple (for small tables at least - less 
fun if you have hundreds of pages!). Just use:

\defineconversion[Contd][~,{ (cont’d)},{ (cont’d)},{ (cont’d)},{ (cont’d)},{ 
(cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)} ]
\setupfloatsplitting[conversion=Contd]

This results in "Table 1 My Long table", "Table 1 (cont’d) My Long table" and 
so on.


There is already a conversion for this numbering style.

\setuplabeltext [en] [continued={ (cont’d)}]

\setupfloatsplitting [conversion=continued]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Changing the caption on a split table

2022-08-13 Thread Bruce Horrocks via ntg-context


> On 3 Aug 2022, at 00:26, Bruce Horrocks via ntg-context  
> wrote:
> 
> I have a 5-page table placed using
> 
> \setupcaption [table] [way=bytext,prefixsegments=none]
> \placetable[split]{My long table}{...}
> 
> The caption for the first table page is "Table 1a  My Long table"; for the 
> second table page it is "Table 1b  My long table" and so on. I'd like to 
> change these to be "Table 1  My Long table" then "Table 1 (cont'd) My long 
> table" for the remaining pages.
> 
> I've tried \setupcaption[table][suffix={(cont'd)] but that affects all the 
> pages. How can I set it for the second and subsequent pages only, please?

The solution turned out to be really simple (for small tables at least - less 
fun if you have hundreds of pages!). Just use:

\defineconversion[Contd][~,{ (cont’d)},{ (cont’d)},{ (cont’d)},{ (cont’d)},{ 
(cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)},
   { (cont’d)},{ (cont’d)},{ 
(cont’d)},{ (cont’d)},{ (cont’d)} ]
\setupfloatsplitting[conversion=Contd]

This results in "Table 1 My Long table", "Table 1 (cont’d) My Long table" and 
so on.

—
Bruce Horrocks
Hampshire, UK

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Changing the caption on a split table

2022-08-02 Thread Bruce Horrocks via ntg-context
I have a 5-page table placed using

\setupcaption [table] [way=bytext,prefixsegments=none]
\placetable[split]{My long table}{...}

The caption for the first table page is "Table 1a  My Long table"; for the 
second table page it is "Table 1b  My long table" and so on. I'd like to change 
these to be "Table 1  My Long table" then "Table 1 (cont'd) My long table" for 
the remaining pages.

I've tried \setupcaption[table][suffix={(cont'd)] but that affects all the 
pages. How can I set it for the second and subsequent pages only, please?

—
Bruce Horrocks
Hampshire, UK

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Auto width and height on table cells

2022-06-30 Thread Pablo Rodriguez via ntg-context
On 6/30/22 18:10, Angel M Alganza via ntg-context wrote:
> [...]
> No, you aren't, and it almost does it, except when the fixed width
> column is other than the first one, I'm afraid.

Hi Ángel,

there might be a way to get it, as long as you don’t define height
directly, such as in:

 \starttext
  \showframe
  \startbuffer
  row\currentxtablerow--col\currentxtablecolumn
  \stopbuffer
  \startbuffer[table]
  \startxtable[option={stretch, height}, align={lohi, middle}]
  \startxrow
  \dorecurse{5}
{\startxcell[width=.115\textwidth]\inlinebuffer\stopxcell}
  \startxcell\inlinebuffer\stopxcell
  \stopxrow
  \startxrow
  \dorecurse{5}
{\startxcell\inlinebuffer\stopxcell}
  \startxcell[offset=1em]\input zapf\stopxcell
  \stopxrow
  \dorecurse{5}
  {\startxrow
  \dorecurse{6}
{\startxcell\inlinebuffer\stopxcell}
  \stopxrow}
  \stopxtable
  \stopbuffer
  \getbuffer[table]
  \page
  \setuppapersize[A3, landscape]
  \getbuffer[table]
  \stoptext

Again, just in case it helps,

Pablo
___
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] Auto width and height on table cells

2022-06-30 Thread Angel M Alganza via ntg-context

Hi Pablo,

On Thu, Jun 30, 2022 at 04:15:10PM +0200, Pablo Rodriguez via ntg-context wrote:


I’m not sure whether I’m totally missing your point,
but I think this is a way that might achieve what you want:


No, you aren't, and it almost does it, except when the fixed width
column is other than the first one, I'm afraid.

¡Muchas gracias!
Ángel
___
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] Auto width and height on table cells

2022-06-30 Thread Pablo Rodriguez via ntg-context
On 6/30/22 09:46, Angel M Alganza via ntg-context wrote:
> [...]
> How about the auto row height?  That'd be the only thing I'm missing.

Hi Ángel,

I’m not sure whether I’m totally missing your point, but I think this is
a way that might achieve what you want:

  \starttext
  \showframe
  \startbuffer
  row\currentxtablerow--col\currentxtablecolumn
  \stopbuffer
  \startbuffer[table]
  \startxtable[option={stretch, height}, align={lohi, middle}]
  \startxrow
  \startxcell[width=3cm, option=fixed]\inlinebuffer\stopxcell
  \dorecurse{5}
{\startxcell\inlinebuffer\stopxcell}
  \stopxrow
  \startxrow
  \startxcell[height=3cm, option=fixed]\inlinebuffer\stopxcell
  \dorecurse{5}
{\startxcell\inlinebuffer\stopxcell}
  \stopxrow
  \dorecurse{5}
  {\startxrow
  \dorecurse{6}
{\startxcell\inlinebuffer\stopxcell}
  \stopxrow}
  \stopxtable
  \stopbuffer
  \getbuffer[table]
  \page
  \setuppapersize[A3, landscape]
  \getbuffer[table]
  \stoptext

Just in case it helps,

Pablo
___
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] Auto width and height on table cells

2022-06-30 Thread Angel M Alganza via ntg-context

Hi again,

On Thu, Jun 30, 2022 at 12:12:07PM +0200, Henning Hraban Ramm via ntg-context 
wrote:

I can stay with “natural tables” (and “tabulate” for easy cases), but 
the auto-stretching of rows or whole tables _is_ missing.


I'm going back, too, I think.

Unfortunately, this is a situation like in LaTeX: We have a choice of 
table “packages”, but none of them covers my most common use cases.


Same here.
___
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] Auto width and height on table cells

2022-06-30 Thread Henning Hraban Ramm via ntg-context

Am 30.06.22 um 09:36 schrieb Hans Hagen via ntg-context:

On 6/30/2022 9:22 AM, Angel M Alganza via ntg-context wrote:
They’re also tedious, because you can’t setup rows/columns in advance 
(like \setupTABLE) – or did that change?


I'm afraid you're right.
You're joking right? SInce when can one not set up something in some 
context subsystem? Why would I make a table mechanism with no presets?


Yes, presets are nice, and I appreciate the better performance, but if I 
can setup stuff like striped tables or some other “advanced” formatting 
without explicite settings within the table, I prefer that.


I can stay with “natural tables” (and “tabulate” for easy cases), but 
the auto-stretching of rows or whole tables _is_ missing.


Unfortunately, this is a situation like in LaTeX: We have a choice of 
table “packages”, but none of them covers my most common use cases.


Hraban
___
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] Auto width and height on table cells

2022-06-30 Thread Angel M Alganza via ntg-context

Hi again, Hans,

On Thu, Jun 30, 2022 at 10:26:58AM +0200, Hans Hagen via ntg-context wrote:


How about the auto row height?  That'd be the only thing I'm missing.
we don't have it for the vertical direction ... you can remind me 
later this year (to see if it is doable)


Ah, OK.  Thank you!  :-)

Cheers,
Ángel
___
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] Auto width and height on table cells

2022-06-30 Thread Hans Hagen via ntg-context

On 6/30/2022 9:46 AM, Angel M Alganza via ntg-context wrote:

On Thu, Jun 30, 2022 at 09:36:07AM +0200, Hans Hagen via ntg-context wrote:

You're joking right? SInce when can one not set up something in some 
context subsystem? Why would I make a table mechanism with no presets?


I see! :-)

It's just more symbolic than in natural tables (which is better 
performance wise). I'm pretty sure it's mentioned in some manual.


I didn't see it in the wiki and I thought it didn't exist.

How about the auto row height?  That'd be the only thing I'm missing.
we don't have it for the vertical direction ... you can remind me later 
this year (to see if it is doable)


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] Auto width and height on table cells

2022-06-30 Thread Angel M Alganza via ntg-context

On Thu, Jun 30, 2022 at 09:36:07AM +0200, Hans Hagen via ntg-context wrote:

You're joking right? SInce when can one not set up something in some 
context subsystem? Why would I make a table mechanism with no presets?


I see! :-)

It's just more symbolic than in natural tables (which is better 
performance wise). I'm pretty sure it's mentioned in some manual.


I didn't see it in the wiki and I thought it didn't exist.

How about the auto row height?  That'd be the only thing I'm missing.

Thanks so much.
Ángel
___
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] Auto width and height on table cells

2022-06-30 Thread Hans Hagen via ntg-context

On 6/30/2022 9:22 AM, Angel M Alganza via ntg-context wrote:

Hi Henning,

On Thu, Jun 30, 2022 at 09:02:28AM +0200, Henning Hraban Ramm via 
ntg-context wrote:


They’re also tedious, because you can’t setup rows/columns in advance 
(like \setupTABLE) – or did that change?


I'm afraid you're right.
You're joking right? SInce when can one not set up something in some 
context subsystem? Why would I make a table mechanism with no presets?



\starttext
\setupxtable[suffix][align=middle,foregroundcolor=red]
\setupxtable[blabla][foregroundstyle=slanted]
\setupxtable[crap]  [foregroundcolor=blue]
\setupxtable[bold]  [crap][foregroundstyle=bold]

\startxtable[frame=off]
\startxtablehead
\startxrow[bold]
\startxcell[suffix] a 0 \stopxcell
\startxcell[blabla] a 1 \stopxcell
\startxcell a 2 \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody
\startxrow \startxcell[suffix][ny=2] a 1 \stopxcell \startxcell 
b 1 \stopxcell \startxcell c 1 \stopxcell \stopxrow
\startxrow  \startxcell 
b 2 \stopxcell \startxcell c 2 \stopxcell \stopxrow
\startxrow \startxcell[suffix]   a 3 \stopxcell \startxcell 
b 3 \stopxcell \startxcell c 3 \stopxcell \stopxrow
\startxrow \startxcell[suffix]   a 4 \stopxcell \startxcell 
b 4 \stopxcell \startxcell c 4 \stopxcell \stopxrow
\startxrow \startxcell[suffix]   a 5 \stopxcell \startxcell 
b 5 \stopxcell \startxcell c 5 \stopxcell \stopxrow

\stopxtablebody
\stopxtable
\stoptext

It's just more symbolic than in natural tables (which is better 
performance wise). I'm pretty sure it's mentioned in some manual.


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] Auto width and height on table cells

2022-06-30 Thread Angel M Alganza via ntg-context

Hi Henning,

On Thu, Jun 30, 2022 at 09:02:28AM +0200, Henning Hraban Ramm via ntg-context 
wrote:

They’re also tedious, because you can’t setup rows/columns in advance 
(like \setupTABLE) – or did that change?


I'm afraid you're right.

Cheers,
Ángel
___
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] Auto width and height on table cells

2022-06-30 Thread Henning Hraban Ramm via ntg-context

Am 30.06.22 um 08:40 schrieb Angel M Alganza via ntg-context:

Hello, Hans,

On Thu, Jun 30, 2022 at 08:16:53AM +0200, Hans Hagen via ntg-context wrote:


\startxtable[option=stretch]
  \startxrow
  \startxcell[width=3cm,option=fixed] one \stopxcell


Thank you very much, that does part of the trick (the column width).
Is there a way to do the same for the row height, please?

I never looked at xtables, since the wiki says they're used for tables
that need to span several pages, which I don't need.


They’re also tedious, because you can’t setup rows/columns in advance 
(like \setupTABLE) – or did that change?


Hraban
___
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] Auto width and height on table cells

2022-06-29 Thread Angel M Alganza via ntg-context

Hello, Hans,

On Thu, Jun 30, 2022 at 08:16:53AM +0200, Hans Hagen via ntg-context wrote:


\startxtable[option=stretch]
  \startxrow
  \startxcell[width=3cm,option=fixed] one \stopxcell


Thank you very much, that does part of the trick (the column width).
Is there a way to do the same for the row height, please?

I never looked at xtables, since the wiki says they're used for tables
that need to span several pages, which I don't need.

Cheers,
Ángel
___
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] Auto width and height on table cells

2022-06-29 Thread Hans Hagen via ntg-context

On 6/30/2022 7:43 AM, Angel M Alganza via ntg-context wrote:

Hello,

I want some tables to occupy 100% of \textwidth and \textheight and for
all columns to be the same width except one or two that I want to
specify and for all rows to be the same height except for one or two,
that I want to specify as well..
For the moment, I'm doing it "manually", calculating column width as

   (\textwidth - width of fixed columns) / # rest of columns

and row height as

   (\textheight - height of fixed rows) / # rest of rows

I'm getting the result that I want, but it's a bit tedious.

Is it possible to have ConTeXt do all those calculations for me?
I haven't been able to figure it out from the manuals and the wiki.

\starttext

\startxtable[option=stretch]
   \startxrow
   \startxcell[width=3cm,option=fixed] one \stopxcell
   \startxcell two \stopxcell
   \startxcell three \stopxcell
   \stopxrow
   \startxrow
   \startxcell a \stopxcell
   \startxcell b \stopxcell
   \startxcell c \stopxcell
   \stopxrow
\stopxtable

\stoptext


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


[NTG-context] Auto width and height on table cells

2022-06-29 Thread Angel M Alganza via ntg-context

Hello,

I want some tables to occupy 100% of \textwidth and \textheight and for
all columns to be the same width except one or two that I want to
specify and for all rows to be the same height except for one or two,
that I want to specify as well.. 


For the moment, I'm doing it "manually", calculating column width as

  (\textwidth - width of fixed columns) / # rest of columns

and row height as

  (\textheight - height of fixed rows) / # rest of rows

I'm getting the result that I want, but it's a bit tedious.

Is it possible to have ConTeXt do all those calculations for me?
I haven't been able to figure it out from the manuals and the wiki.

Thank you in advance.

Regards,
Ángel
___
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 of Contents empty for unknown reason

2022-06-13 Thread Aditya Mahajan via ntg-context
On Sun, 12 Jun 2022, Joel via ntg-context wrote:

> I need to display a table of contents, but only displaying chapters.
> 
> Here is my minimum working example:

You need to add "criterium=all" to both placelist and completecontent. See 
below:

> \starttext
>     \startfrontmatter
>         \startchapter[title={Contents}]
>             \placelist[chapter][criterium=all]
>         \stopchapter
>         \completecontent[criterium=all]
>     \stopfrontmatter
>     \startbodymatter
>     \startchapter[title={Title 1}]
>     \input knuth
>     \stopchapter
>     \stopbodymatter
> 
> \stoptext

Aditya___
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 of Contents empty for unknown reason

2022-06-12 Thread Joel via ntg-context
I need to display a table of contents, but only displaying chapters.

Here is my minimum working example:
\starttext
    \startfrontmatter
        \startchapter[title={Contents}]
            \placelist[chapter]
        \stopchapter
        \completecontent
    \stopfrontmatter
    \startbodymatter
    \startchapter[title={Title 1}]
    \input knuth
    \stopchapter
    \stopbodymatter

\stoptext

For reasons I don't understand, both  \placelist[chapter] and \completecontent 
display the title, but are otherwise empty of contents. I believe the code was 
working before an update. I used ConTeXt live though and confirmed this code 
even doesn't work there.
Why isn't it rendering the table of contents?
--Joel

___
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] How to include a file with table data within a table?

2022-05-29 Thread Wolfgang Schuster via ntg-context

I sent a fix to the dev list.

Wolfgang

Joel via ntg-context schrieb am 29.05.2022 um 18:34:
After a recent update to ConTeXt, the code no longer seems to allow me 
to \input a file within a table:


\starttext
\starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
 \HL
        \NC {\bf Term} \NC {\bf Definition} \NC\NR
    \HL
        \input test2.tex %<here you see I have input a file inside 
the table

 \HL
\stoptabulate
\stoptext

File test2.tex contains "\NC {\bf Term} \NC {\bf Definition} \NC\NR".

I also tried defining a macro earlier in the document...

\define[2]\tablewordis{%
    \NC \NC \NC\NR
 \NC #1 \NC #2 \NC\NR
}

...then placing that in test2.tex, e.g.:

\tablewordis{my word}{my definition}

I get the error: " The file ended when scanning an argument."

Before the update, this code worked fine.

How can I \input a file while inside a table environment, as above?

I have a document that has 100s of these inputs in my code, and now 
nothing will compile.


Thanks,

--Joel

 *





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


Re: [NTG-context] How to include a file with table data within a table?

2022-05-29 Thread Joel via ntg-context
 Adding the brackets + file name also didn't work.
--Joel

On Sunday, May 29, 2022, 11:33:48 AM MDT, Henning Hraban Ramm via 
ntg-context  wrote:  
 
 Did you try \input{file.tex} ?
(Just an idea, didn’t try.)

Hraban

Am 29.05.22 um 18:34 schrieb Joel via ntg-context:
> After a recent update to ConTeXt, the code no longer seems to allow me 
> to \input a file within a table:
> 
> \starttext
> \starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
>      \HL
>          \NC {\bf Term} \NC {\bf Definition} \NC\NR
>      \HL
>          \input test2.tex %<here you see I have input a file inside 
> the table
>      \HL
> \stoptabulate
> \stoptext
> 
> File test2.tex contains "\NC {\bf Term} \NC {\bf Definition} \NC\NR".
> 
> I also tried defining a macro earlier in the document...
> 
> \define[2]\tablewordis{%
>      \NC \NC \NC\NR
>      \NC #1 \NC #2 \NC\NR
> }
> 
> ...then placing that in test2.tex, e.g.:
> 
> \tablewordis{my word}{my definition}
> 
> I get the error: " The file ended when scanning an argument."
> 
> Before the update, this code worked fine.
> 
> How can I \input a file while inside a table environment, as above?
> 
> I have a document that has 100s of these inputs in my code, and now 
> nothing will compile.
> 
> Thanks,
> 
> --Joel
___
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
___


Re: [NTG-context] How to include a file with table data within a table?

2022-05-29 Thread Henning Hraban Ramm via ntg-context

Did you try \input{file.tex} ?
(Just an idea, didn’t try.)

Hraban

Am 29.05.22 um 18:34 schrieb Joel via ntg-context:
After a recent update to ConTeXt, the code no longer seems to allow me 
to \input a file within a table:


\starttext
\starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
     \HL
         \NC {\bf Term} \NC {\bf Definition} \NC\NR
     \HL
         \input test2.tex %<here you see I have input a file inside 
the table

     \HL
\stoptabulate
\stoptext

File test2.tex contains "\NC {\bf Term} \NC {\bf Definition} \NC\NR".

I also tried defining a macro earlier in the document...

\define[2]\tablewordis{%
     \NC \NC \NC\NR
     \NC #1 \NC #2 \NC\NR
}

...then placing that in test2.tex, e.g.:

\tablewordis{my word}{my definition}

I get the error: " The file ended when scanning an argument."

Before the update, this code worked fine.

How can I \input a file while inside a table environment, as above?

I have a document that has 100s of these inputs in my code, and now 
nothing will compile.


Thanks,

--Joel

___
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] How to include a file with table data within a table?

2022-05-29 Thread Joel via ntg-context
After a recent update to ConTeXt, the code no longer seems to allow me to 
\input a file within a table:
\starttext
\starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
    \HL
        \NC {\bf Term} \NC {\bf Definition} \NC\NR                
    \HL
        \input test2.tex %<here you see I have input a file inside the table
    \HL
\stoptabulate
\stoptext
File test2.tex contains "\NC {\bf Term} \NC {\bf Definition} \NC\NR".
I also tried defining a macro earlier in the document...
\define[2]\tablewordis{%
    \NC \NC \NC\NR
    \NC #1 \NC #2 \NC\NR
}
...then placing that in test2.tex, e.g.:
\tablewordis{my word}{my definition}

I get the error: " The file ended when scanning an argument."
Before the update, this code worked fine.
How can I \input a file while inside a table environment, as above?
I have a document that has 100s of these inputs in my code, and now nothing 
will compile.

Thanks,
--Joel
   
   -


___
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] split TABLE cells

2022-05-19 Thread Wolfgang Schuster via ntg-context

Steffen Wolfrum via ntg-context schrieb am 19.05.2022 um 12:44:

do you have a MWE?
the example from https://wiki.contextgarden.net/Tabulate gives an empty page:

[...]


You need \starttext and \stoptext in your document. The examples in the 
wiki don't need

both commands because they are added when the examples are created.

Below is a simple example.

\setuppapersize[A5]

\starttext

\starttabulate[|l|p|]
\NC Donald Knuth  \NC \input{knuth}  \NC\NR
\NC Hermann Zapf  \NC \input{zapf}   \NC\NR
\NC Edward Tufte  \NC \input{tufte}  \NC\NR
\NC Eugene Linden \NC \input{linden} \NC\NR
\stoptabulate

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] split TABLE cells

2022-05-19 Thread Steffen Wolfrum via ntg-context


> Am 19.05.2022 um 08:14 schrieb Hans Hagen via ntg-context 
> :
> 
> On 5/18/2022 8:07 PM, Steffen Wolfrum via ntg-context wrote:
>> Hi,
>> I just found an old mail from 30 May 2008:
>> How do I split not only TABLE but cells? It was not possible then.
>> \starttext
>> \bTABLE[split=yes,option=stretch]
>> \bTR
>> \bTD
>> \input tufte \input knuth Hello world ...
>> \eTD
>> \bTD
>> \input tufte
>> \eTD
>> \bTD
>> \input knuth
>> \eTD
>> \eTR
>> \bTR
>> \bTD
>> Test
>> \eTD
>> \bTD
>> Test
>> \eTD
>> \bTD
>> Test
>> \eTD
>> \eTR
>> \eTABLE
>> \stoptext
> not possible, use tabulate instead


do you have a MWE? 

the example from https://wiki.contextgarden.net/Tabulate gives an empty page:



\setuppapersize[A10, landscape][A8, landscape]
\setuppaper[nx=2,ny=2]
\setuparranging[XY]

\switchtobodyfont[5pt]
\setuppagenumbering[location={header,inright}]
\showframe[edge]

\setuptabulate
 [split=yes,
  header=text,
  title={\color[red] Fenchurch St. Paul},
  frame=on]

\starttabulate[|p(1.2cm)|p(1.2cm)|]
\dorecurse{6}{
\NC  Bells:  \NC  Tin tan din dan bim bam bom bo \NC\NR
\HL
\NC  Name:  \NC  Tailor Paul \NC \NR
  
\HL
}
\stoptabulate
)



Best wishes, Steffen
___
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] split TABLE cells

2022-05-18 Thread Hans Hagen via ntg-context

On 5/18/2022 8:07 PM, Steffen Wolfrum via ntg-context wrote:

Hi,

I just found an old mail from 30 May 2008:

How do I split not only TABLE but cells? It was not possible then.

\starttext
\bTABLE[split=yes,option=stretch]
\bTR
\bTD
\input tufte \input knuth Hello world ...
\eTD
\bTD
\input tufte
\eTD
\bTD
\input knuth
\eTD
\eTR
\bTR
\bTD
Test
\eTD
\bTD
Test
\eTD
\bTD
Test
\eTD
\eTR
\eTABLE
\stoptext

not possible, use tabulate instead

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


[NTG-context] split TABLE cells

2022-05-18 Thread Steffen Wolfrum via ntg-context
Hi,

I just found an old mail from 30 May 2008:

How do I split not only TABLE but cells? It was not possible then.

\starttext
\bTABLE[split=yes,option=stretch]
\bTR
\bTD
\input tufte \input knuth Hello world ...
\eTD
\bTD
\input tufte
\eTD
\bTD
\input knuth
\eTD
\eTR
\bTR
\bTD
Test
\eTD
\bTD
Test
\eTD
\bTD
Test
\eTD
\eTR
\eTABLE
\stoptext


Best wishes, Steffen
___
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 breaks incorrectly between pages

2022-05-15 Thread śrīrāma via ntg-context
On 5/15/22 6:18 PM Bruce Horrocks wrote:
> Too slow!!
> 
> I'd already added https://wiki.contextgarden.net/
TABLE#Tables_in_page_headers.

Hmm. I searched the wiki for '\bTABLEnested' and this did not show up there. I 
just now checked the edit history now and you seemed to have added it just 
four minutes after I made the first edit to add it! Then, I wrote a more 
detailed example. Looks like we added it around the same time.

Sorry if I created any confusion. 

  Sreeram


___
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 breaks incorrectly between pages

2022-05-15 Thread Bruce Horrocks via ntg-context
Too slow!!

I'd already added https://wiki.contextgarden.net/TABLE#Tables_in_page_headers.

> On 15 May 2022, at 12:00, śrīrāma via ntg-context  wrote:
> 
> On 5/15/22 2:20 PM Wolfgang Schuster via ntg-context wrote:
>> Use the TABLEnested environment in your document header which was added
>> to avoid problems like in your example.
>> 
>> \startsetups headertext
>> \bTABLEnested[setups=headertable,option=stretch]
>> ...
>> \eTABLEnested
>> \stopsetups
> 
> Splendid (as always)! Definitely a better solution for Stefan's document.
> 
> I added a section in the wiki making a note of this:
>  https://wiki.contextgarden.net/TABLE#Headers_with_TABLEs
> 
> Thanks Wolfgang! Until now, I did not even know of the 'nested' type for 
> TABLE.
> 
>  Sreeram
> 

—
Bruce Horrocks
Hampshire, UK

___
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 breaks incorrectly between pages

2022-05-15 Thread śrīrāma via ntg-context
On 5/15/22 2:20 PM Wolfgang Schuster via ntg-context wrote:
> Use the TABLEnested environment in your document header which was added
> to avoid problems like in your example.
> 
> \startsetups headertext
> \bTABLEnested[setups=headertable,option=stretch]
> ...
> \eTABLEnested
> \stopsetups

Splendid (as always)! Definitely a better solution for Stefan's document.

I added a section in the wiki making a note of this:
  https://wiki.contextgarden.net/TABLE#Headers_with_TABLEs

Thanks Wolfgang! Until now, I did not even know of the 'nested' type for 
TABLE.

  Sreeram


___
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 breaks incorrectly between pages

2022-05-15 Thread Wolfgang Schuster via ntg-context

Stefan Nedeljkovic via ntg-context schrieb am 13.05.2022 um 09:00:
Dear list I need your help with a table that seems to completely 
screw up the page when it spans across multiple pages. I'm attaching 
all the necessary files.


Use the TABLEnested environment in your document header which was added 
to avoid problems like in your example.


\startsetups headertext
\bTABLEnested[setups=headertable,option=stretch]
...
\eTABLEnested
\stopsetups

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Table breaks incorrectly between pages

2022-05-14 Thread Stefan Nedeljkovic via ntg-context
Wow, thank you very, very much!

On Sun, 15 May 2022, 05:35 śrīrāma,  wrote:

> On 5/13/22 12:30 PM Stefan Nedeljkovic via ntg-context wrote:
> > Dear list I need your help with a table that seems to completely screw up
> > the page when it spans across multiple pages. I'm attaching all the
> > necessary files.
> >
> > Kind regards,
> > Stefan
>
> This seems to be a known issue for quite a while, see here:
>   https://www.mail-archive.com/ntg-context@ntg.nl/msg69827.html
>
> As Wolfgang suggested there, you can use framed instead of TABLE in your
> header. I have modified your example file (see attached). With that you
> get the
> attached PDF.
>
> By the way, your example was missing a \bTABLEhead. Moreover, I believe
> cells
> in TABLE head entries should be enclosed by \bTH \eTH instead of \(b|e)TD.
> I
> have made these changes as well.
>
> [Also, I hope you are aware that you can use style=\tt, style=\bf per row/
> column/cell with \setupTABLE; that will significantly reduce markup in
> your
> file]
>
> Best,
>   Sreeram
___
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 breaks incorrectly between pages

2022-05-14 Thread śrīrāma via ntg-context
On 5/13/22 12:30 PM Stefan Nedeljkovic via ntg-context wrote:
> Dear list I need your help with a table that seems to completely screw up
> the page when it spans across multiple pages. I'm attaching all the
> necessary files.
> 
> Kind regards,
> Stefan

This seems to be a known issue for quite a while, see here:
  https://www.mail-archive.com/ntg-context@ntg.nl/msg69827.html

As Wolfgang suggested there, you can use framed instead of TABLE in your 
header. I have modified your example file (see attached). With that you get the 
attached PDF.

By the way, your example was missing a \bTABLEhead. Moreover, I believe cells 
in TABLE head entries should be enclosed by \bTH \eTH instead of \(b|e)TD. I 
have made these changes as well.

[Also, I hope you are aware that you can use style=\tt, style=\bf per row/
column/cell with \setupTABLE; that will significantly reduce markup in your 
file]

Best,
  Sreeram% kate: hl ctx

\input fonts

\usetypescript[ibmplex][uc]
\setupbodyfont[ibmplex,rm,9pt]

\setuppapersize[A4]
\setuplayout[
leftedge=\dimexpr0cm,
rightedge=\dimexpr0cm,
leftedgedistance=\dimexpr0cm,
rightedgedistance=\dimexpr0cm,
leftmargin=\dimexpr0cm,
rightmargin=\dimexpr0cm,
leftmargindistance=\dimexpr0cm,
rightmargindistance=\dimexpr0cm,
width=middle,
cutspace=\dimexpr1.5cm,
backspace=\dimexpr1.5cm,
topspace=\dimexpr1.5cm,
header=\dimexpr4cm,
height=middle,
bottomspace=\dimexpr0cm,
footer=\dimexpr0.5cm]

\setupheadertexts[\directsetup{fheader}]

\definehspace[tnumber][0.5em]

\startsetups [fheader]
\startframed[width=max,frame=off]
\startoverlay
{\leftaligned{\framedtext[location=top,frame=off,width=fit,offset=0ex]{„ДОЛИНА” Д.О.О. Београд\\
  ПЈ за прераду меса\\
  ПИБ: СР 100029284\\
  МБ: 06434517\\
  Текући рачун: 205-157956-65\\
  Email: dolin...@gmail.com}}}
{\rightaligned{\framedtext[location=top,frame=off,width=fit,offset=0ex]{%
  Булевар Краља Александра 334, 11000 Београд\\
  011\hspace[tnumber]3806\hspace[tnumber]007\\
  011\hspace[tnumber]3820\hspace[tnumber]457\\
  011\hspace[tnumber]2419\hspace[tnumber]078\\
  \vskip 2em
  Жике Поповића бб, 12220, Велико Градиште\\
  012\hspace[tnumber]662\hspace[tnumber]016}}}
\stopoverlay
\stopframed
\stopsetups

\startsetups [headertable]
\setupTABLE[frame=off]
\setupTABLE[column][1][align=flushleft]
\setupTABLE[column][2][align=flushright]
\stopsetups

\startsetups headertext
\start
\bTABLE[setups=headertable,option=stretch]
\bTR
\bTD
„ДОЛИНА” Д.О.О. Београд\\
ПЈ за прераду меса\\
ПИБ: СР 100029284\\
МБ: 06434517\\
Текући рачун: 205-157956-65\\
Email: dolin...@gmail.com
\eTD
\bTD
Булевар Краља Александра 334, 11000 Београд\\
011\hspace[tnumber]3806\hspace[tnumber]007\\
011\hspace[tnumber]3820\hspace[tnumber]457\\
011\hspace[tnumber]2419\hspace[tnumber]078\\
\vskip 2em
Жике Поповића бб, 12220, Велико Градиште\\
012\hspace[tnumber]662\hspace[tnumber]016\\
\eTD
\eTR
\eTABLE
\stop
\stopsetups

\setuppagenumbering[location=]
\setupfootertexts[][\midaligned{\userpagenumber/\lastuserpage}]
\starttext
\switchtobodyfont[18pt]
\definehspace[hspacing][0.15em]
О\hspace[hspacing]Т\hspace[hspacing]П\hspace[hspacing]Р\hspace[hspacing]Е\hspace[hspacing]М\hspace[hspacing]Н\hspace[hspacing]И\hspace[hspacing]Ц\hspace[hspacing] А\\
\switchtobodyfont[9pt]
{\bf РАЧУН БРОЈ 3180/09}\\
\vskip 3em
Купац: ХЛАДНИ ИЗВОР\\
Место: РИПАЊ, Авалска бр. 261\\
ПИБ: 103358290\\
МБ: 17556711\\
\vskip 3em
Место издавања рачуна: Велико Градиште\\
Датум издавања рачуна: 04.06.2020. 11:13:03\\
Датум промета: 05.06.2020\\
Датум плаћања: 05.06.2020\\
\vskip 3em\start
\startsetups[maintable]
\setupTABLE[frame=off]
\setupTABLE[row][*][height=7.25mm]
\setupTABLE[column][1][align=flushleft]
\setupTABLE[column][2][align=flushleft]
\setupTABLE[column][3][align=flushleft]
\setupTABLE[column][4][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][5][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][6][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][7][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][8][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][9][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][10][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][11][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][12][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\stopsetups
\switchtobodyfont[6pt]
\startalignment[middle]
\bTABLE[setups=maintable,option=stretch,split=repeat]
\bTABLEhead
\bTR[bottomframe=on, rulethickness=2pt,offset=0.25pt]
\bTH\bf Рб \eTH
\bTH\bf Шифра артикла \eTH
\bTH\bf Назив артикла \eTH
\bTH\bf Јединица мере \eTH
\bTH\bf Количина \eTH
\bTH\bf Цена \eTH
\bTH\bf Износ \eTH
\bTH\bf Попуст \eTH
\bTH\bf Основа за ПДВ \eTH
\bTH\bf Порез \eTH
\bTH\bf Износ пореза \eTH
\bTH

[NTG-context] Table breaks incorrectly between pages

2022-05-14 Thread Stefan Nedeljkovic via ntg-context
Dear list I need your help with a table that seems to completely screw up
the page when it spans across multiple pages. I'm attaching all the
necessary files.

Kind regards,
Stefan
\input fonts

\usetypescript[ibmplex][uc]
\setupbodyfont[ibmplex,rm,9pt]

\setuppapersize[A4]
\setuplayout[
leftedge=\dimexpr0cm,
rightedge=\dimexpr0cm,
leftedgedistance=\dimexpr0cm,
rightedgedistance=\dimexpr0cm,
leftmargin=\dimexpr0cm,
rightmargin=\dimexpr0cm,
leftmargindistance=\dimexpr0cm,
rightmargindistance=\dimexpr0cm,
width=middle,
cutspace=\dimexpr1.5cm,
backspace=\dimexpr1.5cm,
topspace=\dimexpr1.5cm,
header=\dimexpr4cm,
height=middle,
bottomspace=\dimexpr0cm,
footer=\dimexpr0.5cm]


\setupheadertexts[\setups{headertext}]

\definehspace[tnumber][0.5em]

\startsetups [headertable]
\setupTABLE[frame=off]
\setupTABLE[column][1][align=flushleft]
\setupTABLE[column][2][align=flushright]
\stopsetups

\startsetups headertext
\start
\bTABLE[setups=headertable,option=stretch]
\bTR
\bTD
„ДОЛИНА” Д.О.О. Београд\\
ПЈ за прераду меса\\
ПИБ: СР 100029284\\
МБ: 06434517\\
Текући рачун: 205-157956-65\\
Email: dolin...@gmail.com
\eTD
\bTD
Булевар Краља Александра 334, 11000 Београд\\
011\hspace[tnumber]3806\hspace[tnumber]007\\
011\hspace[tnumber]3820\hspace[tnumber]457\\
011\hspace[tnumber]2419\hspace[tnumber]078\\
\vskip 2em
Жике Поповића бб, 12220, Велико Градиште\\
012\hspace[tnumber]662\hspace[tnumber]016\\
\eTD
\eTR
\eTABLE
\stop
\stopsetups

\setuppagenumbering[location=]
\setupfootertexts[][\midaligned{\userpagenumber/\lastuserpage}]
\starttext
\switchtobodyfont[18pt]
\definehspace[hspacing][0.15em]
О\hspace[hspacing]Т\hspace[hspacing]П\hspace[hspacing]Р\hspace[hspacing]Е\hspace[hspacing]М\hspace[hspacing]Н\hspace[hspacing]И\hspace[hspacing]Ц\hspace[hspacing] А\\
\switchtobodyfont[9pt]
{\bf РАЧУН БРОЈ 3180/09}\\
\vskip 3em
Купац: ХЛАДНИ ИЗВОР\\
Место: РИПАЊ, Авалска бр. 261\\
ПИБ: 103358290\\
МБ: 17556711\\
\vskip 3em
Место издавања рачуна: Велико Градиште\\
Датум издавања рачуна: 04.06.2020. 11:13:03\\
Датум промета: 05.06.2020\\
Датум плаћања: 05.06.2020\\
\vskip 3em\start
\startsetups[maintable]
\setupTABLE[frame=off]
\setupTABLE[row][*][height=7.25mm]
\setupTABLE[column][1][align=flushleft]
\setupTABLE[column][2][align=flushleft]
\setupTABLE[column][3][align=flushleft]
\setupTABLE[column][4][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][5][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][6][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][7][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][8][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][9][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][10][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][11][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\setupTABLE[column][12][alignmentcharacter={.},aligncharacter=yes,align=flushright]
\stopsetups
\switchtobodyfont[6pt]
\startalignment[middle]
\bTABLE[setups=maintable,option=stretch,split=yes,header=repeat]
\bTR[bottomframe=on, rulethickness=2pt,offset=0.25pt]
\bTD\bf Рб \eTD
\bTD\bf Шифра артикла \eTD
\bTD\bf Назив артикла \eTD
\bTD\bf Јединица мере \eTD
\bTD\bf Количина \eTD
\bTD\bf Цена \eTD
\bTD\bf Износ \eTD
\bTD\bf Попуст \eTD
\bTD\bf Основа за ПДВ \eTD
\bTD\bf Порез \eTD
\bTD\bf Износ пореза \eTD
\bTD\bf Основа за ПДВ + ПДВ \eTD
\eTR
\eTABLEhead
\bTABLEbody
\bTR[bottomframe=on,rulethickness=.25pt,offset=2pt]
\bTD\tt 1 \eTD
\bTD\tt 011 \eTD
\bTD ПЕЧЕНИЦА \eTD
\bTD kg \eTD
\bTD\tt 4.22 \eTD
\bTD\tt 1,000.00 \eTD
\bTD\tt 4,220.00 \eTD
\bTD\tt 0.15 \eTD
\bTD\tt 3,587.00 \eTD
\bTD\tt 0.2 \eTD
\bTD\tt 717.40 \eTD
\bTD\tt 4,304.40 \eTD
\eTR\bTR[bottomframe=on,rulethickness=.25pt,offset=2pt]
\bTD\tt 2 \eTD
\bTD\tt 013 \eTD
\bTD ВРАТ \eTD
\bTD kg \eTD
\bTD\tt 1.77 \eTD
\bTD\tt 900.00 \eTD
\bTD\tt 1,593.00 \eTD
\bTD\tt 0.15 \eTD
\bTD\tt 1,354.05 \eTD
\bTD\tt 0.2 \eTD
\bTD\tt 270.81 \eTD
\bTD\tt 1,624.86 \eTD
\eTR\bTR[bottomframe=on,rulethickness=.25pt,offset=2pt]
\bTD\tt 3 \eTD
\bTD\tt 016 \eTD
\bTD ШПИЦ РЕБРА \eTD
\bTD kg \eTD
\bTD\tt 10.45 \eTD
\bTD\tt 490.00 \eTD
\bTD\tt 5,120.50 \eTD
\bTD\tt 0.10 \eTD
\bTD\tt 4,608.45 \eTD
\bTD\tt 0.2 \eTD
\bTD\tt 921.69 \eTD
\bTD\tt 5,530.14 \eTD
\eTR\bTR[bottomframe=on,rulethickness=.25pt,offset=2pt]
\bTD\tt 4 \eTD
\bTD\tt 021 \eTD
\bTD ПИКАНТ СЛАНИНА \eTD
\bTD kg \eTD
\bTD\tt 2.57 \eTD
\bTD\tt 767.00 \eTD
\bTD\tt 1,971.19 \eTD
\bTD\tt 0.15 \eTD
\bTD\tt 1,675.51 \eTD
\bTD\tt 0.2 \eTD
\bTD\tt 335.10 \eTD
\bTD\tt 2,010.61 \eTD
\eTR\bTR[bottomframe=on,rulethickness=.25pt,offset=2pt]
\bTD\tt 5 \eTD
\bTD\tt 042 \eTD
\bTD ДОМАЋА КОБАСИЦА \eTD
\bTD kg \eTD
\bTD\tt 5 \eTD
\bTD\tt 350.00 \eTD
\bTD\tt 1,750.00 \eTD
\bTD\tt 0.20 \eTD
\bTD\tt 1,400.00 \eTD
\bTD\tt 0.2 \eTD
\bTD\tt 280.00 \eTD
\bTD\tt 1,680.00 \eTD
\eTR\bTR[bottomfra

Re: [NTG-context] recursion in a table

2022-05-02 Thread Hans Hagen via ntg-context

On 5/2/2022 2:30 AM, Aditya Mahajan via ntg-context wrote:


\expanded{\NC \recurselevel \noexpand\NC ... }


There is no need for \noexpand before \NC. Even \NR is protected. In 
MKIV there are some more sensitive ones like \FR but in LMTX these are 
defined as \noaligned which permits them being protected too (the 
engine's alignments scanners have some lookahead properties that cna 
otherwise interfere).


\starttabulate[||]
\NC \infofont\meaningasis \NC \NC \NR
\NC \infofont\meaningasis \NR \NC \NR
\NC \infofont\meaningasis \HL \NC \NR
\NC \infofont\meaningasis \FL \NC \NR
\stoptabulate


Remind me of a more-than-a-decade-old discussion on the mailing list, 
summarized here:

https://adityam.github.io/context-blog/post/tex-programming/


Also, \HL doesn’t work at the end, and the second line of the error
message makes no sense:


As you're not afraid of low level code:

\starttext

\starttabulate[|r|c|]
\NC $T$ \NC what \NC \NR
\HL
\expandedloop 0 359 45 {
\NC \number\currentloopiterator ˚ \NC \NC \NR
}
\stoptabulate

\stoptext

So, you can play with:

\expandedloop
\unexpandedloop
\localcontrolledloop
\quitloop
\currentloopiterator
\currentloopnesting
\lastloopiterator

if you want a challenge for a new blog post.

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] recursion in a table

2022-05-01 Thread Aditya Mahajan via ntg-context
On Sun, 1 May 2022, Henning Hraban Ramm via ntg-context wrote:

> Hi,
> I was playing with the example from 
> https://wiki.contextgarden.net/Scaling_Rotating_Mirroring_Clipping#Location_parameter
>  
> and tried to put it in a tabulate:
> 
> 
> \useMPlibrary[dum]
> \setupexternalfigures[width=3em,height=2em,frame=on,]
> 
> %\def\TXT{\ruledhbox{\bf(XyX)}}
> \def\TXT{\externalfigure[pic]}
> 
> \starttabulate[|l|l|l|l|l|l|]
>  \NC\NC normal\NC depth\NC fit\NC broad\NC high\NC\NR
>  \HL
> \dostepwiserecurse{0}{359}{45}{%
> %\expanded{\setuprotate[rotation=\recurselevel]}
>  \NC{\expanded{\recurselevel}˚}%

Untested, but I think that you might need:

\expanded{\NC \recurselevel \noexpand\NC ... }

> This works, but \recurselevel is always 0. I know I must expand it (like 
> in the original example), but I can’t make it work within the tabulation.
> In the first column, \expanded{\recurselevel} stays 0, and 
> rotation=\expanded{\recurselevel} gives an error, while the \setuprotate 
> line has no effect (if I remove "rotation=\recurselevel", of course).
> 
> How would that work?

Remind me of a more-than-a-decade-old discussion on the mailing list, 
summarized here:

https://adityam.github.io/context-blog/post/tex-programming/

> Also, \HL doesn’t work at the end, and the second line of the error 
> message makes no sense:

I find that in such cases, using Lua (CLD) is the simplest solution

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


  1   2   3   4   5   6   7   8   9   10   >