summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/beameraudience
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-05 22:31:34 +0000
committerKarl Berry <karl@freefriends.org>2011-08-05 22:31:34 +0000
commite490838fbf019812f6c428450ffae3c7a9b22153 (patch)
tree9fabcf6be77693af6207a79fe3f41877053c5c32 /Master/texmf-dist/tex/latex/beameraudience
parentef7d8805855fe42e4654f21022b8e19117ede9d7 (diff)
new latex package beameraudience (5aug11)
git-svn-id: svn://tug.org/texlive/trunk@23427 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/beameraudience')
-rw-r--r--Master/texmf-dist/tex/latex/beameraudience/beameraudience.sty81
1 files changed, 81 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/beameraudience/beameraudience.sty b/Master/texmf-dist/tex/latex/beameraudience/beameraudience.sty
new file mode 100644
index 00000000000..955ea1e2cac
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/beameraudience/beameraudience.sty
@@ -0,0 +1,81 @@
+%%
+%% This program is provided under the terms of the
+%% LaTeX Project Public License distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt.
+%%
+%% Author: Holger Marschall
+%% holgermarschall@yahoo.de
+%%
+\def\fileversion{0.1}
+\def\filedate{2011/08/02}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{beameraudience}[\filedate\space
+ v\fileversion\space assembling beamer frames according to audience]
+
+% check for beamer class
+% taken from beamersubframe (v 0.1 -- Mike Kaufmann -- THANKS!)
+\@ifclassloaded{beamer}{}{%
+ \PackageError{beameraudience}{%
+ The package works only with the beamer class,\MessageBreak
+ therefore it is not loaded.
+ }{%
+ The package is not loaded, because it needs the\MessageBreak
+ beamer class. Continuing may lead to additional\MessageBreak
+ errors because of undefined commands.
+ }
+ \endinput
+}
+
+\RequirePackage{kvoptions}
+\RequirePackage{cprotect}
+\RequirePackage{ifthen}
+
+\DeclareStringOption[all]{audience}
+\ProcessKeyvalOptions*
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% start functional stuff
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%
+% new frame command '\framefor{#1}{#2}'
+% #1 audience-keyword checked
+% against the package option
+% #2 frame content
+%
+% and related stuff: '\justfor{#1}{#2}'
+% '\showcontentfor{#1}{#2}'
+%
+
+\newboolean{includethis}
+\newcommand{\ifinclude}[1]{\ifthenelse{\boolean{includethis}}{#1}{}}
+\newcommand{\ifshow}[1]{\ifthenelse{\boolean{includethis}}{\only<beamer:1|handout:1>{#1}}{\only<beamer:0|handout:0>{#1}}}
+
+\newcommand{\framefor}[2]%
+{%
+ \ifthenelse{\equal{#1}{\beameraudience@audience}}{\setboolean{includethis}{true}}{}
+ \ifinclude{%
+ \begin{frame}
+ #2
+ \end{frame}%
+ }
+ \setboolean{includethis}{false}
+}
+
+\newcommand{\justfor}[2]%
+{%
+ \ifthenelse{\equal{#1}{\beameraudience@audience}}{\setboolean{includethis}{true}}{}
+ \ifinclude{%
+ #2
+ }
+ \setboolean{includethis}{false}
+}
+
+\newcommand{\showcontentfor}[2]%
+{%
+ \ifthenelse{\equal{#1}{\beameraudience@audience}}{\setboolean{includethis}{true}}{}
+ \ifshow{%
+ #2
+ }
+ \setboolean{includethis}{false}
+} \ No newline at end of file