I am modifiyng some macros to enforce a section style that should end with a full stop. The full stop is added automatically, but sometimes people add the full stop and I get two. How can I modify the code to detect the punctuation and add it only if it is needed? I guess I need to use futurelet, but I don't know how to use it.
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.
|
Firstly it is always best to post a MWE. As you have not posted one I am posting a general answer, for exact formatting of the section you will need to add your own formatting commands. You don't need a
The rest of the code are minor details. Here is the MWE.
If you want the macro to work both for
and test with
You can also visit the link quoted by Philippe Goutet in the comments below. |
|||||||||||||
|
|
The problem can be solved at a macro level without 'meddling' with the space factor.
|
|||||||||||
|

\documentclassand the appropriate packages so that those trying to help don't have to recreate it. This will also clarify any ambiguities in your question. – Peter Grill Mar 2 '12 at 5:07