From: Peter Rolf <indiego@gmx.net>
Subject: Re: afterpage
Date: Mon, 28 Aug 2006 22:35:21 +0200 [thread overview]
Message-ID: <44F35389.3050909@gmx.net> (raw)
In-Reply-To: <f35545860608281019h61c96ff4gdffc185929efb9d0@mail.gmail.com>
Hi Paul,
Paul Jones wrote:
> Hello,
>
> I have used Latex in the past and have the following code that inserts
> information on certain pages using afterpage. Is there some way to do a
> similar thing in context?
>
\setupoutput[pdf]
\definelayer[info]
\setuplayer[info]
[height=\paperheight,width=\paperwidth]
\setupbackgrounds[page]
[background={text,info}]% info layer is above normal text layer
\def\WhichPage#1{%
\def\docommand##1{\ifnum\pageno=##1\relax
\setlayerframed[info][x=20mm,y=\dimexpr\paperheight-15mm,location=r]
[background=color,backgroundcolor=white]
{\tfb This page is inserted on page \number\pageno}\fi}%
\rawprocesscommalist[#1]\docommand}%
% put it in a command that is called for every page
\setupheadertexts[\the\pageno\WhichPage{3,4}]
\starttext
\dorecurse{12}{\input zapf\relax
\input tufte\relax}
\stoptext
I hope this fits your needs.
Greetings, Peter
> \usepackage{afterpage}
> \newcommand{\insertpagea}{\vbox to \textheight{\vfill This page inserted
> on page 3 \vfill}}
> \newcommand{\insertpageb}{\vbox to \textheight{\vfill This page inserted
> on page 4 \vfill}}
> \newcommand{\incpage}{\ifthenelse{\value{page}=3}{\insertpagea}{%
>
> \ifthenelse{\value{page}=4}{\insertpageb}{%
> \afterpage{\incpage}}}}
> \afterpage{\incpage}
> \begin{document}
> .
> .
> .
> \end{document}
>
> I am not sure if this could be done at a different level also, maybe
> with texexec or something. I basically have a requirement to insert
> content into a document on a specific page. After doing so the table of
> contents must still be correct.
>
> I am still fairly new in the Tex world so any help you can give will be
> very much appreciated.
>
> Paul
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
next prev parent reply other threads:[~2006-08-28 20:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-28 17:19 afterpage Paul Jones
2006-08-28 20:35 ` Peter Rolf [this message]
2006-08-28 20:55 ` afterpage Hans Hagen
2006-08-28 21:17 ` afterpage Peter Rolf
2006-08-28 21:46 ` afterpage Paul Jones
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=44F35389.3050909@gmx.net \
--to=indiego@gmx.net \
--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).