3
$\begingroup$

Fundamental problem is: Is there any way I can use OverDot[var] as symbol in a function? I have tried to use Symbolize[OverDot[x,1]] for example, to no avail.

If I try I get the following error:

Error because OverDot[x] is not a symbol

It does of course work to make all the dotted variables into just {xdot, ydot, zdot}:

getVelocitySphericalFromCartesian[v_, vdot_] :=

 Module[{x, y, z, xdot, ydot, zdot, rdot, \[Theta]dot, \[Phi]dot},
  {x, y, z} = v;
  {xdot, ydot, zdot} = vdot;
  {x,y,z,xdot,ydot,zdot} (*Some function of these six variables here*)
]

But I'm interested in making it look better and prettier by using the dots. Is it possible?

$\endgroup$
2
  • 1
    $\begingroup$ You could try using \[FormalX], etc. $\endgroup$
    – Greg Hurst
    Commented Nov 6, 2018 at 14:05
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$
    – Chris K
    Commented Nov 6, 2018 at 15:52

1 Answer 1

3
$\begingroup$
Notation`AutoLoadNotationPalette = False;(*prevents Notation palette from popping up*)
(* or allow the pallete to pop up *)
<< Notation`

Replace ... with typeset form of OverDot[x]:

Module[{ ... = 2},  ...]

Symbolize[ParsedBoxWrapper[OverscriptBox[_, "."]]];

Module[{ ... = 2},  ...]
Module[{ ... = 2},  ...]

2

enter image description here

$\endgroup$
4
  • $\begingroup$ Thank you very much, that worked! By the way, how did you know that it was OverscriptBox? If I put x then Ctrl+&, period, into FullForm it said OverDot[x,1], however the warning said it was Overscript, and finally, you give used OverscriptBox? Can you explain the command a little if you have time? In any case, thanks again! $\endgroup$ Commented Nov 6, 2018 at 19:35
  • $\begingroup$ A little off-topic: is there any way to make the dots render a little bigger btw? $\endgroup$ Commented Nov 6, 2018 at 19:42
  • $\begingroup$ @GandalfSaxe The front end converts to box structures for display. Try MakeBoxes[OverDot[x], StandardForm] to see the form the front end works with. $\endgroup$
    – Greg Hurst
    Commented Nov 6, 2018 at 20:30
  • 1
    $\begingroup$ @GandalfSaxe You could always do Symbolize[ParsedBoxWrapper[OverscriptBox["x", "\[FilledSmallCircle]"]]] or Symbolize[ParsedBoxWrapper[OverscriptBox["x", "\[FilledCircle]"]]] and then copy the output of Overscript[x, \[FilledSmallCircle]] or Overscript[x, \[FilledCircle]] respecitvely. You could also control the size of "." with Style / StyleBox. $\endgroup$
    – Greg Hurst
    Commented Nov 6, 2018 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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