1

I would like to ask that how can we use Latex delimiter \(\) instead of $…$ inside parameter of \hl{} highlight from soul package?

\documentclass[a5paper,12pt]{beamer}

\usepackage{soul,xcolor} \sethlcolor{yellow} \usepackage{amsmath}

\makeatletter \let\HL\hl \renewcommand\hl{% \let\set@color\beamerorig@set@color \let\reset@color\beamerorig@reset@color \HL} \makeatother

\begin{document}

\hl{This is a function $f^{3}$.} % this is okay

% \hl{This is a function (f^{3}).} % but this is not \end{document}

Nuec Tah
  • 139

0 Answers0