beamerinnerthemeumbcboxes.sty 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. \ProvidesPackage{beamerinnerthemeumbcboxes}[2004/12/20 v1.0 for beamer 3.01]
  2. % Here we define two new environments, displaybox and onlinebox,
  3. % draw fancy boxes around text and equations.
  4. %
  5. % Usage:
  6. %
  7. % \documentclass{beamer}
  8. % \usetheme{umbc4}
  9. % \useinnertheme{umbcboxes}
  10. % \setbeamercolor{umbcboxes}{bg=violet!15,fg=black}
  11. % ...
  12. % \begin{displaybox}{5cm}
  13. % \[ a^2 + b^2 = c^2 \]
  14. % \end{displaybox}
  15. % ...
  16. % This is an \begin{onlinebox}{24mm} online box.\end{onlinebox}
  17. %
  18. % Rouben Rostamian <rostamian@umbc.edu>
  19. \mode<presentation>
  20. % The default box color. The user is expected to override this.
  21. \setbeamercolor{umbcboxes}{bg=structure!15!normal text.bg,fg=black}
  22. % \newenvironment{displaybox}[1]{
  23. % \begin{columns}\begin{column}{#1}
  24. % \begin{beamerboxesrounded}[lower=umbcboxes,shadow=true]{}}
  25. % {\end{beamerboxesrounded}\end{column}\end{columns}}
  26. %
  27. % \newenvironment{onlinebox}[1]{
  28. % \newbox\@mybox
  29. % \setbox\@mybox\hbox\bgroup\begin{minipage}{#1}
  30. % \begin{beamerboxesrounded}[lower=umbcboxes,shadow=true]{}%
  31. % \centering\vspace{-2pt}}
  32. % {\end{beamerboxesrounded}\end{minipage}\egroup%
  33. % \hspace{0.0em}\raisebox{1pt}{\usebox\@mybox}\hspace{0.5em}}
  34. \newenvironment{displaybox}[1]
  35. {
  36. \centerline\bgroup\hfill
  37. \begin{beamerboxesrounded}[lower=umbcboxes,shadow=true,width=#1]{}
  38. }
  39. {
  40. \end{beamerboxesrounded}\hfill\egroup
  41. }
  42. \newenvironment{onlinebox}[1]
  43. {
  44. \newbox\@mybox
  45. \newdimen\@myboxht
  46. \setbox\@mybox\hbox\bgroup%
  47. \begin{beamerboxesrounded}[lower=umbcboxes,shadow=true,width=#1]{}
  48. \centering
  49. }
  50. {
  51. \end{beamerboxesrounded}\egroup
  52. \@myboxht\ht\@mybox
  53. \raisebox{-0.25\@myboxht}{\usebox\@mybox}\hspace{2pt}
  54. }
  55. \mode<all>