* TOC: Chapters with and without page-numbers
@ 2013-03-12 11:01 "H. Özoguz"
0 siblings, 0 replies; 7+ messages in thread
From: "H. Özoguz" @ 2013-03-12 11:01 UTC (permalink / raw)
To: ntg-context
Hello there,
normally I use
\setuplist[chapter][pagenumber=no]
to prevent pages for chapters in the TOC, because normally (!) after
every chapter-titel comes a section-title, directly, without text
between the two titles. And so it is in this case enough to give the
page-number for the section-titles only.
But now I have an book with one single chapter, which do not have
sections. So with
\setuplist[chapter][pagenumber=no]
it has no page-number in the TOC. I want to have the page-number for
this single chapter-title only, but for the other chapter-titles (which
have section-titles after them) I want still the above setting. How to
do that?
Thank you!
Huseyin
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: TOC: Chapters with and without page-numbers
2013-03-15 6:46 "H. Özoguz"
2013-03-15 8:07 ` Keith J. Schultz
@ 2013-03-15 18:13 ` Wolfgang Schuster
1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2013-03-15 18:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 15.03.2013 um 07:46 schrieb H. Özoguz <h.oezoguz@mmnetz.de>:
> Maybe I have not made it clear, what I mean?
>
> My Minexample is:
>
> \setuplist[chapter][pagenumber=no]
> \starttext
> \completecontent
> \chapter{Chapter 1}
> \section{Section 1}
> \chapter{Chapter 2}
> \stoptext
>
> Now Chapter 1 is without pagenumber in the TOC, correct, because it has a section after the chapter-title! But Chapter 2 has no sections, so it need a page number, how to do that?
You can play with the following solution, it’s a bit dirty because you have to save the values of the chapter entry before you check for section entries.
\setuplist[chapter][alternative=mychapter]
\definelistalternative[mychapter][renderingsetup=list:mychapter]
\startsetups[list:mychapter]
\par
\setbox\scratchboxone\hbox{\currentlistentrynumber \quad \currentlistentrytitle \quad \currentlistentrypagenumber}
\setbox\scratchboxtwo\hbox{\currentlistentrynumber \quad \currentlistentrytitle}
\determinelistcharacteristics[section]
\ifnum\listlength=0
\box\scratchboxone
\else
\box\scratchboxtwo
\fi
\par
\stopsetups
\starttext
\completecontent
\chapter{Chapter 1}
\section{Section 1}
\chapter{Chapter 2}
\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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: TOC: Chapters with and without page-numbers
2013-03-15 15:53 ` john Culleton
@ 2013-03-15 17:24 ` Jonathan Barchi
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Barchi @ 2013-03-15 17:24 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Fri, Mar 15, 2013 at 11:53 AM, john Culleton <John@wexfordpress.com> wrote:
> On Fri, 15 Mar 2013 09:07:33 +0100
> "Keith J. Schultz" <keithjschultz@web.de> wrote:
>
>> Hi,
>>
>> I could find any options to do what you want.
>>
>> I assume you would have to redefine completecontent command to get
>> the functionality you need.
>>
>> I have not checked, but I assume that completecontent accesses a
>> Lua-table with the TOC information. It should be easy enough to use
>> this table to create the effect you want.
>>
>> regards
>> Keith.
>>
>> Am 15.03.2013 um 07:46 schrieb H. Özoguz <h.oezoguz@mmnetz.de>:
>>
>> > Maybe I have not made it clear, what I mean?
>> >
>> > My Minexample is:
>> >
>> > \setuplist[chapter][pagenumber=no]
>> > \starttext
>> > \completecontent
>> > \chapter{Chapter 1}
>> > \section{Section 1}
>> > \chapter{Chapter 2}
>> > \stoptext
>> >
>> > Now Chapter 1 is without pagenumber in the TOC, correct, because it
>> > has a section after the chapter-title! But Chapter 2 has no
>> > sections, so it need a page number, how to do that?
>>
>> ___________________________________________________________________________________
>> 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
>> ___________________________________________________________________________________
>
>
> With other versions of TeX (eplain comes to mind) You can edit the
> TOC file external to the tex program, and then take a second run
> without recording page numbers. There is a command for this.
> With Context this might be too complex.
>
> I see no problem with having a page number on chapter 1 however.
> Most books look that way. The Chicago Manual of Style has:
>
> Proofs (a chapter) 91
> Introduction (a section) 91
>
>
> --
> John Culleton
> Wexford Press
> Free list of books for self-publishers:
> http://wexfordpress.net/shortlist.html
> PDF e-book: "Create Book Covers with Scribus"
> available at http://www.booklocker.com/books/4055.html
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
I think you may be able to do this with a combination of \setupheads
and \setuphead commands, along with possibly defining a new head that
inherits from chapter (\definehead[name][chapter], then
\setuphead[name]).
I don't really have time to play much with this now, but see the
following links for a bunch more information on the commands above and
on section heads in general. There are several arguments to
setupheads/setuphead that modify how numbering is handled.
1. http://wiki.contextgarden.net/Category:Command/Sections
2. http://wiki.contextgarden.net/Titles
The second article, in particular, has been very helpful for me in
setting up some of the headers for my dissertation.
Jon
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: TOC: Chapters with and without page-numbers
2013-03-15 8:07 ` Keith J. Schultz
@ 2013-03-15 15:53 ` john Culleton
2013-03-15 17:24 ` Jonathan Barchi
0 siblings, 1 reply; 7+ messages in thread
From: john Culleton @ 2013-03-15 15:53 UTC (permalink / raw)
To: ntg-context
On Fri, 15 Mar 2013 09:07:33 +0100
"Keith J. Schultz" <keithjschultz@web.de> wrote:
> Hi,
>
> I could find any options to do what you want.
>
> I assume you would have to redefine completecontent command to get
> the functionality you need.
>
> I have not checked, but I assume that completecontent accesses a
> Lua-table with the TOC information. It should be easy enough to use
> this table to create the effect you want.
>
> regards
> Keith.
>
> Am 15.03.2013 um 07:46 schrieb H. Özoguz <h.oezoguz@mmnetz.de>:
>
> > Maybe I have not made it clear, what I mean?
> >
> > My Minexample is:
> >
> > \setuplist[chapter][pagenumber=no]
> > \starttext
> > \completecontent
> > \chapter{Chapter 1}
> > \section{Section 1}
> > \chapter{Chapter 2}
> > \stoptext
> >
> > Now Chapter 1 is without pagenumber in the TOC, correct, because it
> > has a section after the chapter-title! But Chapter 2 has no
> > sections, so it need a page number, how to do that?
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
With other versions of TeX (eplain comes to mind) You can edit the
TOC file external to the tex program, and then take a second run
without recording page numbers. There is a command for this.
With Context this might be too complex.
I see no problem with having a page number on chapter 1 however.
Most books look that way. The Chicago Manual of Style has:
Proofs (a chapter) 91
Introduction (a section) 91
--
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: "Create Book Covers with Scribus"
available at http://www.booklocker.com/books/4055.html
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: TOC: Chapters with and without page-numbers
2013-03-15 6:46 "H. Özoguz"
@ 2013-03-15 8:07 ` Keith J. Schultz
2013-03-15 15:53 ` john Culleton
2013-03-15 18:13 ` Wolfgang Schuster
1 sibling, 1 reply; 7+ messages in thread
From: Keith J. Schultz @ 2013-03-15 8:07 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
I could find any options to do what you want.
I assume you would have to redefine completecontent command to get
the functionality you need.
I have not checked, but I assume that completecontent accesses a Lua-table
with the TOC information. It should be easy enough to use this table to create
the effect you want.
regards
Keith.
Am 15.03.2013 um 07:46 schrieb H. Özoguz <h.oezoguz@mmnetz.de>:
> Maybe I have not made it clear, what I mean?
>
> My Minexample is:
>
> \setuplist[chapter][pagenumber=no]
> \starttext
> \completecontent
> \chapter{Chapter 1}
> \section{Section 1}
> \chapter{Chapter 2}
> \stoptext
>
> Now Chapter 1 is without pagenumber in the TOC, correct, because it has a section after the chapter-title! But Chapter 2 has no sections, so it need a page number, how to do that?
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: TOC: Chapters with and without page-numbers
@ 2013-03-15 6:46 "H. Özoguz"
2013-03-15 8:07 ` Keith J. Schultz
2013-03-15 18:13 ` Wolfgang Schuster
0 siblings, 2 replies; 7+ messages in thread
From: "H. Özoguz" @ 2013-03-15 6:46 UTC (permalink / raw)
To: ntg-context
Maybe I have not made it clear, what I mean?
My Minexample is:
\setuplist[chapter][pagenumber=no]
\starttext
\completecontent
\chapter{Chapter 1}
\section{Section 1}
\chapter{Chapter 2}
\stoptext
Now Chapter 1 is without pagenumber in the TOC, correct, because it has
a section after the chapter-title! But Chapter 2 has no sections, so it
need a page number, how to do that?
Regards,
Huseyin
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* TOC: Chapters with and without page-numbers
@ 2013-03-12 11:03 "H. Özoguz"
0 siblings, 0 replies; 7+ messages in thread
From: "H. Özoguz" @ 2013-03-12 11:03 UTC (permalink / raw)
To: ntg-context
Hello there,
normally I use
\setuplist[chapter][pagenumber=no]
to prevent pages for chapters in the TOC, because normally (!) after
every chapter-titel comes a section-title, directly, without text
between the two titles. And so it is in this case enough to give the
page-number for the section-titles only.
But now I have an book with one single chapter, which do not have
sections. So with
\setuplist[chapter][pagenumber=no]
it has no page-number in the TOC. I want to have the page-number for
this single chapter-title only, but for the other chapter-titles (which
have section-titles after them) I want still the above setting. How to
do that?
Thank you!
Huseyin
PS.: Sorry for sending this question with the wrong email-adress one
minute before, it awaits moderation, but can be deleted, of course.
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-15 18:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-12 11:01 TOC: Chapters with and without page-numbers "H. Özoguz"
2013-03-12 11:03 "H. Özoguz"
2013-03-15 6:46 "H. Özoguz"
2013-03-15 8:07 ` Keith J. Schultz
2013-03-15 15:53 ` john Culleton
2013-03-15 17:24 ` Jonathan Barchi
2013-03-15 18:13 ` Wolfgang Schuster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).