Is there any simple way of removing the last character of an argument to a command (or environment)? I'm looking for a simple way to remove the punctuation mark from a caption when it appears in the contents list without having to write the same caption twice.
|
If you are using the
|
||||
|
|
The safest way, in my opinion, is to use a command for the final period:
In this way you have a precise control on what you type. |
|||||||||
|
|
Ideal task for luatex
You can easily make it more robust and remove the last character only if it is a punctuation. |
|||
|
|
|
Another solution is to patch
The resulting output is:
Note that you must patch |
|||||
|
