ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* standardmakeup, frontmatter, bodymatter & page numbering
@ 2007-10-02 23:36 Mojca Miklavec
  2007-10-03 10:54 ` Peter Rolf
  2007-11-29 19:14 ` Wolfgang Schuster
  0 siblings, 2 replies; 14+ messages in thread
From: Mojca Miklavec @ 2007-10-02 23:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

I have a document consisting of title page, some introduction which
should have pages numbered with roman numerals, and finally the real
content

\setuphead[subject][page=odd,style=\ss\bfb]
\setuppagenumbering[location=]

\starttext
\startstandardmakeup
title page
\stopstandardmakeup

\startfrontmatter
\setuppagenumbering[conversion=romannumerals]
\setupfootertexts[page \pagenumber{}]
\subject{some intro pages}
\input tufte
\stopfrontmatter

\startbodymatter
\setupfootertexts[page \pagenumber{} of \totalnumberofpages]
\dorecurse{10}{\subject{real content} \dorecurse{\recurselevel}{\input knuth} }
\stopbodymatter

\stoptext

Now the problems:
1.) The second page starts counting at 1, while counting should start
at page 3. This can be solved by using another
\startstandardmakeup\strut\stopstandardmakeup.

2.) The last page says "page 26 of 27" - the total page number is
indeed 27, but counting started on the second page, so it never
reaches the last number.

3.) I would like the page number on the first page of bodymatter to be
"page 1 of 23" instead of "page 4 of 27", and the last one to ge "page
23 of 23" instead of "page 26 of 27"

There is some way=bychapter setting for page numering, but in that
case there are no suitable chapters/sections available.

Any hints appreciated ...

Thanks a lot,
    Mojca
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: standardmakeup, frontmatter, bodymatter & page numbering
  2007-10-02 23:36 standardmakeup, frontmatter, bodymatter & page numbering Mojca Miklavec
@ 2007-10-03 10:54 ` Peter Rolf
  2007-10-03 17:33   ` Mojca Miklavec
  2007-11-29 19:14 ` Wolfgang Schuster
  1 sibling, 1 reply; 14+ messages in thread
From: Peter Rolf @ 2007-10-03 10:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Mojca Miklavec schrieb:
> Hello,
> 
> I have a document consisting of title page, some introduction which
> should have pages numbered with roman numerals, and finally the real
> content
> 
> \setuphead[subject][page=odd,style=\ss\bfb]
> \setuppagenumbering[location=]
> 
> \starttext
> \startstandardmakeup
> title page
> \stopstandardmakeup
> 
> \startfrontmatter
> \setuppagenumbering[conversion=romannumerals]
> \setupfootertexts[page \pagenumber{}]
> \subject{some intro pages}
> \input tufte
> \stopfrontmatter
> 
> \startbodymatter
> \setupfootertexts[page \pagenumber{} of \totalnumberofpages]
> \dorecurse{10}{\subject{real content} \dorecurse{\recurselevel}{\input knuth} }
> \stopbodymatter
> 
> \stoptext
> 
> Now the problems:
> 1.) The second page starts counting at 1, while counting should start
> at page 3. This can be solved by using another
> \startstandardmakeup\strut\stopstandardmakeup.
> 
> 2.) The last page says "page 26 of 27" - the total page number is
> indeed 27, but counting started on the second page, so it never
> reaches the last number.
> 
> 3.) I would like the page number on the first page of bodymatter to be
> "page 1 of 23" instead of "page 4 of 27", and the last one to ge "page
> 23 of 23" instead of "page 26 of 27"
> 
> There is some way=bychapter setting for page numering, but in that
> case there are no suitable chapters/sections available.
> 
> Any hints appreciated ...
>
Hi Mojca,

see
http://www.pragma-ade.com/general/magazines/mag-0002.pdf

(Page ranges) for the details.


Greetings, Peter


> Thanks a lot,
>     Mojca
> ___________________________________________________________________________________
> 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: standardmakeup, frontmatter, bodymatter & page numbering
  2007-10-03 10:54 ` Peter Rolf
@ 2007-10-03 17:33   ` Mojca Miklavec
  2007-10-03 18:51     ` Peter Rolf
  0 siblings, 1 reply; 14+ messages in thread
