1

This is probably a beginner question, but it's always been throwing me off about LaTeX, especially because when I'm showing new people the basics, I can't explain why that is.

So the question is: Why does \large have to be wrapped inside {} to not make everything after it become large as well? When I type \large{Some text} it doesn't mean at all what one might expect ({Some text} isn't an argument apparently). For commands like \textbf it works the way I'm used to for most commands: Without braces, it just affects the next token, with curlies, it affects that whole argument inside the curlies and nothing beyond that.

Is there a term for these kinds of commands? I don't recall having seen very many others that behave like this.

  • 2
    \large is a font size declaration which is active until another font size declaration appears or the local group ends. In fact, \large does not have an argument, so \large{foo} is actually wrong but does not really do harm –  Apr 14 '17 at 23:33
  • 1
    \textbf{...} is just a convenience function, because you often only want to typeset a few words in bold. The command that does the work is \bfseries which is like \large stays in force until it is cancelled. See https://en.wikibooks.org/wiki/LaTeX/Fonts for a longer list of similar macros. – alephzero Apr 14 '17 at 23:42
  • 1
    " Without braces, it just affects the next token," - in fact, it always affects its parameter. If there are no curly brackets, the parameter is the next single character. If there are brackets, the parameter is everything inside the brackets. This rule applies to all \TeX and \LaTeX commands - it's nothing special to do with textbf. – alephzero Apr 14 '17 at 23:46
  • Basically something like \large can be considered like the speed limit sign on a road: The speed limit on it usually holds until the next speed limit (either lower or higher) appears... –  Apr 15 '17 at 00:10
  • \bfseries, \color{red}, \sloppy, \raggedright, \large are all declarations that affect all following text until the end of the current group – David Carlisle Apr 15 '17 at 00:11
  • 1
    It's the difference between a macro that changes the state of the system and a command that takes an argument. – Herb Schulz Apr 15 '17 at 00:19

0 Answers0