ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Procházka Lukáš Ing. - Pontex s. r. o." <LPr@pontex.cz>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Replacing a piece of a paper
Date: Wed, 12 Jan 2011 09:39:03 +0100	[thread overview]
Message-ID: <op.vo6szddytpjj8f@lpr> (raw)
In-Reply-To: <87vd1vnpv7.fsf@micropit.couberia.bzh>

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.

Best regards,

Lukas


On Tue, 11 Jan 2011 21:32:12 +0100, Peter Münster <pmlists@free.fr> wrote:

> Not necessary, context can produce such files for you.
>
> Example, using positioning macros, that shows also a problem with
> vertical offset:
>
> --8<---------------cut here---------------start------------->8---
> % Produce A2-example:
> \startbuffer[a2]
> \setuppapersize[A2]
> \setuplayout[page]
> \setupbackgrounds[page][background=color, backgroundcolor=blue]
> \starttext
> \input tufte
> \stoptext
> \stopbuffer
> \savebuffer[a2][a2-page.tex]
> \executesystemcommand{context a2-page}
>
> % Produce A4-example:
> \startbuffer[a4]
> \setuppapersize[A4]
> \setuplayout[page]
> \starttext
> \input tufte
> \stoptext
> \stopbuffer
> \savebuffer[a4][a4-page.tex]
> \executesystemcommand{context a4-page}
>
> % Do the job:
> \setuppapersize[A2]
> \setuplayout[page]
> \setuppositioning[state=overlay,
>   yoffset=-12pt%%%%%%%%%%%%%%%%%%%%%%% Why is this offset needed???
> ]
> \starttext
> \startpositioning
>   \position(0,0){\externalfigure[a2-page]}
>   \position(0,0){\framed[frame=off, offset=overlay, background=color,
>       backgroundcolor=white]{\externalfigure[a4-page]}}
> \stoppositioning
> \stoptext
> --8<---------------cut here---------------end--------------->8---
>


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
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  8:39 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   ` Procházka Lukáš Ing. - Pontex s. r. o. [this message]
2011-01-12  9:30     ` Replacing a piece of a paper Wolfgang Schuster
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=op.vo6szddytpjj8f@lpr \
    --to=lpr@pontex.cz \
    --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).