ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Helmut Schwertner <hschwert@gmx.de>
Subject: special characters and \startuseMPgraphic{FunnyFrame}
Date: Mon, 03 May 2004 20:40:11 +0200	[thread overview]
Message-ID: <4096920B.8070209@gmx.de> (raw)

Hello,

the following example does not work if the text in the 
\FrameTitle{Blockflötenspielen} contains special characters like öäßé etc.

Has someone a solution for this problem?

Thanks a lot,

Helmut


***********************************************************
\mainlanguage[de]
\language[de]
\enableregime[windows]
\setuppapersize[a4][a4]
\setupoutput[pdftex]
\pdfcompresslevel=0

\runMPgraphicstrue

\setupcolors[state=start]

\startuseMPgraphic{FunnyFrame}
  picture p; numeric w, h, o;
  p:=textext.rt(\MPstring{FunnyFrame});
  w:=OverlayWidth; h:=OverlayHeight; o:=BodyFontSize;
  p:=p shifted (2o,h-ypart center p); draw p;
  drawoptions (withpen pencircle scaled 1pt withcolor .625blue);
  draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p, h) ;
  draw boundingbox p;
  setbounds currentpicture to unitsquare xyscaled (w,h);
\stopuseMPgraphic

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]

\defineframedtext[FunnyText][frame=off,background=FunnyFrame]

\def\StartFrame{\startFunnyText}
\def\StopFrame{\stopFunnyText}

\def\FrameTitle#1%
  {\setMPtext{FunnyFrame}{\hbox spread 2em {\hss\strut#1\hss}}}

\setMPtext{FunnyFrame}{}

\starttext

\FrameTitle{Blockflötenspielen}
\StartFrame
These: Blockflötenspielen macht Spaß!
\StopFrame

\stoptext

             reply	other threads:[~2004-05-03 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-03 18:40 Helmut Schwertner [this message]
2004-05-03 18:57 ` Willi Egger
2004-05-03 19:00 ` Mikael Persson

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=4096920B.8070209@gmx.de \
    --to=hschwert@gmx.de \
    --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).