Grouping is often important in TeX/LaTeX programming. I know of three ways to delimit a group:
- Via a
\begingroup…\endgrouppair; - Via a pair of matched braces
{}; - Via a
\bgroup…\egroup.
Now I am wondering: what is the difference between these three? Does their effect depend on whether they appear in math mode or text mode? In which way, if so?
Note: I am sure that if I look through the TeXBook, TeX By Topic, and some other resources I will find an answer. However, I am sure there are many others who are curious about this and do not have the time to engage in such a search -- just like me. It would surely be useful to have the info all in one place -- e.g. as an answer here.
\bgroup ... \egroup, not\endgroup. – barbara beeton Aug 06 '15 at 13:00