[NTG-context] Re: last page number for a list

2024-04-03 Thread Alan Bowen
Hi, Bruce—
This does not quite work—the page numbers are those of the first page of
the chapter, not the last. But thanks for the tip about \writetolist.
Perhaps I can get that to work.

What I need are ToC entries like
AuthorName
ShortTitle   1–6

I need this pagination because one of the requirements of continuous
publication on the OJS is that once an item is published changes are not
permitted. So I cannot go with normal continuous publication since, for us
anyway, items are not processed in strict sequential order (e,g., we may
have, paper+paper+ review+paper...)

If it helps: I currently have

\startFMTitle[reference=\Reference, title={}][itemAuthor=AuthorName,
itemTitle=ShortTitle,...]
\setuplist[FMTitle][state=start, alternative=startendfmpages,
criterium=all,]
(\Reference is defined at the in the preamble to input of the
file/component.)

\definelistalternative[startendfmpages][renderingsetup=list:startendfmpages]

\startsetups[list:startendfmpages]
  \structurelistuservariable{itemAuthor}\crlf
  \structurelistuservariable{itemTitle}\hfill%
   \at[\currentlistentrypagenumber]–\at[\lastpagenumber]
\vglue1pc
\stopsetups
where I have \reference[\lastpagenumber]{} at the end of the file. But this
gives me ??–viii (the viii is correct and interactive) for the FMTitle.
Sadly the entries for all my other Titles (SourceTitle, StudyTitle...) is
??–viii.
(Each title is a modified chapter.)

Curiously, \at[\Reference]–\convertnumber{r}{\lastpagenumber}  and
\at[\Reference]–\at[\lastpagenumber] work properly in the body text.
The overall structure is project-product sort with many components in the
product.

This is probably TMI. The bottom line is that I am truly stumped.

All best,
Alan

On Wed, Apr 3, 2024 at 6:56 AM Bruce Horrocks  wrote:

>
>
> > On 30 Mar 2024, at 19:59, Alan Bowen  wrote:
> >
> > How can I get the last page number of a chapter for a list (ToC)?
> >
> > Outside of a list, I use \lastpagenumber.
> > But that does not work in a list such as the ToC.
> >
> > Any tips or pointers will be gladly received.
>
>
> I'm not quite sure what you want to do with these numbers: something like
> printing out a contents page but instead of the start page of a chapter it
> shows the last page of the chapter?
>
> If so then try creating a custom list and use \writetolist immediately
> before each \stopchapter command?
>
> \definelist[LastPages][criterium=all]
> \starttext
> \completecontent
> \page
> \completelist[LastPages]
> \page
> \dorecurse{10}{
>   \startchapter[title={This is my chapter}]
>   This is a chapter\par \dorecurse{6}{\input knuth } \input
> math-kontinuitet-sv
>
>   \writetolist[LastPages]{3.}{\namedstructurevariable{chapter}{title}}
>   \stopchapter
> }
> \stoptext
>
> But I can't get the number option of \writetolist to work - the "3." above
> is ignored. :-(
>
> —
> 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
>
> ___
>
___
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: last page number for a list

2024-04-03 Thread Bruce Horrocks


> On 30 Mar 2024, at 19:59, Alan Bowen  wrote:
> 
> How can I get the last page number of a chapter for a list (ToC)?
> 
> Outside of a list, I use \lastpagenumber. 
> But that does not work in a list such as the ToC.
> 
> Any tips or pointers will be gladly received.


I'm not quite sure what you want to do with these numbers: something like 
printing out a contents page but instead of the start page of a chapter it 
shows the last page of the chapter?

If so then try creating a custom list and use \writetolist immediately before 
each \stopchapter command?

\definelist[LastPages][criterium=all]
\starttext
\completecontent
\page
\completelist[LastPages]
\page
\dorecurse{10}{
  \startchapter[title={This is my chapter}]
  This is a chapter\par \dorecurse{6}{\input knuth } \input math-kontinuitet-sv

  \writetolist[LastPages]{3.}{\namedstructurevariable{chapter}{title}}
  \stopchapter
}
\stoptext

But I can't get the number option of \writetolist to work - the "3." above is 
ignored. :-(

—
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: chronological TOC

2024-01-29 Thread jbf
And indeed this is the best solution I could find, though it obviously 
meant that something like '29 April 2017' was no good for sorting on... 
it has to be the US date format YY-MM-DD


Julian

On 30/1/24 06:15, Wolfgang Schuster wrote:

Henning Hraban Ramm schrieb am 27.01.2024 um 10:05:

Am 26.01.24 um 23:46 schrieb jbf:
I wonder if someone can point me in the right direction for a 
separate TOC which needs to be in chronological order at the back of 
the book (i.e. not in page number order, although I need the page 
numbers to show up in the TOC. There is the normal TOC at the front 
of the book, according to chapter titles.


I have succeeded in defining a separate TOC to place at the back, 
but have not succeeded in the chronological order! Here is what I 
have done:


\definelist[chron][criterium=all,alternative=c]

At the back of the book:

\placelist[chron][criterium=all]

Then at an appropriate point after each \startchapter I have placed 
(as an example):


\writetolist[chron]{}{{\bf 29 April 2017,} Speech, Panama City}

This gives me my list, but in page number order. How do I get the 
date (e.g. 29 April 2017) to be the ordering factor in the list. I 
assume it will be something to do with criterium, but am clueless at 
the moment on how to indicate this.


I don’t know if it works this way (the wizards will know a way), but 
for special needs I’m (ab)using indexes:
just add something like \index[2017-04-29]{Speech, Panama City} to 
your chapter command and setup the index at will.


Lists have a sort option but this is no use here because you can't use 
the title to have a chronological sorted list.


\starttext

\placelist[section][order=title]

\section{Hans}

\section{Peter}

\section{Anton}

\stoptext

Using the register mechanism as you suggest seems to be the best 
option in this case.


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
___ 


___
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: chronological TOC

2024-01-29 Thread Bruce Horrocks
On 29 Jan 2024, at 19:15, Wolfgang Schuster  
wrote:
> 
> Henning Hraban Ramm schrieb am 27.01.2024 um 10:05:
>> Am 26.01.24 um 23:46 schrieb jbf:
>>> I wonder if someone can point me in the right direction for a separate TOC 
>>> which needs to be in chronological order at the back of the book (i.e. not 
>>> in page number order, although I need the page numbers to show up in the 
>>> TOC. There is the normal TOC at the front of the book, according to chapter 
>>> titles.
>>> 
>>> I have succeeded in defining a separate TOC to place at the back, but have 
>>> not succeeded in the chronological order! Here is what I have done:
>>> 
>>> \definelist[chron][criterium=all,alternative=c]
>>> 
>>> At the back of the book:
>>> 
>>> \placelist[chron][criterium=all]
>>> 
>>> Then at an appropriate point after each \startchapter I have placed (as an 
>>> example):
>>> 
>>> \writetolist[chron]{}{{\bf 29 April 2017,} Speech, Panama City}
>>> 
>>> This gives me my list, but in page number order. How do I get the date 
>>> (e.g. 29 April 2017) to be the ordering factor in the list. I assume it 
>>> will be something to do with criterium, but am clueless at the moment on 
>>> how to indicate this.
>> I don’t know if it works this way (the wizards will know a way), but for 
>> special needs I’m (ab)using indexes:
>> just add something like \index[2017-04-29]{Speech, Panama City} to your 
>> chapter command and setup the index at will.
> 
> Lists have a sort option but this is no use here because you can't use the 
> title to have a chronological sorted list.
> 
> \starttext
> 
> \placelist[section][order=title]
> 
> \section{Hans}
> 
> \section{Peter}
> 
> \section{Anton}
> 
> \stoptext
> 
> Using the register mechanism as you suggest seems to be the best option in 
> this case.

The order= mechanism doesn't seem to work for \definelist lists as opposed to 
the built-in ones, viz:

\definelist[chron]
\starttext

\placelist[section][order=title]

\section{Hans}
\writetolist[chron]{}{Hans}

\section{Peter}
\writetolist[chron]{}{Peter}

\section{Anton}
\writetolist[chron]{}{Anton}

\placelist[chron][criterium=all,order=title]
\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: chronological TOC

2024-01-29 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 27.01.2024 um 10:05:

Am 26.01.24 um 23:46 schrieb jbf:
I wonder if someone can point me in the right direction for a separate 
TOC which needs to be in chronological order at the back of the book 
(i.e. not in page number order, although I need the page numbers to 
show up in the TOC. There is the normal TOC at the front of the book, 
according to chapter titles.


I have succeeded in defining a separate TOC to place at the back, but 
have not succeeded in the chronological order! Here is what I have done:


\definelist[chron][criterium=all,alternative=c]

At the back of the book:

\placelist[chron][criterium=all]

Then at an appropriate point after each \startchapter I have placed 
(as an example):


\writetolist[chron]{}{{\bf 29 April 2017,} Speech, Panama City}

This gives me my list, but in page number order. How do I get the date 
(e.g. 29 April 2017) to be the ordering factor in the list. I assume 
it will be something to do with criterium, but am clueless at the 
moment on how to indicate this.


I don’t know if it works this way (the wizards will know a way), but for 
special needs I’m (ab)using indexes:
just add something like \index[2017-04-29]{Speech, Panama City} to your 
chapter command and setup the index at will.


Lists have a sort option but this is no use here because you can't use 
the title to have a chronological sorted list.


\starttext

\placelist[section][order=title]

\section{Hans}

\section{Peter}

\section{Anton}

\stoptext

Using the register mechanism as you suggest seems to be the best option 
in this case.


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: chronological TOC

2024-01-27 Thread Henning Hraban Ramm

Am 26.01.24 um 23:46 schrieb jbf:
I wonder if someone can point me in the right direction for a separate 
TOC which needs to be in chronological order at the back of the book 
(i.e. not in page number order, although I need the page numbers to show 
up in the TOC. There is the normal TOC at the front of the book, 
according to chapter titles.


I have succeeded in defining a separate TOC to place at the back, but 
have not succeeded in the chronological order! Here is what I have done:


\definelist[chron][criterium=all,alternative=c]

At the back of the book:

\placelist[chron][criterium=all]

Then at an appropriate point after each \startchapter I have placed (as 
an example):


\writetolist[chron]{}{{\bf 29 April 2017,} Speech, Panama City}

This gives me my list, but in page number order. How do I get the date 
(e.g. 29 April 2017) to be the ordering factor in the list. I assume it 
will be something to do with criterium, but am clueless at the moment on 
how to indicate this.


I don’t know if it works this way (the wizards will know a way), but for 
special needs I’m (ab)using indexes:
just add something like \index[2017-04-29]{Speech, Panama City} to your 
chapter command and setup the index at will.


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] chronological TOC

2024-01-26 Thread jbf
I wonder if someone can point me in the right direction for a separate 
TOC which needs to be in chronological order at the back of the book 
(i.e. not in page number order, although I need the page numbers to show 
up in the TOC. There is the normal TOC at the front of the book, 
according to chapter titles.


I have succeeded in defining a separate TOC to place at the back, but 
have not succeeded in the chronological order! Here is what I have done:


\definelist[chron][criterium=all,alternative=c]

At the back of the book:

\placelist[chron][criterium=all]

Then at an appropriate point after each \startchapter I have placed (as 
an example):


\writetolist[chron]{}{{\bf 29 April 2017,} Speech, Panama City}

This gives me my list, but in page number order. How do I get the date 
(e.g. 29 April 2017) to be the ordering factor in the list. I assume it 
will be something to do with criterium, but am clueless at the moment on 
how to indicate this.


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


Re: [NTG-context] \writetolist not writing the number to the TOC

2023-03-27 Thread Willi Egger via ntg-context
Thank you Hans,

that is, what I need. It was even easy to implement in the layout-file only :-) 
because these sections where already under a “mysection” head.

Kind regards

Willi

> On 27 Mar 2023, at 15:52, Hans Hagen via ntg-context  
> wrote:
> 
> On 3/26/2023 3:10 PM, Willi Egger via ntg-context wrote:
>> Hello Hraban,
>> thank you. I missed this point. However, adding a dot behind the number does 
>> not appear to solve the problem. The title’s text still starts at the left 
>> margin which looks very odd.
>> Kind regards
>> Willi
>>> On 26 Mar 2023, at 12:51, Henning Hraban Ramm via ntg-context 
>>>  wrote:
>>> 
>>> Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:
>>>> Good evening!
>>>> I have a setup in which I need to send info to the TOC:
>>>> Consider the following example:
>>>> \starttext
>>>> \starttitle[title=Contents]
>>>>   \placelist[chapter][criterium=all]
>>>> \stoptitle
>>>> \startchapter[title=Mychapter]
>>>>   \input knuth
>>>>   \startsubject[title=Subject will be in TOC]
>>>> \writetolist[chapter]{1}{I am in TOC!}
>>>> \input ward
>>>>   \stopsubject
>>>> \stopchapter
>>>> \stoptext
>>>> According to the Wiki I should get te number (1) in the TOC. Instead the 
>>>> text starts at the height of the chapter-numbering and is not carrying the 
>>>> given number.
>>>> Am I doing something wrong?
>>> 
>>> The wiki says:
>>> 
>>> “The default table of contents is combined list. To write to it one has to 
>>> choose the level to which it should be inserted: 
>>> \writetolist[chapter]{1.}{Chapter list entry A},
>>> \writetolist[section]{1.1}{Section list entry A}, etc.”
>>> 
>>> https://wiki.contextgarden.net/Command/writetolist
>>> 
>>> So maybe you need a dot?
>>> 
>>> Otherwise I don’t know.
> \definehead[xsubject][section][number=no]
> 
> \setuplist[xsubject][margin=2em]
> 
> \starttext
>\starttitle[title=Contents]
>  \placelist[chapter,xsubject][criterium=all]
>\stoptitle
>\startchapter[title=Mychapter]
>  \input knuth
>  \startxsubject[title=Subject will be in TOC1] \input ward \stopxsubject
>  \startxsubject[title=Subject will be in TOC2] \input ward \stopxsubject
>\stopchapter
> \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 / 
> 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] \writetolist not writing the number to the TOC

2023-03-27 Thread Hans Hagen via ntg-context

On 3/26/2023 3:10 PM, Willi Egger via ntg-context wrote:

Hello Hraban,

thank you. I missed this point. However, adding a dot behind the number does 
not appear to solve the problem. The title’s text still starts at the left 
margin which looks very odd.

Kind regards
Willi


On 26 Mar 2023, at 12:51, Henning Hraban Ramm via ntg-context 
 wrote:

Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:

Good evening!
I have a setup in which I need to send info to the TOC:
Consider the following example:
\starttext
\starttitle[title=Contents]
   \placelist[chapter][criterium=all]
\stoptitle
\startchapter[title=Mychapter]
   \input knuth
   \startsubject[title=Subject will be in TOC]
 \writetolist[chapter]{1}{I am in TOC!}
 \input ward
   \stopsubject
\stopchapter
\stoptext
According to the Wiki I should get te number (1) in the TOC. Instead the text 
starts at the height of the chapter-numbering and is not carrying the given 
number.
Am I doing something wrong?


The wiki says:

“The default table of contents is combined list. To write to it one has to 
choose the level to which it should be inserted: 
\writetolist[chapter]{1.}{Chapter list entry A},
\writetolist[section]{1.1}{Section list entry A}, etc.”

https://wiki.contextgarden.net/Command/writetolist

So maybe you need a dot?

Otherwise I don’t know.

\definehead[xsubject][section][number=no]

\setuplist[xsubject][margin=2em]

\starttext
\starttitle[title=Contents]
  \placelist[chapter,xsubject][criterium=all]
\stoptitle
\startchapter[title=Mychapter]
  \input knuth
  \startxsubject[title=Subject will be in TOC1] \input ward 
\stopxsubject
  \startxsubject[title=Subject will be in TOC2] \input ward 
\stopxsubject

\stopchapter
\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 / 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] \writetolist not writing the number to the TOC

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

thank you. I missed this point. However, adding a dot behind the number does 
not appear to solve the problem. The title’s text still starts at the left 
margin which looks very odd.

Kind regards
Willi

> On 26 Mar 2023, at 12:51, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:
>> Good evening!
>> I have a setup in which I need to send info to the TOC:
>> Consider the following example:
>> \starttext
>> \starttitle[title=Contents]
>>   \placelist[chapter][criterium=all]
>> \stoptitle
>> \startchapter[title=Mychapter]
>>   \input knuth
>>   \startsubject[title=Subject will be in TOC]
>> \writetolist[chapter]{1}{I am in TOC!}
>> \input ward
>>   \stopsubject
>> \stopchapter
>> \stoptext
>> According to the Wiki I should get te number (1) in the TOC. Instead the 
>> text starts at the height of the chapter-numbering and is not carrying the 
>> given number.
>> Am I doing something wrong?
> 
> The wiki says:
> 
> “The default table of contents is combined list. To write to it one has to 
> choose the level to which it should be inserted: 
> \writetolist[chapter]{1.}{Chapter list entry A},
> \writetolist[section]{1.1}{Section list entry A}, etc.”
> 
> https://wiki.contextgarden.net/Command/writetolist
> 
> So maybe you need a dot?
> 
> Otherwise I don’t know.
> 
> 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] \writetolist not writing the number to the TOC

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

Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:

Good evening!

I have a setup in which I need to send info to the TOC:

Consider the following example:

\starttext

\starttitle[title=Contents]
   \placelist[chapter][criterium=all]
\stoptitle

\startchapter[title=Mychapter]
   \input knuth
   \startsubject[title=Subject will be in TOC]
 \writetolist[chapter]{1}{I am in TOC!}
 \input ward
   \stopsubject
\stopchapter

\stoptext

According to the Wiki I should get te number (1) in the TOC. Instead the text 
starts at the height of the chapter-numbering and is not carrying the given 
number.

Am I doing something wrong?


The wiki says:

“The default table of contents is combined list. To write to it one has 
to choose the level to which it should be inserted: 
\writetolist[chapter]{1.}{Chapter list entry A},

\writetolist[section]{1.1}{Section list entry A}, etc.”

https://wiki.contextgarden.net/Command/writetolist

So maybe you need a dot?

Otherwise I don’t know.

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 prefix the list of figures with part number?

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

My project has different parts. Each part contains a whole list of figures. At 
the beginning of the book I would like to place a list of all figures. Hoever 
they should be prefixed with the part number. I can not figure out how to 
achieve this.

May be someone can hint me…

Cheers 

Willi

\setuplist[figures][pageprefixsegments=part:chapter] % Pageprefix? 

\setuphead[part][placehead=yes] 

\starttext
\startpart[title=part one]

\starttitle[title=Contents]
  \placelist[part,chapter][criterium=all]

  \startsubject[title=Figures]  
\placelistoffigures[criterium=all]
  \stopsubject

\stoptitle


\startchapter[title=Mychapter]
  \input knuth
  \startsubject[title=Subject will be in TOC]
\writetolist[chapter]{1}{I am in TOC!}
\input ward
 \startplacefigure
[location=middle,
 title=Cow 1]
{\externalfigure[cow][width=7cm]}
\stopplacefigure

  \stopsubject 
\stopchapter
\stoppart

\startpart[title=Part two]
 \startchapter[title=Myotherchapter] 
   \startplacefigure
 [location=middle,
  title=Cow 2]
{\externalfigure[cow][width=7cm]}
  \stopplacefigure
  \stopchapter
\stoppart
\stoptext
___
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] \writetolist not writing the number to the TOC

2023-03-25 Thread Willi Egger via ntg-context
Good evening!

I have a setup in which I need to send info to the TOC:

Consider the following example:

\starttext

\starttitle[title=Contents]
  \placelist[chapter][criterium=all]
\stoptitle

\startchapter[title=Mychapter]
  \input knuth
  \startsubject[title=Subject will be in TOC]
\writetolist[chapter]{1}{I am in TOC!}
\input ward
  \stopsubject 
\stopchapter

\stoptext

According to the Wiki I should get te number (1) in the TOC. Instead the text 
starts at the height of the chapter-numbering and is not carrying the given 
number.

Am I doing something wrong?

Kind regards
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] Confusing interaction between \writetolist and bookmarks (bug?)

2021-11-22 Thread musa furber via ntg-context
On Mon, Nov 22, 2021 at 6:28 PM Hans Hagen via ntg-context <
ntg-context@ntg.nl> wrote:

> On 11/22/2021 10:49 AM, musa furber via ntg-context wrote:
> > I am relatively new to ConTeXt and have encountered something that does
> > not work as I expected it to based on various documentation and examples.
> >
> > My book design requires the front matter to contain an abridged table of
> > contents just for chapters, and a detailed table of contents in the back
> > matter.
> >
> > Everything worked fine -- including the PDF bookmarks and table of
> > contents -- until I started using \writetolist to manually inject
> > additional sections and subsections into their respective lists. The
> > manually injected entries do show up (as I expected), but their
> > corresponding PDF bookmarks get repeated (not what I expected).
> you can probably best use
>
> \startsection[title={...},list={...},bookmark={...}]
> ...
> \stopsection
>

