ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: pmlists@free.fr (Peter Münster)
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: undesired offset with \position (was: Re: Replacing a piece of a paper)
Date: Tue, 11 Jan 2011 21:32:12 +0100	[thread overview]
Message-ID: <87vd1vnpv7.fsf@micropit.couberia.bzh> (raw)
In-Reply-To: <op.vo5km7jitpjj8f@lpr> (=?utf-8?B?IlByb2Now6F6a2EgTHVrw6E=?= =?utf-8?B?xaE=?= Ing. - Pontex s. r. o."'s message of "Tue, 11 Jan 2011 17:41:21 +0100")

Procházka Lukáš Ing. - Pontex s. r. o. <LPr@pontex.cz> writes:

> Would it be possible to provide a small example of such processing an
> arbitrary file?

Yes.


> I can send a sample A2 or A1 PDF, and also a replacing A4, if necessary.

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

-- 
Peter Münster

Contact information: http://pmrb.free.fr/contact/
___________________________________________________________________________________
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
___________________________________________________________________________________

  parent reply	other threads:[~2011-01-11 20:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 16:41 Replacing a piece of a paper 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 ` Peter Münster [this message]
2011-01-12  8:39   ` Procházka Lukáš Ing. - Pontex s. r. o.
2011-01-12  9:30     ` 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=87vd1vnpv7.fsf@micropit.couberia.bzh \
    --to=pmlists@free.fr \
    --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).