So I have a code, modified from this answer by User "ShreevatsaR", which can be called at using
The code works great, for any characters inside it.
For example, for:
Only ... the code will jam for punctuation marks.
The code is not designed for punctuation marks, which is fine. Because the code runs some character encoding conversion which is not needed for punctuation marks.
But, the problem is, currently I cannot compile something as such:
In fact, I have to manually copy and paste untill I end up getting all of the punctuation marks outside of the command, and re-initializing the environment for those parts which are not punctuation marks:
Which is a bit time-consuming. Is there any way to do this automatically please?
Please note that, for this question, the answer doesn't require the specific
} command to be used. For my part, you can replace the command by any sort of command, e.g. as such:
Also, the Chinese characters are not necessary. They could be anything which is not in a pre-defined list of items to be excluded, e.g.:
The point is to exclude any punctuation marks (in this case
I would be satisfied with:
- an answer that either thus excludes all possible punctuation marks, however Tex may figure out those ...
- or an answer that allows a list of punctuation marks to be specified (e.g.
-in the following example).