From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: How can I use a variable for a MetaPost coordinate ?
Date: Thu, 5 Oct 2023 08:05:44 +0200 [thread overview]
Message-ID: <852514a4-aad4-464f-b178-b08adadd13f1@uni-bonn.de> (raw)
In-Reply-To: <61545EF6-8B7A-4FDA-A374-0A69AB077D00@icloud.com>
Have a look at chapter 6.4 of the metafun manual. You need StartPage ...
StopPage in your MPcode, then you can knock yourself out by using
variables such as PaperHeight or TextHeight and do all sorts of
calculations.
All best
Thomas
On 10/5/23 05:54, peter.hopcroft--- via ntg-context wrote:
> Hello list, I want to draw lines on a page. I want to pass my line
> coordinates as a percent of \width or \textheight, rather than as
> millimetres. So that if I change the page size I don't need to change
> the coordinates. The MWE below compiles but the pdf does not have any
> lines drawn on it. Is there a way of doing calculations on the
> coordinates for the draw using ConTexT variables like \textheight? Thank
> you, Peter Hopcroft
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id}
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2023-10-05 6:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 3:54 [NTG-context] " peter.hopcroft--- via ntg-context
2023-10-05 6:05 ` Thomas A. Schmitz [this message]
2023-10-06 3:03 ` [NTG-context] " peter.hopcroft--- 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=852514a4-aad4-464f-b178-b08adadd13f1@uni-bonn.de \
--to=thomas.schmitz@uni-bonn.de \
--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).