From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90668 Path: news.gmane.org!not-for-mail From: Norbert Melzer Newsgroups: gmane.comp.tex.context Subject: [MetaFun] Decorating running text Date: Wed, 18 Mar 2015 14:59:06 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1420109212==" X-Trace: ger.gmane.org 1426687201 19609 80.91.229.3 (18 Mar 2015 14:00:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Mar 2015 14:00:01 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 18 14:59:50 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YYEVh-0007wF-L8 for gctc-ntg-context-518@m.gmane.org; Wed, 18 Mar 2015 14:59:49 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CE71B101EA for ; Wed, 18 Mar 2015 14:59:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uAyKtGrx-4PX for ; Wed, 18 Mar 2015 14:59:47 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 13CB91022E for ; Wed, 18 Mar 2015 14:59:13 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4A4ED101EA for ; Wed, 18 Mar 2015 14:59:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BVOV_ke6uVWq for ; Wed, 18 Mar 2015 14:59:08 +0100 (CET) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 9489B101E8 for ; Wed, 18 Mar 2015 14:59:08 +0100 (CET) Original-Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t2IDx6XL022593 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 18 Mar 2015 14:59:07 +0100 Original-Received: by igbue6 with SMTP id ue6so44489941igb.1 for ; Wed, 18 Mar 2015 06:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=eV2uDDgDPZJg6Dl6hPadeVNhQLylPxF/3zP94YUXNyo=; b=H1ZKjT8yW2UClHRMDA2rw/2Y/16SCUky8QAUUjXy7eYOsfwytI1N95A4tsc9Nkvzrf 17TLjMGPzFWnk2VJ2jfdwg5h4mwcpjEaLrX9kPALoV3XY5wzBFRMzAMxfWDyboZgw0D+ EInPlLIOvwdmmM/FISxk7tiJIDMGbsTMPm//4KRJvSCEsfe5+/kb1rzrnxVRMos7R5Fc fVDHkG/WLnHzLk3sK3HD+wow7YC+EWnwUz6LJRRvsZmCPMMFZTe30jI75PBy6NLEelqR Qojd8j1No6bklTaDcfy8cIei6L5y21qJdSRSYSj5RNogG1eAJYqwxPMScydqbWWVhb8n LhZw== X-Received: by 10.50.66.141 with SMTP id f13mr6874438igt.47.1426687146173; Wed, 18 Mar 2015 06:59:06 -0700 (PDT) Original-Received: by 10.42.133.134 with HTTP; Wed, 18 Mar 2015 06:59:06 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4001:c05::230; country=US; latitude=38.0000; longitude=-97.0000; http://maps.google.com/maps?q=38.0000,-97.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07O51X7FE - 8e25bc72eba2 - 20150318 (trained as not-spam) Received-SPF: pass (filter1-utr.mf.surf.net: domain of timmelzer@gmail.com designates 2607:f8b0:4001:c05::230 as permitted sender) receiver=filter1-utr.mf.surf.net; client-ip=2607:f8b0:4001:c05::230; envelope-from=; helo=mail-ig0-x230.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:90668 Archived-At: --===============1420109212== Content-Type: multipart/alternative; boundary=047d7bdc0dd28dac220511907cca --047d7bdc0dd28dac220511907cca Content-Type: text/plain; charset=UTF-8 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. --047d7bdc0dd28dac220511907cca Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi there!

I have some text (a single wo= rd) which I want to decorate using MP.

In this spe= cial 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
\de= fine\Shogun{\startMPcode draw textext("Shogun") \stopMPcode}

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

=
=C2=A0 \placefigure[here][fig:crown]{The crown that shall decorate the= \quote{g} in \quotation{Shogun}}{
=C2=A0 \startMPcode
= =C2=A0 =C2=A0 fill (-20,-17.5)--(20,-17.5)--(30,12.5)--(10,-2.5)--(0,17.5)-= -(-10,-2.5)--(-30,12.5)--cycle
=C2=A0 =C2=A0 =C2=A0 withcolor yel= low ;
=C2=A0 \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. Al= so I don't know how I could ensure that the text and the crown would cr= ow accordingly to the surrounding text.
--047d7bdc0dd28dac220511907cca-- --===============1420109212== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1420109212==--