ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Norbert Melzer <timmelzer@gmail.com>
To: ntg-context@ntg.nl
Subject: [MetaFun] Decorating running text
Date: Wed, 18 Mar 2015 14:59:06 +0100	[thread overview]
Message-ID: <CA+bCVss9AhdnYBfpCbEmoRAHq_8yJrYEShmC4NOPMFYmDBM-ZA@mail.gmail.com> (raw)


[-- 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
___________________________________________________________________________________

                 reply	other threads:[~2015-03-18 13:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CA+bCVss9AhdnYBfpCbEmoRAHq_8yJrYEShmC4NOPMFYmDBM-ZA@mail.gmail.com \
    --to=timmelzer@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).