ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Floris van Manen via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Floris van Manen <vm@klankschap.nl>
Subject: Re: metafun: circular arc
Date: Wed, 6 Oct 2021 07:36:42 +0200	[thread overview]
Message-ID: <a4c317fc-3bba-edc9-2181-b446d78d5de8@klankschap.nl> (raw)
In-Reply-To: <0f3be5cc-7fbe-2394-8e5b-a0d847592469@uni-bonn.de>

In the example the text is drawn as:

draw followtext(q, "\strut TEXT ONE")


it looks as if the \strut generates a space before the text.
e.g. if you omit the \strut, the text will align at the start point.
In my perception, the \strut is a zero width box, so it should not 
generate the space before.
But I might be wrong here (most likely ;-)

.F




On 05/10/2021 23:32, Thomas A. Schmitz via ntg-context wrote:
> 
> \startuseMPgraphic{empedocless}
> path p, q, r ;
> pair a ;
> 
> p := fullcircle scaled 10cm ;
> drawarrow p              withpen pencircle scaled 1mm withcolor red ;
> draw        point 0 of p withpen pencircle scaled 1mm withcolor blue ;
> q := p cutafter (point .4 along p) ;
> drawarrow q              withpen pencircle scaled .5mm withcolor green ;
> draw followtext(q, "\strut TEXT ONE") ;
> 
> p := fullcircle scaled 8cm ;
> drawarrow p              withpen pencircle scaled 1mm withcolor cyan ;
> draw        point 0 of p withpen pencircle scaled 1mm withcolor magenta ;
> q := p cutafter (point .3 along p) ;
> q := q rotated 120 ;
> drawarrow q              withpen pencircle scaled .5mm withcolor yellow ;
> draw followtext(q, "\strut TEXT TWO") ;
> 
> % the real deal: best make a macro for this
> 
> p := fullcircle scaled 6cm ;
> draw        point 0 of p withpen pencircle scaled 5mm withcolor blue ;
> drawarrow p              withpen pencircle scaled 1mm withcolor red ;
> a := (point eps of p) rotated 45 ;
> draw a withpen pencircle scaled 2mm;
> q := p cutafter a ;
> q := q rotated 20 ;
> drawarrow q              withpen pencircle scaled .5mm withcolor green ;
> draw followtext(q, "\strut TEXT TWO") ;
> 
> \stopuseMPgraphic
> 
> \useMPgraphic{empedocless}
___________________________________________________________________________________
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:[~2021-10-06  5:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 14:58 Thomas A. Schmitz via ntg-context
2021-10-05 16:38 ` Hans Hagen via ntg-context
2021-10-05 21:32   ` Thomas A. Schmitz via ntg-context
2021-10-06  5:36     ` Floris van Manen via ntg-context [this message]

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=a4c317fc-3bba-edc9-2181-b446d78d5de8@klankschap.nl \
    --to=ntg-context@ntg.nl \
    --cc=vm@klankschap.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).