From: Hans Hagen <pragma@wxs.nl>
To: ntg-context@ntg.nl
Subject: Re: A document composed only of TEXpages
Date: Fri, 4 Mar 2016 12:57:51 +0100 [thread overview]
Message-ID: <56D9783F.1050903@wxs.nl> (raw)
In-Reply-To: <CAFErUDC9Mz08ud+UkOOWxyOSfOCTvHncTzXHhdoGWNWtvXezPw@mail.gmail.com>
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
___________________________________________________________________________________
prev parent reply other threads:[~2016-03-04 11:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 18:49 Chicho Pep
2016-03-04 11:57 ` Hans Hagen [this message]
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=56D9783F.1050903@wxs.nl \
--to=pragma@wxs.nl \
--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).