Skip to content

Instantly share code, notes, and snippets.

@lucaswerkmeister
Created November 27, 2016 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucaswerkmeister/3f7672ee522f7e823cec63fdc85fd7aa to your computer and use it in GitHub Desktop.
Save lucaswerkmeister/3f7672ee522f7e823cec63fdc85fd7aa to your computer and use it in GitHub Desktop.
Colored underline, with Beamer overlay support
% colored underline, with Beamer overlay support
% usage: \cul{x} or \cul[blue]{x} or \cul<2->{x} or \cul<2->[blue]{x}
\newcommand<>{\cul}[2][red]{%
% change underline dimentions: https://tex.stackexchange.com/a/167957/25264
\fontdimen8\textfont3=0.75pt%
% colored underline: https://tex.stackexchange.com/a/9477/25264
% transparent underline: https://tex.stackexchange.com/a/45601/25264
% switch between colored and transparent: http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/beamer/doc/beameruserguide.pdf sections 9.3 and 9.6.1
\alt#3%
{\color{#1}\underline{{\color{black}#2}}\color{black}}%
{\transparent{0.0}\underline{{\transparent{1.0}#2}}\transparent{1.0}}%
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment