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
___________________________________________________________________________________

Reply via email to