From: Xan <dxpublica@telefonica.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Metafun does not change color
Date: Thu, 18 Feb 2010 22:03:37 +0100 [thread overview]
Message-ID: <4B7DAB29.6020301@telefonica.net> (raw)
Hi,
I have the following code (see at final). I define SquareText to be
darkblue in framecolor, but metafun use darkred. Why? Any ideas?
Xan.
\page
\section{Tectònica de plaques}
\subsection{Com es formen els relleus?}
\setupFLOWcharts[width=.4\textwidth]
\startFLOWchart[fixistes]
\startFLOWcell
\name {Fonts}
\location {1,1}
\text {Algunes teories es basaven en relats bíblics. Atribuïen al
diluvi universal la causa d'alguns relleus i la presència de fòssils
marins a les muntanyes.}
\connection [rl] {fixistes}
\shape{procedure}
\stopFLOWcell
\startFLOWcell
\name {fixistes}
\location{2,1}
\text {Altres suposaven que la Terra s'ha anat arrugat progressivament
en refredar-se i que els relleus són arrugues provocades per l'escorça
en contracció.}
\shape{decision}
\stopFLOWcell
\stopFLOWchart
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame]
\def\StartFrame{\startFunnyText}
\def\StopFrame {\stopFunnyText }
\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
\setMPtext{FunnyFrame}{} % initialize the text variable
\startuseMPgraphic{FunnyFrame}
picture p ; numeric o ; path a, b ; pair c ;
p := textext.rt(\MPstring{FunnyFrame}) ;
o := BodyFontSize ;
a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
pickup pencircle scaled OverlayLineWidth ;
b := a superellipsed .95 ;
fill b withcolor OverlayColor ;
draw b withcolor OverlayLineColor ;
b := (boundingbox p) superellipsed .95 ;
fill b withcolor OverlayColor ;
draw b withcolor OverlayLineColor ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\setupframedtexts
[FunnyText]
[backgroundcolor=lightgray,
framecolor=darkred,
rulethickness=2pt,
offset=\bodyfontsize,
before={\blank[big,medium]},
after={\blank[big]},
width=\textwidth]
\FrameTitle{Teories fixistes}
\StartFrame
Al llarg del segle XIX i el començament del XX, es crearen diverses
teories que intentaven explicar l'origen de les serrelades i el
plegament dels estrats, que no podem explicar fàcilment.
Totes aquestes teories tenen com a {\bf principi} que els continents i
els oceans han ocupat les {\em mateixes posicions} des de l'origen de la
Terra fins ara.
\StopFrame
\FLOWchart[fixistes]
\defineoverlay[SquareFrame][\useMPgraphic{SquareFrame}]
\defineframedtext[SquareText][frame=off,background=SquareFrame]
\def\StartSquareFrame{\startSquareText}
\def\StopSquareFrame {\stopSquareText }
\def\SquareTitle#1%
{\setMPtext{SquareFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
\setMPtext{SquareFrame}{} % initialize the text variable
\startuseMPgraphic{SquareFrame}
picture p ; numeric o ; path a, b ; pair c ;
p := textext.rt(\MPstring{SquareFrame}) ;
a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
o := BodyFontSize ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
b := a randomized (o/2) ;
fill b withcolor .85white ; draw b ;
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/8) ;
fill b withcolor .85white ; draw b ;
draw p withcolor black;
setbounds currentpicture to a ;
\stopuseMPgraphic
\setupframedtexts
[SquareText]
[backgroundcolor=screen,
framecolor=darkblue,
rulethickness=2pt,
offset=\bodyfontsize,
before={\blank[big,medium]},
after={\blank[big]},
width=\textwidth]
\SquareTitle{Mobilisme}
\StartSquareFrame
El 1912, Alfred Wegener proposa una teoria revolucionària
\StopSquareFrame
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2010-02-18 21:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-18 21:03 Xan [this message]
2010-02-19 12:59 ` Hans Hagen
2010-02-19 13:25 ` Xan
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=4B7DAB29.6020301@telefonica.net \
--to=dxpublica@telefonica.net \
--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).