# [NTG-context] [MetaFun] Decorating running text

Norbert Melzer timmelzer at gmail.com
Wed Mar 18 14:59:06 CET 2015

Hi there!

I have some text (a single word) which I want to decorate using MP.

In this special case, I want to put a little crown above the "g" in the
word "Shogun". Also the crown and text should get scaled accordingly to the
surrounding text.

tex
\define\Shogun{\startMPcode draw textext("Shogun") \stopMPcode}

\starttext
The word \Shogun\ shall be decorated with the crown shown in
fig~\in[fig:crown]:

\placefigure[here][fig:crown]{The crown that shall decorate the \quote{g}
in \quotation{Shogun}}{
\startMPcode
fill
(-20,-17.5)--(20,-17.5)--(30,12.5)--(10,-2.5)--(0,17.5)--(-10,-2.5)--(-30,12.5)--cycle
withcolor yellow ;
\stopMPcode }
\stoptext


I wanted to try to draw the text using MPs draw, but then the baselines
doesn't match as you can see in the example. Also I don't know how I could
ensure that the text and the crown would crow accordingly to the
surrounding text.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150318/522d9853/attachment.html>