ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "śrīrāma via ntg-context" <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: śrīrāma <citturs@gmail.com>
Subject: Double-sided documents with MetaFun's Field[Text][Text]
Date: Mon, 07 Feb 2022 07:49:27 +0530	[thread overview]
Message-ID: <4386378.LvFx2qVVIh@sreeramtplt> (raw)

Dear list,

I have a double-sided document in which I want to draw certain page 
backgrounds on the right (odd) and left (even) pages. Here is an example

%%% SOF
    \setuppagenumbering[alternative=doublesided]
    \setuplayout
            [backspace=4cm,
            leftmargin=4cm,
            cutspace=2cm,
            rightmargin=2cm,
    leftmargindistance=0cm,
    rightmargindistance=0cm,
                header=2cm,
                footer=2cm,
            topspace=1cm,
            bottomspace=1cm,
                    top=1cm,
                bottom=1cm,
                width=middle,
                height=fit]

    \startuseMPgraphic{page}
    StartPage;
        draw Area[Text][Text] 
            shifted (InnerMarginWidth,BottomHeight+FooterHeight);
        draw Field[Text][Text] withcolor blue;
    StopPage;
    \stopuseMPgraphic
    \defineoverlay[page][\useMPgraphic{page}]
    \setupbackgrounds[page][background=page]

    \starttext
    \dorecurse{10}{\input knuth \page}
    \stoptext
%%% EOF

In the resulting PDF the Field[Text][Text] path is not positioned (/computed?) 
correctly, while the manually positioned Area[Text][Text] path is as expected. 
So, it seems that the margin widths and other distance are updated for each 
odd, even page but Field[Text][Text] is still wrong? The Field[Text][Text] 
path appears on every page as though it is on an odd (right) page.

Have I missed something?

Thanks,
śrīrāma (Sreeram)


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

             reply	other threads:[~2022-02-07  2:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07  2:19 śrīrāma via ntg-context [this message]
2022-02-07  6:39 ` śrīrāma via ntg-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=4386378.LvFx2qVVIh@sreeramtplt \
    --to=ntg-context@ntg.nl \
    --cc=citturs@gmail.com \
    /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).