Thank you, Hans. This pointer is exactly what I needed.
___
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] Confusing interaction between \writetolist and bookmarks (bug?)

2021-11-22 Thread Musa Furber via ntg-context
On 22 November 2021 at 18:28:44, Hans Hagen via ntg-context (
ntg-context@ntg.nl) wrote:

On 11/22/2021 10:49 AM, musa furber via ntg-context wrote:
> I am relatively new to ConTeXt and have encountered something that does
> not work as I expected it to based on various documentation and examples.
>
> My book design requires the front matter to contain an abridged table of
> contents just for chapters, and a detailed table of contents in the back
> matter.
>
> Everything worked fine -- including the PDF bookmarks and table of
> contents -- until I started using \writetolist to manually inject
> additional sections and subsections into their respective lists. The
> manually injected entries do show up (as I expected), but their
> corresponding PDF bookmarks get repeated (not what I expected).
you can probably best use

\startsection[title={...},list={...},bookmark={...}]
...
\stopsection


I do not think that is an option for me.

The book is bilingual, with Arabic and English. There are places where I
want the chapter, section, and subsection titles to be bilingual as well,
with English on the left and Arabic on the right. I accomplish this using
the following…


\defineparagraphs[BilingualTitle][n=3,before={\blank[2*line]},after=,]

\setupparagraphs[BilingualTitle][1][width=.4\textwidth]

\setupparagraphs[BilingualTitle][2][width=.12\textwidth]

\setupparagraphs[BilingualTitle][3][width=.4\textwidth]


\define[2]\BilingualChapter

   {\expanded{\writetolist[chapter]{}{#1}}

   \startBilingualTitle


 
\noindentation\setlatin{}\tfd\setupinterlinespace\feature[+][smallcaps]\word{#1}\feature[<]

   \nextBilingualTitle

   \hfill\nextBilingualTitle

   \noindentation\setarabic{}\tfd\setupinterlinespace{#2}

   \stopBilingualTitle

  }


…with variants for section, subsection, and subsection.


Regards,

Musa
___
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] Confusing interaction between \writetolist and bookmarks (bug?)

2021-11-22 Thread Hans Hagen via ntg-context

On 11/22/2021 10:49 AM, musa furber via ntg-context wrote:
I am relatively new to ConTeXt and have encountered something that does 
not work as I expected it to based on various documentation and examples.


My book design requires the front matter to contain an abridged table of 
contents just for chapters, and a detailed table of contents in the back 
matter.


Everything worked fine -- including the PDF bookmarks and table of 
contents -- until I started using \writetolist to manually inject 
additional sections and subsections into their respective lists. The 
manually injected entries do show up (as I expected), but their 
corresponding PDF bookmarks get repeated (not what I expected).

you can probably best use

\startsection[title={...},list={...},bookmark={...}]
...
\stopsection

-
  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] Confusing interaction between \writetolist and bookmarks (bug?)

2021-11-22 Thread musa furber via ntg-context
I am relatively new to ConTeXt and have encountered something that does not
work as I expected it to based on various documentation and examples.

My book design requires the front matter to contain an abridged table of
contents just for chapters, and a detailed table of contents in the back
matter.

Everything worked fine -- including the PDF bookmarks and table of contents
-- until I started using \writetolist to manually inject additional
sections and subsections into their respective lists. The manually injected
entries do show up (as I expected), but their corresponding PDF bookmarks
get repeated (not what I expected).

Here is a M(not)WD:

###begin
\setupinteraction[state=start]
\placebookmarks[chapter, section][chapter, section]
\setupinteractionscreen[option=bookmark]

\starttext

  \startfrontmatter
\title{Contents}
\placelist[chapter]
  \stopfrontmatter

  \startbodymatter
\chapter{Chapter ONE}
\section{Section ONE}
\writetolist[section]{}{Section via writetolist ONE}
\chapter{Chapter TWO}
  \stopbodymatter

  \startbackmatter
\chapter{Detailed Table of Contents}
\placecontent[criterium=all]
  \stopbackmatter

\stoptext
###end

The repetitions go away when any one of the following is done:
-- commenting out the front/body/back commands
-- commenting out both contents at front and back
-- commenting out just back contents
-- commenting out the \writetolist

Have I misunderstood something?

Many thanks,
Musa
___
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] Solved: Book setup with LHS-side quotes before chapters/parts, header/footer issues, TOC, etc.

2021-10-26 Thread Gerben Wierda via ntg-context
Thanks to Wolfgang Schuster and Bruce Horrocks I have now a working solution. I 
ended up following Bruce’s suggestion of doing a left hand side (LHS) page 
opposite the first (RHS) chapter or part page differently than using 
after/before modifications of the \chapter and \part setups as I had been doing 
years ago (but that book did not have parts and was done in mkii)

The modification of \chapter and \part setups with before= and after= never 
worked in the \component setup in LMTX. Creating a separate command to run 
immediately before a \chapter or \part, as suggested by Bruce, was simpler and 
and turned out to be more robust. So, this single file example also works when 
\components are used.

The only issues I have now left are very minimal. In the table of contents, the 
abstract for a part has some extra whitespace above, which the chapter 
abstracts don’t have. But that is not really a problem. And getting the part 
title somewhere more centred on its page is also left as an issue for later.

Example file. In a project/component setup: everything before the \starttext 
goes into the environment file, the rest in the product file.

%%%
%%% Sections that have a LHS preface with a quote
%%%

\startsetups SectionLHSPageSetup
 \page[left]
 \setupheader[state=empty]
 \start
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\tf\it
\stopsetups

\definestartstop [SectionLHSPage]
 [ before={\setups{SectionLHSPageSetup}},
   after={\stopnarrower
\stopalignment\stop}]

\define[1]\SectionPrequote{\startSectionLHSPage #1\stopSectionLHSPage}

%%%
%%% part is managed here
%%%
\defineconversionset [part] [Romannumerals] [numbers]
\setuplabeltext[en][partlabel=Part~]

\setuphead [part]
  [sectionsegments=part,
   bodypartlabel=partlabel,
   appendixlabel=,
   sectionconversionset=part,
   page=yes,
   header=empty,
   footer=empty,
   placehead=yes]

\definelist[parttext]
\setuplist[parttext][margin=1.3em,pagecommand=\gobbleoneargument]
\define[1]\PartAbstract{\writetolist[parttext]{}{\start\itx#1\stop}}

%%%
%%% chapter is managed here
%%%
\definetext
  [chapterfooter] % name
  [footer]% vertical location
  [pagenumber]% content

\setuplabeltext[en][appendixchapterlabel=Appendix~]
\setuphead
  [chapter]
  [page=yes,
   header=empty,
   bodypartlabel=,
   appendixlabel=appendixchapterlabel,
   footer=chapterfooter,
   sectionsegments=chapter,
   before={\blank[force,2*big]},
   after={\blank[3*big]}]

\definelist[chaptertext]
\setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
\define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}

\defineresetset [default] [0,0] [1]
\setupcombinedlist [content] [list={part,parttext,chapter,chaptertext}]

\starttext

\startfrontmatter
\completecontent
\SectionPrequote{If you think good architecture is expensive, try bad 
architecture\crlf
{\tf Brian Foote and Joseph Yoder}}
\startchapter[title={One}]
\dorecurse{7}{\input tufte \par \input knuth}
\stopchapter
\stopfrontmatter

\startbodymatter
\dorecurse{3}{
  \SectionPrequote{The world is not \rationals, it is \reals\crlf {\tf Gerben 
Wierda}}
  \part{Title title title}
  \PartAbstract{This is a part abstract.}
  \dorecurse{2}{
\SectionPrequote{If you think good architecture is expensive, try
bad architecture\crlf
{\tf Brian Foote and Joseph Yoder}}
\startchapter[title={Two}]
\ChapterAbstract{This is a chapter abstract.}
\dorecurse{5}{\input tufte \par \input knuth}
\stopchapter
  }
}
\stopbodymatter
\startappendices
  \defineresetset[default][0,1][1] %% reset , chapter, but not part
  \setuphead[part][number=no]
  \SectionPrequote{The world is not \rationals, it is \reals\crlf {\tf Gerben 
Wierda}}
  \part{Title title title}
  \PartAbstract{This is a part abstract.}
  \dorecurse{2}{
\SectionPrequote{If you think good architecture is expensive, try
bad architecture\crlf
{\tf Brian Foote and Joseph Yoder}}
\startchapter[title={Two}]
\ChapterAbstract{This is a chapter abstract.}
\dorecurse{5}{\input tufte \par \input knuth}
\stopchapter
  }
\stopappendices
\stoptext

In a component setup, a part component may look like this:

\startcomponent p_partone
\product prd_book
\project project_book

\SectionPrequote{The world is not \rationals, it is \reals\crlf
{\tf Gerben Wierda}}
\part{Title title title}
\PartAbstract{This is a part abstract for a normal part.}
\component c_chapter
\component c_chapter
\stopcomponent

and a chapter component like this:

\startcomponent c_chapter
\product prd_book
\project project_book

\starttext

\SectionPrequote{If you think good architecture is expensive, try bad 
architecture\crlf
{\tf Brian Foote and Joseph Yoder}}
\chapter{An Inconvenient Truth}
\ChapterAbstract{This is a chapter abstract.}

\setupindenting[next]
\placeinitial I{\kap{\bf n the half}} century or so that human kind has had IT,
the IT sector has increasingly wrestled with the fact that IT projects often
fail in one

Re: [NTG-context] How do I get the first page of the chapter to display the page number in the footer in this setup?

2021-10-25 Thread Bruce Horrocks via ntg-context
Hi Gerben,

See below...

> On 24 Oct 2021, at 17:04, Gerben Wierda via ntg-context  
> wrote:
> 
> On 24 Oct 2021, at 16:38, Wolfgang Schuster 
>  wrote:
>> 
>> Gerben Wierda via ntg-context schrieb am 24.10.2021 um 15:42:
>>> My double-sided layout starts each chapter on a right page with a quote on 
>>> the opposing left page. I’d like to move the page number of that right page 
>>> to the footer, but haven’t been able to find how to do this is the 
>>> documentation. How can I do this?
>> 
>> \definetext
>>   [chapterfooter] % name
>>   [footer]% vertical location
>>   [pagenumber]% content
>> 
>> \setuphead
>>   [chapter]
>>   [header=empty,
>>footer=chapterfooter]
>> 
>> \starttext
>> 
>> \dorecurse{4}
>>   {\expanded{\chapter{Chapter \recurselevel}}
>>\dorecurse{10}{\samplefile{lorem}}}
>> 
>> \stoptext
>> 
>> Wolfgang
> 
> Yes, this works in a simple setup. But it doesn’t work in mine with my 
> LHS-quote/RHS-chapterstart setup using before and after on setup head.
> 
> Try this:
> 
> \setuplayout[location=doublesided]
> \setuppagenumbering[alternative=doublesided]
> 
> \definetext
>   [chapterfooter] % name
>   [footer]% vertical location
>   [pagenumber]% content
> 
> \setuphead[chapter]
>   [page=,
>header=empty,
>footer=chpaterfooter,
>sectionsegments=chapter,
>before={\setups[chapter:before]},
>after={\setups[chapter:after]}]
> 
> \startsetups chapter:before
> \page[left]
> \noheaderandfooterlines
> \startalignment[left,nothyphenated]
> \startnarrower[4*left]
> \em \getbuffer[chapter:quote]
> \stopnarrower
> \stopalignment
> \resetsetups[quote:text]
> \page[right]
> \blank[force,2*big]
> \stopsetups

Change chapter:before to be as follows (changes marked with %%)

\startsetups chapter:before
\page[left]
%noheaderandfooterlines %%
\setupheader[state=empty] %%
\setupfootertexts [] [pagenumber] [pagenumber] [] %%
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\resetsetups[quote:text]
\page[right]
\blank[force,2*big]   
\setupfootertexts [] [] [] []  %%
\stopsetups

Is that what you were after?

> 
> \startsetups chapter:after
> \blank[3*big]
> \stopsetups
> 
> \definelist[chaptertext]
> \setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
> \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}
> 
> \starttext
> \startbuffer [chapter:quote]
> If you think good architecture is expensive, try bad architecture\crlf
> {\tf Brian Foote and Joseph Yoder}
> \stopbuffer
> 
> \chapter[h:one]{One}
> \ChapterAbstract{This is chapter abstract 1.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \chapter[h:two]{Two}
> \ChapterAbstract{This is chapter abstract 2.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \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 / 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] Move the page number from header to footer on the current page only?

2021-10-25 Thread Gerben Wierda via ntg-context
I have a problem with getting the page number on the ‘first’ page of a chapter 
(in my setup, it is actually the second page as there is a LHS page before it 
with a quote. The bare minimum example:

\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided]

\setuphead[chapter]
  [page=,
   header=empty,
   footer=chpaterfooter,
   sectionsegments=chapter,
   before={\setups[chapter:before]}]

\startsetups chapter:before
\page[left]
\noheaderandfooterlines
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\page[right]
\stopsetups

\starttext
\startbuffer [chapter:quote]
If you think good architecture is expensive, try bad architecture\crlf
{\tf Brian Foote and Joseph Yoder}
\stopbuffer

\chapter[h:one]{One}
\dorecurse{5}{\input tufte \par \input knuth}

\chapter[h:two]{Two}
\dorecurse{5}{\input tufte \par \input knuth}

\stoptext

What I think I need is a way to move the page number from header to footer for 
just the current page (immediately after \page[right]) in this setup. 

Or a way to move the page number from header to footer on any current page.

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

> On 24 Oct 2021, at 18:04, Gerben Wierda via ntg-context  
> wrote:
> 
> On 24 Oct 2021, at 16:38, Wolfgang Schuster 
>  <mailto:wolfgang.schuster.li...@gmail.com>> wrote:
>> 
>> Gerben Wierda via ntg-context schrieb am 24.10.2021 um 15:42:
>>> My double-sided layout starts each chapter on a right page with a quote on 
>>> the opposing left page. I’d like to move the page number of that right page 
>>> to the footer, but haven’t been able to find how to do this is the 
>>> documentation. How can I do this?
>> 
>> \definetext
>>   [chapterfooter] % name
>>   [footer]% vertical location
>>   [pagenumber]% content
>> 
>> \setuphead
>>   [chapter]
>>   [header=empty,
>>footer=chapterfooter]
>> 
>> \starttext
>> 
>> \dorecurse{4}
>>   {\expanded{\chapter{Chapter \recurselevel}}
>>\dorecurse{10}{\samplefile{lorem}}}
>> 
>> \stoptext
>> 
>> Wolfgang
> 
> Yes, this works in a simple setup. But it doesn’t work in mine with my 
> LHS-quote/RHS-chapterstart setup using before and after on setup head.
> 
> Try this:
> 
> \setuplayout[location=doublesided]
> \setuppagenumbering[alternative=doublesided]
> 
> \definetext
>   [chapterfooter] % name
>   [footer]% vertical location
>   [pagenumber]% content
> 
> \setuphead[chapter]
>   [page=,
>header=empty,
>footer=chpaterfooter,
>sectionsegments=chapter,
>before={\setups[chapter:before]},
>after={\setups[chapter:after]}]
> 
> \startsetups chapter:before
> \page[left]
> \noheaderandfooterlines
> \startalignment[left,nothyphenated]
> \startnarrower[4*left]
> \em \getbuffer[chapter:quote]
> \stopnarrower
> \stopalignment
> \resetsetups[quote:text]
> \page[right]
> \blank[force,2*big]
> \stopsetups
> 
> \startsetups chapter:after
> \blank[3*big]
> \stopsetups
> 
> \definelist[chaptertext]
> \setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
> \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}
> 
> \starttext
> \startbuffer [chapter:quote]
> If you think good architecture is expensive, try bad architecture\crlf
> {\tf Brian Foote and Joseph Yoder}
> \stopbuffer
> 
> \chapter[h:one]{One}
> \ChapterAbstract{This is chapter abstract 1.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \chapter[h:two]{Two}
> \ChapterAbstract{This is chapter abstract 2.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \stoptext
> 
> 
> 
> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
> R Enterprise Architecture <https://ea.rna.nl/> (main site)
> Book: Chess and the Art of Enterprise Architecture 
> <https://ea.rna.nl/the-book/>
> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
> 
> 
> ___
> 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://con

Re: [NTG-context] How do I get the first page of the chapter to display the page number in the footer in this setup?

2021-10-24 Thread Gerben Wierda via ntg-context
On 24 Oct 2021, at 16:38, Wolfgang Schuster  
wrote:
> 
> Gerben Wierda via ntg-context schrieb am 24.10.2021 um 15:42:
>> My double-sided layout starts each chapter on a right page with a quote on 
>> the opposing left page. I’d like to move the page number of that right page 
>> to the footer, but haven’t been able to find how to do this is the 
>> documentation. How can I do this?
> 
> \definetext
>   [chapterfooter] % name
>   [footer]% vertical location
>   [pagenumber]% content
> 
> \setuphead
>   [chapter]
>   [header=empty,
>footer=chapterfooter]
> 
> \starttext
> 
> \dorecurse{4}
>   {\expanded{\chapter{Chapter \recurselevel}}
>\dorecurse{10}{\samplefile{lorem}}}
> 
> \stoptext
> 
> Wolfgang

Yes, this works in a simple setup. But it doesn’t work in mine with my 
LHS-quote/RHS-chapterstart setup using before and after on setup head.

Try this:

\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided]

\definetext
  [chapterfooter] % name
  [footer]% vertical location
  [pagenumber]% content

\setuphead[chapter]
  [page=,
   header=empty,
   footer=chpaterfooter,
   sectionsegments=chapter,
   before={\setups[chapter:before]},
   after={\setups[chapter:after]}]

\startsetups chapter:before
\page[left]
\noheaderandfooterlines
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\resetsetups[quote:text]
\page[right]
\blank[force,2*big]
\stopsetups

\startsetups chapter:after
\blank[3*big]
\stopsetups

\definelist[chaptertext]
\setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
\define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}

\starttext
\startbuffer [chapter:quote]
If you think good architecture is expensive, try bad architecture\crlf
{\tf Brian Foote and Joseph Yoder}
\stopbuffer

\chapter[h:one]{One}
\ChapterAbstract{This is chapter abstract 1.}

\dorecurse{5}{\input tufte \par \input knuth}

\chapter[h:two]{Two}
\ChapterAbstract{This is chapter abstract 2.}

\dorecurse{5}{\input tufte \par \input knuth}

\stoptext



Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>


___
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 do I get the first page of the chapter to display the page number in the footer in this setup?

2021-10-24 Thread Gerben Wierda via ntg-context
I attempted this:

\page[right]
\setupheadertexts[]
\setupfootertexts[pagenumber]
\setupfooter[text][after={\setupfootertexts[]\setupheadertexts[pagenumber]}]

but that does not work. This definitely moves the page numbers to the footer.

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

> On 24 Oct 2021, at 15:42, Gerben Wierda via ntg-context  
> wrote:
> 
> My double-sided layout starts each chapter on a right page with a quote on 
> the opposing left page. I’d like to move the page number of that right page 
> to the footer, but haven’t been able to find how to do this is the 
> documentation. How can I do this?
> 
> Example:
> 
> \setuplayout[location=doublesided]
> \setuppagenumbering[alternative=doublesided]
> \setuphead[chapter]
>   [page=,
>sectionsegments=chapter,
>before={\setups[chapter:before]},
>after={\setups[chapter:after]}]
> 
> \startsetups chapter:before
> \page[left]
> \noheaderandfooterlines
> \startalignment[left,nothyphenated]
> \startnarrower[4*left]
> \em \getbuffer[chapter:quote]
>   \stopnarrower
> \stopalignment
> \resetsetups[quote:text]
> \page[right]
> %\noheaderandfooterlines % I want the enumber in the footer here
> \blank[force,2*big]
> \stopsetups
> 
> \startsetups chapter:after
> \blank[3*big]
> \stopsetups
> 
> \definelist[chaptertext]
> \setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
> \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}
> 
> \starttext
> \startbuffer [chapter:quote]
> If you think good architecture is expensive, try bad architecture\crlf
> {\tf Brian Foote and Joseph Yoder}
> \stopbuffer
> 
> \chapter[h:one]{One}
> \ChapterAbstract{This is chapter abstract 1.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \chapter[h:two]{Two}
> \ChapterAbstract{This is chapter abstract 2.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \stoptext
> 
> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
> R Enterprise Architecture <https://ea.rna.nl/> (main site)
> Book: Chess and the Art of Enterprise Architecture 
> <https://ea.rna.nl/the-book/>
> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

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


[NTG-context] How do I get the first page of the chapter to display the page number in the footer in this setup?

2021-10-24 Thread Gerben Wierda via ntg-context
My double-sided layout starts each chapter on a right page with a quote on the 
opposing left page. I’d like to move the page number of that right page to the 
footer, but haven’t been able to find how to do this is the documentation. How 
can I do this?

Example:

\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided]
\setuphead[chapter]
  [page=,
   sectionsegments=chapter,
   before={\setups[chapter:before]},
   after={\setups[chapter:after]}]

\startsetups chapter:before
\page[left]
\noheaderandfooterlines
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\resetsetups[quote:text]
\page[right]
%\noheaderandfooterlines % I want the enumber in the footer here
\blank[force,2*big]
\stopsetups

\startsetups chapter:after
\blank[3*big]
\stopsetups

\definelist[chaptertext]
\setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
\define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}

\starttext
\startbuffer [chapter:quote]
If you think good architecture is expensive, try bad architecture\crlf
{\tf Brian Foote and Joseph Yoder}
\stopbuffer

\chapter[h:one]{One}
\ChapterAbstract{This is chapter abstract 1.}

\dorecurse{5}{\input tufte \par \input knuth}

\chapter[h:two]{Two}
\ChapterAbstract{This is chapter abstract 2.}

\dorecurse{5}{\input tufte \par \input knuth}

\stoptext

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

___
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] Indexing redux