From: Mojca Miklavec @ 2007-10-03 17:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/3/07, Peter Rolf <indiego@gmx.net> wrote:
> Mojca Miklavec schrieb:
> > Hello,
> >
> > I have a document consisting of title page, some introduction which
> > should have pages numbered with roman numerals, and finally the real
> > content
> >
> > \setuphead[subject][page=odd,style=\ss\bfb]
> > \setuppagenumbering[location=]
> >
> > \starttext
> > \startstandardmakeup
> > title page
> > \stopstandardmakeup
> >
> > \startfrontmatter
> > \setuppagenumbering[conversion=romannumerals]
> > \setupfootertexts[page \pagenumber{}]
> > \subject{some intro pages}
> > \input tufte
> > \stopfrontmatter
> >
> > \startbodymatter
> > \setupfootertexts[page \pagenumber{} of \totalnumberofpages]
> > \dorecurse{10}{\subject{real content} \dorecurse{\recurselevel}{\input knuth} }
> > \stopbodymatter
> >
> > \stoptext
> >
> > Now the problems:
> > 1.) The second page starts counting at 1, while counting should start
> > at page 3. This can be solved by using another
> > \startstandardmakeup\strut\stopstandardmakeup.
> >
> > 2.) The last page says "page 26 of 27" - the total page number is
> > indeed 27, but counting started on the second page, so it never
> > reaches the last number.
> >
> > 3.) I would like the page number on the first page of bodymatter to be
> > "page 1 of 23" instead of "page 4 of 27", and the last one to ge "page
> > 23 of 23" instead of "page 26 of 27"
> >
> > There is some way=bychapter setting for page numering, but in that
> > case there are no suitable chapters/sections available.
> >
> > Any hints appreciated ...
> >
> Hi Mojca,
>
> see
> http://www.pragma-ade.com/general/magazines/mag-0002.pdf
>
> (Page ranges) for the details.

Thanks a lot for the pointer. But the following example fails:

\setuppagenumbering
	[location=]
\setupsubpagenumber
	[state=start]
\setupfootertexts
	[page \subpageno{} of \nofsubpages]

\starttext
	abc
\stoptext

! Missing number, treated as zero.
<to be read again>
                   {
<argument> page \subpageno {
                            } of \nofsubpages {}{}{}
\firstoftwoarguments #1#2->#1

\doattributes ...sname #1#2\@EA \endcsname \fi {#4
                                                  }\dostopattributes
\dosingletexts ...atetexts {#1#2#5}{#6{}{}{}}}}}}}
                                                  \egroup
<argument> ...tk \v!footer \v!text \c!middletext }
                                                  \hss }\hskip -\makeupwidth...
...
l.11 \stoptext

Plus, I don't know how to instruct "way=by..." to reset the counter at
the boundary of frontmatter/bodymatter

Thanks a lot,
    Mojca
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: standardmakeup, frontmatter, bodymatter & page numbering
  2007-10-03 17:33   ` Mojca Miklavec
@ 2007-10-03 18:51     ` Peter Rolf
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Rolf @ 2007-10-03 18:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Mojca Miklavec schrieb:
> On 10/3/07, Peter Rolf <indiego@gmx.net> wrote:
>> Mojca Miklavec schrieb:
>>> Hello,
>>>
>>> I have a document consisting of title page, some introduction which
>>> should have pages numbered with roman numerals, and finally the real
>>> content
>>>
>>> \setuphead[subject][page=odd,style=\ss\bfb]
>>> \setuppagenumbering[location=]
>>>
>>> \starttext
>>> \startstandardmakeup
>>> title page
>>> \stopstandardmakeup
>>>
>>> \startfrontmatter
>>> \setuppagenumbering[conversion=romannumerals]
>>> \setupfootertexts[page \pagenumber{}]
>>> \subject{some intro pages}
>>> \input tufte
>>> \stopfrontmatter
>>>
>>> \startbodymatter
>>> \setupfootertexts[page \pagenumber{} of \totalnumberofpages]
>>> \dorecurse{10}{\subject{real content} \dorecurse{\recurselevel}{\input knuth} }
>>> \stopbodymatter
>>>
>>> \stoptext
>>>
>>> Now the problems:
>>> 1.) The second page starts counting at 1, while counting should start
>>> at page 3. This can be solved by using another
>>> \startstandardmakeup\strut\stopstandardmakeup.
>>>
>>> 2.) The last page says "page 26 of 27" - the total page number is
>>> indeed 27, but counting started on the second page, so it never
>>> reaches the last number.
>>>
>>> 3.) I would like the page number on the first page of bodymatter to be
>>> "page 1 of 23" instead of "page 4 of 27", and the last one to ge "page
>>> 23 of 23" instead of "page 26 of 27"
>>>
>>> There is some way=bychapter setting for page numering, but in that
>>> case there are no suitable chapters/sections available.
>>>
>>> Any hints appreciated ...
>>>
>> Hi Mojca,
>>
>> see
>> http://www.pragma-ade.com/general/magazines/mag-0002.pdf
>>
>> (Page ranges) for the details.
> 
> Thanks a lot for the pointer. But the following example fails:
> 
> \setuppagenumbering
> 	[location=]
> \setupsubpagenumber
> 	[state=start]
> \setupfootertexts
> 	[page \subpageno{} of \nofsubpages]
> 
> \starttext
> 	abc
> \stoptext
> 
> ! Missing number, treated as zero.
> <to be read again>
>                    {
> <argument> page \subpageno {
>                             } of \nofsubpages {}{}{}
> \firstoftwoarguments #1#2->#1
> 
> \doattributes ...sname #1#2\@EA \endcsname \fi {#4
>                                                   }\dostopattributes
> \dosingletexts ...atetexts {#1#2#5}{#6{}{}{}}}}}}}
>                                                   \egroup
> <argument> ...tk \v!footer \v!text \c!middletext }
>                                                   \hss }\hskip -\makeupwidth...
> ...
> l.11 \stoptext
>
I guess the standard activation of that mechanism is 'bychapter', so
there is no initialisation (withount a \chapter). If you use
"way=bytext" it should (hopefully) work.


