ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: olivier Turlier <crp.tbeb@wanadoo.fr>
Subject: accents in "funny frame"
Date: Wed, 07 Jul 2004 15:31:40 +0200	[thread overview]
Message-ID: <40EBFB3C.1050704@wanadoo.fr> (raw)

Hello Contexers,
I play with the "funny frame" code given by Hans et al.

How put accentuation (french) in the frame title ?
I use latest context .iso image (ConTeXt ver. 2004.6.21 fmt: 2004.6.21 
int: english mes: english)
Below is the source (compiled with : texmfstart texexec.pl --autopdf 
--pdf funny-french-frame.tex):

----------------------------------------
%funny-french-frame.tex
\enableregime[il1]
\useencoding[ffr]
\mainlanguage[fr]
\enableregime[windows]
\setupindenting[medium]

\usetypescript[palatino][texnansi]
\setupbodyfont[palatino,rm,12pt]

\setupcolors[state=start]


%---------------------------------------------------- funny frame
\startMPenvironment
     \enableregime[il1]                                %
     \useencoding[ffr]                                 %
     \mainlanguage[fr]                                 % not working
     \enableregime[windows]                        %
     \usetypescript[palatino][texnansi]
     \setupbodyfont[palatino,rm,14pt]
\stopMPenvironment

% \startuseMPgraphic{FunnyFrame} %--------- white background, blue 
square frame
% 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

\startuseMPgraphic{FunnyFrame} %---------- grey background, red 
randomized  frame
picture p ; numeric o ; path a, b ; pair c ;
p := textext.rt(\MPstring{FunnyFrame}) ;
a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
o := BodyFontSize ;
p := p shifted (2o,OverlayHeight+ypart center p) ;
drawoptions (withpen pencircle scaled 1.5pt withcolor .625red) ;
b := a randomized (o/2) ;
fill b withcolor .95white ; draw b ;         %---- color of main text
c := center p ;
c := b intersectionpoint (c shifted (0,-o)--c shifted(0,o)) ;
p := p shifted (c-center p) ;
b := (boundingbox p) randomized (o/4) ;
fill b withcolor .90white ; draw b ;         %----- color of title
draw p withcolor blue ;
setbounds currentpicture to a ;
\stopuseMPgraphic




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

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

\def\StartFrame{\startFunnyText}
\def\StopFrame{\stopFunnyText}
\def\FrameTitle#1%
     {\setMPtext{FunnyFrame}{\hbox spread 3em {\ss\bf\hss\strut#1\hss}}}

\setMPtext{FunnyFrame}{}
  %-------------------------------------------------------



\setupheadertexts[\currentpage~/~\lastpage]


\starttext

\FrameTitle{Introduction }
     \StartFrame
         On présente tout ce qui a un rapport avec {\it l'origine} du stage
     \StopFrame

\page

\FrameTitle{Développement}  %---------------------- accent not working
     \StartFrame
         On présente tout le  {\it déroulement} du stage, par groupe de 
tâches
     \StopFrame

\page

\FrameTitle{Conclusion}
     \StartFrame
         \startlines
             On {\it analyse} le stage point par point -- négatif et 
positif --
             on {\it synthétise} l'ensemble des apports,
             et on entrevoit le {\it futur} professionnel {\it concrètement}
         \stoplines
     \StopFrame

\page

\stoptext
---------------------
Thanks for your answer(s)

--

olivier TURLIER

             reply	other threads:[~2004-07-07 13:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-07 13:31 olivier Turlier [this message]
2004-07-28 11:38 ` Hans Hagen
2004-07-28 11:40 ` Hans Hagen

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=40EBFB3C.1050704@wanadoo.fr \
    --to=crp.tbeb@wanadoo.fr \
    --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).