2021-08-26 Thread Rik Kabel via ntg-context


On 8/26/2021 03:26, Taco Hoekwater wrote:

Hi Rik,


On 26 Aug 2021, at 03:14, Rik Kabel via ntg-context  wrote:

List,

I am trying to create an index with both "see" and "see also" cross-reference entries.[1] At this 
point, ConTeXt provides basic support for "see" entries via the \seeREGISTER command (it does not properly 
support references to sub-entries) and it provides no support at all for "see also" entries.

Can somebody suggest a way to generate these entries? Perhaps a way of 
inserting entries into the index before it is formatted, in the manner of 
\writetolist or \writebetweenlist? (MkII has \writetoregister, but that did not 
carry forward and I do not know if it would have helped here.)


Since strc-reg.mkiv starts with a number of ’todo’ comments, I think your best 
bet is to create an
actual functional example along with an explanation of what you want the 
typeset result to look
like in the cases where it is not doing what you want.

Generally, explicit examples / test files are the best way to get replies to 
questions
(either by Hans or anyone else).


The following produces what I am looking for, and a bit more. Page 3 of 
the output shows what I would like to see, page 4 is the generated 
index. I don't really need the "see under" and "see also under" 
variants, but they would be nice to have. I am indifferent to having 
stops before "see also"s. I would like to be able to turn checking on or 
off, so that generic directives (in the example, see also specific 
breeds) will not generate an error, while the Ford Prefect example will 
generate an error.



   \defineprocessor[also][color=blue]
   \defineprocessor[under][color=green]
   \defineprocessor[alsounder][color=orange]
   \define\seealsoindex\seeindex
   \define\seealsounderindex\seeindex
   \define\seeunderindex\seeindex
   \setupinteraction [state=start]
   \setupregister    [index][balance=no,check=no]

   %% seeindex entries may start on the same line as their head entry
   \seeindex {dog breeds+Wiener dog}{dog breeds+Dachshund}
   %%  The next example should not work,
   %%    since there is no main entry /Adams, Douglas/
   \seeindex {Prefect, Ford}{Adams, Douglas}

   %%  When referring to a subentry, the target must be a subentry,
   %%    but should display as if a main entry. The next example
   %%    should point to the /Adams+Douglas/ subentry, but it
   %%    should be formatted as if it were /Adams, Douglas/
   \seeindex {Dent, Arthur}{Adams+Douglas}

   %% The following two work as expected
   \seeindex {Matilda effect}{obliteration}
   \seeindex {Marut, Ret}{Traven, B.}

   %% seealso should be placed after as a subentry after real page
   references
   %% seealso should have an appropriate label (default English /see also/)
   \seealsoindex {pseudepigraphy}{also->obliteration}
   \seealsoindex {dog breeds}{also->breeding programs}
   \seealsoindex {dog breeds}{also->specific breeds}
   %% seealsounder is like seealso except that it refers to a main entry
   \seealsounderindex{Coton de Tulear}{alsounder->dog breeds}
   %% seeunder also is like seealso except that it refers to a main entry
   \seeunderindex    {Weimaraner}{under->dog breeds}
   \starttext
 Stuff
 \index{obliteration}
 \index{Adams+Douglas}\index{Adams+John}
 \index{Beagle}
 \index{dog breeds+Beagle}
 \index{dog breeds+Coton de Tulear}
 \index{dog breeds+Dachshund}
 \index{dog breeds+Weimaraner}
   \page
 More stuff
 \index{Adams+John Quincy}
 \index{misquotation}
 \index{pseudepigraphy}
 \index{Traven, B.}
 \index{Beagle}
 \index{Coton de Tulear}
 \index{breeding programs}
   \page
   \definedescription[Index][headstyle=bold,alternative=top,inbetween=]
   \startIndex{a}
 Adams\par
 \quad \reference[AdamsDouglas]{Adams, Douglas}Douglas\quad 1\par
 \quad John\quad 1\par
 \quad John Quincy\quad 2\par
   \stopIndex
   \startIndex{b}
 Beagle\quad 1, 2\par
 \reference[breedingprograms]{breeding programs}breeding
   programs\quad 2
   \stopIndex
   \startIndex{c}
 Coton de Tulear\quad 2.\par
 \quad {\em See also under} \in[dogbreeds]
   \stopIndex
   \startIndex{d}
 \reference[DentArthur]{Dent, Arthur}Dent, Arthur {\em see}
   \in[AdamsDouglas]\par
 \reference[dogbreeds]{dog breeds}dog breeds\par
 \quad \reference[dbBeagle]{dog breeds, Beagle}Beagle\quad 1\par
 \quad \reference[dbCoton]{dog breeds, Coton}Coton de
   Tulear\quad 1\par
 \quad \reference[dbDachshund]{dog breeds,
   Dachshund}Dachshund\quad 1\par
 \quad \reference[dbWeimaraner]{dog breeds,
   Weimarane

Re: [NTG-context] Indexing redux

2021-08-26 Thread Taco Hoekwater via ntg-context
Hi Rik,

> On 26 Aug 2021, at 03:14, Rik Kabel via ntg-context  
> wrote:
> 
> List,
> 
> I am trying to create an index with both "see" and "see also" cross-reference 
> entries.[1] At this point, ConTeXt provides basic support for "see" entries 
> via the \seeREGISTER command (it does not properly support references to 
> sub-entries) and it provides no support at all for "see also" entries.
> 
> Can somebody suggest a way to generate these entries? Perhaps a way of 
> inserting entries into the index before it is formatted, in the manner of 
> \writetolist or \writebetweenlist? (MkII has \writetoregister, but that did 
> not carry forward and I do not know if it would have helped here.)


Since strc-reg.mkiv starts with a number of ’todo’ comments, I think your best 
bet is to create an
actual functional example along with an explanation of what you want the 
typeset result to look 
like in the cases where it is not doing what you want.

Generally, explicit examples / test files are the best way to get replies to 
questions 
(either by Hans or anyone else).

Best wishes,
Taco

>  
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)



___
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] Indexing redux

2021-08-25 Thread Rik Kabel via ntg-context

List,

I am trying to create an index with both "see" and "see also" 
cross-reference entries.[1] At this point, ConTeXt provides basic 
support for "see" entries via the \seeREGISTER command (it does not 
properly support references to sub-entries) and it provides no support 
at all for "see also" entries.


Can somebody suggest a way to generate these entries? Perhaps a way of 
inserting entries into the index before it is formatted, in the manner 
of \writetolist or \writebetweenlist? (MkII has \writetoregister, but 
that did not carry forward and I do not know if it would have helped here.)


I had brought this up to no response a couple of years ago.[2] I am 
hopeful that LMTX may offer a chance to get support for improved 
indexing, and in particular for "see" and "see also" entries.


[1] For definitions and usage of "see" entries, see 
https://docs.oasis-open.org/dita/v1.1/OS/langspec/langref/index-see.html. 
For "see also" entries, see 
https://docs.oasis-open.org/dita/v1.1/OS/langspec/langref/index-see-also.html. 
For a deeper dive, see the publicly available University of Chicago 
Manual of Style version 15 guide, chapter 18, available at 
https://press.uchicago.edu/Misc/Chicago/CHIIndexingComplete.pdf, or more 
recent versions not yet freely available online.


[2] See "Possible seeindex enhancement" at 
https://www.mail-archive.com/ntg-context@ntg.nl/msg89470.html.


--
Rik


___
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] Add items to list with arbitrary page number

2021-03-18 Thread denis.maier
That's neat Hans. Thanks. Especially didn't know about \writedatatolist. 

What I want is basically to manually construct a toc entry, but in compliance 
with the overall styling of the contents list.

So, I was hoping for something like this?