This is taken from my letter environment. It's from 2003 and I don't
remember any details...


\def\MySubpagerange#1{%
  \ifnum\nofsubpages>1
    \ifnum\numexpr\subpageno+1\relax<\nofsubpages
     {\ss\tfx\the\numexpr\subpageno+1\relax\,-\,\nofsubpages}
    \else
      \ifnum\numexpr\subpageno+1\relax=\nofsubpages\relax
        {\ss\tfx\nofsubpages}\fi
    \fi
  \fi
}

% show subpagenumber in the right footer margin, if more than one page
is used
\setuppagenumbering[
   location={footer,margin},
   command=\MySubpagerange,
  ]

\setupsubpagenumber[way=bytext]

% show (sub)pagenumber in header ( no pagenumber at page 1)
\setupheadertexts[{\ifnum\subpageno>1 \the\subpageno\fi}]
\setupheader[style=small, state=high]


> Plus, I don't know how to instruct "way=by..." to reset the counter at
> the boundary of frontmatter/bodymatter
>
It's only a counter, so (if there is no parameter support for your
environment) you are free to reset it whenever you want.
Just add some code to the 'before|after' parameter of front|bodymatter.

HTH, Peter


> Thanks a lot,
>     Mojca
> ___________________________________________________________________________________
> 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: standardmakeup, frontmatter, bodymatter & page numbering
  2007-10-02 23:36 standardmakeup, frontmatter, bodymatter & page numbering Mojca Miklavec
  2007-10-03 10:54 ` Peter Rolf
@ 2007-11-29 19:14 ` Wolfgang Schuster
  2007-12-07 16:29   ` Mojca Miklavec
  2008-06-01 18:25   ` Specifying last page when using imposition John Devereux
  1 sibling, 2 replies; 14+ messages in thread
From: Wolfgang Schuster @ 2007-11-29 19:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mojca Miklavec

On Wed, 3 Oct 2007 01:36:54 +0200
"Mojca Miklavec" <mojca.miklavec.lists@gmail.com> wrote:

> Hello,
> 
> I have a document consisting of title page, some introduction which
> should have pages numbered with roman numerals, and finally the real
> content
> 
> \setuphead[subject][page=odd,style=\ss\bfb]
> \setuppagenumbering[location=]
> 
> \starttext
> \startstandardmakeup
> title page
> \stopstandardmakeup
> 
> \startfrontmatter
> \setuppagenumbering[conversion=romannumerals]
> \setupfootertexts[page \pagenumber{}]
> \subject{some intro pages}
> \input tufte
> \stopfrontmatter
> 
> \startbodymatter
> \setupfootertexts[page \pagenumber{} of \totalnumberofpages]
> \dorecurse{10}{\subject{real content} \dorecurse{\recurselevel}{\input knuth} }
> \stopbodymatter
> 
> \stoptext
> 
> Now the problems:
> 1.) The second page starts counting at 1, while counting should start
> at page 3. This can be solved by using another
> \startstandardmakeup\strut\stopstandardmakeup.
> 
> 2.) The last page says "page 26 of 27" - the total page number is
> indeed 27, but counting started on the second page, so it never
> reaches the last number.
> 
> 3.) I would like the page number on the first page of bodymatter to be
> "page 1 of 23" instead of "page 4 of 27", and the last one to ge "page
> 23 of 23" instead of "page 26 of 27"
> 
> There is some way=bychapter setting for page numering, but in that
> case there are no suitable chapters/sections available.
> 
> Any hints appreciated ...
> 
> Thanks a lot,
>     Mojca

Hi Mojca,

maybe I'm a little bit late with my answer but I stumpled across this
question after I was searching for something in the archive and I found
the following solution.

