Printing and Coloring a formula.

We define a map"Size" changing size of a text, a map "BoldFace" making a text boldface, a map "Col" coloring a text.

In[55]:=

Size[S_] := StyleForm[S, FontSize FormulaSize] ; BoldFace[S_] := StyleForm[S, FontWeight->"Bold"] ; Col[S_, col_] := StyleForm[S, FontColor col] ;

In order to use the map Size, we have first to set the parameter FormulaSize to a particular size, say:

In[58]:=

FormulaSize = 18 ;

We introduce two individuals, Eloise and Abelard, which we call players. We introduce two colors, a kind of pink and a kind of blue, several versions for each of them. We call pink Eloise's color, and blue Abelard's color.

In[59]:=

EloiseCol = Merge[HotPink, Red] ; EloiseLightCol = HotPink ; EloisePaleCol = M ... belardCol = NavyBlue ; AbelardLightCol = RoyalBlue ; AbelardPaleCol = LightBlue ;

We define a map sending the name Eloise into Eloise's color, and the name Abelard into Abelard's color.

In[65]:=

PlayerCol[p_] := If[p"Eloise", EloiseCol, AbelardCol] ; PlayerLightCol[p_] : ... LightCol] ; PlayerPaleCol[p_] := If[p"Eloise", EloisePaleCol, AbelardPaleCol] ;


Created by Mathematica  (October 17, 2006)