[texhax] Add a dot at the end of a sentence if not placed already
Torsten Wagner
torsten.wagner at fh-aachen.de
Mon Jul 4 13:05:23 CEST 2005
A new week and a new task ;)
Hello everybody. Last time I asked you how to change always the first
letter of a word to capital letters, independent of the original text.
Because of the great help here in TeXHax \makeupperletter{word} works
perfectly now. Thanks to all of you.
I promised a new tasked ;)
O.K. My lovely boss asked me to give all captions a dot at the end of
the sentence. The problem, I have 100 of different files from 100 of
different authors. Some placed a dot, some not.
Can I (You) define a macro which proofs whether \caption{ This is a nice
figure and this is a nice caption.} has a dot at the end and if not
place one there? Otherwise, this will be a very time consuming task :(
Follow commands should result in the same way.
\caption{ This is a nice figure and this is a nice caption.}
\caption{ This is a nice figure and this is a nice caption}
result
Figure X. This is a nice figure and this is a nice caption.<----- a dot
at the end
O.K. and now increase this nice mental exercise.....
\caption{ This is a nice figure, this is a number with a dot 6.0, the
dot here maybe trouble the macro ;) and this is a nice caption.}
\caption{ This is a nice figure, this is a number with a dot 6.0, the
dot here maybe trouble the macro ;) and this is a nice caption}
should of course result in
Figure X. This is a nice figure, this is a number with a dot 6.0, the
dot here maybe trouble the macro ;) and this is a nice caption.
O.K. Thread is open for discussions.... ;)
Thanks
Totti
More information about the texhax
mailing list