ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Replacing a piece of a paper
Date: Wed, 12 Jan 2011 10:30:39 +0100	[thread overview]
Message-ID: <F75475EE-D12F-461B-9384-F8C7F0BD1DC3@gmail.com> (raw)
In-Reply-To: <op.vo6szddytpjj8f@lpr>


Am 12.01.2011 um 09:39 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> Hello,
> 
> thanks to all for the answers, Peter's solution is closest to that I need. My code now is:
> 
> ---
> \setuppapersize[A1,landscape]
> \setuplayout[page]
> \setuppositioning
>  [state=overlay,
>   yoffset=-12pt % Why?
>  ]
> 
> \starttext
>  \startpositioning
>    \position(0,0){\rotate[rotation=90]{\externalfigure[TvNK]}}
>    \position(630mm,297mm){\framed[frame=off,offset=overlay,background=color,backgroundcolor=white]
>                          {\externalfigure[_R]}}
>  \stoppositioning
> \stoptext
> ---
> 
> I'd still have two questions:
> 
> - Is it possible to determine the size of the PDF being inserted (in my case the "TvNK", which is A1)? I'd need to know this because depending on this, I'd need to \setuppapersize[<size-of-PDF-to-be-inserted>,landscape].
> 
> - Is it possible to "move" the origin for \positioning to the right bottom corner? It's not "fatal" to know it, as having the PDF size known, I can evaluate 630mm = width.of.A1 - width.of.A4 and 297 = height.of.A1 - height.of.A4;  I'm just curious.

\define[2]\Replacement
  {\startTEXpage[background={foreground,replacement}]%
   \layeredtext
     [corner={right,bottom},location={left,top}]
     [background=color,backgroundcolor=white,offset=0pt]
     {\externalfigure[#2]}
     {\externalfigure[#1]}
   \stopTEXpage}

\useexternalfigure[big]  [hacker][scale=3000]
\useexternalfigure[small][cow]

\starttext
\Replacement{big}{small}
\stoptext

\layeredtext is described in the details manuals.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2011-01-12  9:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 16:41 Procházka Lukáš Ing. - Pontex s. r. o.
2011-01-11 16:45 ` Mojca Miklavec
2011-01-11 17:32   ` Procházka Lukáš Ing. - Pontex s. r. o.
2011-01-11 17:59     ` Aditya Mahajan
2011-01-11 18:26       ` Hans Hagen
2011-01-12  8:45     ` zs
2011-01-11 16:53 ` luigi scarso
2011-01-11 20:32 ` undesired offset with \position (was: Re: Replacing a piece of a paper) Peter Münster
2011-01-12  8:39   ` Replacing a piece of a paper Procházka Lukáš Ing. - Pontex s. r. o.
2011-01-12  9:30     ` Wolfgang Schuster [this message]
2011-01-12 10:56       ` Procházka Lukáš Ing. - Pontex s. r. o.
2011-01-12 11:02         ` luigi scarso
2011-01-12 11:03         ` Wolfgang Schuster

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=F75475EE-D12F-461B-9384-F8C7F0BD1DC3@gmail.com \
    --to=schuster.wolfgang@googlemail.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).