Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2009

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

Search the Archive

Re: Log[x]//TraditionalForm

  • To: mathgroup at
  • Subject: [mg96083] Re: Log[x]//TraditionalForm
  • From: cca at
  • Date: Wed, 4 Feb 2009 05:21:50 -0500 (EST)

>>Nevertheless, how to force to use ln(x) instead log(x) ?

The following rule will display "Log[x]" as "ln(x)" in TraditionalForm.

Log /: MakeBoxes[Log[z_], TraditionalForm] :=
  RowBox[{"ln", "(", MakeBoxes[z, TraditionalForm], ")"}];

This is only a formatting (presentation) rule. The returned "ln(x)" wont be
interpreted as Log[x] in TraditionalForm. But this can be done locally in
many ways -- using InterpretTemplate, TemplateBox (new in V7) or
CellEvaluationFunction (and there are other solutions).  To achieve this in
a global way, you can do the following:

MakeExpression[RowBox[{"ln", "(", x_, ")"}], TraditionalForm] :=
 MakeExpression[RowBox[{"Log", "[", x, "]"}], TraditionalForm]

As for "ln x", take a look at ESC@ESC (\[InvisibleApplication]).

Carlos C=E9sar de Ara=FAjo
Gregos & Troianos Educacional
MSN: cca_gregosetroianos at
Belo Horizonte, MG, Brasil
(31) 3283-1122

  • Prev by Date: HDF5 broken in v7?
  • Next by Date: Re: Log[x]//TraditionalForm
  • Previous by thread: HDF5 broken in v7?
  • Next by thread: Re: Log[x]//TraditionalForm