ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: repeat a page inside a document
Date: Thu, 6 Feb 2020 19:14:54 +0100	[thread overview]
Message-ID: <20200206191454.720b6c3e02262060be13c8b5@gmail.com> (raw)
In-Reply-To: <762a1f0b-7667-20c0-2a8a-80f48629034e@gmx.es>

On Thu, 6 Feb 2020 16:28:04 +0100
Pablo Rodriguez <oinos@gmx.es> wrote:

> Dear list,
> 
> I have the following sample:
> 
>     \starttext
>     \input knuth
>     \page[right]
>     \setuplayout[page]
>         \externalfigure[\jobname.pdf][page=1]
>     \stoptext
> 
> 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.

\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

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

  parent reply	other threads:[~2020-02-06 18:14 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 [this message]
2020-02-06 19:00   ` Pablo Rodriguez
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=20200206191454.720b6c3e02262060be13c8b5@gmail.com \
    --to=wolfgang.schuster.lists@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).