Consider the code:
\documentclass{book}
\usepackage{xcolor,soul}
\colorlet{soulred}{red!25}
\begin{document}
\thispagestyle{empty}
\LARGE
\begingroup
\sethlcolor{soulred}%
Here is some text. \hl{Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.}%
\endgroup
\end{document}
producing the output
QUESTION: I would like to have no white space showing between the red highlighting; but rather, have the displayed highlighted text appear as a "color-filled polygon." What might be the best way to accomplish this; and how? My MWE may not be the best way to start. Remark: I know that if I wanted the entire paragraph "blocked off", I could use the mdframed
package, but I don't know how to extend it to a specific portion(s) of a given paragraph. I compiled the code with pdflatex
. Thank you.
\hl{...}
does redefine\strut
and\rule
.