diff --git a/lectures/lectureslides.cls b/lectures/lectureslides.cls index 61cb8dd..cf39f0e 100644 --- a/lectures/lectureslides.cls +++ b/lectures/lectureslides.cls @@ -1,4 +1,4 @@ -\def\filedate{1 February 2014} +\def\filedate{2 August 2018} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Document class for lecture slides. @@ -15,12 +15,13 @@ % v1.2 Added TikZ package and grid macro, and deprecated PGF. % v1.3 Added support for configurable class types. % v1.3.1 Fixed regression that eliminated paper title from title page. +% v1.3.2 Added text highlighting and \alertbf macros. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[2001/06/01] \ProvidesClass{lectureslides}% - [2014/07/06 INFO lecture slides style, v.1.3.1] + [2018/08/02 INFO lecture slides style, v.1.3.2] % "Stream of conciousness" chapters vs. explicit individual classes. NOTE: % you can't have both chapters and classes! This is because we use the same @@ -98,8 +99,9 @@ } -% Bold-face text using the structure colour. +% Bold-face text using the structure or alert colour. \newcommand<>{\structurebf}[1]{\structure#2{\textbf{#1}}} +\newcommand<>{\alertbf}[1]{\alert#2{\textbf{#1}}} % Define the standard beamer colours as actual colours, as we use them @@ -112,6 +114,17 @@ \newcommand<>{\strikeout}[1]{\alt#2{\sout{#1}}{#1}} +% Coloured highlighting of text (via Mark George). +% \vphantom gives correct ascender and descender height for box. +\newcommand{\highlight}[2][yellow!75]{\setlength{\fboxsep}{1pt}\hskip-1pt\colorbox{#1}{\vphantom{dy}#2}} + +% Uses the same spacing as \highlight, but does no highlighting. Use on the +% original code when using incremental highlighting. +\newcommand{\nohighlight}[1]{\highlight[white!0]{#1}} + +\newcommand{\error}[1]{\highlight[red!75]{#1}} + + % Document setup. \author{} \if@chapters