Re: [NTG-context] Page number woes

2019-09-05 Thread Mari Voipio
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
 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
>
___
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] Page number woes

2019-09-03 Thread Wolfgang Schuster

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

___
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] Page number woes

2016-03-15 Thread Pablo Rodriguez
On 03/14/2016 03:43 PM, Mari Voipio wrote:
> Greetings all!
> 
> I have a book setup that worked perfectly as long as the inside cover
> was only one page long. But then we added information to the inside
> cover and had to split the information on two pages. The so called
> inside cover works fine, the TOC works fine, but the main text part
> (starting with Intro) begins now on page 2 when it should be on page
> 1. And this happens even when the TOC is two pages long, which is a
> bit weird (I would assume that if it counts TOC into page numbers,
> two-page TOC would mean that Intro starts on page 3, but nope, it
> still starts on page 2).
> [...]

Hi Mari,

how about adding "\setcounter[userpage][1]" just before the introduction?

Just in case it might help,


Pablo
-- 
http://www.ousia.tk
___
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] Page number woes

2016-03-15 Thread Wolfgang Schuster

Mari Voipio 
14. März 2016 um 15:43
Greetings all!

I have a book setup that worked perfectly as long as the inside cover
was only one page long. But then we added information to the inside
cover and had to split the information on two pages. The so called
inside cover works fine, the TOC works fine, but the main text part
(starting with Intro) begins now on page 2 when it should be on page
1. And this happens even when the TOC is two pages long, which is a
bit weird (I would assume that if it counts TOC into page numbers,
two-page TOC would mean that Intro starts on page 3, but nope, it
still starts on page 2).

The minimal sample attached to this message is really ugly as it
doesn't contain any of the environment files, but the problem is
visible here just as well as in the real thing - if I make the second
page of the inside cover disappear, Intro starts on page 1 as it
should. If the so called inside cover is two pages long, Intro starts
on page 2. (The file to be compiled is prd-pr43-general_test.tex, the
others are component files.)

It is quite possible the TOC file is the culprit and it has been pure
luck that everything has worked until now... I don't understand the
page mechanism in ConTeXt well enough to see where the problem is.

I noticed that my ConTeXt version is pretty old: "ConTeXt ver:
2015.02.03 23:55 MKIV beta" (hmm... I didn't update at ConTeXt meeting
as I usually do, stupid me.)
I'd rather not update just now (production in sensitive phase), but if
you think the problem will go away with an update, I'll do it.

Move your intro text after the \startfrontmatter command everything before
it doesn’t belong to any sectionblock.

You can also omit \startext and \stoptext commands when you \startcomponent
etc. because they already do the work of \starttext.

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
___