Mathematica graphics

Alt++ could adjust the size, but how to store the satisfactory size?

For example: Each time I type |, its size is (I assume) 12.

How to make its effect like adding StyleBox["|", FontSize->18]?

  • $\begingroup$ any problems with the question? some downvotes? $\endgroup$ Jul 29, 2013 at 7:19
  • 1
    $\begingroup$ I don´t get the downvotes, too... seems somewhat undeserved, especially since no one commented. $\endgroup$
    – Yves Klett
    Jul 29, 2013 at 7:23
  • $\begingroup$ @YvesKlett Agree, +1 to counter them :) Maybe they do not like the font size? $\endgroup$
    – Kuba
    Jul 29, 2013 at 7:24
  • 2
    $\begingroup$ Well, typography is a highly controversial topic ;-) $\endgroup$
    – Yves Klett
    Jul 29, 2013 at 7:25
  • 2
    $\begingroup$ @YvesKlett I like typography with mathematica, and I wish more effort of wolfram in typography... $\endgroup$ Jul 29, 2013 at 8:43

3 Answers 3

 InputAutoReplacements -> {"!!" -> StyleBox["\[NotVerticalBar]", 25]}]

Then just type !!

or use

SetOptions[InputNotebook[],InputAliases -> {"!!" -> StyleBox["\[NotVerticalBar]", 25]}]

to type Esc!!Esc

  • 2
    $\begingroup$ There is one imperfect thing: First input !! and then add xx!! yy,xx,yy will inherit the FontSize->25. $\endgroup$ Jul 29, 2013 at 8:36
  • $\begingroup$ @HyperGroups, increasing font size through front end menu exhibits the same behavior, it's a feature of the frond end. $\endgroup$
    – panda-34
    Jul 29, 2013 at 9:17

This could be a comment but it is wrong habbit to put the answers there, if it is not what you like I will delete it:

newNV[x__] := Row[{x}, Style["\[NotVerticalBar]", 25]]

newNV[1, 2, 3, 4]

enter image description here

  • $\begingroup$ This is good for some programming generated formulas. Now I'm typing formulas by hand and Ctrl+9 this way. But this is also useful, so just leave it as one answer. $\endgroup$ Jul 29, 2013 at 8:40
  • $\begingroup$ @HyperGroups I agree that @panda-34 's answer is closer to your needs so I've +1ed it. :) Bun none of this two is ideal. panda-34's solution do not affect NotVerticalBar[] for example. $\endgroup$
    – Kuba
    Jul 29, 2013 at 8:48

By forcing the character to have a certain font size you run into the problem that its relative size will be incorrect if the entire expression is subsequently styled to have a different font size.

Therefore, it would be better to scale the character with a Magnification factor instead of an absolute font size. If you're interested in typesetting, I would assume that the relevant formatting is really only needed for TraditionalForm output, so I would use the following:

  NotVerticalBar[x___], TraditionalForm] := 
  RowBox[Riffle[ToBoxes /@ Flatten[{x}], 
    StyleBox["\[NotVerticalBar]", Magnification -> 2.5]]]]

TraditionalForm[Style[a^2 \[NotVerticalBar] b, FontSize -> 18]]


TraditionalForm[Style[a^2 \[NotVerticalBar] b, FontSize -> 24]]


If you want this to be in StandardForm, you'd have to replace TraditionalForm by StandardForm everywhere above, and the result would look like this:

Style[a^2 \[NotVerticalBar] b, FontSize -> 24]


  • $\begingroup$ This is not suitable for direct manual entry in WYSIWYG style, it's more like Kuba's approach... $\endgroup$
    – Jens
    Jul 29, 2013 at 23:32

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.