[...]
\startbodymatter
\page[odd] % only \page give a empty before the \section
\setuppagenumber[number=1]
\setupfootertexts[page \pagenumber{} of \lastpagenumber] % no \totalnumber...
\dorecurse{10}{\subject{real content} \dorecurse{\recurselevel}{\input knuth} }
\stopbodymatter
[...]

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: standardmakeup, frontmatter, bodymatter & page numbering
  2007-11-29 19:14 ` Wolfgang Schuster
@ 2007-12-07 16:29   ` Mojca Miklavec
  2007-12-08 12:09     ` Wolfgang Schuster
  2008-06-01 18:25   ` Specifying last page when using imposition John Devereux
  1 sibling, 1 reply; 14+ messages in thread
From: Mojca Miklavec @ 2007-12-07 16:29 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 11/29/07, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
> On Wed, 3 Oct 2007 01:36:54 +0200
> "Mojca Miklavec" <mojca.miklavec.lists@gmail.com> wrote:
>
> > Hello,
> >
> > I have a document consisting of title page, some introduction which
> > should have pages numbered with roman numerals, and finally the real
> > content
> >
> > \setuphead[subject][page=odd,style=\ss\bfb]
> > \setuppagenumbering[location=]
> >
> > \starttext
> > \startstandardmakeup
> > title page
> > \stopstandardmakeup
> >
> > \startfrontmatter
> > \setuppagenumbering[conversion=romannumerals]
> > \setupfootertexts[page \pagenumber{}]
> > \subject{some intro pages}
> > \input tufte
> > \stopfrontmatter
> >
> > \startbodymatter
> > \setupfootertexts[page \pagenumber{} of \totalnumberofpages]
> > \dorecurse{10}{\subject{real content} \dorecurse{\recurselevel}{\input knuth} }
> > \stopbodymatter
> >
> > \stoptext
> >
> > Now the problems:
> > 1.) The second page starts counting at 1, while counting should start
> > at page 3. This can be solved by using another
> > \startstandardmakeup\strut\stopstandardmakeup.
> >
> > 2.) The last page says "page 26 of 27" - the total page number is
> > indeed 27, but counting started on the second page, so it never
> > reaches the last number.
> >
> > 3.) I would like the page number on the first page of bodymatter to be
> > "page 1 of 23" instead of "page 4 of 27", and the last one to ge "page
> > 23 of 23" instead of "page 26 of 27"
> >
> > There is some way=bychapter setting for page numering, but in that
> > case there are no suitable chapters/sections available.
> >
> > Any hints appreciated ...
> >
> > Thanks a lot,
> >     Mojca
>
> Hi Mojca,
>
> maybe I'm a little bit late with my answer

Hello Wolfgang,

I hardcoded the number when I needed it, but you proposal is very
useful for the next time when I will need it again. I only need to
figure out where to store it on the wiki/texshow, so that it will be
possible to find it agin. (This still cannot handle the problem  if I
wanted to number "last page of frontmatter", but I don't need it at
the moment.)

> but I stumpled across this
> question after I was searching for something in the archive and I found
> the following solution.
>
> [...]
> \startbodymatter
> \page[odd] % only \page give a empty before the \section
> \setuppagenumber[number=1]
> \setupfootertexts[page \pagenumber{} of \lastpagenumber] % no \totalnumber...

Thanks a lot :)

> \dorecurse{10}{\subject{real content} \dorecurse{\recurselevel}{\input knuth} }
> \stopbodymatter
> [...]

Mojca
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: standardmakeup, frontmatter, bodymatter & page numbering
  2007-12-07 16:29   ` Mojca Miklavec
@ 2007-12-08 12:09     ` Wolfgang Schuster
  0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Schuster @ 2007-12-08 12:09 UTC (permalink / raw)
  To: Mojca Miklavec; +Cc: mailing list for ConTeXt users

On Fri, 7 Dec 2007 17:29:36 +0100
"Mojca Miklavec" <mojca.miklavec.lists@gmail.com> wrote:

