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

2023-09-10 Thread Jim
Hi Lutz,

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

Cheers.

Jim

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

> Hi Jim,

> perhaps does this work for you?

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

> Greetings Lutz

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

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

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

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

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

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

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

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

>>Thanks.

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

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

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

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

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

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


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

2023-09-09 Thread Jim
Hi Wolfgang,

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

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

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

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

> Hi Jim,

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

Argh.  Mea culpa.

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

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

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

Cheers.

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

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


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

2023-09-09 Thread Jim
Wolfgang,

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

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

Thanks.
Jim


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

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

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

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

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

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

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

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

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

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

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

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

> \definehead [contentstitle] [title]

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

> \starttext

> \completecontent

> \title{Title}

> \subject{Subject}

> \subsubject{Subsubject}

> \stoptext
>  end example 1

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

> \definehead [contentstitle] [title]

> \starttext

> \contentstitle{Contents}

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

> \title{Title}

> \subject{Subject}

> \subsubject{Subsubject}

> \stoptext
>  end example 2

> Wolfgang

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

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


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

2023-09-09 Thread Wolfgang Schuster

Jim schrieb am 09.09.2023 um 22:34:

Wolfgang,

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

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


Hi Jim,

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

are in your document?

Wolfgang

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

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


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

2023-09-09 Thread Lutz Haseloff
Hi Jim,

perhaps does this work for you?


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


Greetings Lutz

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

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

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

2023-09-09 Thread Wolfgang Schuster

Jim schrieb am 09.09.2023 um 20:11:

Hi,

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

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

Blah blah blah2
Blah blah 4
...

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

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

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

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


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


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


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

\definehead [contentstitle] [title]

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


\starttext

\completecontent

\title{Title}

\subject{Subject}

\subsubject{Subsubject}

\stoptext
 end example 1

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

\definehead [contentstitle] [title]

\starttext

\contentstitle{Contents}

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

\title{Title}

\subject{Subject}

\subsubject{Subsubject}

\stoptext
 end example 2

Wolfgang


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

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