Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

For a long time i've evaluated D[f[t],{t,3}] to get this power-like derivative thing:

$$f^{(3)}(x)$$

Is it possible to obtain same through an easier keyboard shortcut?

share|improve this question
3  
f'''[t] ????? –  Artes May 17 '13 at 15:10
1  
yes i know, but i mean without evaluation needed, like for second derivative, f ctrl+6 esc ' ' esc –  Sren May 17 '13 at 15:29
1  
Derivative[3][f][x] then Ctrl + Shift + n? –  Silvia May 17 '13 at 20:34
add comment

1 Answer

Edit: My interpretation of your question:

From the clarification in your comment to the question:

like for second derivative, fCtrl6Esc''Esc

I assume you want the analogous entry method for the third derivative as you demonstrated for the second derivative. The difference to the other entry methods is that it uses the special character \[DoublePrime] in the input, as a superscript. That's very different from the input method using simply f'''[x] where the character ' is repeated three times.

End edit

This works by setting an InputAlias for the unicode character of the triple prime so that you can enter it as ESC'''ESC, and then setting $PreRead to translate triple primes in superscript boxes before they get converted to Power:

SetOptions[EvaluationNotebook[], 
 InputAliases -> 
  Join[Quiet@
     OptionValue[Options[EvaluationNotebook[]], InputAliases] /. 
    InputAliases -> {}, {
    "'''" -> FromCharacterCode[8244]}]]

$PreRead = ReplaceAll[#, SuperscriptBox[f_, "‴"] :> RowBox[
      {
       RowBox[{"Derivative", "[", "3", "]"}], "[", f, "]"}]] &;

f[x_] := x^4

f‴[z]

(* ==> 24 z *)

g‴[x]

$g^{(3)}[x]$

The example code above can't be copied directly: you have to enter the triple primes as superscripts, i.e., fCtrl6Esc'''Esc

A similar alias definition using Unicode was done in this answer.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.