Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

display Floor in StandardForm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90122] display Floor in StandardForm
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Mon, 30 Jun 2008 04:51:03 -0400 (EDT)

In TraditionalForm Floor[x] is displayed as \[LeftFloor]x\[RightFloor]
in both of the following cases

(1) Evaluate Floor[x] then Output in pretty form
(2) Entering Floor[x] in an InputCell an then Cell/Convert to
    TraditionalForm

Now I tried to mimic this behavior for StandardForm. I did

Unprotect[Floor, Ceiling];
Format[Floor[x_/;!NumericQ[x]], StandardForm] := 
     DisplayForm[RowBox[{"\[LeftFloor]", x, "\[RightFloor]"}]]
Protect[Floor];

The case (1) above now works even with complicated expressions and
lists, but case (2) replaces Floor[x] with DisplayForm[...]

Is there a possibility to make it work as in TraditionalForm?

TIA

Gruss Peter
-- 
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Re: Export PDF plot or Save Selection As -- big troubles with
  • Next by Date: Re: Happy Birthday Mathematica!
  • Previous by thread: How to plot discontinuous functions?
  • Next by thread: Controling the color of line segments in a Log plot