[Tex/LaTex] Difference between \relax and % for ending a line

macros

when would I use one over the other? Are they the same?

Best Answer

They're not the same at all: % will comment out the rest of the line, including the line break, while \relax is just mostly a no-op and you're using that spaces (including line breaks) after control sequences are discarded.

Frankly, I can't see any situation where you'd not want to use %.