MathGroup Archive 2012

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

Search the Archive

Re: Derivatives Output as TraditionalForm

  • To: mathgroup at
  • Subject: [mg124496] Re: Derivatives Output as TraditionalForm
  • From: "Oleksandr Rasputinov" <oleksandr_rasputinov at>
  • Date: Sat, 21 Jan 2012 05:20:47 -0500 (EST)
  • Delivered-to:
  • References: <jfb2rl$hls$>

On Fri, 20 Jan 2012 06:50:29 -0000, mathgroup  <fizzymath at>  

> The following code was offered in a Wolfram Blog to make Derivatives  
> print
> out as they would be written with pencil and paper rather then     
> f^(0,1)[x,y] for example....which is standard Mathematica  
> is the code(written by Simon, I think was his name).....the original  
> Blog had a Wolfram program  pdConv ...however, you had to apply it  to   
> each expression whereas this code , once run, does it throughout the  
> Notebook....
> Derivative/:MakeBoxes[Derivative[inds__][g_][vars__],TraditionalForm]:=ToBoxes[Apply[Defer[D[g[vars],##]]&,Transpose[{{vars},{inds}}]/.{{var_,0}:>Sequence[],{var_,1}:>{var}}],TraditionalForm]
> I have 2 Questions....
> (1)  Why isnt this code standard within Mathematica rather then having  
> to be  Coded by the user?....I used to do all this with Format  which  
> was a Royal Nightmare by comparison.........I have never seen what  
> purpose  this output   f^(0,1)[x,y]   served.......or does it???

The notation Mathematica uses is less commonly seen but there is nothing  
especially non-standard about it. If you don't like it, you can change it,  
as the code example demonstrates. As for why Mathematica doesn't use the  
more typical notation in TraditionalForm output, I don't know for sure,  
but I would hazard a guess that it is so that TraditionalForm can be  
re-interpreted into StandardForm without having to be littered with  
InterpretationBoxes to clarify the ambiguous notation. Implementing such  
features is not free, of course, so maybe WRI took the view that their  
time was better spent doing other things.

> (2)   Second....if I want to modify this code to get output  as     
> df/dx   rather then  df[x,y]/dx, ,  for example  ,  how do I change it?


  • Prev by Date: Re: Tips for writing correct, non trivial Mathematica Libraries
  • Next by Date: Re: Daylight savings time in DatePlus.
  • Previous by thread: Derivatives Output as TraditionalForm
  • Next by thread: Re: Derivatives Output as TraditionalForm