Fake CAPTCHA image spelling "unit propagation". Generated with Wolfram Alpha.
The Blog of Bob Rubbens

Starred LaTeX Commands Suck

Tuesday, September 30, 2025

Any time I run into a LaTeX command that I don’t know yet, and it’s starred, I can never tell.

What do they do???

For some commands, it kind of makes sense. For example, when using \subsection*, the numbering is hidden. I think most people run into this one pretty quickly, as it’s easy to just try it and immediately see the difference.

However, they’re not all so easy to figure out. Consider these examples:

Here’s my, probably unoriginal, suggestion. Why not just use an optional keyword argument? Or at least a one-letter flag instead of a star. For example, for each of the use cases above, I suggest the following one-letter flag:

Here’s an example of a package that does it right. In the command \qrcode, the starred version is identical to [nolink]. Love it!

I know it’s impossible to change all the starred commands that are already there. But maybe for the new ones we can have the more verbose style. After all, code is read more often than it is written. Or why not have both a starred version of a command for a certain blessed option that’s frequently used, and then the non-blessed options just get assigned a nice keyword argument. Best of both worlds!1


View as: md (raw), txt.


Generated with BYOB. License: CC-BY-SA. This page is designed to last.