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.

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

share|improve this question
    
any problems with the question? some downvotes? –  HyperGroups Jul 29 '13 at 7:19
1  
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
2  
Well, typography is a highly controversial topic ;-) –  Yves Klett Jul 29 '13 at 7:25
2  
@YvesKlett I like typography with mathematica, and I wish more effort of wolfram in typography... –  HyperGroups Jul 29 '13 at 8:43
show 1 more comment

3 Answers

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

Then just type !!

or use

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

to type Esc!!Esc

share|improve this answer
2  
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
add comment

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

share|improve this answer
    
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
add comment

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[
  NotVerticalBar[x___], TraditionalForm] := 
 DisplayForm[
  RowBox[Riffle[ToBoxes /@ Flatten[{x}], 
    StyleBox["\[NotVerticalBar]", Magnification -> 2.5]]]]

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

small

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

big

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]

standard

share|improve this answer
    
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
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.