\writetolist[chapter][location=here,pagenumber=4]{5}{It's a test}

Maybe I'm missing an easier way to achieve this?

Denis

P.S.: I don't really understand  what these \installXprocessor commands do. Is 
that documented somewhere?

-Ursprüngliche Nachricht-
Von: Hans Hagen  
Gesendet: Donnerstag, 18. März 2021 00:22
An: mailing list for ConTeXt users ; Maier, Denis Christian 
(UB) 
Betreff: Re: [NTG-context] Add items to list with arbitrary page number

On 3/17/2021 6:19 PM, denis.ma...@ub.unibe.ch wrote:
> Hi,
> 
> I need to add an item to a list with an arbitrary page number. (The 
> reason is that I have a multivolume book, and I want to add 
> information about the other books to the TOC)
> 
> I know about this:
> 
> \writetolist[section]{}{It's a test}
> 
> But how can you add an arbitrary page number ?
It all depends on what you want to do 


\starttext

\installstructurelistprocessor{chapter:userdata}
   {\startlinecorrection[blank]
\hfill \inframed{you really need to look at 
\structurelistuservariable{pagenumber}}%
\stoplinecorrection}

\placelist[chapter]

\chapter{one}

\writebetweenlist[chapter][location=here]{\blank page 4\blank}

\writedatatolist[chapter][location=here][pagenumber=4]

\writetolist[chapter]{}{It's a test}

\chapter{two}

\stoptext

wikifyable

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] Add items to list with arbitrary page number

2021-03-17 Thread Hans Hagen

On 3/17/2021 6:19 PM, denis.ma...@ub.unibe.ch wrote:

Hi,

I need to add an item to a list with an arbitrary page number. (The 
reason is that I have a multivolume book, and I want to add information 
about the other books to the TOC)


I know about this:

\writetolist[section]{}{It's a test}

But how can you add an arbitrary page number ?

It all depends on what you want to do 


\starttext

\installstructurelistprocessor{chapter:userdata}
  {\startlinecorrection[blank]
   \hfill \inframed{you really need to look at 
\structurelistuservariable{pagenumber}}%

   \stoplinecorrection}

\placelist[chapter]

\chapter{one}

\writebetweenlist[chapter][location=here]{\blank page 4\blank}

\writedatatolist[chapter][location=here][pagenumber=4]

\writetolist[chapter]{}{It's a test}

\chapter{two}

\stoptext

wikifyable

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
___


[NTG-context] Add items to list with arbitrary page number

2021-03-17 Thread denis.maier
Hi,
I need to add an item to a list with an arbitrary page number. (The reason is 
that I have a multivolume book, and I want to add information about the other 
books to the TOC)

I know about this:
\writetolist[section]{}{It's a test}

But how can you add an arbitrary page number ?

Best,
Denis

___
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] Automatically setting the value of list key in annotation module

2020-12-09 Thread Aditya Mahajan
On Wed, 9 Dec 2020, Wolfgang Schuster wrote:

> > Actually, I cannot figure out how \writetolist works. According to
> https://wiki.contextgarden.net/Command/writetolist, the 2nd argument is the
> "number". But, for some reason, the list number doesn't show in placelist:
> >
> >
> > \definelist[test]
> >
> > \starttext
> >
> > \placelist[test][criterium=all, alternative=b]
> 
> Add "headnumber=always".

Thanks!

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
___


Re: [NTG-context] Automatically setting the value of list key in annotation module

2020-12-09 Thread Wolfgang Schuster

Aditya Mahajan schrieb am 08.12.2020 um 20:05:

On Tue, 8 Dec 2020, Aditya Mahajan wrote:


Hi,

On Tue, 8 Dec 2020, Hans Hagen wrote:


On 12/8/2020 8:47 AM, Aditya Mahajan wrote:

\usemodule[annotation]

\defineannotation[test][alternative=paragraph]

\starttext

\placelist[test][criterium=all]

\starttest[title={This is a title}]
\input ward
\stoptest

\starttest[title={This is another title}, list={This is in the 2nd list}]
\input ward
\stoptest

just cheat:

\starttest[title={This is another title}, list={This is in the 2nd
list},after={\writetolist[test]{1}{what a cheat}}]
   \input ward
\stoptest

I actually wanted it the other way round ... make sure that 
\starttest[test][title={...}] gets added to the list. Looking at the comments 
of the annotation module, I get the impression that this should work.

I could do it manually by adding \writetolist as part of the renderingsetup, 
but there are already multiple \writetolist in the annotation module, so I 
think that I am missing a configuration option.

Actually, I cannot figure out how \writetolist works. According to 
https://wiki.contextgarden.net/Command/writetolist, the 2nd argument is the 
"number". But, for some reason, the list number doesn't show in placelist:


\definelist[test]

\starttext

\placelist[test][criterium=all, alternative=b]


Add "headnumber=always".

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] Automatically setting the value of list key in annotation module

2020-12-08 Thread Aditya Mahajan
On Tue, 8 Dec 2020, Aditya Mahajan wrote:

> Hi,
> 
> On Tue, 8 Dec 2020, Hans Hagen wrote:
> 
> > On 12/8/2020 8:47 AM, Aditya Mahajan wrote:
> > > \usemodule[annotation]
> > > 
> > > \defineannotation[test][alternative=paragraph]
> > > 
> > > \starttext
> > > 
> > > \placelist[test][criterium=all]
> > > 
> > > \starttest[title={This is a title}]
> > >\input ward
> > > \stoptest
> > > 
> > > \starttest[title={This is another title}, list={This is in the 2nd list}]
> > >    \input ward
> > > \stoptest
> > 
> > just cheat:
> > 
> > \starttest[title={This is another title}, list={This is in the 2nd
> > list},after={\writetolist[test]{1}{what a cheat}}]
> >   \input ward
> > \stoptest
> 
> I actually wanted it the other way round ... make sure that 
> \starttest[test][title={...}] gets added to the list. Looking at the comments 
> of the annotation module, I get the impression that this should work. 
> 
> I could do it manually by adding \writetolist as part of the renderingsetup, 
> but there are already multiple \writetolist in the annotation module, so I 
> think that I am missing a configuration option.

Actually, I cannot figure out how \writetolist works. According to 
https://wiki.contextgarden.net/Command/writetolist, the 2nd argument is the 
"number". But, for some reason, the list number doesn't show in placelist:


\definelist[test]

\starttext

\placelist[test][criterium=all, alternative=b]

\writetolist[test]{1}{One}
\writetolist[test]{2}{Two}

\stoptext

This gives

One1
Two1

while I was expecting

1 One   1
2 Two   1

What am I missing?

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


Re: [NTG-context] Automatically setting the value of list key in annotation module

2020-12-08 Thread Aditya Mahajan
Hi,

On Tue, 8 Dec 2020, Hans Hagen wrote:

> On 12/8/2020 8:47 AM, Aditya Mahajan wrote:
> > \usemodule[annotation]
> > 
> > \defineannotation[test][alternative=paragraph]
> > 
> > \starttext
> > 
> > \placelist[test][criterium=all]
> > 
> > \starttest[title={This is a title}]
> >\input ward
> > \stoptest
> > 
> > \starttest[title={This is another title}, list={This is in the 2nd list}]
> >\input ward
> > \stoptest
> 
> just cheat:
> 
> \starttest[title={This is another title}, list={This is in the 2nd
> list},after={\writetolist[test]{1}{what a cheat}}]
>   \input ward
> \stoptest

I actually wanted it the other way round ... make sure that 
\starttest[test][title={...}] gets added to the list. Looking at the comments 
of the annotation module, I get the impression that this should work. 

I could do it manually by adding \writetolist as part of the renderingsetup, 
but there are already multiple \writetolist in the annotation module, so I 
think that I am missing a configuration option.

> btw, maybe wolfgang should turn that module into a core mkxl one using the new
> fancy macro magic

That will be nice. There is some overlap with strc-con, but that does not have 
any of the goodies which the annotation module provides.

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
___


Re: [NTG-context] Automatically setting the value of list key in annotation module

2020-12-08 Thread Hans Hagen

On 12/8/2020 8:47 AM, Aditya Mahajan wrote:

\usemodule[annotation]

\defineannotation[test][alternative=paragraph]

\starttext

\placelist[test][criterium=all]

\starttest[title={This is a title}]
   \input ward
\stoptest

\starttest[title={This is another title}, list={This is in the 2nd list}]
   \input ward
\stoptest


just cheat:

\starttest[title={This is another title}, list={This is in the 2nd 
list},after={\writetolist[test]{1}{what a cheat}}]

  \input ward
\stoptest

btw, maybe wolfgang should turn that module into a core mkxl one using 
the new fancy macro magic


anyway, if this happens a lot we could think of some addition to the 
list mechanism


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] Simpleslides presentation: list of topics

2016-09-15 Thread Otared Kavian
Hi Aditya and Thomas,

Thanks to both of your for your attention to my bizarre request.
Actually it is quite easy to have a page a list of the topics on a page, as one 
can see in the following example (please see below). Tne only thing I am 
lacking write now, is a trick to go the list of topics from any page, without 
adding manually a link to that page on each slide.

Another question: I am not at all familiar with the code you have written for 
the nice visual counter used in simpleslides module. Would it be possible to 
add interactivity to each portion of that visual counter, in such that upon 
clicking on that portion one jumps to the corresponding page?

Best regards: OK
%%% begin example-swoosh-topics.tex
\usemodule[simpleslides]
[style=swoosh]

\setupinteraction[state=start]

\definelist[ListOfTopics]
\setuplist[ListOfTopics][alternative=f]

\define[1]\Topic{%
\SlideTitle{#1}
\unexpanded\define\TopicTitle{#1}
\writetolist[ListOfTopics]{}{#1}
}
\define\Slide{\SlideTitle{\TopicTitle}}

\define[1]\placeListOfTopics{%
\SlideTitle{#1}
\startalignment[middle]
\completelist[ListOfTopics]
\stopalignment}

\setupTitle
  [ title={Title of the presentation},
   author={Name of authors},
 date={Date of presentation},
  ]

\starttext
\placeTitle

\placeListOfTopics{Today's talk}

\Topic{First topic}
We introduce here our first topic: to find a solution to\dots

\Slide

The first slide.

Write whatever you want.

\Slide

The second slide.

Continue writing.

\Topic{Second topic}
We introduce here our second topic: to find another solution to\dots

\Slide

The first slide.

Write whatever you want.

\Slide

The second slide.

Continue writing.

\stoptext
%%% end example-swoosh-topics.tex

> On 15 Sep 2016, at 17:05, Aditya Mahajan <adit...@umich.edu> wrote:
> 
> On Thu, 15 Sep 2016, Otared Kavian wrote:
> 
>> Hi Thomas,
>> 
>> Thanks for your quick answer. Actually, mistakenly, I thought you had gave 
>> up the simplesildes module, not Aditya… And I included Wolfgang because he 
>> follows everything and has insight for everything…
>> 
>> Anyhow, thank you for sharing this nice module. Actually sometimes it is 
>> useful to have the interaction and some links working in a presentation, at 
>> least in maths. Imagine a case in which you introduce an equation and later 
>> on you refer to it and someone asks to show it again. Also it is handy to 
>> have a list of topics because this way one can go back easily to the page 
>> where the list is and go quickly to such and such topic. Moreover it happens 
>> that one can prepare a topic but not show it unless there is a specific 
>> demand.
>> 
>> Now, from an esthetic point of view for the swoosh, it is not obvious where 
>> to put the list, but when there are only a few topics (as is usually the 
>> case) then one can find an appropriate setting of the list.
>> Another solution would be to have the nice visual counter to be interactive 
>> and so clicking on a certain number would go to the wanted topic.
> 
> I use my unreleased overview module to place a visual ToC at the end:
> https://randomdeterminism.wordpress.com/2014/01/01/announcing-the-overview-module/
> 
> There have been some changes in the module since that blog post; the most 
> up-to-date code is at github: https://github.com/adityam/context-overviewpage
> 
> I use this in two ways: Either in the conclusions as in the 2nd last slide at 
> http://www.ece.mcgill.ca/~amahaj1/projects/real-time/slides/2016-wiopt.pdf
> 
> or as a visual ToC as in the last slide at
> http://www.ece.mcgill.ca/~amahaj1/talks/rutgers-2015.pdf
> 
> There is very little documentation, but if you are interested I can write 
> some notes on how to use the module.
> 
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] placelist not working in latest beta

2016-03-21 Thread Hans Hagen

On 3/21/2016 9:57 AM, Schmitz Thomas A. wrote:

Hi all,

example attached with output from latest beta and an older one. The \placelist 
command appears to have changed recently; the older beta I tested is from 
November, but this used to work in February as well, the change must be recent.


when playign with some new feature i commented too much

around line 722, uncomment:

\setuplistalternative
  [\c!command=\strictlistparameter\c!command,
   \c!symbol=.]




Thanks a lot

Thomas

\definelist[MyTopics][criterium=all]

\def\MyMark{}

\def\Topic%
   {\dosingleargument\doTopic}

\def\doTopic[#1]{%
   \gdef\MyMark{#1}%
   \writetolist[MyTopics][location=none]{#1}{}}

\define[3]\FancyEntry{%
   \doifelse{\rawstructurelistfirst}{\MyMark}%
 {\quad\color[red]{#1}\quad}
 {\quad #1\quad}}

\setuplist[MyTopics]
   [pagenumber=no,
alternative=command,
command=\FancyEntry]

\setupfootertexts [{\switchtobodyfont[8pt]\quad{\placelist[MyTopics]}}]

\starttext

\Topic[First]
\contextversion

First Topic

\page

\Topic[Second]

Second Topic

\page

\Topic[Third]

Third Topic

\stoptext



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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] placelist not working in latest beta

2016-03-21 Thread Schmitz Thomas A.
Hi all,

example attached with output from latest beta and an older one. The \placelist 
command appears to have changed recently; the older beta I tested is from 
November, but this used to work in February as well, the change must be recent.

Thanks a lot

Thomas

\definelist[MyTopics][criterium=all]

\def\MyMark{}

\def\Topic%
  {\dosingleargument\doTopic}

\def\doTopic[#1]{%
  \gdef\MyMark{#1}%
  \writetolist[MyTopics][location=none]{#1}{}}

\define[3]\FancyEntry{%
  \doifelse{\rawstructurelistfirst}{\MyMark}%
{\quad\color[red]{#1}\quad}
{\quad #1\quad}}

\setuplist[MyTopics]
  [pagenumber=no,
   alternative=command,
   command=\FancyEntry]

\setupfootertexts [{\switchtobodyfont[8pt]\quad{\placelist[MyTopics]}}] 

\starttext

\Topic[First]
\contextversion

First Topic

\page

\Topic[Second]

Second Topic

\page

\Topic[Third]

Third Topic

\stoptext



2015_11_19.pdf
Description: Adobe PDF document


2016_03_13.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \writetolist command...

2016-03-04 Thread Willi Egger
Hans, thank you for your tip!

Willi
> On 4 mrt. 2016, at 12:08, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 3/4/2016 5:37 AM, Willi Egger wrote:
>> Hi all,
>> 
>> I need to write to a list, however it appears that the second argument from 
>> \writetolist[name]{number}{ext} does not end up in the list. — What do I 
>> miss?
>> 
>> \starttext
>>  \startsubject[title=Contents]
>>  \placelist[section][criterium=all]
>>  \stopsubject
>> 
>>  \startsubject[title=A Paragraph as Subject]
>>  \writetolist[section]{1}{Writetolist: Subject title}
>>  \stopsubject
>> \stoptext
> 
> headnumber=always
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \writetolist command...

2016-03-04 Thread Hans Hagen

On 3/4/2016 5:37 AM, Willi Egger wrote:

Hi all,

I need to write to a list, however it appears that the second argument from 
\writetolist[name]{number}{ext} does not end up in the list. — What do I miss?

\starttext
\startsubject[title=Contents]
\placelist[section][criterium=all]
\stopsubject

\startsubject[title=A Paragraph as Subject]
\writetolist[section]{1}{Writetolist: Subject title}
\stopsubject
\stoptext


headnumber=always


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] \writetolist command...

2016-03-03 Thread Willi Egger
Hi all,

I need to write to a list, however it appears that the second argument from 
\writetolist[name]{number}{ext} does not end up in the list. — What do I miss?

\starttext
\startsubject[title=Contents]
\placelist[section][criterium=all]
\stopsubject

\startsubject[title=A Paragraph as Subject]
\writetolist[section]{1}{Writetolist: Subject title}
\stopsubject
\stoptext

Kind regards

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] horizontal list of sections/topics?

2016-02-12 Thread Alan BRASLAU
On Fri, 12 Feb 2016 23:36:47 +0100
"Thomas A. Schmitz" <thomas.schm...@uni-bonn.de> wrote:

> Hi,
> 
> this is a quick question before I start coding: for my next
> presentation style, I would like to have a list of topics with the
> current topic highlighted. There are already two styles in
> simpleslides doing this, but this time, I'd like the list to be
> horizontal, at the bottom of the slide. Is there already a
> listalternative for this? Or is it not too complex to have a
> \definelistalternative do this? Or would it be easier not to rely on
> the list mechanism but code something from scratch?
> 
> Thanks for your advice and all best
> 
> Thomas

Hi Thomas,

I use the following code that puts a (vertical) list into the left margin.
The present topic is highlighted.

You will need to modify your list with before=,after=, etc.
Maybe this can give you some ideas.

Alan


I use it as follows:


\def\MarkPage{4} % first 3 slides are title, introduction and outline...

I then put this whenever I want to begin a new topic.

\Topic [A new topic]





\definelist [MyTopics] [criterium=all]
\setuplist  [MyTopics]
[pagenumber=no,alternative=command,command=\FancyEntry,interaction=all]
\setupinteraction [state=start,color=,contrastcolor=]

\def\MarkPage{0}
\def\MyMark{}
\def\Topic{\dosingleargument\doTopic}
\def\doTopic[#1]{\def\MyMark{#1}\writetolist[MyTopics]{}{#1}}

\define[3]\FancyEntry {
\framed[width=2.5cm,align={right,nothyphenated},frame=off,offset=0pt]
{\doifelse \rawstructurelistsecond \MyMark
{\color [simpleslides:contrastcolor]{\switchtobodyfont 
[12pt]#2\par}}
{\color [simpleslides:altcontrastcolor] {\switchtobodyfont 
[12pt]#2\par}}
\blank [small]}
}

\setuptexttexts[margin][\ifnum\realpageno>\MarkPage\vbox{\placelist[MyTopics]}\fi][]
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Regression with \doboundtext in \writetolist

2015-10-11 Thread Hans Hagen

On 10/11/2015 5:21 AM, Rik Kabel wrote:

The following example works with older versions of ConTeXt, such as the
version from 20150325 in my repository. It fails with TL15 and later,
including the current standalone beta.

% macros=mkvi
\setwidthof {99}\to\IDWidth\relax
\def\STWidth{\dimexpr\textwidth-\IDWidth+1cm}
\definelist[OList]
\setuplist
[OList][criterium=all,alternative=c,pagecommand=\gobbleoneargument]

\starttexdefinition OLister #ID#String
{\writetolist[OList]{}{\hbox{\simplealignedbox{\IDWidth}{left}{#ID\quad}
{\doboundtext{#String}{\STWidth}{…}
\stoptexdefinition

\starttext
\OLister1{Some list testing text xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\OLister2{Yet another list testing text xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\OLister3{A list testing text xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\OLister4{Different list testing text xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\subject{List half width}
\startcolumns[n=2]
\placelist[OList]
\stopcolumns
\stoptext

With the 20150325 ConTeXt, there are .tuc file entries like:

["second"]="\\hbox {\\simplealignedbox {\\IDWidth
}{left}{2\\quad }{\\doboundtext {Yet another list testing text xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx}{\\STWidth }{…}}}",

but with more recent versions, the corresponding entry is:

["second"]="\\hbox {\\simplealignedbox {12.6pt}{left}{2\\quad
}{\\hbox {\\setbox \\scratchbox \\hbox {Yet another list testing
text xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx xxx}\\scratchdimen \\dimexpr \\textwidth -12.6pt+1cm\\relax
\\box \\scratchbox }}}",



\unexpanded\def\STWidth{\dimexpr\textwidth-\IDWidth+1cm}

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Regression with \doboundtext in \writetolist

2015-10-11 Thread Wolfgang Schuster

Rik Kabel <mailto:cont...@rik.users.panix.com>
11. Oktober 2015 um 18:25
On 2015-10-11 06:11, Hans Hagen wrote:

On 10/11/2015 5:21 AM, Rik Kabel wrote:

The following example works with older versions of ConTeXt, such as the
version from 20150325 in my repository. It fails with TL15 and later,
including the current standalone beta.

% macros=mkvi
\setwidthof {99}\to\IDWidth\relax
\def\STWidth{\dimexpr\textwidth-\IDWidth+1cm}
\definelist[OList]
\setuplist
[OList][criterium=all,alternative=c,pagecommand=\gobbleoneargument]

\starttexdefinition OLister #ID#String
    
{\writetolist[OList]{}{\hbox{\simplealignedbox{\IDWidth}{left}{#ID\quad} 


{\doboundtext{#String}{\STWidth}{…}
\stoptexdefinition

\starttext
\OLister1{Some list testing text xxx xxx xxx xxx xxx xxx xxx xxx 
xxx

xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\OLister2{Yet another list testing text xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\OLister3{A list testing text xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\OLister4{Different list testing text xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\subject{List half width}
\startcolumns[n=2]
\placelist[OList]
\stopcolumns
\stoptext

With the 20150325 ConTeXt, there are .tuc file entries like:

["second"]="\\hbox {\\simplealignedbox {\\IDWidth
}{left}{2\\quad }{\\doboundtext {Yet another list testing text xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx}{\\STWidth }{…}}}",

but with more recent versions, the corresponding entry is:

["second"]="\\hbox {\\simplealignedbox {12.6pt}{left}{2\\quad
}{\\hbox {\\setbox \\scratchbox \\hbox {Yet another list testing
text xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx 
xxx

xxx xxx}\\scratchdimen \\dimexpr \\textwidth -12.6pt+1cm\\relax
\\box \\scratchbox }}}",



\unexpanded\def\STWidth{\dimexpr\textwidth-\IDWidth+1cm}

Yes, expansion needs to be delayed to get the current dimension when 
the list is placed. My error—thank you for the correction. But the 
regression is not resolved. The .tuc file now contains:


["second"]="\\hbox {\\simplealignedbox {12.6pt}{left}{2\\quad
}{\\hbox {\\setbox \\scratchbox \\hbox {Yet another list testing
text xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx}\\scratchdimen \\STWidth \\relax \\box \\scratchbox }}}",

Still no mention of dobounded text is carried into the list.
Is \limitatetext a option for you because unlike \doboundtext the 
command is unexpandable?


\starttext

\doboundtext {Thus, I came to the conclusion that the designer of a new 
system ...}{.5\textwidth}{...}


\limitatetext{Thus, I came to the conclusion that the designer of a new 
system ...}{.5\textwidth}{...}


\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Regression with \doboundtext in \writetolist

2015-10-11 Thread Rik

On 2015-10-11 12:56, Wolfgang Schuster wrote:
Is \limitatetext a option for you because unlike \doboundtext the 
command is unexpandable?


\starttext

\doboundtext {Thus, I came to the conclusion that the designer of a 
new system ...}{.5\textwidth}{...}


\limitatetext{Thus, I came to the conclusion that the designer of a 
new system ...}{.5\textwidth}{...}


\stoptext

Is it an option of which I am aware, yes. Do I desire to use it, no. 
Will I use it? Perhaps, if \doboundtext cannot be repaired. The 
resulting page with \limitatetext has large rivers of white on the page.


But more likely I will look for a hack to use \doboundtext to trim the 
text before writing it to the list, even though it loses the flexibility 
of computing the width dynamically.


Can you point to what changed between the 20150325 version and TL15 to 
break this?


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Regression with \doboundtext in \writetolist

2015-10-11 Thread Rik Kabel

On 2015-10-11 06:11, Hans Hagen wrote:

On 10/11/2015 5:21 AM, Rik Kabel wrote:

The following example works with older versions of ConTeXt, such as the
version from 20150325 in my repository. It fails with TL15 and later,
including the current standalone beta.

% macros=mkvi
\setwidthof {99}\to\IDWidth\relax
\def\STWidth{\dimexpr\textwidth-\IDWidth+1cm}
\definelist[OList]
\setuplist
[OList][criterium=all,alternative=c,pagecommand=\gobbleoneargument]

\starttexdefinition OLister #ID#String
{\writetolist[OList]{}{\hbox{\simplealignedbox{\IDWidth}{left}{#ID\quad}
{\doboundtext{#String}{\STWidth}{…}
\stoptexdefinition

\starttext
\OLister1{Some list testing text xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\OLister2{Yet another list testing text xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\OLister3{A list testing text xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\OLister4{Different list testing text xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
\subject{List half width}
\startcolumns[n=2]
\placelist[OList]
\stopcolumns
\stoptext

With the 20150325 ConTeXt, there are .tuc file entries like:

["second"]="\\hbox {\\simplealignedbox {\\IDWidth
}{left}{2\\quad }{\\doboundtext {Yet another list testing text xxx
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx}{\\STWidth }{…}}}",

but with more recent versions, the corresponding entry is:

["second"]="\\hbox {\\simplealignedbox {12.6pt}{left}{2\\quad
}{\\hbox {\\setbox \\scratchbox \\hbox {Yet another list testing
text xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx xxx}\\scratchdimen \\dimexpr \\textwidth -12.6pt+1cm\\relax
\\box \\scratchbox }}}",



\unexpanded\def\STWidth{\dimexpr\textwidth-\IDWidth+1cm}

Yes, expansion needs to be delayed to get the current dimension when the 
list is placed. My error—thank you for the correction. But the 
regression is not resolved. The .tuc file now contains:


   ["second"]="\\hbox {\\simplealignedbox {12.6pt}{left}{2\\quad
   }{\\hbox {\\setbox \\scratchbox \\hbox {Yet another list testing
   text xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
   xxx xxx}\\scratchdimen \\STWidth \\relax \\box \\scratchbox }}}",

Still no mention of dobounded text is carried into the list.
--
Rik
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Regression with \doboundtext in \writetolist

2015-10-11 Thread Wolfgang Schuster

Rik 
11. Oktober 2015 um 21:20
On 2015-10-11 12:56, Wolfgang Schuster wrote:
Is it an option of which I am aware, yes. Do I desire to use it, no. 
Will I use it? Perhaps, if \doboundtext cannot be repaired. The 
resulting page with \limitatetext has large rivers of white on the page.


But more likely I will look for a hack to use \doboundtext to trim the 
text before writing it to the list, even though it loses the 
flexibility of computing the width dynamically.

Adding \noexpand before \doboundtext should work.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Regression with \doboundtext in \writetolist

2015-10-10 Thread Rik Kabel
The following example works with older versions of ConTeXt, such as the 
version from 20150325 in my repository. It fails with TL15 and later, 
including the current standalone beta.


   % macros=mkvi
   \setwidthof {99}\to\IDWidth\relax
   \def\STWidth{\dimexpr\textwidth-\IDWidth+1cm}
   \definelist[OList]
   \setuplist
   [OList][criterium=all,alternative=c,pagecommand=\gobbleoneargument]

   \starttexdefinition OLister #ID#String
   {\writetolist[OList]{}{\hbox{\simplealignedbox{\IDWidth}{left}{#ID\quad}
   {\doboundtext{#String}{\STWidth}{…}
   \stoptexdefinition

   \starttext
   \OLister1{Some list testing text xxx xxx xxx xxx xxx xxx xxx xxx xxx
   xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
   \OLister2{Yet another list testing text xxx xxx xxx xxx xxx xxx xxx
   xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
   \OLister3{A list testing text xxx xxx xxx xxx xxx xxx xxx xxx xxx
   xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
   \OLister4{Different list testing text xxx xxx xxx xxx xxx xxx xxx
   xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx}
   \subject{List half width}
   \startcolumns[n=2]
   \placelist[OList]
   \stopcolumns
   \stoptext

With the 20150325 ConTeXt, there are .tuc file entries like:

   ["second"]="\\hbox {\\simplealignedbox {\\IDWidth
   }{left}{2\\quad }{\\doboundtext {Yet another list testing text xxx
   xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
   xxx}{\\STWidth }{…}}}",

but with more recent versions, the corresponding entry is:

   ["second"]="\\hbox {\\simplealignedbox {12.6pt}{left}{2\\quad
   }{\\hbox {\\setbox \\scratchbox \\hbox {Yet another list testing
   text xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
   xxx xxx}\\scratchdimen \\dimexpr \\textwidth -12.6pt+1cm\\relax
   \\box \\scratchbox }}}",

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Questions on registers, and on processors used with registers

2015-10-04 Thread Rik Kabel

A few questions on registers, and on processors used with registers:

Can processors be used on entries in \setregisterentry? My tests so far 
have not been successful.


Can processors be used on one level of a two-level register 
{\index{Name+Processor->quotation precis}? Again, no success with attempts.


Can something other than page numbers be the indexed item?

I have a book with many quotations, each identified by a number 
(generated by \definelabel). For an index of quotations, it would be 
more useful to point to that quotation number than the page number.


Perhaps the last requirement would be served by building a list with the 
quote number and quotation precis, suppressing the page numbers with 
pagenumber=\gobbleoneargument. But placelist does not seem to behave as 
one would hope. The example in the wiki for setuplist (shown below) does 
not print the numbers (1., 2.) in the first braced argument to writetolist.


   \definelist[Reprints][criterium=all]

   \starttext
  \section{Sec 1}
  \writetolist[Reprints]{1.}{List entry A}
  \subsection{Subsec 1}
  \writebetweenlist[Reprints]{\hrule}
  \writetolist[Reprints]{2.}{List entry B}
  \completelist[Reprints]
   \stoptext

I would prefer a register solution to take advantage of similar 
formatting (column support and such) provided there, since this will 
appear with the book’s standard indices.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] chapter only in bookmarks (not in text or in TOC)

2015-07-06 Thread Hans Hagen

On 7/5/2015 7:54 PM, Pablo Rodriguez wrote:

Dear list,

I have the following sample:

 \showframe
 \setupinteraction[state=start]
 \placebookmarks[chapter]
 \definehead[hiddentitle][chapter]
 \setuphead[hiddentitle][incrementnumber=no]
 \starttext
 \completecontent
 \hiddentitle{Prologue}
 aa\page aa
 \chapter{Foreword}
 aa
 \chapter{Introduction}
 \stoptext

I would like to have a \hiddentitle command that doesn’t display the
heading in text (and adds no extra space), that it doesn’t add it to the
table of contents, but that it adds it as a bookmark.

How should I define \hiddentitle to get that?


something

\setupinteraction[state=start]
\placebookmarks[chapter,hiddentitle]
\definehead[hiddentitle][chapter]
\starttext
\completecontent
\writetolist[hiddentitle]{!!}{xxx}
aa\page aa
\chapter{Foreword}
aa
\chapter{Introduction}
\stoptext

or

\setupinteraction[state=start]
\placebookmarks[chapter,hiddentitle]
\definehead[hiddentitle][chapter]
\setuphead[hiddentitle][incrementnumber=list]
\starttext
\completecontent
\hiddentitle{Prologue}
aa\page aa
\chapter{Foreword}
aa
\chapter{Introduction}
\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] overlay or layer for chapter head.

2015-04-02 Thread Otared Kavian
Hi,

Maybe you need to say state=repeat in the definition of your layer:

\definelayer[chapterbackground][state=repeat]

Best regards: OK

 
 On 02 Apr 2015, at 13:15, robin.kirk...@csiro.au wrote:
 
 From: John Culleton j...@wexfordpress.com
 Subject: [NTG-context] overlay or layer for chapter head.
 Date: 2 April 2015 1:19:03 AEDT
 
 I am redoing a book for a client. Each chapter
 head has a fancy design. I want to reproduce that
 fancy page but still have the \chapter
 statement for running heads, TOC etc. 
 
 Is there a way that I can overlay the entire
 chapter first page with a graphic, ideally a one
 page pdf file. 
 
 I have tried workarounds with
 \startstandardmakeup,\writetolist,
 \definemarking etc. but the whole thing is
 getting too complicated. I just want to overlay a
 the entire page with a graphic yet have
 the real content of the page still available for
 TOC, running head, indexing terms etc.
 
 Any suggestions?
 
 -- 
 John Culleton
 Wexford Press
 
 Hi John,
 
 I did this recently by defining a layer and putting an image in it using 
 \setlayer, in a macro called just before chapters are started:
 
 \definelayer[chapterbackground]
 \setupexternalfigures[location=default]
 
 \unexpanded\def\chapterbefore{
\setlayer[chapterbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
}
\setupbackgrounds[page]
[background=chapterbackground]
 }
 
 \setuphead[chapter][before=\chapterbefore]
 
 \starttext
 \chapter{Knuth}
 \dorecurse{5}{
\input knuth
\par
 }
 
 \chapter{Dawkins}
 \input dawkins
 \stoptext
 
 No doubt there is a neater/better way to do it than that. In fact I tried to 
 set up the background only once, like this:
 
 \definelayer[chapterbackground]
 \setupexternalfigures[location=default]
 \setlayer[chapterbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
 }
 
 \setuphead[chapter]
[before={
\setupbackgrounds[page]
[background=chapterbackground]
}]
 
 \starttext
 \chapter{Knuth}
 \dorecurse{5}{
\input knuth
\par
 }
 
 \chapter{Dawkins}
 \input dawkins
 \stoptext
 
 But it looks like the layer “forgets” the image each time it is used, and the 
 second chapter does not have the image. I’d be pleased to know the “right 
 way” to do this too ...
 
 Robin
 
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] overlay or layer for chapter head.

2015-04-02 Thread Robin.Kirkham
 From: John Culleton j...@wexfordpress.com
 Subject: [NTG-context] overlay or layer for chapter head.
 Date: 2 April 2015 1:19:03 AEDT
 
 I am redoing a book for a client. Each chapter
 head has a fancy design. I want to reproduce that
 fancy page but still have the \chapter
 statement for running heads, TOC etc. 
 
 Is there a way that I can overlay the entire
 chapter first page with a graphic, ideally a one
 page pdf file. 
 
 I have tried workarounds with
 \startstandardmakeup,\writetolist,
 \definemarking etc. but the whole thing is
 getting too complicated. I just want to overlay a
 the entire page with a graphic yet have
 the real content of the page still available for
 TOC, running head, indexing terms etc.
 
 Any suggestions?
 
 -- 
 John Culleton
 Wexford Press

Hi John,

I did this recently by defining a layer and putting an image in it using 
\setlayer, in a macro called just before chapters are started:

\definelayer[chapterbackground]
\setupexternalfigures[location=default]

\unexpanded\def\chapterbefore{
\setlayer[chapterbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
}
\setupbackgrounds[page]
[background=chapterbackground]
}

\setuphead[chapter][before=\chapterbefore]

\starttext
\chapter{Knuth}
\dorecurse{5}{
\input knuth
\par
}

\chapter{Dawkins}
\input dawkins
\stoptext

No doubt there is a neater/better way to do it than that. In fact I tried to 
set up the background only once, like this:

\definelayer[chapterbackground]
\setupexternalfigures[location=default]
\setlayer[chapterbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
}

\setuphead[chapter]
[before={
\setupbackgrounds[page]
[background=chapterbackground]
}]

\starttext
\chapter{Knuth}
\dorecurse{5}{
\input knuth
\par
}

\chapter{Dawkins}
\input dawkins
\stoptext

But it looks like the layer “forgets” the image each time it is used, and the 
second chapter does not have the image. I’d be pleased to know the “right way” 
to do this too ...

Robin



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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] overlay or layer for chapter head.

2015-04-02 Thread John Culleton
On Thu, 02 Apr 2015 15:10:19 +0200
Procházka Lukáš Ing. - Pontex s. r. o.
l...@pontex.cz wrote:

 Hello,
 
 On Thu, 02 Apr 2015 14:46:11 +0200, Otared
 Kavian ota...@gmail.com wrote:
 
  Hi,
 
  Maybe you need to say state=repeat in the
  definition of your layer:
 
  \definelayer[chapterbackground][state=repeat]
 
 '[state=repeat]' causes all pages have the
 'mill' background.
 
 Best regards,
 
 Lukas
 
 

I am not seeking a background but rather a
foreground. And I only need this for 7 chapter
heads. Here is how I put the page image into my
context file now:
-
\startstandardmakeup[doublesided=no]
\vskip -0.15in
 \hskip -0.7in
\hbox{\externalfigure[chaphead2.pdf][width=\paperwidth,
height=\paperheight]} \stopstandardmakeup
\writetolist[chapter]{2}{Chapter 2: Understanding
the Food Industry}%

This works but I want a less fiddly-more
reliable method.  



-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Updated PDF e-book: Create Book Covers with
Scribus 1.4.5 coming soon at
http://www.booklocker.com/!
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] overlay or layer for chapter head.

2015-04-02 Thread Wolfgang Schuster

 Am 02.04.2015 um 17:12 schrieb John Culleton j...@wexfordpress.com:
 
 On Thu, 02 Apr 2015 15:10:19 +0200
 Procházka Lukáš Ing. - Pontex s. r. o.
 l...@pontex.cz mailto:l...@pontex.cz wrote:
 
 Hello,
 
 On Thu, 02 Apr 2015 14:46:11 +0200, Otared
 Kavian ota...@gmail.com wrote:
 
 Hi,
 
 Maybe you need to say state=repeat in the
 definition of your layer:
 
 \definelayer[chapterbackground][state=repeat]
 
 '[state=repeat]' causes all pages have the
 'mill' background.
 
 Best regards,
 
 Lukas
 
 
 
 I am not seeking a background but rather a
 foreground. And I only need this for 7 chapter
 heads. Here is how I put the page image into my
 context file now:
 -
 \startstandardmakeup[doublesided=no]
 \vskip -0.15in
 \hskip -0.7in
 \hbox{\externalfigure[chaphead2.pdf][width=\paperwidth,
 height=\paperheight]} \stopstandardmakeup
 \writetolist[chapter]{2}{Chapter 2: Understanding
 the Food Industry}%
 
 This works but I want a less fiddly-more
 reliable method.  

\setupexternalfigures[location=default]

\definelayer[chaptertext][width=\paperwidth,height=\paperheight]

\define[2]\ChapterCommand
  {\setlayerframed
 [chaptertext]
 [x=3cm,
  y=8cm]
 [frame=off]
 {#1 – #2}}

\definemakeup[chapterpage][page]

\setupmakeup
  [chapterpage]
  [pagestate=start,
  before={\setupbackgrounds[page][background=chapterimage]},
  bottom={\placelayer[chaptertext]}]

\defineoverlay[chapterimage][\overlayfigure{\structureuservariable{image}}]

\setuphead
  [chapter]
  [   before={\startmakeup[chapterpage]},
%command=\ChapterCommand,
   placehead=empty,
   after={\stopmakeup}]

\setuphead
  [title]
  [ before={\blank[big]},
 after={\blank[2*big]},
   command=]

\starttext

\completecontent

\startchapter[title={Understanding the Food Industry}][image=mill.png]

\input knuth

\stopchapter

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] overlay or layer for chapter head.

2015-04-01 Thread John Culleton
I am redoing a book for a client. Each chapter
head has a fancy design. I want to reproduce that
fancy page but still have the \chapter
statement for running heads, TOC etc. 

Is there a way that I can overlay the entire
chapter first page with a graphic, ideally a one
page pdf file. 

I have tried workarounds with
\startstandardmakeup,\writetolist,
\definemarking etc. but the whole thing is
getting too complicated. I just want to overlay a
the entire page with a graphic yet have
the real content of the page still available for
TOC, running head, indexing terms etc.

Any suggestions?


-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Updated PDF e-book: Create Book Covers with
Scribus 1.4.5 coming soon at
http://www.booklocker.com/!
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] overlay or layer for chapter head.

2015-04-01 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi John,

Per Hans' Fwd: I can confirm that this latest post of yours made it to the  
list.


Best wishes
Idris

On Wed, 01 Apr 2015 08:19:03 -0600, John Culleton j...@wexfordpress.com  
wrote:



I am redoing a book for a client. Each chapter
head has a fancy design. I want to reproduce that
fancy page but still have the \chapter
statement for running heads, TOC etc.

Is there a way that I can overlay the entire
chapter first page with a graphic, ideally a one
page pdf file.

I have tried workarounds with
\startstandardmakeup,\writetolist,
\definemarking etc. but the whole thing is
getting too complicated. I just want to overlay a
the entire page with a graphic yet have
the real content of the page still available for
TOC, running head, indexing terms etc.

Any suggestions?





--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] overlay or layer for chapter head.

2015-04-01 Thread Alan BRASLAU
John,

Do you mean this post?
(It appeared on the mailing list)

Alan


On Wed, 1 Apr 2015 10:19:03 -0400
John Culleton j...@wexfordpress.com wrote:

 I am redoing a book for a client. Each chapter
 head has a fancy design. I want to reproduce that
 fancy page but still have the \chapter
 statement for running heads, TOC etc. 
 
 Is there a way that I can overlay the entire
 chapter first page with a graphic, ideally a one
 page pdf file. 
 
 I have tried workarounds with
 \startstandardmakeup,\writetolist,
 \definemarking etc. but the whole thing is
 getting too complicated. I just want to overlay a
 the entire page with a graphic yet have
 the real content of the page still available for
 TOC, running head, indexing terms etc.
 
 Any suggestions?




On Wed, 1 Apr 2015 21:13:49 +0200
Hans Hagen pra...@wxs.nl wrote:

  Forwarded Message 
 Subject: My posts.
 Date: Wed, 1 Apr 2015 14:21:41 -0400
 From: John Culleton j...@wexfordpress.com
 Organization: WexfordPress
 To: Hans Hagen pra...@wxs.nl
 
 Recently my posts don't appear on the list. If I
 send you a cc you are kind enough to answer. But
 is there a reason why my recent posts don't
 appear on the mailing list?
 
 Here is the text of my most recent post:
 


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mkiv versus mkii: whitespace issues

2015-03-22 Thread Wolfgang Schuster

 Am 21.03.2015 um 19:49 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 On 20 Mar 2015, at 18:33, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 
 Am 20.03.2015 um 14:43 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 Sorry to ask again, but is there no solution?
 
 Can you send a *working* minimal example!
 
 I don’t know how. It happens with my project. I can’t publish my entire 
 project’s source code as it is for a book that is sold commercially.
 
 I’ll look into trying to make a minimal example. But so far I haven’t been 
 able to.

The initial is the problem but you can fix this when you replace \GotoPar with 
a different mechanism.

 begin example
\showgrid

\definelist[chaptertext][style=\itx]

\define[1]\ChapterAbstract{\doflushatpar{\writetolist[chaptertext]{}{#1}}}

\starttext

\title{\headtext{content}}

\placelist[chapter,chaptertext]

\chapter{Knuth}

\ChapterAbstract{\input ward }

\placeinitial\input knuth

\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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mkiv versus mkii: whitespace issues

2015-03-20 Thread Gerben Wierda
Sorry to ask again, but is there no solution?

G

On 16 Mar 2015, at 15:03, Gerben Wierda gerben.wie...@rna.nl wrote:

 
 On 15 Mar 2015, at 23:24, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 
 Am 14.03.2015 um 15:54 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 I am running into two issues with my mkii-to-mkiv conversion project
 
 - The \chapter command in mkiv uses more whitespace between the header and 
 the first paragraph. How can I influence this?
 
 The different space before the \chapter is caused by the “fixed” keyword for 
 \blank
 which produce different result with MkII and MkIV and the MkIV behaviour need
 to be corrected.
 
 The space after \chapter comes from your \writetolist entry and you can 
 correct
 this with the \GotoPar command at the end of the entry as shown below.
 
  begin example
 \showgrid
 
 \setuphead[chapter][before={\blank[force,2*line]}]
 
 \starttext
 
 \chapter{Knuth}
 
 \writetolist[chapter]{}{}\GotoPar
 
 \input knuth
 
 \stoptext
  end example
 
 Thanks. I tried this
 
 % Every chapter starts with a quote on the LHS page:
 \setuphead
   [chapter]
   [page=,
before={\setups[chapter:before]},
after={\setups[chapter:after]}]
 
 \startsetups chapter:before
 \page[left]
 \noheaderandfooterlines
 \startalignment[left,nothyphenated]
   \startnarrower[4*left]
 \em \getbuffer[chapter:quote]
   \stopnarrower
 \stopalignment
 \resetsetups[quote:text]
 \page[right]
 \noheaderandfooterlines
 \blank[force,2*big]
 \stopsetups
 
 \startsetups chapter:after
 \blank[3*big]
 \stopsetups
 
 \definelist[chaptertext]
 \setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
 \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}\GotoPar}
 
 
 (Adding the \GotoPar at the end) but it did not had any effect. At one place 
 (no chapter but an unnumbered title, it doesn’t work as well. Here I now have:
 
 \title[h:grief1]{Intermezzo:\\
 A short story about grief}
 \writetolist[chapter]{}{Intermezzo: A Short Story about Grief}\GotoPar
 \ChapterAbstract{A small fragment of a movie script that beautifully
 illustrates the gap between the rational and the real.}
 
 I changed it to 
 \title[h:grief1]{Intermezzo:\\
 A short story about grief}
 \writetolist[chapter]{}{Intermezzo: A Short Story about Grief}\GotoPar
 \ChapterAbstract{A small fragment of a movie script that beautifully
 illustrates the gap between the rational and the real.}\GotoPar
 
 And that works. So I changed it in another chapter to
 
 \chapter[h:loosely]{Prologue:\\Loosely Coupled Spaghetti}
 \ChapterAbstract{Starting with an example of how things can go wrong in a
 current Business-IT landscape, we notice that these kinds of problems have
 existed almost for as long as IT has existed, and that no proposed `silver
 bullet' has ever solved them. The goal of the book is introduced.}\GotoPar
 
 \placeinitial S{\kap{\bf uppose we}} have a system for the approval of loans. 
 The
 business logic has been put into a Business Rule Engine (BRE)
 system\footnote{If you are not technical and terms like `application server',
 
 But there it doesn’t. Apparently, I am still missing something. 
 
 G
 
 
 
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mkiv versus mkii: whitespace issues

2015-03-16 Thread Gerben Wierda

On 15 Mar 2015, at 23:24, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 14.03.2015 um 15:54 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 I am running into two issues with my mkii-to-mkiv conversion project
 
 - The \chapter command in mkiv uses more whitespace between the header and 
 the first paragraph. How can I influence this?
 
 The different space before the \chapter is caused by the “fixed” keyword for 
 \blank
 which produce different result with MkII and MkIV and the MkIV behaviour need
 to be corrected.
 
 The space after \chapter comes from your \writetolist entry and you can 
 correct
 this with the \GotoPar command at the end of the entry as shown below.
 
  begin example
 \showgrid
 
 \setuphead[chapter][before={\blank[force,2*line]}]
 
 \starttext
 
 \chapter{Knuth}
 
 \writetolist[chapter]{}{}\GotoPar
 
 \input knuth
 
 \stoptext
  end example

Thanks. I tried this

% Every chapter starts with a quote on the LHS page:
\setuphead
  [chapter]
  [page=,
   before={\setups[chapter:before]},
   after={\setups[chapter:after]}]

\startsetups chapter:before
\page[left]
\noheaderandfooterlines
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\resetsetups[quote:text]
\page[right]
\noheaderandfooterlines
\blank[force,2*big]
\stopsetups

\startsetups chapter:after
\blank[3*big]
\stopsetups

\definelist[chaptertext]
\setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
\define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}\GotoPar}


(Adding the \GotoPar at the end) but it did not had any effect. At one place 
(no chapter but an unnumbered title, it doesn’t work as well. Here I now have:

\title[h:grief1]{Intermezzo:\\
A short story about grief}
\writetolist[chapter]{}{Intermezzo: A Short Story about Grief}\GotoPar
\ChapterAbstract{A small fragment of a movie script that beautifully
illustrates the gap between the rational and the real.}

I changed it to 
\title[h:grief1]{Intermezzo:\\
A short story about grief}
\writetolist[chapter]{}{Intermezzo: A Short Story about Grief}\GotoPar
\ChapterAbstract{A small fragment of a movie script that beautifully
illustrates the gap between the rational and the real.}\GotoPar

And that works. So I changed it in another chapter to

\chapter[h:loosely]{Prologue:\\Loosely Coupled Spaghetti}
\ChapterAbstract{Starting with an example of how things can go wrong in a
current Business-IT landscape, we notice that these kinds of problems have
existed almost for as long as IT has existed, and that no proposed `silver
bullet' has ever solved them. The goal of the book is introduced.}\GotoPar

\placeinitial S{\kap{\bf uppose we}} have a system for the approval of loans. 
The
business logic has been put into a Business Rule Engine (BRE)
system\footnote{If you are not technical and terms like `application server',

But there it doesn’t. Apparently, I am still missing something. 

G


 
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mkiv versus mkii: whitespace issues

2015-03-15 Thread Gerben Wierda
} --- --- ---}}

%
\setuptolerance[horizontal=strict]
\setupcolors[state=start]
\setupcolor[rgb]
%
\setupquote[style=small]

%
\usetypescript[serif,sans,mono] [hanging] [normal]

% Bypassing type-gtamacfonts.tex
\starttypescript [sans,serif] [optima] [texnansi,ec]
\definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular]
[encoding=\typescriptthree]
\definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic]
[encoding=\typescriptthree]
\definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold]
[encoding=\typescriptthree]
\definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic]
[encoding=\typescriptthree]
\definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack]
[encoding=\typescriptthree]
\stoptypescript
\starttypescript [sans,serif] [optima] [name]
\setups[font:fallback:\typescriptone]
\definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular]
\definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic]
\definefontsynonym [\typescriptprefix\typescriptone Bold]   [Optima-Bold]
\definefontsynonym [\typescriptprefix\typescriptone BoldItalic]
[Optima-BoldItalic]
\definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack]
\stoptypescript
\definetypeface[allsans][rm][serif][optima][default][encoding=texnansi]
\definetypeface[allsans][ss][sans][optima][default][encoding=texnansi]
%\definetypeface[allsans][rm][serif][optima][default][encoding=ec]
%\definetypeface[allsans][ss][sans][optima][default][encoding=ec]
\loadmapfile [gtamacfonts.map]
\setupbodyfont[allsans,10pt]

\setupalign[hanging]
\setupfootnotes[conversion=set 2,way=bypage,align=flushleft]

%

%\def\doalignline#1#2% \\ == newline
% {\ifhmode\hfil\break\fi
%  \begingroup
%  \setlocalhsize % new
%  \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
%  \dowithnextbox
%{\noindent
% \hbox to \localhsize
%   {\ifcase\alignstrutmode\or\strut\fi
% #1\unhbox\nextbox#2}\endgroup}
%\hbox}

\def\startBookQuote
 {\par\bgroup
  \setupnarrower[before=]\startnarrower\indenting[never]\tfx}
\def\stopBookQuote{\stopnarrower\egroup}
%
\startmode[standalone]
  \setupfootertexts[pagenumber][{\jobname-\filename{\currentcomponent}}]
  \def\maybeendnotes
 {\subsubject{Notes} \placenotes[endnote] \subsubject{Bibliography}
\switchtobodyfont[9pt]
\placepublications[criterium=all]}
  \appendtoks \maybeendnotes \to \everystoptext
\stopmode
%
\setupcaption[figure][style=small]
\setupinteraction[state=start]

\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupnarrower
  [ left=\measure{CAindent},
right=\measure{CAindent},
   middle=\measure{CAindent}]
\setupitemize[each][margin=\measure{CAindent},width=\measure{CAindent}]

\defineenumeration[Step][headstyle=slanted,
location=hanging,width=fit,stopper=:,margin=\measure{CAindent},]
\defineenumeration[Phase][headstyle=slanted,
location=hanging,width=fit,stopper=:,margin=\measure{CAindent},]
\definedescription[Member][headstyle=bold,
location=hanging,indenting={yes},margin=\measure{CAindent},width=fit]

\setupnotedefinition[footnote][indenting={yes,medium}]
\setupnotedefinition[endnote][indenting={yes,medium},style={\switchtobodyfont[10pt]}]

\setupbibtex[database=gwierda,sort=author]
\setuppublications[numbering=short,sorttype=bbl,refcommand=short,autohang=yes]
\setupcite[short]

\useURL[masteringarchimateblog][http://masteringarchimate.com]
\useURL[masteringarchimatebook][http://masteringarchimate.com/mastering-archimate-edition-ii/]

\setupinteraction
 [style=,
  color=,
  contrastcolor=]

%\setupbackend[export=yes,xhtml=yes]

\definelist[chaptertext]
\setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
\define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}

\stopenvironment
=

test.tex mkii 
\showgrid
\startcomponent c_loosely
\product prd_book
\project project_cataoia

\starttext
\startbuffer [chapter:quote]
In software, the chain isn't as strong as its weakest link; it's as weak as
all the weak links multiplied together\crlf
{\tf Steve McConnell --- Code Complete}\crlf\crlf
Nothing is as dangerous in architecture as dealing with separated problems\crlf
{\tf Alvar Aalto}
\stopbuffer

\chapter[h:loosely]{Prologue:\\Loosely Coupled Spaghetti}
\ChapterAbstract{Starting with an example of how things can go wrong in a
current Business-IT landscape, we notice that these kinds of problems have
existed almost for as long as IT has existed, and that no proposed `silver
bullet' has ever solved them. The goal of the book is introduced.}

\lettrine{S}{\kap{\bf uppose we}} have a system for the approval of loans. The
business logic has been put into a Business Rule Engine (BRE)
system\footnote{If you are not technical and terms like `application server',
`caught exceptions', or `web proxy' in the fragment that follows, do not
immediately get you

Re: [NTG-context] mkiv versus mkii: whitespace issues

2015-03-15 Thread Wolfgang Schuster

 Am 14.03.2015 um 15:54 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 I am running into two issues with my mkii-to-mkiv conversion project
 
 - The \chapter command in mkiv uses more whitespace between the header and 
 the first paragraph. How can I influence this?

The different space before the \chapter is caused by the “fixed” keyword for 
\blank
which produce different result with MkII and MkIV and the MkIV behaviour need
to be corrected.

The space after \chapter comes from your \writetolist entry and you can correct
this with the \GotoPar command at the end of the entry as shown below.

 begin example
\showgrid

\setuphead[chapter][before={\blank[force,2*line]}]

\starttext

\chapter{Knuth}

\writetolist[chapter]{}{}\GotoPar

\input knuth

\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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] small abstracts in table of contents?

2014-11-25 Thread Gerben Wierda
This works, but not completely. I’ve added this to my environments file:

\definelist[chaptertext]
\setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]

and the contents list is created by

\title[h:toc]{Contents}
\placelist[chapter,chaptertext]
%\completecontent[level=chapter]

The %-outcommented was the original list. In the chapter file, it now says

\chapter[h:foo]{Foo}
\writetolist[chaptertext]{}{\input tufte}

The effect of this is that every chapter name in the list is typeset as \itx, 
not just the summary chaptertext. The chapter numbers are still in their 
original font and size.

G

On 25 Nov 2014, at 08:18, Otared Kavian ota...@gmail.com wrote:

 Hi Gerben,
 
 As Wolfgang said, you can use something like this (example given by him some 
 months ago on the mailing list):
 
 \definelist[chaptertext]
 \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]
 
 \starttext
 
 \placelist[chapter,chaptertext]
 
 \chapter{This is a chapter}
 
 \writetolist[chaptertext]{}{This is a small description of this chapter: 
 \input ward }
 
 \input knuth.tex
 
 \stoptext
 
 Best regards: OK
 
 On 25 Nov 2014, at 00:41, Gerben Wierda gerben.wie...@rna.nl wrote:
 
 I have a standard ToC, but what I’d like to have is that each chapter item 
 (I don’t go lower than that in the hierarchy) comes with its own little 
 abstract.Is that possible?
 
 G
 ___
 If your question is of interest to others as well, please add an entry to 
 the Wiki!
 
 maillist : ntg-context@ntg.nl / 
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] small abstracts in table of contents?

2014-11-25 Thread Otared Kavian
Hi Gerben,

This shouldn’t be a problem, since you may give your own style to the list of 
chapters by saying for example

\setuplist[chapter][style=\bf]

or whatever style you wish.

Best regards: OK

 On 25 Nov 2014, at 14:49, Gerben Wierda gerben.wie...@rna.nl wrote:
 
 This works, but not completely. I’ve added this to my environments file:
 
 \definelist[chaptertext]
 \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]
 
 and the contents list is created by
 
 \title[h:toc]{Contents}
 \placelist[chapter,chaptertext]
   %\completecontent[level=chapter]
 
 The %-outcommented was the original list. In the chapter file, it now says
 
 \chapter[h:foo]{Foo}
 \writetolist[chaptertext]{}{\input tufte}
 
 The effect of this is that every chapter name in the list is typeset as \itx, 
 not just the summary chaptertext. The chapter numbers are still in their 
 original font and size.
 
 G
 
 On 25 Nov 2014, at 08:18, Otared Kavian ota...@gmail.com 
 mailto:ota...@gmail.com wrote:
 
 Hi Gerben,
 
 As Wolfgang said, you can use something like this (example given by him some 
 months ago on the mailing list):
 
 \definelist[chaptertext]
 \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]
 
 \starttext
 
 \placelist[chapter,chaptertext]
 
 \chapter{This is a chapter}
 
 \writetolist[chaptertext]{}{This is a small description of this chapter: 
 \input ward }
 
 \input knuth.tex
 
 \stoptext
 
 Best regards: OK
 
 On 25 Nov 2014, at 00:41, Gerben Wierda gerben.wie...@rna.nl 
 mailto:gerben.wie...@rna.nl wrote:
 
 I have a standard ToC, but what I’d like to have is that each chapter item 
 (I don’t go lower than that in the hierarchy) comes with its own little 
 abstract.Is that possible?
 
 G
 ___
 If your question is of interest to others as well, please add an entry to 
 the Wiki!
 
 maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / 
 http://www.ntg.nl/mailman/listinfo/ntg-context 
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / 
 http://tex.aanhet.net http://tex.aanhet.net/
 archive  : http://foundry.supelec.fr/projects/contextrev/ 
 http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net 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 mailto:ntg-context@ntg.nl / 
 http://www.ntg.nl/mailman/listinfo/ntg-context 
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / 
 http://tex.aanhet.net http://tex.aanhet.net/
 archive  : http://foundry.supelec.fr/projects/contextrev/ 
 http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] small abstracts in table of contents?

2014-11-25 Thread Gerben Wierda
On 25 Nov 2014, at 15:12, Otared Kavian ota...@gmail.com wrote:

 Hi Gerben,
 
 This shouldn’t be a problem, since you may give your own style to the list of 
 chapters by saying for example
 
   \setuplist[chapter][style=\bf]
 
 or whatever style you wish.

I tried

\definelist[chaptertext]
\setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]
\setuplist[chapter][style=\tfa,before={\blank[big]}]

but what happens in the TOC is:
- Chapter numbers and page numbers are \tfa
- Chapter name seems \it
- Chapter text is \itx

In other words, the \itx command for chaptertext influences the style of chapter

G

Minimal example:

\definelist[chaptertext]
\setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]
\setuplist[chapter][style=\tfa,before={\blank[big]}]

\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\writetolist[chaptertext]{}{This is a small description of this chapter:
\input ward }

\input knuth.tex

\chapter{This is a chapter}

\writetolist[chaptertext]{}{This is a small description of this chapter:
\input ward }

\input knuth.tex

\chapter{This is a chapter}

\writetolist[chaptertext]{}{This is a small description of this chapter:
\input ward }

\input knuth.tex

\stoptext


 
 Best regards: OK
 
 On 25 Nov 2014, at 14:49, Gerben Wierda gerben.wie...@rna.nl wrote:
 
 This works, but not completely. I’ve added this to my environments file:
 
 \definelist[chaptertext]
 \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]
 
 and the contents list is created by
 
 \title[h:toc]{Contents}
 \placelist[chapter,chaptertext]
  %\completecontent[level=chapter]
 
 The %-outcommented was the original list. In the chapter file, it now says
 
 \chapter[h:foo]{Foo}
 \writetolist[chaptertext]{}{\input tufte}
 
 The effect of this is that every chapter name in the list is typeset as 
 \itx, not just the summary chaptertext. The chapter numbers are still in 
 their original font and size.
 
 G
 
 On 25 Nov 2014, at 08:18, Otared Kavian ota...@gmail.com wrote:
 
 Hi Gerben,
 
 As Wolfgang said, you can use something like this (example given by him 
 some months ago on the mailing list):
 
 \definelist[chaptertext]
 \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]
 
 \starttext
 
 \placelist[chapter,chaptertext]
 
 \chapter{This is a chapter}
 
 \writetolist[chaptertext]{}{This is a small description of this chapter: 
 \input ward }
 
 \input knuth.tex
 
 \stoptext
 
 Best regards: OK
 
 On 25 Nov 2014, at 00:41, Gerben Wierda gerben.wie...@rna.nl wrote:
 
 I have a standard ToC, but what I’d like to have is that each chapter item 
 (I don’t go lower than that in the hierarchy) comes with its own little 
 abstract.Is that possible?
 
 G
 ___
 If your question is of interest to others as well, please add an entry to 
 the Wiki!
 
 maillist : ntg-context@ntg.nl / 
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 
 ___
 If your question is of interest to others as well, please add an entry to 
 the Wiki!
 
 maillist : ntg-context@ntg.nl / 
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 
 ___
 If your question is of interest to others as well, please add an entry to 
 the Wiki!
 
 maillist : ntg-context@ntg.nl / 
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

maillist

Re: [NTG-context] small abstracts in table of contents?

2014-11-25 Thread Otared Kavian
Hi Gerben,

Sorry for not having been more cautious: what I sent you works fine with mkiv, 
but somehow in mkii giving a style for your  list of « chaptertext » spills 
over to the list of « chapter »…

The following seems to give your desired result in mkii:

\definelist[chaptertext]
\setuplist[chaptertext][pagecommand=\gobbleoneargument]
\define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}
\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\ChapterAbstract{This is a small description of this chapter: \input ward }

\input knuth.tex

\stoptext

Best regards: OK

 On 25 Nov 2014, at 17:01, Gerben Wierda gerben.wie...@rna.nl wrote:
 
 On 25 Nov 2014, at 15:12, Otared Kavian ota...@gmail.com 
 mailto:ota...@gmail.com wrote:
 
 Hi Gerben,
 
 This shouldn’t be a problem, since you may give your own style to the list 
 of chapters by saying for example
 
  \setuplist[chapter][style=\bf]
 
 or whatever style you wish.
 
 I tried
 
 \definelist[chaptertext]
 \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]
 \setuplist[chapter][style=\tfa,before={\blank[big]}]
 
 but what happens in the TOC is:
 - Chapter numbers and page numbers are \tfa
 - Chapter name seems \it
 - Chapter text is \itx
 
 In other words, the \itx command for chaptertext influences the style of 
 chapter
 
 G
 
 Minimal example:
 
 \definelist[chaptertext]
 \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]
 \setuplist[chapter][style=\tfa,before={\blank[big]}]
 
 \starttext
 
 \placelist[chapter,chaptertext]
 
 \chapter{This is a chapter}
 
 \writetolist[chaptertext]{}{This is a small description of this chapter:
 \input ward }
 
 \input knuth.tex
 
 \chapter{This is a chapter}
 
 \writetolist[chaptertext]{}{This is a small description of this chapter:
 \input ward }
 
 \input knuth.tex
 
 \chapter{This is a chapter}
 
 \writetolist[chaptertext]{}{This is a small description of this chapter:
 \input ward }
 
 \input knuth.tex
 
 \stoptext
 
 
 
 Best regards: OK
 
 On 25 Nov 2014, at 14:49, Gerben Wierda gerben.wie...@rna.nl 
 mailto:gerben.wie...@rna.nl wrote:
 
 This works, but not completely. I’ve added this to my environments file:
 
 \definelist[chaptertext]
 \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument]
 
 and the contents list is created by
 
 \title[h:toc]{Contents}
 \placelist[chapter,chaptertext]
 %\completecontent[level=chapter]
 
 The %-outcommented was the original list. In the chapter file, it now says
 
 \chapter[h:foo]{Foo}
 \writetolist[chaptertext]{}{\input tufte}
 
 The effect of this is that every chapter name in the list is typeset as 
 \itx, not just the summary chaptertext. The chapter numbers are still in 
 their original font and size.
 
 G
 
 On 25 Nov 2014, at 08:18, Otared Kavian ota...@gmail.com 
 mailto:ota...@gmail.com wrote:
 
 Hi Gerben,
 
 As Wolfgang said, you can use something like this (example given by him 
 some months ago on the mailing list):
 
 \definelist[chaptertext]
 \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]
 
 \starttext
 
 \placelist[chapter,chaptertext]
 
 \chapter{This is a chapter}
 
 \writetolist[chaptertext]{}{This is a small description of this chapter: 
 \input ward }
 
 \input knuth.tex
 
 \stoptext
 
 Best regards: OK
 
 On 25 Nov 2014, at 00:41, Gerben Wierda gerben.wie...@rna.nl 
 mailto:gerben.wie...@rna.nl wrote:
 
 I have a standard ToC, but what I’d like to have is that each chapter 
 item (I don’t go lower than that in the hierarchy) comes with its own 
 little abstract.Is that possible?
 
 G
 ___
 If your question is of interest to others as well, please add an entry to 
 the Wiki!
 
 maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / 
 http://www.ntg.nl/mailman/listinfo/ntg-context 
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / 
 http://tex.aanhet.net http://tex.aanhet.net/
 archive  : http://foundry.supelec.fr/projects/contextrev/ 
 http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net 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 mailto:ntg-context@ntg.nl / 
 http://www.ntg.nl/mailman/listinfo/ntg-context 
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / 
 http://tex.aanhet.net http://tex.aanhet.net/
 archive  : http://foundry.supelec.fr/projects/contextrev/ 
 http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net http://contextgarden.net

Re: [NTG-context] small abstracts in table of contents?

2014-11-24 Thread Wolfgang Schuster

 Am 25.11.2014 um 00:41 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 I have a standard ToC, but what I’d like to have is that each chapter item (I 
 don’t go lower than that in the hierarchy) comes with its own little 
 abstract.Is that possible?

You can use the \writebetweenlist or \writetolist commands for this.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] small abstracts in table of contents?

2014-11-24 Thread Otared Kavian
Hi Gerben,

As Wolfgang said, you can use something like this (example given by him some 
months ago on the mailing list):

\definelist[chaptertext]
\setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]

\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\writetolist[chaptertext]{}{This is a small description of this chapter: \input 
ward }

\input knuth.tex

\stoptext

Best regards: OK

 On 25 Nov 2014, at 00:41, Gerben Wierda gerben.wie...@rna.nl wrote:
 
 I have a standard ToC, but what I’d like to have is that each chapter item (I 
 don’t go lower than that in the hierarchy) comes with its own little 
 abstract.Is that possible?
 
 G
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] small abstracts in table of contents?

2014-11-24 Thread Hans Hagen

On 11/25/2014 8:18 AM, Otared Kavian wrote:

Hi Gerben,

As Wolfgang said, you can use something like this (example given by him some 
months ago on the mailing list):

\definelist[chaptertext]
\setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]

\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\writetolist[chaptertext]{}{This is a small description of this chapter: \input 
ward }

\input knuth.tex

\stoptext


The mkiv way:

\starttext

\unexpanded\def\ShowSummary#1#2#3%
  {\inleftmargin{#1}\structurelistuservariable{summary}\blank}

\placelist[chapter][alternative=command,command=\ShowSummary]

\startchapter
  [title={This is a chapter}]
  [summary={This is a small description of this chapter}]

\input knuth.tex

\stopchapter

\startchapter
  [title={This is also a chapter}]
  [summary={This is a larger description of this chapter}]

\input ward.tex

\stopchapter

\stoptext



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \writetolist in mkiv

2014-10-13 Thread Jano Kula

Thank you, Wolfgang, here is the working example for the structure manual ;)

% \writetolist  local table of contents example
\def\ManualSubsection#1{\blank%
{\bf Manual Subsection #1}\par%
\writetolist[subsection]{}{Manual Subsection #1}%
\input tufte\relax}

\starttext
\dorecurse{3}{%
\startchapter[title=Chapter]
\placelist[section][criterium=chapter]
\startsection[title=Section]
\placelist[subsection][criterium=section]
\ManualSubsection{\recurselevel-1}
\ManualSubsection{\recurselevel-2}
\stopsection
\startsection[title=Section]
\placelist[subsection][criterium=section]
\ManualSubsection{\recurselevel-1}
\ManualSubsection{\recurselevel-2}
\stopsection
\stopchapter}
\stoptext




On 12.10.2014 23:06, Wolfgang Schuster wrote:


Am 12.10.2014 um 22:57 schrieb Jano Kula jano.k...@gmail.com:


Hello Wolfgang,

On 12.10.2014 21:28, Wolfgang Schuster wrote:


Am 12.10.2014 um 20:39 schrieb Jano Kula jano.k...@gmail.com:


Hello to everybody!

Minimal story
-
How to insert local TOC of manually created subsections after the section 
starts?

% start minimal example
\def\ManualSubsection#1{\blank%
{\bf Manual Subsection #1}\par%
\writetolist[subsection]{whatever}{Manual Subsection #1}%
\input tufte\relax}

\starttext
\dorecurse{3}{%
\startchapter[title=Chapter]
\placecontent[chapter,criterium=local] % local TOC OK


You can’t put a keyword (chapter) and a assignment (criterium=local) in the 
same argument
of a setup-command, what you’re looking for is 
\placelist[chapter][criterium=local].

Wolfgang


Thanks, got it: \placelist[section][criterium=local] places the list of 
sections included in the chapter.

Still, how to do the same with subsections manually inserted by 
\writetolist[subsection]{}{Subsection title}?


\placelist[subsection][criterium=section]

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] \writetolist in mkiv

2014-10-12 Thread Jano Kula

Hello to everybody!

Minimal story
-
How to insert local TOC of manually created subsections after the 
section starts?


% start minimal example
\def\ManualSubsection#1{\blank%
{\bf Manual Subsection #1}\par%
\writetolist[subsection]{whatever}{Manual Subsection #1}%
\input tufte\relax}

\starttext
\dorecurse{3}{%
\startchapter[title=Chapter]
\placecontent[chapter,criterium=local] % local TOC OK
\startsection[title=Section]
Here we would like to see the local list of manual subsections
\placecontent[section,criterium=local] % local TOC not OK
\ManualSubsection{\recurselevel-1}
\ManualSubsection{\recurselevel-2}
\stopsection
\stopchapter}
\stoptext
% stop minimal example

Longer Story

Predefined \startchapter|section inserts titledata in TUC file:
  [titledata]={
   [label]=chapter,
   [title]=Chapter,
  },
  ...
  [titledata]={
   [label]=section,
   [title]=Section,
  },
while \writetolist[subsection]{whatever}{Manual Subsection #1} inserts 
userdata:

  [userdata]={
   [first]=whatever,
   [second]=Manual Subsection \\recurselevel -1,
  },
Is this the reason and can I force to write titledata in the TUC file?

Real case is of course more complicated and also PDF hyperlinks should work.

Thank you in advance,

Jano

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \writetolist in mkiv

2014-10-12 Thread Wolfgang Schuster

Am 12.10.2014 um 20:39 schrieb Jano Kula jano.k...@gmail.com:

 Hello to everybody!
 
 Minimal story
 -
 How to insert local TOC of manually created subsections after the section 
 starts?
 
 % start minimal example
 \def\ManualSubsection#1{\blank%
 {\bf Manual Subsection #1}\par%
 \writetolist[subsection]{whatever}{Manual Subsection #1}%
 \input tufte\relax}
 
 \starttext
 \dorecurse{3}{%
 \startchapter[title=Chapter]
 \placecontent[chapter,criterium=local] % local TOC OK

You can’t put a keyword (chapter) and a assignment (criterium=local) in the 
same argument
of a setup-command, what you’re looking for is 
\placelist[chapter][criterium=local].

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \writetolist in mkiv

2014-10-12 Thread Jano Kula

Hello Wolfgang,

On 12.10.2014 21:28, Wolfgang Schuster wrote:


Am 12.10.2014 um 20:39 schrieb Jano Kula jano.k...@gmail.com:


Hello to everybody!

Minimal story
-
How to insert local TOC of manually created subsections after the section 
starts?

% start minimal example
\def\ManualSubsection#1{\blank%
{\bf Manual Subsection #1}\par%
\writetolist[subsection]{whatever}{Manual Subsection #1}%
\input tufte\relax}

\starttext
\dorecurse{3}{%
\startchapter[title=Chapter]
\placecontent[chapter,criterium=local] % local TOC OK


You can’t put a keyword (chapter) and a assignment (criterium=local) in the 
same argument
of a setup-command, what you’re looking for is 
\placelist[chapter][criterium=local].

Wolfgang


Thanks, got it: \placelist[section][criterium=local] places the list of 
sections included in the chapter.


Still, how to do the same with subsections manually inserted by 
\writetolist[subsection]{}{Subsection title}?


Jano

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \writetolist in mkiv

2014-10-12 Thread Wolfgang Schuster

Am 12.10.2014 um 22:57 schrieb Jano Kula jano.k...@gmail.com:

 Hello Wolfgang,
 
 On 12.10.2014 21:28, Wolfgang Schuster wrote:
 
 Am 12.10.2014 um 20:39 schrieb Jano Kula jano.k...@gmail.com:
 
 Hello to everybody!
 
 Minimal story
 -
 How to insert local TOC of manually created subsections after the section 
 starts?
 
 % start minimal example
 \def\ManualSubsection#1{\blank%
 {\bf Manual Subsection #1}\par%
 \writetolist[subsection]{whatever}{Manual Subsection #1}%
 \input tufte\relax}
 
 \starttext
 \dorecurse{3}{%
 \startchapter[title=Chapter]
 \placecontent[chapter,criterium=local] % local TOC OK
 
 You can’t put a keyword (chapter) and a assignment (criterium=local) in the 
 same argument
 of a setup-command, what you’re looking for is 
 \placelist[chapter][criterium=local].
 
 Wolfgang
 
 Thanks, got it: \placelist[section][criterium=local] places the list of 
 sections included in the chapter.
 
 Still, how to do the same with subsections manually inserted by 
 \writetolist[subsection]{}{Subsection title}?

\placelist[subsection][criterium=section]

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chapter precis

2014-08-30 Thread Alan BRASLAU
Interesting thread.

I currently use:

\definestartstop [precis]
 [style=italic,indenting=no,indentnext=no,after={\blank}]

and then

\startchapter [title=A Chapter]

\startprecis
Short summary text.
\stoprecis

\stopchapter


and indeed it could be interesting to also include this text in the
table of contents as suggested in this thread.

I thought about adding
before={\startbuffer[precis]},
 
after={\stopbuffer\getbuffer[precis]\writetolist[chapter]{}{\getbuffer[precis]}}
to the \definestartstop
but this does not seem to work. I did not try further.
Perhaps someone has an idea on how to better achieve this?

Alan


On Thu, 28 Aug 2014 16:46:28 +0200
Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 28.08.2014 um 16:17 schrieb Werner Hintze w.hin...@posteo.eu:
 
  Some old fashioned novels have a chapter précis in the table of
  contents. In Latex exists the command \chapterprecis to put the
  text at the beginning of the chapter and in the able of contents. I
  thought, I can realize this in ConTeXt with
  
  \writebetweenlist[chapter]{XYZ}
  
  or with
  
  \weitetolist[chapter]{XYZ}
  
  But both produce only a fatal error. What’s wrong here?
 
 
 Hard to tell without a example which demonstrates the error because
 the following works for me.
 
 \starttext
 
 \completecontent
 
 \chapter{This is a chapter}
 
 \writetolist[chapter]{}{This is a summary of the chapter with
 \tex{writetolist}.}
 
 \writebetweenlist[chapter][location=here]{This is a summary of the
 chapter with \tex{writebetweenlist}.}
 
 \chapter{This is another chapter}
 
 \stoptext
 
 Wolfgang


-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS URA 2464
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.bras...@cea.fr
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chapter precis

2014-08-28 Thread Wolfgang Schuster

Am 28.08.2014 um 16:17 schrieb Werner Hintze w.hin...@posteo.eu:

 Some old fashioned novels have a chapter précis in the table of contents. In 
 Latex exists the command \chapterprecis to put the text at the beginning of 
 the chapter and in the able of contents. I thought, I can realize this in 
 ConTeXt with
 
 \writebetweenlist[chapter]{XYZ}
 
 or with
 
 \weitetolist[chapter]{XYZ}
 
 But both produce only a fatal error. What’s wrong here?


Hard to tell without a example which demonstrates the error because the 
following works for me.

\starttext

\completecontent

\chapter{This is a chapter}

\writetolist[chapter]{}{This is a summary of the chapter with 
\tex{writetolist}.}

\writebetweenlist[chapter][location=here]{This is a summary of the chapter with 
\tex{writebetweenlist}.}

\chapter{This is another chapter}

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter precis

2014-08-28 Thread Werner Hintze
The example works for me too. But the command doesn’t work in my file. 
I can’t find out why.




On 28 Aug 2014, at 16:46, Wolfgang Schuster wrote:


Am 28.08.2014 um 16:17 schrieb Werner Hintze w.hin...@posteo.eu:

Some old fashioned novels have a chapter précis in the table of 
contents. In Latex exists the command \chapterprecis to put the text 
at the beginning of the chapter and in the able of contents. I 
thought, I can realize this in ConTeXt with


\writebetweenlist[chapter]{XYZ}

or with

\weitetolist[chapter]{XYZ}

But both produce only a fatal error. What’s wrong here?



Hard to tell without a example which demonstrates the error because 
the following works for me.


\starttext

\completecontent

\chapter{This is a chapter}

\writetolist[chapter]{}{This is a summary of the chapter with 
\tex{writetolist}.}


\writebetweenlist[chapter][location=here]{This is a summary of the 
chapter with \tex{writebetweenlist}.}


\chapter{This is another chapter}

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chapter precis

2014-08-28 Thread Werner Hintze

Hmm... That’s really strange, What I did:

1. I deleted the line with \writebetweenlist and compiled the file. It 
worked.

2. I put back the line and triode to compile - fatal error
3. I commented out all the lines which had something to do with the 
table of contend - fatal error

4. I changed all back - fatal error (as expected)
5. I commented out all the lines in my project files (all the lines with 
\input and compiled and got an empty file witour errors.
6. I deleted the comment signs one after the other and compiled every 
time - no error
7. All was how it was, so I entered the \writebetweenlist (absolutely 
the same: copy and paste) and ... Tatarata! It works...


An enigma. I effectively changed nothing, all is now as it was before. 
Very, very strange...


Anyway: It works. Thanks for the help!

WH

On 28 Aug 2014, at 16:46, Wolfgang Schuster wrote:


Am 28.08.2014 um 16:17 schrieb Werner Hintze w.hin...@posteo.eu:

Some old fashioned novels have a chapter précis in the table of 
contents. In Latex exists the command \chapterprecis to put the text 
at the beginning of the chapter and in the able of contents. I 
thought, I can realize this in ConTeXt with


\writebetweenlist[chapter]{XYZ}

or with

\weitetolist[chapter]{XYZ}

But both produce only a fatal error. What’s wrong here?



Hard to tell without a example which demonstrates the error because 
the following works for me.


\starttext

\completecontent

\chapter{This is a chapter}

\writetolist[chapter]{}{This is a summary of the chapter with 
\tex{writetolist}.}


\writebetweenlist[chapter][location=here]{This is a summary of the 
chapter with \tex{writebetweenlist}.}


\chapter{This is another chapter}

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chapter precis

2014-08-28 Thread Werner Hintze

Yes. I did. Before and now.

But I think, writebetweenlist is not what I’m looking for. I try now 
with \writetolist[section] and to give the section list the desired 
format. That seems not easy, because the text now runs on the whole 
line, this means also in the region, where the page numbers are. It 
should terminate before, where the line of dots terminates or so. I see 
no parameter for this width seems ti be not the right one (it seems, 
width has no visible effect at all).




On 28 Aug 2014, at 17:22, Wolfgang Schuster wrote:


Am 28.08.2014 um 17:17 schrieb Werner Hintze w.hin...@posteo.eu:


Hmm... That’s really strange, What I did:

I deleted the line with \writebetweenlist and compiled the file. It 
worked.

I put back the line and triode to compile - fatal error
I commented out all the lines which had something to do with the 
table of contend - fatal error

I changed all back - fatal error (as expected)
I commented out all the lines in my project files (all the lines with 
\input and compiled and got an empty file witour errors.
I deleted the comment signs one after the other and compiled every 
time - no error
All was how it was, so I entered the \writebetweenlist (absolutely 
the same: copy and paste) and ... Tatarata! It works...
An enigma. I effectively changed nothing, all is now as it was 
before. Very, very strange…




Do you set all three arguments for \writebetweenlist, i.e. 
\writebetweenlist[…]{…}{…}


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chapter precis

2014-08-28 Thread Wolfgang Schuster

Am 28.08.2014 um 17:46 schrieb Werner Hintze w.hin...@posteo.eu:

 Yes. I did. Before and now.
 
 But I think, writebetweenlist is not what I’m looking for. I try now with 
 \writetolist[section] and to give the section list the desired format. That 
 seems not easy, because the text now runs on the whole line, this means also 
 in the region, where the page numbers are. It should terminate before, where 
 the line of dots terminates or so. I see no parameter for this width seems ti 
 be not the right one (it seems, width has no visible effect at all).
 
You can use the maxwidth key to set a limit for the width of the list entry.

\definelist[chaptertext]
%\setuplist [chaptertext][maxwidth=8cm]

\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\writetolist[chaptertext]{}{\input ward }

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chapter precis

2014-08-28 Thread Werner Hintze
Sorry. I don’t understand. If I use maxwidth (line 2 without the %), I 
get just one truncated line of the text. But I’d like to have all the 
text, somewhat indented on both sides, but not truncated.


But why is the text without maxwidth indented on the right?

Werner

On 28 Aug 2014, at 17:57, Wolfgang Schuster wrote:


Am 28.08.2014 um 17:46 schrieb Werner Hintze w.hin...@posteo.eu:


Yes. I did. Before and now.

But I think, writebetweenlist is not what I’m looking for. I try 
now with \writetolist[section] and to give the section list the 
desired format. That seems not easy, because the text now runs on the 
whole line, this means also in the region, where the page numbers 
are. It should terminate before, where the line of dots terminates or 
so. I see no parameter for this width seems ti be not the right one 
(it seems, width has no visible effect at all).


You can use the maxwidth key to set a limit for the width of the list 
entry.


\definelist[chaptertext]
%\setuplist [chaptertext][maxwidth=8cm]

\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\writetolist[chaptertext]{}{\input ward }

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chapter precis

2014-08-28 Thread Wolfgang Schuster

Am 28.08.2014 um 18:17 schrieb Werner Hintze w.hin...@posteo.eu:

 Sorry. I don’t understand. If I use maxwidth (line 2 without the %), I get 
 just one truncated line of the text. But I’d like to have all the text, 
 somewhat indented on both sides, but not truncated.
 
 But why is the text without maxwidth indented on the right?
 
When you enable the pagenumber context puts some space between the number and 
the text.

\definelist[chaptertext]
\setuplist [chaptertext][margin=2em,pagecommand=\gobbleoneargument]
%\setuplist [chaptertext][margin=2em,pagenumber=no]

\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\writetolist[chaptertext]{}{\input ward }

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chapter precis

2014-08-28 Thread Werner Hintze
Aha. I see. So it may work. But I just recalled how to achieve the same 
result with Latex and Memoir... And I decided to sleep one night and if 
then my feeling ist the same as now, I'll turn back to Latex. I’m too 
stupid for such a complicated tool as ConTeXt. I know that it is much 
better als Latex, but I don’t understand it. It’s now a year that I 
use it frequently and I have the impression that I made not a single 
step forward.


Let’s see what the morning brings and says ;)

Thank you all for all your help!

Werner

On 28 Aug 2014, at 18:53, Wolfgang Schuster wrote:


Am 28.08.2014 um 18:17 schrieb Werner Hintze w.hin...@posteo.eu:

Sorry. I don’t understand. If I use maxwidth (line 2 without the 
%), I get just one truncated line of the text. But I’d like to have 
all the text, somewhat indented on both sides, but not truncated.


But why is the text without maxwidth indented on the right?

When you enable the pagenumber context puts some space between the 
number and the text.


\definelist[chaptertext]
\setuplist [chaptertext][margin=2em,pagecommand=\gobbleoneargument]
%\setuplist [chaptertext][margin=2em,pagenumber=no]

\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\writetolist[chaptertext]{}{\input ward }

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] writetolist doesn't include sectionnumber in mkiv?

2014-02-15 Thread Sanjoy Mahajan
With MkIV, I'm having trouble getting \writetolist to include
sectionnumbers.  Or at least, I cannot get the typeset list to include
the sectionnumbers (but maybe writetolist sent in the information).

Here's a minimal example, which is almost exactly the example from the
wiki at http://wiki.contextgarden.net/Command/setuplist.  The only change
is that I've included [order=command] so that the \hrule ends up at the
right place.

\definelist[Reprints][criterium=all]

\starttext
  \section{Sec 1}
  \writetolist[Reprints]{1.}{List entry A}
  \subsection{Subsec 1}
  \writebetweenlist[Reprints]{\hrule}
  \writetolist[Reprints]{2.}{List entry B}
  \completelist[Reprints][order=command]
\stoptext


When typeset (I'm using the 2014.02.14 beta), the completelist looks
like:


List entry A   1

List entry B   1

But the 1. and 2. didn't show up in the left column.

I tried adding \setuplist[Reprints][sectionnumber=yes] but that didn't
help.  Does one need to define an alternative that includes
sectionnumbers?

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Bug in the latest beta

2013-04-15 Thread Jannik Voges
Hello ConTeXt-Users,


I have found a bug, when using \writetolist:

\starttext

\writetolist[chapter]{}{test}

\stoptext

That gives an error, but changing the list to a not predefined list doesn't.

For example

\definelist[chapter1]

\starttext

\writetolist[chapter1]{}{test}

\stoptext


Thanks

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Bug in the latest beta

2013-04-15 Thread Wolfgang Schuster

Am 14.04.2013 um 12:42 schrieb Jannik Voges researchj...@icloud.com:

 Hello ConTeXt-Users,
 
 
 I have found a bug, when using \writetolist:
 
 \starttext
 
 \writetolist[chapter]{}{test}
 
 \stoptext
 
 That gives an error, but changing the list to a not predefined list doesn't.
 
 For example
 
 \definelist[chapter1]
 
 \starttext
 
 \writetolist[chapter1]{}{test}
 
 \stoptext

Can you try your example with the current beta because I don’t get an error 
when I process your example.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Bug in the latest beta

2013-04-15 Thread Jannik Voges
Hello,


today I updated the beta and the error is gone. Thanks for the fix or sorry, if 
that error was caused by a corrupt installation.


Jannik


Am 14.04.2013 um 12:42 schrieb Jannik Voges researchj...@icloud.com:

 Hello ConTeXt-Users,
 
 
 I have found a bug, when using \writetolist:
 
 \starttext
 
 \writetolist[chapter]{}{test}
 
 \stoptext
 
 That gives an error, but changing the list to a not predefined list doesn't.
 
 For example
 
 \definelist[chapter1]
 
 \starttext
 
 \writetolist[chapter1]{}{test}
 
 \stoptext
 
 
 Thanks
 
 Jannik
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to use module simpleslides' SideToc

2013-01-09 Thread Sietse Brouwer
Hello PengCZ,

This is not exactly what you want, because it took me very long to
remember to look at SideToc.pdf. But it is close, and I have tried to
put in a lot of comments. Hopefully you can solve it from here?

Cheers, and good luck,
Sietse

% * We use \Topic to set the current topic, and to
%   record it in the topic list

% * \setuptexttexts places the topic list in the left margin
%   on every page
%   http://wiki.contextgarden.net/Command/setuptexttexts
%   (needs improving)

% * \setupbackgrounds sets the backgrond color of the left
%   margin on every page: this highlights the TOC area
%   http://wiki.contextgarden.net/Command/setupbackgrounds

% * the entry typesetting command (called \FancyTopic) typesets
%   entries inside a \framed block as wide as the margin is.
%   This allows highlighting the background of the current topic,
%   and also allows linebreaks etc.
%   http://wiki.contextgarden.net/Command/framed

\setuppapersize[A6,landscape][A6,landscape]
\setuplayout [leftmargin=5cm,
  backspace=6cm,
  width=6cm,
  ]
% Color for the margin (topic list area)
\definecolor[colMyTopics][r=1,g=0.7,b=0.7] % pink

% Color for the current topic (in the topic list)
% I like white, because it attaches the current topic to the
%   main area; but perhaps you prefer pale yellow?
% \definecolor[colCurrentTopic][r=1,g=1,b=0.7] % pale yellow
\definecolor[colCurrentTopic][r=1,g=1,b=1] % white

% When \placelist[MyTopics] is called, it calls this \FancyEntry
% function to typeset each individual entry.
% #1: entry (i.e. topic name) to typeset
% \MyMark: section (i.e. topic name) we are currently in (set by
% \Topic).
\define[3]\FancyEntry {
\ifnum\structurelistrealpagenumber=\realpageno\relax SAME \else
OTHER \fi PAGE
\blank[medium]
\doifelse \rawstructurelistfirst \MyMark
  {\framed[frame=off,
   align=normal,
   width=5cm, % same as leftmargin in \setuplayout
   background=color,
   backgroundcolor=colCurrentTopic]{%
--- current mark's entry \par
\color[red]{--- arg (entry): #1}\par
\color[red]{--- mark: \MyMark}
  }}
  {\framed[frame=off, align=normal]{%
--- other entry \par
\color[blue]{--- arg (entry): #1}\par
\color[blue]{--- mark: \MyMark}
  }}
\blank[medium]
}

% Show the margin areas, headers, footers, etc.
\showframe

% Color the margin area. \setupbackgrounds must be called after
% \showframe, or \showframe will 'overwrite' \setupbackgrounds.
\setupbackgrounds[text][leftmargin][
background=color,
backgroundcolor=colMyTopics]
\definelist[MyTopics][criterium=all]

\def\MyMark{}

% \Topic takes one optional argument: #1, the topic name.
\def\Topic%
  {\dosingleargument\doTopic}

\def\doTopic[#1]{%
  % let it be known that we are in section #1 (used by \FancyTopic)
  \def\MyMark{#1}%
  % let topic #1 appear in the TOC (well, the MyTopics list)
  \writetolist[MyTopics]{#1}{}%
}

\setuplist[MyTopics]
  [pagenumber=no,
   alternative=command,
   command=\FancyEntry]

% On every page, place the TOC in the margin, plzkthx
\setuptexttexts[margin][\vbox{\placelist[MyTopics]}][]

\starttext

\Topic[First]
First Topic

\page

\Topic[Second]
Second Topic

\page

\Topic[Third]
Third Topic

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to use module simpleslides' SideToc

2013-01-08 Thread Thomas A. Schmitz

On 01/08/2013 03:10 PM, Alan BRASLAU wrote:

Yes,

Many simpleslides styles seem to be broken.
Thomas seems to be aware of this but has not gotten to looking into it.

(t-slidesvisualcounter.tex is part of the simpleslides module:
texmf-modules/tex/context/third/simpleslides)

Alan


I hope there aren't that many broken styles... Anyway, I'm not teaching 
this year, so I don't use the module too often, so this slips by me. I 
looked at the SideToc style, but I can't figure out the problem; 
something must have changed in the core. So all I can do is give a 
minimal example for what fails and hope that one of the real experts 
will have an idea. Most of the clever code in the example is actually 
Wolfgang's... So here comes:


\setuplayout [leftmargin=4cm,
  backspace=5cm]

\define[3]\FancyEntry
 {\doifelse{#1}{\MyMark}%
{\color[red]{#1 = \MyMark}\blank[medium]}
{\color[blue]{#1 = \MyMark}\blank[medium]}
}

\definelist[MyTopics][criterium=all]

\def\MyMark{}

\def\Topic%
  {\dosingleargument\doTopic}

\def\doTopic[#1]{%
  \def\MyMark{#1}%
  \writetolist[MyTopics]{#1}{}%
}

\setuplist[MyTopics]
  [pagenumber=no,
   alternative=command,
   command=\FancyEntry]

\setuptexttexts[margin][\vbox{\placelist[MyTopics]}][]

\starttext

\Topic[First]

First Topic

\page

\Topic[Second]

Second Topic

\stoptext

The problem is that the \doifelse always evaluates to false, even when 
\MyMark is defined and equal to the topic; I hope the example clarifies 
this. [tested with latest beta mkiv]


All best

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to use module simpleslides' SideToc

2013-01-08 Thread 土卜皿
hi,
 I compiled the following code,

\setuplayout [leftmargin=4cm,
  backspace=5cm]

\define[3]\FancyEntry {
\ifnum\structurelistrealpagenumber=\realpageno\relax SAME \else OTHER
\fi PAGE
\blank[medium]
\doifelse \rawstructurelistfirst \MyMark

  {\color[red] {#1 = \MyMark}}
  {\color[blue]{#1 = \MyMark}}
\blank[medium]
}

\definelist[MyTopics][criterium=all]

\def\MyMark{}

\def\Topic%
  {\dosingleargument\doTopic}

\def\doTopic[#1]{%
  \def\MyMark{#1}%
  \writetolist[MyTopics]{#1}{}%
}

\setuplist[MyTopics]
  [pagenumber=no,
   alternative=command,
   command=\FancyEntry]

\setuptexttexts[margin][\vbox{\placelist[MyTopics]}][]

\starttext

\Topic[First]

First Topic

\page

\Topic[Second]

Second Topic

\stoptext

but I can not get the right pdf, please check the attachment!

context  version: 2013.01.08 01:19
LuaTeX, Version beta-0.74.0-2012122510

  Thanks!

BEST REGARDS
PengCZ


2013/1/9 Hans Hagen pra...@wxs.nl

 On 1/8/2013 11:26 PM, Thomas A. Schmitz wrote:

  \define[3]\FancyEntry
   {\doifelse{#1}{\MyMark}%
  {\color[red]{#1 = \MyMark}\blank[medium]}
  {\color[blue]{#1 = \MyMark}\blank[medium]}
 }


 When you're back in teaching mode I'll tell you how to do it properly, so
 here's a quick hack:

 \define[3]\FancyEntry {
 \ifnum\**structurelistrealpagenumber=\**realpageno\relax SAME \else
 OTHER \fi PAGE
 \blank[medium]
 \doifelse \rawstructurelistfirst \MyMark

   {\color[red] {#1 = \MyMark}}
   {\color[blue]{#1 = \MyMark}}
 \blank[medium]
 }

 In your case you compare an unexpandable macro with a regular one so that
 will always be false.

 Last year the list macros became more flexible and more properties are
 available as either unexpandable or expandable macro

 Hans

 --**--**-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | 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 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : 
 http://foundry.supelec.fr/**projects/contextrev/http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 __**__**
 ___



sidetuc.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] two bugs in the latest beta of context mkiv

2012-12-03 Thread Jannik Voges
Hello,


I want to report two bugs in the latest beta of context mkiv.

When I  typeset the following example, I get the sectionnumber 1 for the second 
subsection. I would expect the sectionnumber 2.0.1 for that subsection. This 
problem (wrong sectionnumber) also appears in the table of contents.

\starttext
\chapter{A Chapter}
\section{A Section}
\subsection{A Subsection}

\chapter{Another Chapter}
\subsection{Another Subsection}
\stoptext

In my attempt to circumvent this problem I tried to write my own table of 
contents (the number in the headlines were easy to fix) with 
\writetolist[toc]{number}{text}. But \writetolist seems to be broken, because 
the sectionnumber is missing. As an minimal example you can use the example 
from the context-wiki:

\definelist[Reprints][criterium=all]

\starttext
  \section{Sec 1}
  \writetolist[Reprints]{1.}{List entry A}%
  \writetolist[Reprints]{}{With no number}%
  \subsection{Subsec 1}
  \writebetweenlist[Reprints]{\hrule}
  \writetolist[Reprints]{2.}{List entry B}%
  \completelist[Reprints]
\stoptext

As you see, the horizontal line appears at the top of the list and not after 
the second entry. So there seems to be an additional bug.


Sincerely

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Lists and alternative=command

2012-05-17 Thread Rogers, Michael K
I'd love help with this:  I have list that uses alternative=command, and it 
stopped working when I switched from last year's TeXLive context to a recent 
beta.  I've minimized the problem to this example:

\definelist  [MyList]
\define[3]\MyListEntry{:#1:#2:#3:}
\setuplist   [MyList] [alternative=command,command=\MyListEntry]
\starttext
\writetolist[MyList]{First}{Second}
\placelist[MyList]
\stoptext

It generates the following error three times, once per argument in 
\MyListEntry, I suppose.

ConTeXt  ver: 2012.05.14 16:00 MKIV  fmt: 2012.5.16  int: english/english
...
! Argument of \MyListEntry has an extra }.

system   tex  error on line 11 in file foo1789.tex: Argument of  ...

1 \definelist  [MyList]
2 \define[3]\MyListEntry{:#1:#2:#3:}
3 \setuplist   [MyList] [alternative=command,command=\MyListEntry]
4 \starttext
5 \writetolist[MyList]{First}{Second}
6 \placelist[MyList]
7 \stoptext

inserted text
\par
to be read again
   }
\12:79:command ...ernativeparameter \c!command }
  \ifx \p_command \empty [\c...
\strc_lists_apply_renderingsetup ...nderingsetup }
  \relax \the \t_lists_every...
\strclistsentryprocess ... \fi \fi \fi \endcsname
  \dostoptagged \listextrapa...
l.11 {}

...
l.7 \stoptext

Thanks,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \setuphead and \startchapter request

2012-03-19 Thread Alan BRASLAU
Wolfgang,

Thank you for the suggestions.
However, I have tried many such, things...



On Mon, 19 Mar 2012 12:50:14 +0100
Wolfgang Schuster schuster.wolfg...@googlemail.com wrote:

 
 Am 19.03.2012 um 12:45 schrieb Alan BRASLAU:
 
  I would like to use, for example,
  
  \setuphead [chapter] [after={\placecontent\blank}]
  
  But sometimes, I would like to use something like
  
  \startchapter [number=no,incrementnumber=no,after=,
  title={Conclusions of the first part}]
  
  \stopchapter
 
 You know \starttitle, it’s the unnumbered version of \startchapter.

Yes, of course, but \starttitle does not, by design, add an entry
to the TOC, nor a bookmark. And

\starttitle [title={Conclusions}]
\writetolist[chapter]{}{Conclusions}% works
\bookmark{Conclusions}% Does not work!

is less elegant than

\startchapter [number=no,incrementnumber=no,title={Conclusions}]

(but does have the advantage of suppressing the Chapter label.)


 We have the following key for \setuphead:
 
 - beforesection (called before \startchapter),
 - insidesection (called after \startchapter) and
 - aftersection (called after \stopchapter)

You suggest that I use insidesection={\placecontent\blank}
rather than after={\placecontent\blank}. OK, this works.

However, in both cases, the contents get placed after the above
\starttitle (or \startchapter) commands, something that one really does
not want. Alternately, adding \placecontent\blank everywhere else is
sloppy.


  2. If I have:
  \setuplabeltext [chapter=Chapter ] % with trailing space; blank by
  default would there be some way to specify chapter=, (or another
  mechanism) to have the Chapter label blank for a specific instance
  of \startchapter?
 
 The easiest way is to create a new heading for this purpose.

I do not really want to create new headings for this purpose,
if I can avoid it, and should be unnecessary.
The suggestion would be for specific instances of \startchapter etc.
to be able to take \setuphead keywords as local definitions.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bug in \setuplist

2012-03-15 Thread Willi Egger
Hi Wolfgang,

thank you very much for solving my problem! -- Indeed this works well.

What I need to do is to convert the chapter number into a roman number.

CHAPTER XIV.

BEES CAPABLE OF DOMESTICATION. Astonishment of persons at their
tameness, 25. Bees intended for the comfort of man. Properties fitting
them for domestication. Bees never attack when filled with honey, 26.


As you can see there are only chapter numbers given. All other entries in the 
TOC are not even headings in the text (!). So I will have to set these texts up 
with \writetolist. The texts in the TOC never match any text and are only 
indications on the subject dealt with on the given page. -- I seems that this 
was common in those days, I prepared earlier another book written in Dutch 
showing a similar setup.

Thank you for your kind help

Willi


On 15 Mar 2012, at 13:59, Wolfgang Schuster wrote:

 \unexpanded\def\…#1#2#3{…}

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Bug in \setuplist

2012-03-15 Thread Willi Egger
Hi,

replying to my self:

I was not aware of this macro \convert{new_form}{number_to_be_converted} 

So in the meantime the commands which give the correct result become:

\unexpanded\def\Mychaptercommand#1#2#3{\blank 
CHAPTER~\convertnumber{R}{#1}.\blank{#2}.\hskip0.25\bodyfontsize}
\unexpanded\def\Mysectioncommand#1#2#3{#2, \hskip0.5\bodyfontsize 
#3.\hskip0.25\bodyfontsize}

used in 

\setuplist
[chapter]
[prefix=no,
sectionnumber=no,
headnumber=no,
   alternative=command,
   command=\Mychaptercommand]

\setuplist
[section]
[prefix=no,
sectionnumber=no,
headnumber=no,
alternative=command,
command=\Mysectioncommand]


Again thank you Wolfgang!

Willi   
On 15 Mar 2012, at 17:21, Willi Egger wrote:

 Hi Wolfgang,
 
 thank you very much for solving my problem! -- Indeed this works well.
 
 What I need to do is to convert the chapter number into a roman number.
 
 CHAPTER XIV.
 
 BEES CAPABLE OF DOMESTICATION. Astonishment of persons at their
 tameness, 25. Bees intended for the comfort of man. Properties fitting
 them for domestication. Bees never attack when filled with honey, 26.
 
 
 As you can see there are only chapter numbers given. All other entries in the 
 TOC are not even headings in the text (!). So I will have to set these texts 
 up with \writetolist. The texts in the TOC never match any text and are only 
 indications on the subject dealt with on the given page. -- I seems that this 
 was common in those days, I prepared earlier another book written in Dutch 
 showing a similar setup.
 
 Thank you for your kind help
 
 Willi
 
 
 On 15 Mar 2012, at 13:59, Wolfgang Schuster wrote:
 
 \unexpanded\def\…#1#2#3{…}
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Problem with \writebetweenlist

2012-02-26 Thread Hans Hagen

On 25-2-2012 17:52, Wolfgang Schuster wrote:


Am 25.02.2012 um 12:02 schrieb Jaroslav Hajtmar:


Thanx Wolfgang
for reply, but it does not work still.


I was in a hurry and had no time to test it but the following is tested and 
works.

\def\strc_lists_write_between[#tag][#settings]#command% we can overload location
   {\begingroup
\edef\currentlist{#tag}%
\doifelse{\namedlistparameter{#tag}\c!state}\v!start
  {\strc_lists_inject_yes[#settings,\c!type=\s!command][command={#command}]}
  {\endgroup}}

\def\strc_lists_write_to_yes[#settings]#first#second%
   
{\strc_lists_inject_yes[\c!location=\v!here,#settings,\c!type=\s!simple][first={#first},second={#second}]}

@Hans The “\s!” prefix for first, second and command can’t be used because 
otherwise the keys end up as “\\s!first ” in Lua table index.


ok, but another one needed fixing as well, so now we have

\unexpanded\def\writebetweenlist{\dodoubleempty   \strc_lists_write_between}
\unexpanded\def\writedatatolist {\dotripleargument\strc_lists_write_data_to}
\unexpanded\def\writetolist {\dodoubleempty   \strc_lists_write_to}

\def\strc_lists_write_between[#tag]%
  {\begingroup
   \edef\currentlist{#tag}%
   \doifelse{\namedlistparameter{#tag}\c!state}\v!start
 \strc_lists_write_between_yes
 \strc_lists_write_between_nop}

\def\strc_lists_write_between_yes[#settings]#command%

{\strc_lists_inject_yes[#settings,\c!type=\s!command][command={#command}]}

\def\strc_lists_write_between_nop[#settings]#command%
  {\endgroup}

\def\strc_lists_write_data_to[#tag]%
  {\begingroup
   \edef\currentlist{#tag}%
   \doifelse{\namedlistparameter{#tag}\c!state}\v!start
 \strc_lists_write_data_to_yes
 \strc_lists_write_data_to_nop}

\def\strc_lists_write_data_to_yes[#settings][#userdata]%
  {\ifthirdargument % no need to have an extra step ... used seldom
 \strc_lists_inject_yes[#settings,\c!type=\s!userdata][#userdata]%
   \else
 \strc_lists_inject_yes[\c!type=\s!userdata][#settings]%
   \fi}

\def\strc_lists_write_data_to_nop[#settings][#userdata]%
  {\endgroup}

\def\strc_lists_write_to[#tag]%
  {\begingroup
   \edef\currentlist{#tag}%
   \doifelse{\namedlistparameter{#tag}\c!state}\v!start
 \strc_lists_write_to_yes
 \strc_lists_write_to_nop}

\def\strc_lists_write_to_yes[#settings]#first#second% no \s!first 
because we don't expand user settings


{\strc_lists_inject_yes[\c!location=\v!here,#settings,\c!type=\s!simple][first={#first},second={#second}]}

\def\strc_lists_write_to_nop[#settings]#first#second%
  {\endgroup}



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Unnumbered chapter in table of contents?

2012-02-15 Thread Alasdair McAndrew
Hello,

For my student notes, there are ten numbered chapters, and one unnumbered
(Answers to Exercises).  I want all of these to appear in the table of
contents.  So:

1.   First Chapter
2.   Second chapter

10. Tenth Chapter
Answers to Exercises

I've set up the chapters with

\def\chap#1#2{\vbox{Chapter #1\crlf\framed[frame=off,topframe=on]{#2}}}

\setuphead[chapter][
command=\chap,
style=bfd,
after={\blank[1cm]},
]

However, I don't want this heading on the exercises; just the title.

How can I easily achieve all of this?  I've tried with

\title[Answers to Exercises]

and

\writetolist[content]{}{Answers to Exercises}

but these don't seem to work.

Thanks,
Alasdair
-- 
Blog: http://amca01.wordpress.com
Web:  http://sites.google.com/site/amca01/
Facebook: http://www.facebook.com/alasdair.mcandrew
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Unnumbered chapter in table of contents?

2012-02-15 Thread Otared Kavian
Hi Alasdair,

Is this what you want?
 begin
\starttext

\completecontent

\chapter{Chapter one}

\section{First section}

\section{Second section}

\chapter{Chapter two}

\section{First section}

\section{Second section}

\chapter[title={Answer to all the questions},number=no]

\stoptext
% end

Best regards: OK
On 16 févr. 2012, at 01:26, Alasdair McAndrew wrote:

 Hello,
 
 For my student notes, there are ten numbered chapters, and one unnumbered 
 (Answers to Exercises).  I want all of these to appear in the table of 
 contents.  So:
 
 1.   First Chapter
 2.   Second chapter
 
 10. Tenth Chapter
 Answers to Exercises
 
 I've set up the chapters with 
 
 \def\chap#1#2{\vbox{Chapter #1\crlf\framed[frame=off,topframe=on]{#2}}}
 
 \setuphead[chapter][
 command=\chap,
   style=bfd,
   after={\blank[1cm]},
   ]
 
 However, I don't want this heading on the exercises; just the title.
 
 How can I easily achieve all of this?  I've tried with 
 
 \title[Answers to Exercises]
 
 and 
 
 \writetolist[content]{}{Answers to Exercises}
 
 but these don't seem to work.  
 
 Thanks,
 Alasdair
 -- 
 Blog: http://amca01.wordpress.com
 Web:  http://sites.google.com/site/amca01/
 Facebook: http://www.facebook.com/alasdair.mcandrew
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Pagereferences to more than one page

2012-01-02 Thread luigi scarso
On Mon, Jan 2, 2012 at 5:30 PM, luigi scarso luigi.sca...@gmail.com wrote:

 On Mon, Jan 2, 2012 at 5:21 PM, Jan Heinen jahei...@gmx.de wrote:
  Though I searched a lot for the question in the bottom,
  - I could not find a parameter for \at which solves my problem
  - I could not find any other command which helps me
 
  Is this a limitation of ConText? I can't imagin that I am the only one
 and
  first who wants to reference to more than one page.
 I'm working on this
 but the idea of reference is that there is exactly one label for an
 object (which can be the same)
 so that \pagereference[red]foo
 \pagereference[red]boo
 is wrong because the label red has more than one reference, while
  \pagereference[red:1]foo
 \pagereference[red:2]foo
 is ok (as hans said).


Using this idea, and the two pass way, we can wrap \pagereference and \at
with \PageReference and \At,
wheret \PageReference[red] really means \pagereference[red:1],
\pagereference[red:2] and so on,
while \At{page:}[red] put \at{page:}[red:],\at{}[red:2] and so on.
After the end of the first pass we store the multiple references into
multiref.tuc, and we read this file at the beginning of every other pass;
its data is used by \At
to put the correct reference.

This is not a good solution, because multiref.tuc must be keep in synch
with the tuc file of the source, so context ---purgeall must be call to
clean up temporary data and restart.
The ideal solution store these data into the tuc file --- context has
 core-two.lua and core-two.mkiv for this, if I've time I will fix.

%
\startluacode
document.jan =  document.jan or {}
document.jan.multiple_references =  document.jan.multiple_references or {}
document.jan.multiple_references_stored =
 document.jan.multiple_references_stored or {}
\stopluacode


\def\WriteToList{%
\startluacode
local f=io.open('multiref.tuc','r')
if f==nil then
 f=io.open('multiref.tuc','w')
 f:write(local multiple_references= multiple_references or {}\n)
 f:write(multiple_references={\n)
 for k,v in pairs(document.jan.multiple_references) do
f:write(string.format(['\%s']=\%s,\n,k,v))
 end
 f:write(}\n)
 f:write(return multiple_references\n)
end
\stopluacode
}
\appendtoks\WriteToList\to\everystoptext


\def\ReadList{%
\startluacode
local f=io.open('multiref.tuc','r')
if f~=nil then
 f:close()
 document.jan.multiple_references_stored=dofile('multiref.tuc')
end
\stopluacode
}
\appendtoks\ReadList\to\everystarttext



%% wrap \pagereference
\def\PageReference[#1]{%
\startluacode
if document.jan.multiple_references['#1'] == nil then
  document.jan.multiple_references['#1'] = 1
 else
  document.jan.multiple_references['#1'] =
document.jan.multiple_references['#1'] +1
end
context('\\pagereference[#1:\%d]',document.jan.multiple_references['#1'])
\stopluacode%
}

%% wrap \at
\def\At#1[#2]{%
\startluacode
print(' ',document.jan.multiple_references['#2'])
if document.jan.multiple_references_stored['#2'] == nil then
 context('\\at{#1}[#2]')
else
  for j=1,document.jan.multiple_references_stored['#2'] do
local ref=string.format('#2:\%d',j)
local comma = ','
if j==1 and document.jan.multiple_references_stored['#2']==1 then
context('\\at{#1}[\%s]',ref) end
if j==1 and document.jan.multiple_references_stored['#2']~=1 then
  context('\\at{#1}[\%s],',ref)
elseif 1j and jdocument.jan.multiple_references_stored['#2'] then
  context('\\at{}[\%s],',ref)
elseif j== document.jan.multiple_references_stored['#2'] and
 document.jan.multiple_references_stored['#2']1 then
 context('\\at{}[\%s]',ref)
end
  end
end
\stopluacode
}

\starttext
You can find red vehicles on \At{page:}[red]
You can find yellow vehicles on \At{page:}[yellow]

Here I want to see: You can find red vehicles on page 2,4 (only page 2 is
wrong)
\page

\PageReference[red]Here is a red car.
\page

\PageReference[green]Here is a green car.
\page

\PageReference[red]Here is a red bus.
\page

\PageReference[green]Here is a green car.
\page

\PageReference[yellow]Here is a yellow car.
\page



\stoptext


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] \placelist and \writetolist

2011-12-13 Thread Marco Pessotto

Hello!

I can't understand what I'm doing wrong here:

%

\setuplist[mylist]
  [alternative=c,
width=0mm,
style=\tfx,
criterium=all]

\starttext

\placelist[mylist]

\page[yes]

\input knuth

\writetolist[mylist]{}{Item}

\stoptext
% 

The document compiles fine with version 2011.05.18 22:2, but it fails
miserably with the latest (2011.11.29 23:11)
! Missing number, treated as zero.

system   tex  error on line 11 in file prova.tex: Missing number, 
treated as zero ...

 1 \setuplist[mylist]
 2   [alternative=c,
 3 width=0mm,
 4 style=\tfx,
 5 criterium=all]
 6 
 7 
 8 \starttext
 9 
10 \placelist[mylist]
11   
12 \page[yes]
13 
14 \input knuth
15 
16 \writetolist[mylist]{}{Item}
17 
18 \stoptext

to be read again 
   ,
\doplacestructurelist ...um = #2, number = #3,
   extras = #4, order = #...
\doplacerawlist ...ras }{\listparameter \c!order }
  \stoplistreferences \endgr...
\doplacelist ...ginoflist \doplacerawlist [#1][#2]
  \doendoflist 
\dodoubleemptyonespaced #1#2-#1[{#2}][]
 
to be read again 
   \par 
l.11 
 
? H
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

Thanks in advance.

-- 
Marco

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \placelist and \writetolist

2011-12-13 Thread Wolfgang Schuster

Am 13.12.2011 um 11:41 schrieb Marco Pessotto:

 
 Hello!
 
 I can't understand what I'm doing wrong here:
 
 %
 
 \setuplist[mylist]
  [alternative=c,
width=0mm,
style=\tfx,
criterium=all]
 
 \starttext
 
 \placelist[mylist]
 
 \page[yes]
 
 \input knuth
 
 \writetolist[mylist]{}{Item}
 
 \stoptext
 % 
 
 The document compiles fine with version 2011.05.18 22:2, but it fails
 miserably with the latest (2011.11.29 23:11)

Replace \setuplist with \definelist, before you use a list you should create it.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


  1   2   3   >