       Re: Is there a way to make Mathematica commands and functions

• To: mathgroup at smc.vnet.net
• Subject: [mg93151] Re: Is there a way to make Mathematica commands and functions
• From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
• Date: Wed, 29 Oct 2008 05:48:19 -0500 (EST)
• References: <ge6nf7\$lhs\$1@smc.vnet.net>

```Hi,

do the following only once

lst = Select[
Names["System`*"], ! StringMatchQ[#, "\$*"] &&
Attributes[#] =!= {} &];

replace = {ToLowerCase[#], #} & /@ lst;

DoSubstitution[{newname_String, oldname_String}] :=
Block[{s1, s2, tmp, sym},
s1 = ToExpression[newname];
s2 = oldname;
tmp = {s1[any___], s2[any]};
Quiet[
tmp = ((tmp /. {a_, b_} :> {a, Hold[b]})) /. {a_,
Hold[s_String[b_]]} :> (Hold[a, s[b]] /.
s -> ToExpression[s]);
SetDelayed @@ tmp
]
]

DoSubstitution  /@ replace;

and now

plot[sin[x], {x, 0, 16}]

work!

Regards
Jens

stpatryck wrote:
> Hello All,
>
> I'm a newbie to Mathematica and find having to capitalize Mathematica
> commands and functions somewhat annoying.
>
> Is there some way or program or module or notebook or whatever out
> there that will make Mathematica accept lower case commands and
> functions without my having to redefine all the functions?
>
> Please e-mail me at stpatryck at gmail.com with any suggestions or
> solutions.
>
> Thanks very much in advance.
>
>

```

• Prev by Date: Re: notation using # with exponents and &
• Next by Date: Re: Hypergeometric2F1
• Previous by thread: Re: Is there a way to make Mathematica commands and functions
• Next by thread: Re: Is there a way to make Mathematica commands and functions