> On 11/29/07, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
> > On Wed, 3 Oct 2007 01:36:54 +0200
> > "Mojca Miklavec" <mojca.miklavec.lists@gmail.com> wrote:
> >
> > > Hello,
> > >
> > > I have a document consisting of title page, some introduction which
> > > should have pages numbered with roman numerals, and finally the real
> > > content
> > >
> > > \setuphead[subject][page=odd,style=\ss\bfb]
> > > \setuppagenumbering[location=]
> > >
> > > \starttext
> > > \startstandardmakeup
> > > title page
> > > \stopstandardmakeup
> > >
> > > \startfrontmatter
> > > \setuppagenumbering[conversion=romannumerals]
> > > \setupfootertexts[page \pagenumber{}]
> > > \subject{some intro pages}
> > > \input tufte
> > > \stopfrontmatter
> > >
> > > \startbodymatter
> > > \setupfootertexts[page \pagenumber{} of \totalnumberofpages]
> > > \dorecurse{10}{\subject{real content} \dorecurse{\recurselevel}{\input knuth} }
> > > \stopbodymatter
> > >
> > > \stoptext
> > >
> > > Now the problems:
> > > 1.) The second page starts counting at 1, while counting should start
> > > at page 3. This can be solved by using another
> > > \startstandardmakeup\strut\stopstandardmakeup.
> > >
> > > 2.) The last page says "page 26 of 27" - the total page number is
> > > indeed 27, but counting started on the second page, so it never
> > > reaches the last number.
> > >
> > > 3.) I would like the page number on the first page of bodymatter to be
> > > "page 1 of 23" instead of "page 4 of 27", and the last one to ge "page
> > > 23 of 23" instead of "page 26 of 27"
> > >
> > > There is some way=bychapter setting for page numering, but in that
> > > case there are no suitable chapters/sections available.
> > >
> > > Any hints appreciated ...
> > >
> > > Thanks a lot,
> > >     Mojca
> >
> > Hi Mojca,
> >
> > maybe I'm a little bit late with my answer
> 
> Hello Wolfgang,
> 
> I hardcoded the number when I needed it, but you proposal is very
> useful for the next time when I will need it again. I only need to
> figure out where to store it on the wiki/texshow, so that it will be
> possible to find it agin. (This still cannot handle the problem  if I
> wanted to number "last page of frontmatter", but I don't need it at
> the moment.)

I run into similiar problems for my letter module to reset the page
number for every letter in one document without reseting the global
pagenumber, I extend my example to use subpagenumber instead of global
numbers but I have a problem to get the right number in the table of
content because ConTeXt writes the gobal page number in the galley
files and ignores the subpagenumber.

\startcomponent structure

% setups

\setupsubpagenumber[way=bytext,state=start]
\setuppagenumbering[location=]

\startsectionblockenvironment[frontpart]
  %\setupfootertexts[\convertnumber{r}{\subpagenumber}]
  \setupfootertexts[pagenumber]
  \setuppagenumbering[conversion=romannumerals]
\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
  \setuppagenumber[number=1] % else global pagenumbers in the toc
  \resetsubpagenumber
  \setupfootertexts[page \subpagenumber{} of \numberofsubpages]
\stopsectionblockenvironment

\startsectionblockenvironment[backpart]
  \resetsubpagenumber
\stopsectionblockenvironment

% the real document

\startfrontmatter
\completecontent
\stopfrontmatter

\startbodymatter
\dorecurse{12}{\section{Knuth}\input knuth\par}
\stopbodymatter

\startbackmatter
I'm the last page, really?

This is true in latest the \CONTEXT\ for \LUATEX\ but not for \XETEX\
and \PDFTEX. \stopbackmatter

\stopcomponent

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Specifying last page when using imposition
  2007-11-29 19:14 ` Wolfgang Schuster
  2007-12-07 16:29   ` Mojca Miklavec
@ 2008-06-01 18:25   ` John Devereux
  2008-06-02  6:06     ` Wolfgang Schuster
  1 sibling, 1 reply; 14+ messages in thread
From: John Devereux @ 2008-06-01 18:25 UTC (permalink / raw)
  To: ntg-context


Hi,

I am using imposition to arrange pages in a "booklet" format, a5 on
a4. So after all the pages are printed out (doublesided) I can fold
the stack in half to get my booklet.

So I am using the command

	texexec --arrange --paperformat=a5a4 --printformat=up test.tex

...which works well.


Now I want to write content to appear on the last page. Here is my
test file:



\setuppagenumbering[alternative=doublesided]
\starttext
\showframe
\subject Front Cover

\dorecurse{10}{\input tufte \par}

\page[yes,last]
\raggedcenter
Back Cover
\stoptext


But this does not do what I want. "Back Cover" appears on document
page 9, but on page 4 (of 6) of the output pdf. It needs to be on page
1 of the output (i.e. opposite document page 1). 

Any suggestions?

Thanks,

-- 

