ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [MetaFun] Decorating running text
@ 2015-03-18 13:59 Norbert Melzer
  0 siblings, 0 replies; only message in thread
From: Norbert Melzer @ 2015-03-18 13:59 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 911 bytes --]

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.

[-- Attachment #1.2: Type: text/html, Size: 1215 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-18 13:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18 13:59 [MetaFun] Decorating running text Norbert Melzer

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).