Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. Format[OverVector[v_]] := Style[HoldForm[v], FontFamily -> "Arial Black"]
  2.  
  3. {q, r, OverVector[s], t, u, v}
  4.  
  5. vList = {}
  6. defAsVector[x__Symbol] := (vList = Union[Join[vList, {x}]];)
  7. defAsVector[] := vList
  8. undefAsVector[x__Symbol] := (vList = Complement[vList, {x}];)
  9. undefAsVector[] := (vList = {}; $PrePrint =.;)
  10. $PrePrint = # /. {x_ /; MemberQ[vList, x] :> Style[x, Bold]} &;
  11.  
  12. MakeBoxes[x,StandardFom]:=StyleBox["x",FontWeight->Bold];
  13. MakeExpression[StyleBox["x",FontWeight->Bold]]:=MakeExpression["x"].
  14.  
  15. declaredVectorQ[x_Symbol]:^=declaredVector[x]^=True;
  16. MakeBoxes[x_Symbol?declaredVectorQ,StandardForm]:=
  17. StyleBox[ToString[x],FontWeight->Bold];
  18. MakeExpression[StyleBox[str_String,FontWeight->Bold]:=ToExpression[str];
  19.  
  20. $PrePrint =.
  21. x
  22. $PrePrint = # /. {x -> Style[x, Bold, FontFamily -> "Helvetica"]} &;
  23. x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement