ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Oliver Buerschaper <oliver.buerschaper@mpq.mpg.de>
To: Taco Hoekwater <taco@elvenkind.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: textext vs. btex ... etex
Date: Sun, 22 Aug 2010 09:53:48 +0200	[thread overview]
Message-ID: <FE2CA382-7E99-49E5-A132-378194E69E86@mpq.mpg.de> (raw)
In-Reply-To: <4C6FE76E.2030407@elvenkind.com>

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

>> Now onto step two: how can I typeset each glyph in the formula individually such that it appears precisely in the right location?
> 
> I must be misreading something here, but I cannot figure out what
> 'the right location' means.

Since textext() always returns a single picture that can't be decomposed into smaller building blocks


[-- Attachment #2: mkiv3.pdf --]
[-- Type: application/pdf, Size: 8642 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1454 bytes --]



Hans suggested to textext() each desired snippet individually. So I tried

---
\setupbodyfont[10pt]



\starttext


\startMPinclusions
    pickup pencircle scaled 0.05pt;
    defaultpen := savepen;
    
    picture crosshair;
    crosshair := image(draw fullcircle scaled 2pt;
                       draw (0,-2pt)--(0,2pt);
                       draw (-2pt,0)--(2pt,0);
                      );
    
    bboxmargin := 0;
\stopMPinclusions



\startMPpage    
    for item within rawtextext("$(h,g)$"):
        draw bbox item withcolor 0.8white;
        draw item;
    endfor;
    
    draw crosshair;
\stopMPpage


\startMPpage    
    draw bbox rawtextext("$($") withcolor 0.8white;
    draw rawtextext("$($");
    
    draw bbox rawtextext("$h$") withcolor 0.8white;
    draw rawtextext("$h$");
    
    draw bbox rawtextext("$,$") withcolor 0.8white;
    draw rawtextext("$,$");
    
    draw bbox rawtextext("$g$") withcolor 0.8white;
    draw rawtextext("$g$");
    
    draw bbox rawtextext("$)$") withcolor 0.8white;
    draw rawtextext("$)$");
    
    draw crosshair;
\stopMPpage


\stoptext
---

Clearly, this gives me each glyph individually but stacked on top of each other. What I need though is that the second figure looks exactly like the first one (with all glyphs in the right location) except that the grey bounding boxes appear per glyph.

Thanks for your help,
Oliver

[-- Attachment #4: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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:[~2010-08-22  7:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 14:32 Oliver Buerschaper
2010-08-17 15:34 ` Hans Hagen
2010-08-18 12:20   ` Oliver Buerschaper
2010-08-18 13:02     ` Khaled Hosny
2010-08-18 14:00       ` Oliver Buerschaper
2010-08-18 14:34     ` Hans Hagen
2010-08-21 14:24       ` Oliver Buerschaper
2010-08-21 14:49         ` Taco Hoekwater
2010-08-22  7:53           ` Oliver Buerschaper [this message]
2010-08-22  9:32             ` Taco Hoekwater
2010-08-24  9:31               ` Oliver Buerschaper
2010-08-24 10:19                 ` Taco Hoekwater

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=FE2CA382-7E99-49E5-A132-378194E69E86@mpq.mpg.de \
    --to=oliver.buerschaper@mpq.mpg.de \
    --cc=ntg-context@ntg.nl \
    --cc=taco@elvenkind.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).