I know \emph is to be used to emphasize text. However once in a while, a punctuation mark follows emphasized text, mostly commas and periods.
When \emph makes text italic, it should extend to the punctuation mark, but other emphasis like underlining, color, background, etc. should not.
Can I have a solution in the preamble that defines \emph such that it extends to punctuation marks which follow the text?
I.e. I want
This is a \emph{small}, simple example.
to be rendered as
This is a small, simple example.
and not to become
This is a small, simple example.

\emph{small,}simple example.? – CarLaTeX Jan 03 '17 at 21:30\emph{}such that it emphasises text by means of italicisation and, say, colouring it red, but, if say the emphasised text is followed by punctuation, the punctuation should also be italicised, but not coloured red. So,\emph{small,}could be used to make small red and italic and the comma italic, but not red. But I think the OP wants generic solutions that could include many types of emphasis, but only the italicisation would extend to punctuation – Au101 Jan 03 '17 at 21:36\emph{}for italicisation, and then, say, nesting other emphasis, so like\emph{\textcolor{red}{small}},and it seems like they would like the\emphalone to extend to any punctuation outside the braces, but nothing else, which it seems is how they would like to try to achieve their desired result. I'm not sure that would be the best approach though – Au101 Jan 03 '17 at 21:43