John Devereux
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Specifying last page when using imposition
  2008-06-01 18:25   ` Specifying last page when using imposition John Devereux
@ 2008-06-02  6:06     ` Wolfgang Schuster
  2008-06-02  8:11       ` John Devereux
  0 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Schuster @ 2008-06-02  6:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, Jun 1, 2008 at 8:25 PM, John Devereux
<jdREMOVE@thisdevereux.me.uk> wrote:
>
> Hi,
>
> I am using imposition to arrange pages in a "booklet" format, a5 on
> a4. So after all the pages are printed out (doublesided) I can fold
> the stack in half to get my booklet.
>
> So I am using the command
>
>        texexec --arrange --paperformat=a5a4 --printformat=up test.tex
>
> ...which works well.
>
>
> Now I want to write content to appear on the last page. Here is my
> test file:
>
>
>
> \setuppagenumbering[alternative=doublesided]
> \starttext
> \showframe
> \subject Front Cover
>
> \dorecurse{10}{\input tufte \par}
>
> \page[yes,last]

\page[quadruple,quadruple]

or

\page[8]

> \raggedcenter
> Back Cover
> \stoptext
>
>
> But this does not do what I want. "Back Cover" appears on document
> page 9, but on page 4 (of 6) of the output pdf. It needs to be on page
> 1 of the output (i.e. opposite document page 1).
>
> Any suggestions?
>
> Thanks,
>
> --
>
> John Devereux

Greetings
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Specifying last page when using imposition
  2008-06-02  6:06     ` Wolfgang Schuster
@ 2008-06-02  8:11       ` John Devereux
  2008-06-02  8:22         ` Wolfgang Schuster
  0 siblings, 1 reply; 14+ messages in thread
From: John Devereux @ 2008-06-02  8:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

"Wolfgang Schuster" <schuster.wolfgang@googlemail.com> writes:

> On Sun, Jun 1, 2008 at 8:25 PM, John Devereux
> <jdREMOVE@thisdevereux.me.uk> wrote:
>>
>> Hi,
>>
>> I am using imposition to arrange pages in a "booklet" format, a5 on
>> a4. So after all the pages are printed out (doublesided) I can fold
>> the stack in half to get my booklet.
>>
>> So I am using the command
>>
>>        texexec --arrange --paperformat=a5a4 --printformat=up test.tex
>>
>> ...which works well.
>>
>>
>> Now I want to write content to appear on the last page. Here is my
>> test file:
>>
>>
>>
>> \setuppagenumbering[alternative=doublesided]
>> \starttext
>> \showframe
>> \subject Front Cover
>>
>> \dorecurse{10}{\input tufte \par}
>>
>> \page[yes,last]
>
> \page[quadruple,quadruple]
>
> or
>
> \page[8]

Wolfgang, thanks - but this does not seem to fix the problem. The
"last page" appears opposite page 3 instead of opposite page 1.

To be clear, I am looking for a way to specify that content is to be
placed on the outside of the cover, i.e. printed on the same side of
the same sheet as page 1, when "arranged".


\setuppapersize[A5][A4]
\setuparranging[2UP,rotated,doublesided]
\setuppagenumbering[alternative=doublesided]

\setuplayout[margin=0pt,width=fit]
\setupbodyfont[16pt]

\starttext

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

\page[8]

Back Cover

\stoptext


...

	texexec --arrange --paperformat=a5a4 --printformat=up test2.tex



-- 

John Devereux
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Specifying last page when using imposition
  2008-06-02  8:11       ` John Devereux
@ 2008-06-02  8:22         ` Wolfgang Schuster
  2008-06-02  8:44           ` Wolfgang Schuster
  0 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Schuster @ 2008-06-02  8:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Jun 2, 2008 at 10:11 AM, John Devereux
<jdREMOVE@thisdevereux.me.uk> wrote:
> "Wolfgang Schuster" <schuster.wolfgang@googlemail.com> writes:
>
>> On Sun, Jun 1, 2008 at 8:25 PM, John Devereux
>> <jdREMOVE@thisdevereux.me.uk> wrote:
>>>
>>> Hi,
>>>
>>> I am using imposition to arrange pages in a "booklet" format, a5 on
>>> a4. So after all the pages are printed out (doublesided) I can fold
>>> the stack in half to get my booklet.
>>>
>>> So I am using the command
>>>
>>>        texexec --arrange --paperformat=a5a4 --printformat=up test.tex
>>>
>>> ...which works well.
>>>
>>>
>>> Now I want to write content to appear on the last page. Here is my
>>> test file:
>>>
>>>
>>>
>>> \setuppagenumbering[alternative=doublesided]
>>> \starttext
>>> \showframe
>>> \subject Front Cover
>>>
>>> \dorecurse{10}{\input tufte \par}
>>>
>>> \page[yes,last]
>>
>> \page[quadruple,quadruple]
>>
>> or
>>
>> \page[8]
>
> Wolfgang, thanks - but this does not seem to fix the problem. The
> "last page" appears opposite page 3 instead of opposite page 1.
>
> To be clear, I am looking for a way to specify that content is to be
> placed on the outside of the cover, i.e. printed on the same side of
> the same sheet as page 1, when "arranged".
>
>
> \setuppapersize[A5][A4]
> \setuparranging[2UP,rotated,doublesided]
> \setuppagenumbering[alternative=doublesided]
>
> \setuplayout[margin=0pt,width=fit]
> \setupbodyfont[16pt]
>
> \starttext
>
> \dorecurse{11}{\input tufte \par \input knuth \par}
>
> \page[8]

\page[8] is useless in this example because you're already beyound
the eight page and the argument is useless in this case.

\page[quadruple]

> Back Cover
>
> \stoptext
>
>        texexec --arrange --paperformat=a5a4 --printformat=up test2.tex

texexec test2

you need --arrange only for documents with a table of content, indices ...

Greetings
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Specifying last page when using imposition
  2008-06-02  8:22         ` Wolfgang Schuster
