# How can I set default size for some characters

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]?

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

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


Then just type !!

or use

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


to type Esc!!Esc

-
There is one imperfect thing: First input !! and then add xx!! yy,xx,yy will inherit the FontSize->25. – HyperGroups Jul 29 '13 at 8:36
@HyperGroups, increasing font size through front end menu exhibits the same behavior, it's a feature of the frond end. – panda-34 Jul 29 '13 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]


-
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. – HyperGroups Jul 29 '13 at 8:40
@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. – Kuba Jul 29 '13 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:

Format[
DisplayForm[
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]


-
This is not suitable for direct manual entry in WYSIWYG style, it's more like Kuba's approach... – Jens Jul 29 '13 at 23:32