I sort of understand the difference between the two. But that's not what I'm interested in—I just want to know, which one should I use? In general, when I'm creating commands in a package or class, which one should I use all the time?
Tell me more
×
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.
|
In my opinion, it is better to use
|
||||
|
|
|
A simple rule of thumb is that if you're creating commands that contain data that LaTeX will reread later, you should be using a robust command that is defined using Such data is contained in arguments that typically go into table of contents, list of figures, list of tables etc.; namely, data that are written to an auxiliary file and read in later. Other places are those data that might appear in headers or footers. |
||||
|
|
etoolboxand using\newrobustcmdfor any document command which does not explicitly need to be expandable.\newrobustcmdcreates engine-protected commands, which will never expand unexpectedly. – Joseph Wright♦ Jun 28 '12 at 7:38\newrobustcmdand\renewrobustcmdfrometoolbox.stylike this? www11.zippyshare.com/v/57630671/file.html are there problem? And what do you mean with: "for any document command which does not explicitly need to be expandable" ? Thanks. – FormlessCloud Sep 29 '12 at 0:09