* accents in "funny frame"
@ 2004-07-07 13:31 olivier Turlier
2004-07-28 11:38 ` Hans Hagen
2004-07-28 11:40 ` Hans Hagen
0 siblings, 2 replies; 3+ messages in thread
From: olivier Turlier @ 2004-07-07 13:31 UTC (permalink / 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: accents in "funny frame"
2004-07-07 13:31 accents in "funny frame" olivier Turlier
@ 2004-07-28 11:38 ` Hans Hagen
2004-07-28 11:40 ` Hans Hagen
1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2004-07-28 11:38 UTC (permalink / raw)
olivier Turlier wrote:
> 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
i've fixed this (some merge of verbatim tex into textext problem); i'll
send you a new texexec.pl
btw, this saves keying:
\startMPenvironment[global]
\enableregime[il1]
\useencoding[ffr]
\mainlanguage[fr]
\enableregime[windows]
\usetypescript[palatino][texnansi]
\setupbodyfont[palatino,rm,12pt]
\stopMPenvironment
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: accents in "funny frame"
2004-07-07 13:31 accents in "funny frame" olivier Turlier
2004-07-28 11:38 ` Hans Hagen
@ 2004-07-28 11:40 ` Hans Hagen
1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2004-07-28 11:40 UTC (permalink / raw)
olivier Turlier wrote:
> Hello Contexers,
> I play with the "funny frame" code given by Hans et al.
>
> How put accentuation (french) in the frame title ?
actually the problem was that you stayed in computer modern default
encoding and didn't get palatino at all
Hans
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-07-28 11:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-07 13:31 accents in "funny frame" olivier Turlier
2004-07-28 11:38 ` Hans Hagen
2004-07-28 11:40 ` Hans Hagen
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).