I would like to make a macro with two parameters which return a text. For instance, I want \M{1}{5} to return [1,5], and \M{2}{2} to return [2] (because the two arguments are the same). So I need to have a "check" or condition in my macro to see if the two parameters are the same and perform different executions... How do I implement this "if" in a macro?
|
|
||||
|
|
To complete the list I want to present the package
|
|||
|
|
|
if that are all numbers then you can use
|
||||
|
|
|
Using a more upper-level approach, the
In general, care should be taken when defining single-letter macros/control sequences, since (La)TeX defines a number of these for use in regular formatting (like |
|||
|
|
|
Here is a solution using the
|
|||
|
|

