ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan Braslau <braslau.list@comcast.net>
To: Henri Menke <henrimenke@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Wrong MetaPost text output
Date: Sun, 11 Aug 2019 14:19:41 -0600	[thread overview]
Message-ID: <20190811141941.524bb962@poo.hsd1.co.comcast.net> (raw)
In-Reply-To: <80374662-9b9e-3e61-ebac-e52de8cd2b2d@gmail.com>

On Sun, 11 Aug 2019 11:12:55 -0700
Henri Menke <henrimenke@gmail.com> wrote:

> Thank you for the quick repsonse.  This looks good to me.  However,
> could you tell me a way to get the correct baseline with textext?  When
> I use
> 
>     \startMPpage
>     draw btex dummy etex shifted (0,0);
>     draw btex foo   etex shifted (1.5cm,0);
>     \stopMPpage
> 
> the baseline is the one that I would expect from TeX, i.e. at the depth
> of the “y” is removed or otherwise correctly accounted for.  In contrast
> when I use
> 
>     \startMPpage
>     draw textext("dummy") shifted (0,0);
>     draw textext("foo")   shifted (1.5cm,0);
>     \stopMPpage
> 
> the baseline will be below the depth of the “y” which is sometimes
> unwanted.

textext() is actually textext@#()
so you can use textext.top() for example
to put the *bottom* of the text bounding box at y=0.
Without any @# suffix, the text bounding box gets centered at y=0.

Metafun has a few *new* suffixes defined, so you can use
textext.d(), textext.dlft(), textext.drt(), I BELIEVE,
to position with respect to the tex baseline.
(you need to check this).

Alan
___________________________________________________________________________________
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:[~2019-08-11 20:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-11 16:09 Henri Menke
2019-08-11 17:30 ` Hans Hagen
     [not found]   ` <02a522d1-29a6-09f2-2818-8007f2bf088c@xs4all.nl>
2019-08-11 18:12     ` Henri Menke
2019-08-11 20:19       ` Alan Braslau [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=20190811141941.524bb962@poo.hsd1.co.comcast.net \
    --to=braslau.list@comcast.net \
    --cc=henrimenke@gmail.com \
    --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).