ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* A document composed only of TEXpages
@ 2016-03-03 18:49 Chicho Pep
  2016-03-04 11:57 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Chicho Pep @ 2016-03-03 18:49 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2197 bytes --]

Hello everybody,

I would like to have a document composed of TEXpages only, where each
TEXpage contains one whole subsection or section. I have achieved that
indeed, but I don't get to understand how the numbering of pages works in
this case. I've tried to use \setcounter[userpage][\pagenumber+1]. Here is
my document:

***

\setupinteraction[state=start]

\startsetups[myTEXpagesetup]
  \setupwhitespace[line]
  \setuptolerance[space]
\stopsetups

\setupfittingpage[TEXpage]
  [command=\texsetup{myTEXpagesetup},
   height=fit,
   width=210mm,
   offset=10mm]

\starttext

\startTEXpage
\startsection[title={My Section}]
\placecontent
\stopTEXpage

\setcounter[userpage][\pagenumber+1]

\startTEXpage
\startsubsection[title={My First Subsection}]
Contents
\stopsubsection
\stopTEXpage

\setcounter[userpage][\pagenumber+1]

\startTEXpage
\startsubsection[title={My Second Subsection}]
Contents
\stopsubsection
\stopTEXpage

\setcounter[userpage][\pagenumber+1]

\startTEXpage
\startsubsection[title={My Third Subsection}]
Contents
\stopsubsection
\stopTEXpage

\stopsection

\stoptext

***

The PDF browser numbers the pages correctly, and in this case they get
numbers 1 to 4. But the generated list of contents in page 1 says that
section "My Third Subsection" is in page 3 instead of 4, though the link
correctly jumps to page 4. The (sub)section in the last TEXpage of the
document gets always numbered as if it would be in the next to last TEXpage.

To make the list of contents look good, I may add one last empty TEXpage at
the end of the document. But I'd still like to ask how, or if, it would be
possible to make this use case work without that trick.

There's a pair more things:

When the document is composed of only one single TEXpage, then that page
gets number 0 in the PDF browser, instead of number 1.

When I don't use \setcounter[userpage][\pagenumber+1] in between the
TEXpages, they get numbers 1,1,1,2 in the PDF browser, while the list of
contents says my subsections are in pages 1,1,0 (but the links jump always
to the correct page).

Thank you for your help

Pep

p.s. As PDF browsers, I use Evince, Okular and Firefox's built-in PDF Viewer

p.p.s. I love ConTeXt :)

[-- Attachment #1.2: Type: text/html, Size: 2519 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 2+ messages in thread

* Re: A document composed only of TEXpages
  2016-03-03 18:49 A document composed only of TEXpages Chicho Pep
@ 2016-03-04 11:57 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2016-03-04 11:57 UTC (permalink / raw)
  To: ntg-context

On 3/3/2016 7:49 PM, Chicho Pep wrote:
> Hello everybody,
>
> I would like to have a document composed of TEXpages only, where each
> TEXpage contains one whole subsection or section. I have achieved that
> indeed, but I don't get to understand how the numbering of pages works
> in this case. I've tried to use \setcounter[userpage][\pagenumber+1].

TEXpage etc is probably not the best mechanism to use for that as it is 
just a vbox

in the test suite there is a file experiment-001.tex that shows you a 
trick (maybe that should be module)

> Here is my document:
>
> ***
>
> \setupinteraction[state=start]
>
> \startsetups[myTEXpagesetup]
>    \setupwhitespace[line]
>    \setuptolerance[space]
> \stopsetups
>
> \setupfittingpage[TEXpage]
>    [command=\texsetup{myTEXpagesetup},
>     height=fit,
>     width=210mm,
>     offset=10mm]
>
> \starttext
>
> \startTEXpage
> \startsection[title={My Section}]
> \placecontent
> \stopTEXpage
>
> \setcounter[userpage][\pagenumber+1]
>
> \startTEXpage
> \startsubsection[title={My First Subsection}]
> Contents
> \stopsubsection
> \stopTEXpage
>
> \setcounter[userpage][\pagenumber+1]
>
> \startTEXpage
> \startsubsection[title={My Second Subsection}]
> Contents
> \stopsubsection
> \stopTEXpage
>
> \setcounter[userpage][\pagenumber+1]
>
> \startTEXpage
> \startsubsection[title={My Third Subsection}]
> Contents
> \stopsubsection
> \stopTEXpage
>
> \stopsection
>
> \stoptext
>
> ***
>
> The PDF browser numbers the pages correctly, and in this case they get
> numbers 1 to 4. But the generated list of contents in page 1 says that
> section "My Third Subsection" is in page 3 instead of 4, though the link
> correctly jumps to page 4. The (sub)section in the last TEXpage of the
> document gets always numbered as if it would be in the next to last TEXpage.
>
> To make the list of contents look good, I may add one last empty TEXpage
> at the end of the document. But I'd still like to ask how, or if, it
> would be possible to make this use case work without that trick.
>
> There's a pair more things:
>
> When the document is composed of only one single TEXpage, then that page
> gets number 0 in the PDF browser, instead of number 1.
>
> When I don't use \setcounter[userpage][\pagenumber+1] in between the
> TEXpages, they get numbers 1,1,1,2 in the PDF browser, while the list of
> contents says my subsections are in pages 1,1,0 (but the links jump
> always to the correct page).
>
> Thank you for your help
>
> Pep
>
> p.s. As PDF browsers, I use Evince, Okular and Firefox's built-in PDF Viewer
>
> p.p.s. I love ConTeXt :)
>
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2016-03-04 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-03 18:49 A document composed only of TEXpages Chicho Pep
2016-03-04 11:57 ` Hans Hagen

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).