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
_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to