ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan BRASLAU <alan.braslau@cea.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Alignment problem with labels and textext
Date: Wed, 13 Feb 2013 11:28:04 +0100	[thread overview]
Message-ID: <20130213112804.39915c38@sole> (raw)
In-Reply-To: <CAPoA6K1xzqcJdeDXGQYHedAVhSYcD8zOFyveGr_NBEXENE-n5w@mail.gmail.com>

On Wed, 13 Feb 2013 11:11:23 +0100
Lutz Haseloff <lutz.haseloff@gmail.com> wrote:

> Hi Keith,
> 
> following testfile perhaps describes my problem better:
> 
> \starttext
> \startMPpage
> drawdot (origin);
> label.rt (textext("right") , origin) ;
> label.top (textext("top") , origin) ;
> label.lft (textext("left") , origin) ;
> label.bot (textext("bottom") , origin) ;
> \stopMPpage
> \stoptext
> 
> If i run it by texexec(mkii), all is ok, with context(mkiv) the labels
> overlap.

I do not know what you expect exactly.
Each textext() label has a bounding box.
This bounding box is then aligned in the case of rt, top, lft, bot
with its appropriate edge centered at the origin.
The lft and rt text thus will not have their baselines aligned, unless you add a \strut.

(This is an issue with the chemical macros.)

Try label.rt (texttext("\strut right"), origin) ;

By the way, you can use:
	draw textext.rt ("\strut right") ;
	draw textext.top("\strut top") ;
	draw textext.lft("\strut left") ;
	draw textext.bot("\strut bottom") ;
which gives a tighter fit than label().



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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2013-02-13 10:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13  5:54 Lutz Haseloff
2013-02-13  9:03 ` Alan BRASLAU
2013-02-13  9:47 ` Keith J. Schultz
2013-02-13 10:11   ` Lutz Haseloff
2013-02-13 10:28     ` Alan BRASLAU [this message]
2013-02-13 10:46     ` Keith J. Schultz
2013-02-13 11:32       ` Lutz Haseloff
2013-02-14  6:02         ` Lutz Haseloff
  -- strict thread matches above, loose matches on Subject: below --
2013-02-12  5:26 Lutz Haseloff

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=20130213112804.39915c38@sole \
    --to=alan.braslau@cea.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).