ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: ntg-context@ntg.nl
Subject: Re: repeat a page inside a document
Date: Thu, 6 Feb 2020 20:00:11 +0100	[thread overview]
Message-ID: <6c6d5140-5c69-a877-30c0-e97fcd093898@gmx.es> (raw)
In-Reply-To: <20200206191454.720b6c3e02262060be13c8b5@gmail.com>

On 2/6/20 7:14 PM, Wolfgang Schuster wrote:
> On Thu, 6 Feb 2020 16:28:04 +0100 Pablo Rodriguez wrote:
>> [...]
>> My question is how to get a page from the document you‘re compiling
>> repeated inside the same document.
>>
>> I have tried to search both i-context.pdf and the wiki, but “mirror” and
>> “repeat” seem to be bad options.
>
> You can store each finished page in a box and access the content
> of the stored box afterwards.

Huge thanks for your reply and the code, Wolfgang.

I have just checked “TeX for the Impatient” to understand what shipout
methods and boxes were. I think I can barely grasp their meaning.

Which are other usages for shipouts and boxes? I guess they are used to
add pages in the final PDF document, but I don’t see which other uses
they may have.

BTW, “invokepagehandler” reads “invokepageheandler” in the following
files from the ConTeXt Suite (I don’t know whether the first is the real
source of the rest of them):

* texmf-context/tex/context/interface/mkiv/i-imposition.xml
* texmf-context/tex/context/interface/mkiv/context-en.xml
*
texmf-context/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json
*
texmf-context/context/data/textadept/context/data/scite-context-data-interfaces.lua
*
texmf-context/context/data/scite/context/lexers/data/scite-context-data-interfaces.lua
*
texmf-context/context/data/scite/context/scite-context-data-interfaces.properties

Many thanks again for your help,

Pablo


> \installshipoutmethod{savepages}
>   {\dowithnextbox
>      {\invokepagehandler{normal}{\copy\nextbox}%
>       \putboxincache{savedpages}{\number\realpageno}\nextbox}
>    \hbox}
>
> \setuppaper[method=savepages]
>
> \starttext
>
> \dorecurse{8}
>   {\expanded{\chapter{Chapter \recurselevel}}
>    \dorecurse{\recurselevel}{\samplefile{weisman}}}
>
> \startlayout[page]
> \directboxfromcache{savedpages}{5}
> \page
> \directboxfromcache{savedpages}{2}
> \stoplayout
>
> \stoptext

--
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2020-02-06 19:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 15:28 Pablo Rodriguez
2020-02-06 16:15 ` Henning Hraban Ramm
2020-02-06 18:02   ` Pablo Rodriguez
2020-02-06 19:17     ` Wolfgang Schuster
2020-02-06 21:04       ` Pablo Rodriguez
2020-02-06 21:26         ` Wolfgang Schuster
2020-02-07 20:04           ` Pablo Rodriguez
2020-02-06 16:39 ` Thomas Savary
2020-02-06 18:15   ` Pablo Rodriguez
2020-02-06 18:14 ` Wolfgang Schuster
2020-02-06 19:00   ` Pablo Rodriguez [this message]
2020-02-27 14:24 ` context

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=6c6d5140-5c69-a877-30c0-e97fcd093898@gmx.es \
    --to=oinos@gmx.es \
    --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).