ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Chicho Pep <chichopep@gmail.com>
To: ntg-context@ntg.nl
Subject: A document composed only of TEXpages
Date: Thu, 3 Mar 2016 19:49:40 +0100	[thread overview]
Message-ID: <CAFErUDC9Mz08ud+UkOOWxyOSfOCTvHncTzXHhdoGWNWtvXezPw@mail.gmail.com> (raw)


[-- 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
___________________________________________________________________________________

             reply	other threads:[~2016-03-03 18:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 18:49 Chicho Pep [this message]
2016-03-04 11:57 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFErUDC9Mz08ud+UkOOWxyOSfOCTvHncTzXHhdoGWNWtvXezPw@mail.gmail.com \
    --to=chichopep@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).