@ 2008-06-02  8:44           ` Wolfgang Schuster
  2008-06-02  9:33             ` John Devereux
  0 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Schuster @ 2008-06-02  8:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi John,

>> Wolfgang, thanks - but this does not seem to fix the problem. The
>> "last page" appears opposite page 3 instead of opposite page 1.
>>
>> To be clear, I am looking for a way to specify that content is to be
>> placed on the outside of the cover, i.e. printed on the same side of
>> the same sheet as page 1, when "arranged".

Could you try the following page brake method.

\unprotect

\installpagebreakhandler {newquadruple}%
  {\ifdoublesided
     \!!counta\realpageno
     \!!countb\realpageno
     \advance\!!counta 4
     \divide\!!counta 4
     \multiply\!!counta 4
     \advance\!!countb 1
     \advance\!!counta-\!!countb
     \executepagebreakhandler\v!yes
     \dorecurse\!!counta{\executepagebreakhandler\v!empty}%
   \fi}

\protect

>> \setuppapersize[A5][A4]
>> \setuparranging[2UP,rotated,doublesided]
>> \setuppagenumbering[alternative=doublesided]
>>
>> \setuplayout[margin=0pt,width=fit]
>> \setupbodyfont[16pt]
>>
>> \starttext
>>
>> \dorecurse{11}{\input tufte \par \input knuth \par}
>>
>> \page[8]
>
> \page[8] is useless in this example because you're already beyound
> the eight page and the argument is useless in this case.
>
> \page[quadruple]

\page[newquadruple]

>> Back Cover
>>
>> \stoptext
>>
>>        texexec --arrange --paperformat=a5a4 --printformat=up test2.tex
>
> texexec test2
>
> you need --arrange only for documents with a table of content, indices ...

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Specifying last page when using imposition
  2008-06-02  8:44           ` Wolfgang Schuster
@ 2008-06-02  9:33             ` John Devereux
  2008-06-02  9:59               ` Wolfgang Schuster
  0 siblings, 1 reply; 14+ messages in thread
From: John Devereux @ 2008-06-02  9:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

"Wolfgang Schuster" <schuster.wolfgang@googlemail.com> writes:

> Hi John,
>
>>> Wolfgang, thanks - but this does not seem to fix the problem. The
>>> "last page" appears opposite page 3 instead of opposite page 1.
>>>
>>> To be clear, I am looking for a way to specify that content is to be
>>> placed on the outside of the cover, i.e. printed on the same side of
>>> the same sheet as page 1, when "arranged".
>
> Could you try the following page brake method.
>
> \unprotect
>
> \installpagebreakhandler {newquadruple}%
>   {\ifdoublesided
>      \!!counta\realpageno
>      \!!countb\realpageno
>      \advance\!!counta 4
>      \divide\!!counta 4
>      \multiply\!!counta 4
>      \advance\!!countb 1
>      \advance\!!counta-\!!countb
>      \executepagebreakhandler\v!yes
>      \dorecurse\!!counta{\executepagebreakhandler\v!empty}%
>    \fi}
>
> \protect
>
>>> \setuppapersize[A5][A4]
>>> \setuparranging[2UP,rotated,doublesided]
>>> \setuppagenumbering[alternative=doublesided]
>>>
>>> \setuplayout[margin=0pt,width=fit]
>>> \setupbodyfont[16pt]
>>>
>>> \starttext
>>>
>>> \dorecurse{11}{\input tufte \par \input knuth \par}
>>>
>>> \page[8]
>>
>> \page[8] is useless in this example because you're already beyound
>> the eight page and the argument is useless in this case.
>>
>> \page[quadruple]
>
> \page[newquadruple]

Well, this worked, thank you!

I can safely say I would not have found that on my own...

Could I trouble you for a version to take me to the page *before*,
i.e. the inside back cover? I now realise I may need to put content
there too, and if not I can just do another \page to get to the
outside back cover.

>
>>> Back Cover
>>>
>>> \stoptext
>>>
>>>        texexec --arrange --paperformat=a5a4 --printformat=up test2.tex
>>
>> texexec test2
>>
>> you need --arrange only for documents with a table of content, indices ...

OK, but my real document *will* have these - this was just a minimal
example. Originally I wanted to put the arrangment commands outside
the document, but I then put them inside too in case it helped.

-- 

John Devereux
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Specifying last page when using imposition
  2008-06-02  9:33             ` John Devereux
