What is the difference between the \let and \def commands in TeX/LaTeX?
Ideally please provide a simple example that will illustrate the difference between them.
|
|
|
The difference is in the time at which the 'right hand side' is evaluated. Thus On the other hand, Thus, consider:
This produces
|
|||||||||||
|
|
They're pretty completely different. For example:
creates a new command
copies the commands from the
|
|||||
|
|
While the existing answers are all true I like to highlight one point which wasn't explicitly mentioned yet. I myself got this information recently from Joseph Wright (see his answer and our comments in Simple un-obfuscation of some LaTeX internals). As Michael said Also |
|||
|
|