beamerinnerthemeumbctribullets.sty 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. \ProvidesPackage{beamerinnerthemeumbctribullets}[2004/12/14 v1.0 for beamer 3.01]
  2. % Beamer inner theme
  3. % Set enumi, enumii, enumiii markers to triangles with shadows
  4. %
  5. % Usage:
  6. %
  7. % \useinnertheme{umbctribullets}
  8. %
  9. % The color of the triangles may be changed with the command:
  10. %
  11. % \umbctribulletscolors{colori}{colorii}{coloriii}
  12. %
  13. % For example:
  14. %
  15. % \umbctribulletscolors{structure!60!bg}{structure!60!bg}{red}
  16. %
  17. %
  18. % Rouben Rostamian <rostamian@umbc.edu>
  19. \mode<presentation>
  20. % added 2007-05-05
  21. \usepackage{pgfcomp-version-0-65}
  22. % Draws a right-pointing triangle in color #1.
  23. \newcommand{\umbc@filledTriangle}[1]{%
  24. \pgfmoveto{\pgfxy(0,-1)}
  25. \pgflineto{\pgfxy(0,1)}
  26. \pgflineto{\pgfxy(1,0)}
  27. \pgfclosepath
  28. \color{#1}
  29. \pgffill}
  30. % Draws three overlapping triangles to achieve a shadow effect.
  31. % The non-shadow trangle is drawn in color #1.
  32. \newcommand{\umbc@tribullets}[1]{{ % two braces to localize \pgfsetxvec
  33. \pgfsetxvec{\pgfpoint{0.75ex}{0pt}} % x-scale
  34. \pgfsetyvec{\pgfpoint{0pt}{0.75ex}} % y-scale
  35. \begin{pgfpicture}{-0.1ex}{-0.6ex}{1.2ex}{-0.6ex} % clipping
  36. \pgftranslateto{\pgfxy(0.15,-.30)}
  37. \pgftranslateto{\pgfxy(-0.05,.10)}\umbc@filledTriangle{black!20!bg}
  38. \pgftranslateto{\pgfxy(-0.05,.10)}\umbc@filledTriangle{black!75!bg}
  39. \pgftranslateto{\pgfxy(-0.05,.10)}\umbc@filledTriangle{#1}
  40. \end{pgfpicture}}}
  41. % hook to let user change the tribullets colors for enumi, enumii, enumiii
  42. \newcommand{\umbctribulletscolors}[3]{%
  43. \def\umbc@tribulletscoli{#1}
  44. \def\umbc@tribulletscolii{#2}
  45. \def\umbc@tribulletscoliii{#3}
  46. }
  47. % set default colors for enumi, enumii, enumiii
  48. \umbctribulletscolors{red}{blue}{orange!40!yellow}
  49. \defbeamertemplate{itemize item}{umbctribullets}{%
  50. \umbc@tribullets{\umbc@tribulletscoli}}
  51. \defbeamertemplate{itemize subitem}{umbctribullets}{%
  52. \small\umbc@tribullets{\umbc@tribulletscolii}}
  53. \defbeamertemplate{itemize subsubitem}{umbctribullets}{
  54. \footnotesize\umbc@tribullets{\umbc@tribulletscoliii}}
  55. \setbeamertemplate{items}[umbctribullets]
  56. \mode<all>