@ 2008-06-02  9:59               ` Wolfgang Schuster
  0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Schuster @ 2008-06-02  9:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Jun 2, 2008 at 11:33 AM, John Devereux
<jdREMOVE@thisdevereux.me.uk> wrote:
> "Wolfgang Schuster" <schuster.wolfgang@googlemail.com> writes:
>
>> Hi John,
>>
>>>> Wolfgang, thanks - but this does not seem to fix the problem. The
>>>> "last page" appears opposite page 3 instead of opposite page 1.
>>>>
>>>> To be clear, I am looking for a way to specify that content is to be
>>>> placed on the outside of the cover, i.e. printed on the same side of
>>>> the same sheet as page 1, when "arranged".
>>
>> Could you try the following page brake method.
>>
>> \unprotect
>>
>> \installpagebreakhandler {newquadruple}%
>>   {\ifdoublesided
>>      \!!counta\realpageno
>>      \!!countb\realpageno
>>      \advance\!!counta 4
>>      \divide\!!counta 4
>>      \multiply\!!counta 4
>>      \advance\!!countb 1
>>      \advance\!!counta-\!!countb
>>      \executepagebreakhandler\v!yes
>>      \dorecurse\!!counta{\executepagebreakhandler\v!empty}%
>>    \fi}
>>
>> \protect
>>
>>>> \setuppapersize[A5][A4]
>>>> \setuparranging[2UP,rotated,doublesided]
>>>> \setuppagenumbering[alternative=doublesided]
>>>>
>>>> \setuplayout[margin=0pt,width=fit]
>>>> \setupbodyfont[16pt]
>>>>
>>>> \starttext
>>>>
>>>> \dorecurse{11}{\input tufte \par \input knuth \par}
>>>>
>>>> \page[8]
>>>
>>> \page[8] is useless in this example because you're already beyound
>>> the eight page and the argument is useless in this case.
>>>
>>> \page[quadruple]
>>
>> \page[newquadruple]
>
> Well, this worked, thank you!
>
> I can safely say I would not have found that on my own...
>
> Could I trouble you for a version to take me to the page *before*,
> i.e. the inside back cover? I now realise I may need to put content
> there too, and if not I can just do another \page to get to the
> outside back cover.

\unprotect

\installpagebreakhandler {beforequadruple}%
 {\ifdoublesided
    \!!counta\realpageno
    \!!countb\realpageno
    \advance\!!counta 5
    \divide\!!counta 4
    \multiply\!!counta 4
    \advance\!!countb 2
    \advance\!!counta-\!!countb
    \executepagebreakhandler\v!yes
    \dorecurse\!!counta{\executepagebreakhandler\v!empty}%
  \fi}

\protect

\setuppagenumbering[alternative=doublesided]
\starttext
\showframe
\subject Front Cover

\dorecurse{10}{\input tufte \par}
%\dorecurse{8}{\input tufte \par}

\page[beforequadruple]

Imprint

\page

Back Cover

\stoptext

>>>>        texexec --arrange --paperformat=a5a4 --printformat=up test2.tex
>>>
>>> texexec test2
>>>
>>> you need --arrange only for documents with a table of content, indices ...
>
> OK, but my real document *will* have these - this was just a minimal
> example. Originally I wanted to put the arrangment commands outside
> the document, but I then put them inside too in case it helped.

You could use modes for a imposed and a normal document.

\startmode[fold]
\setuppapersize[A5][A4]
\setuparranging[2UP,rotated,doublesided]
\stopmode

\startnotmode[fold]
\setuppapersize[A5][A5]
\stopnotmode

and process it with

texexec --arrange --mode=fold mydocument

and

texexec mydocument

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-06-02  9:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-02 23:36 standardmakeup, frontmatter, bodymatter & page numbering Mojca Miklavec
2007-10-03 10:54 ` Peter Rolf
2007-10-03 17:33   ` Mojca Miklavec
2007-10-03 18:51     ` Peter Rolf
2007-11-29 19:14 ` Wolfgang Schuster
2007-12-07 16:29   ` Mojca Miklavec
2007-12-08 12:09     ` Wolfgang Schuster
2008-06-01 18:25   ` Specifying last page when using imposition John Devereux
2008-06-02  6:06     ` Wolfgang Schuster
2008-06-02  8:11       ` John Devereux
2008-06-02  8:22         ` Wolfgang Schuster
2008-06-02  8:44           ` Wolfgang Schuster
2008-06-02  9:33             ` John Devereux
2008-06-02  9:59               ` 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).