I'm having trouble understanding part of the documentation for the soul
package. I want to know the exact lower and upper positions of the produced colored rectangle when highlighting text via the \hl
command. The documentation states that highlighting "is nothing else than overstriking with very thick lines" apparently of box height 2.5ex. I've been looking at sections 8.7-8.8 of the documentation.
https://ctan.mirrors.hoobly.com/macros/generic/soul/soul.pdf
When I compare highlighting via soul
and blackouting via the censor
package, the censor
package blackouts text with default height and depth of 2.1 ex and -0.3ex respectively with a total box height of 2.4 ex.
https://mirrors.mit.edu/CTAN/macros/latex/contrib/censor/censor.pdf
I feel like there should be a way to highlight text with custom upper and lower bounds of the colored rectangle similar to how you can set the height and depth of the black box when blackouting via censor
. E.g. \highlight{depth}{height}{text to be highlighted}.
Edit: I'm testing the following:
\begingroup
\sbox0{\heightof{\hl{abcdefghijklmnopqrstuvwxyz}}}
%width=\the\wd0\linebreak
height=\the\ht0\linebreak
depth=\the\dp0
\endgroup