8
votes
1answer
745 views

How to make \hl (highlighting) to automatically place incompatible commands in \mbox?

The soul package provides a useful command \hl for highlighting text. However, \cite, \ref, and some other commands (maybe equations too) must be placed within an \mbox in order for \hl to work ...
8
votes
1answer
3k views

Problems with \ref when using soul for highlighting

Here is a minimal example showing the problem. \documentclass[10pt]{article} \usepackage[usenames,dvipsnames]{color} \usepackage{soul} %\soulregister{\ref}{1} \begin{document} \section*{x}\label{x} ...