[NTG-context] Page number woes

Mari Voipio mari.voipio at iki.fi
Thu Sep 5 11:30:59 CEST 2019


Well, this was total waste of space from my part. When I found a
working file in a different project and copied the code over I
realized that my problem code should never have worked: I had
\setuppagenumber[stop] when I should have had
\setuppagenumber[state=stop]. Adding "state=" to my non-working code
solved all the problems and page numbering works the way I want to
have it.

And, as Wolfgang explained, I really don't need
\setuppagenumber[state=start] in the beginning of bodymatter, so now I
can even clean up my code a bit. Thank you, Wolfgang, I think I
understand blocks better now.

Mari


On Tue, Sep 3, 2019 at 7:03 PM Wolfgang Schuster
<wolfgang.schuster.lists at gmail.com> wrote:
>
> Mari Voipio schrieb am 02.09.2019 um 13:07:
> > Hello!
> >
> > I have a document where I want the page numbers to start from the
> > first page of chapter one. There's bunch of stuff before that,
> > including a table of contents. This has worked fine:
> >
> > \startproduct prd-pr23
> >
> > \startfrontmatter
> > \setuppagenumber[stop]
> > \component pr23-cover_front_web
> > \component blank.tex
> > \component c-contents
> > \stopfrontmatter
> >
> > \startbodymatter
> > \setuppagenumber[start]
> > \component dtr_pg.tex
> > \stopbodymatter
> >
> > \stopproduct
> >
> >
> > However, now I need to switch to using a full-page pdf as cover page
> > and changing that one line messes up with my page numbering, now TOC
> > appears as page 1 and chapter one starts from page 2 in my test file.
> >
> >
> > \startproduct prd-pr23
> >
> >
> > \startfrontmatter
> > \setuppagenumber[stop]
> > \startpagefigure[cover_vaisala_front_stripped]\stoppagefigure
> > \component blank.tex
> > \component c-contents
> > \stopfrontmatter
> >
> > \startbodymatter
> > \setuppagenumber[start]
> > \component dtr_pg.tex         % third chapter (DTR)
> > \stopbodymatter
> >
> > \stopproduct
> >
> > What is it that I don't see? I tried moving the cover page before the
> > \startfrontmatter, but that didn't change anything, TOC still starts
> > on page 2 when it shouldn't have a page number at all. Why does
> > switching the cover page from .tex to \pagefigure have such an effect
> > and how can I counteract it?
> >
> > Mari
> The \setuppagenumber command takes an assignment as argument but in your
> example you pass keywords to it.
>
> When you change the setting in the frontmatter to
> \setuppagenumber[state=stop] the numbers disappear. Since settings in a
> sectionblock are local there is no need to enable the counter in the
> bodypart because the previous setting is forgotten.
>
> When I look in your attached files I see that some file contain the
> setting \setuppagenumber[state=stop] which disabled the page counter.
>
> Wolfgang
>


More information about the ntg-context mailing list