Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Could you give me a complete overview when we should use \DeclareMathSizes, \xxxstyle (such as \scriptstyle, etc), and font size changing macros (\tiny, \small, etc)?

I want this answer to be CW so all of you can collaborate the answer as complete as possible. You can elaborate any relevant aspects that you think they are important for most users.

share|improve this question
1  
Welcome to TeX.SX! This is your first post on the StackExchange network? –  tohecz Feb 26 '13 at 11:49
    
@tohecz: Yes. But I am already familiar with the system. Thank you for the link. –  Stupid Boy Feb 26 '13 at 11:51
    
In edit mode I cannot change this question as a CW. Could you do that? –  Stupid Boy Feb 26 '13 at 12:09
    
No, only moderators can do that, once it's posted. As well, I'm not sure that CW really works for this type of questions. IMHO either you have a specific problem you deal with (and then CW makes no sense) or the question is more a debate thread than a question (and then it might be boundary to "not constructive"). But as I say, I'm not sure, and it's only my opinion ;) I'll let the mods know about it. –  tohecz Feb 26 '13 at 12:19

1 Answer 1

up vote 10 down vote accepted

I'm not sure the question is really answerable. It mentions several essentially unrelated commands and asks when they should be used, but I'll have a go.

\DeclareMathSizes should be used almost never. It defines for a given text font size, what size font to use for math node at text and script sizes. The values predeclared in the LaTeX format will cover the vast majority of cases. You would only using this if writing a class that had a very different set of supported font sizes to the standard classes or were writing a package loading a math font suite that is very different to computer modern (for example some fonts may require script and scriptscript text to be set slightly larger to be readable, computer modern fonts are designed at small point sizes to be legible but if you are using a scalable font with just a single design mechanically scaled you may want to prevent sub-subscripts being too small.

\textstyle \scriptstyle are user level commands in math that force the font style that TeX would normally use automatically in certain constructs so $\scriptstyle b$ and $a^{b}$ the b uses the same font in both cases. It's not possible to give general rules why you should want to do this, it is just an available control. One common reason is to force entries in arrays (which would by default be set as \textstyle to display style by issuing \displaystyle. (AMS and similar alignment environments do this as part of their definition.)

\tiny \small may not be used in math mode they set the font for text mode use (math fonts are normally sized to match though, according to the sizes specified by \DeclareMathSizes). Normally in a document one should avoid explicit size (or font) changes and use logical markup such as \section or \footnote, but they can be useful sometimes, eg to reduce the font to squeeze in a large table.

share|improve this answer
    
Example of justified (and common) usage of \xxxstyle: [tex.stackexchange.com/questions/91038/wedge-with-vertical-bar/… with vertical bar) –  tohecz Feb 26 '13 at 13:10
    
Yes although in most cases (including there) you could arrange to use \mathpaette instead of the primitive \mathchoice then the xxstyle commands would be added automatically and not be explicit in the definition (cf \root or \phantom or \notin) –  David Carlisle Feb 26 '13 at 13:14
1  
Not there, since the other argument (the height of the bar) depends on the size as well, and using both \mathchoice and \mathpalette would create too many variants ;) –  tohecz Feb 26 '13 at 13:19
    
@tohecz right you are: (I never could read TeX code) –  David Carlisle Feb 26 '13 at 13:48

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.