MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

a problem with math database

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: a problem with math database
  • From: Frederic Udina <udina at upf.es>
  • Date: Mon, 17 Feb 92 17:22:08 WET

hello there:


I am programming a couple of functions to allow Mathematica produce
output valid for formula format in Microsoft Word.
All works fine
BUT
when I try to define a little database for fine output of the greek letters 
I have found this big problem:

If I define a function gkstr with:

----------------------------------------------
  Clear[gkstr];

gkstr[zeta]="{\\f23 \\i{z}}" /; !TrueQ[$WordForm];
gkstr[Zeta]="{\\f23 \\i{Z}}" /; !TrueQ[$WordForm];

gkstr[psi]="{\\f23 \\i{y}}" /; !TrueQ[$WordForm];
gkstr[Psi]="{\\f23 \\i{Y}}" /; !TrueQ[$WordForm];


gkstr[sim_Symbol]:=ToString[sim];


________________________________________________

all works fine. Notice the last definition, it says that if no definition
for a symbol, gkstr acts as ToString. It works:


In[37]:= gkstr[Zeta]

Out[37]= {\f23 \i{Z}}

In[38]:= gkstr[foo]

Out[38]= foo


But if I try to set up a much larger database (you can see my definitions at 
the end of this mail), this is I get

In[40]:= gkstr[Zeta]

Out[40]= {\f23 \i{Z}}

In[41]:= gkstr[foo]

Out[41]= gkstr[foo]


It seems like the last definition, the "default" case, does not work at all.


Can someone give me some help?????????


Frederic Udina
Universitat Pompeu Fabra
Barcelona


********************************************************
This is my 'large' database.
********************************************************
Clear[gkstr];

gkstr[alpha]="{\\f23 \\i{a}}" /; !TrueQ[$WordForm];

gkstr[beta]="{\\f23 \\i{b}}" /; !TrueQ[$WordForm];
gkstr[chi]="{\\f23 \\i{c}}" /; !TrueQ[$WordForm];
gkstr[delta]="{\\f23 \\i{d}}" /; !TrueQ[$WordForm];
gkstr[Delta]="{\\f23 \\i{D}}" /; !TrueQ[$WordForm];
gkstr[eta]="{\\f23 \\i{h}}" /; !TrueQ[$WordForm];

gkstr[gamma]="{\\f23 \\i{g}}" /; !TrueQ[$WordForm];

gkstr[Gamma]="{\\f23 \\i{G}}" /; !TrueQ[$WordForm];


gkstr[iota]="{\\f23 \\i{i}}" /; !TrueQ[$WordForm];
gkstr[kappa]="{\\f23 \\i{k}}" /; !TrueQ[$WordForm];
gkstr[lambda]="{\\f23 \\i{l}}" /; !TrueQ[$WordForm];
gkstr[Lambda]="{\\f23 \\i{L}}" /; !TrueQ[$WordForm];
gkstr[mu]="{\\f23 \\i{m}}" /; !TrueQ[$WordForm];


gkstr[nabla]="{\\f23 \\i{\321}}" /; !TrueQ[$WordForm];

gkstr[nu]="{\\f23 \\i{n}}" /; !TrueQ[$WordForm];
gkstr[omicron]="{\\f23 \\i{o}}" /; !TrueQ[$WordForm];
gkstr[omega]="{\\f23 \\i{w}}" /; !TrueQ[$WordForm];
gkstr[Omega]="{\\f23 \\i{W}}" /; !TrueQ[$WordForm];

gkstr[phi]="{\\f23 \\i{f}}" /; !TrueQ[$WordForm];
gkstr[Phi]="{\\f23 \\i{F}}" /; !TrueQ[$WordForm];
gkstr[pi]="{\\f23 \\i{p}}" /; !TrueQ[$WordForm];
gkstr[Pi]="{\\f23 \\i{P}}" /; !TrueQ[$WordForm];

gkstr[psi]="{\\f23 \\i{j}}" /; !TrueQ[$WordForm];
gkstr[Psi]="{\\f23 \\i{Y}}" /; !TrueQ[$WordForm];
gkstr[rho]="{\\f23 \\i{r}}" /; !TrueQ[$WordForm];
gkstr[sigma]="{\\f23 \\i{s}}" /; !TrueQ[$WordForm];
gkstr[Sigma]="{\\f23 \\i{S}}" /; !TrueQ[$WordForm];
gkstr[tau]="{\\f23 \\i{t}}" /; !TrueQ[$WordForm];
gkstr[theta]="{\\f23 \\i{q}}" /; !TrueQ[$WordForm];
gkstr[Theta]="{\\f23 \\i{Q}}" /; !TrueQ[$WordForm];
gkstr[upsilon]="{\\f23 \\i{u}}" /; !TrueQ[$WordForm];
gkstr[Upsilon]="{\\f23 \\i{!}}" /; !TrueQ[$WordForm];
gkstr[epsilon]="{\\f23 \\i{e}}" /; !TrueQ[$WordForm];
gkstr[varpi]="{\\f23 \\i{v}}" /; !TrueQ[$WordForm];
gkstr[varsi]="{\\f23 \\i{V}}" /; !TrueQ[$WordForm];
gkstr[varth]="{\\f23 \\i{J}}" /; !TrueQ[$WordForm];
gkstr[xi]="{\\f23 \\i{x}}" /; !TrueQ[$WordForm];
gkstr[Xi]="{\\f23 \\i{X}}" /; !TrueQ[$WordForm];
gkstr[zeta]="{\\f23 \\i{z}}" /; !TrueQ[$WordForm];
gkstr[Zeta]="{\\f23 \\i{Z}}" /; !TrueQ[$WordForm];

gkstr[psi]="{\\f23 \\i{y}}" /; !TrueQ[$WordForm];
gkstr[Psi]="{\\f23 \\i{Y}}" /; !TrueQ[$WordForm];


gkstr[sim_Symbol]:=ToString[sim];





  • Prev by Date: DSolve bug: addendum to previous posting
  • Next by Date: honest plotting using Mathematica 2.0 RealIntervals
  • Previous by thread: DSolve bug: addendum to previous posting
  • Next by thread: honest plotting using Mathematica 2.0 RealIntervals