summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.dtx')
-rw-r--r--macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.dtx49
1 files changed, 32 insertions, 17 deletions
diff --git a/macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.dtx b/macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.dtx
index 206897ec5d..8f58aee73b 100644
--- a/macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.dtx
+++ b/macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.dtx
@@ -23,7 +23,7 @@
%</driver>
%<package> \ProvidesPackage{beamerappendixnote}
%<*package>
- [2020/06/07 v1.0.1 updated documentation]
+ [2020/06/26 v1.1.1 environment and frame options]
%</package>
%<*driver>
\documentclass{l3doc}
@@ -70,7 +70,7 @@
\begin{documentation}
-\noindent Beamer appendix note introduces the \cs{appxnote} command, which puts the note's content on a separate beamer frame, shown by the command \cs{printappxnotes}. It also creates interactive buttons to move back and forth between the two frames:
+\noindent Beamer appendix note introduces the \cs{appxnote} command, which puts the note's content on a separate beamer frame, shown by the command \cs{printappxnotes}. It also creates interactive buttons to move back and forth between the two frames.
\lstinputlisting{example-basic.tex}
\includegraphics[page=1,width=.49\linewidth]{example-basic.pdf}
@@ -85,10 +85,10 @@ The \pkg{beamerappendixnote} package is available on \fnurl{https://ctan.org/pkg
\begin{function}{\appxnote}
\begin{syntax}
- \cs{appxnote}\marg{title}\marg{content}
+ \cs{appxnote}\oarg{frameoptions}\marg{title}\marg{content}
\end{syntax}
- Create a new appendix note. Inserts a \cs{beamergotobutton} to a frame that contains \marg{content}. The appendix frame is created using \cs{printappxnotes}. The button’s text and the title of the appendix frame are both set to \marg{title}.
+ Create a new appendix note. Inserts a \cs{beamergotobutton} to a frame that contains \meta{content}. The appendix frame is created using \cs{printappxnotes}. The button’s text and the title of the appendix frame are both set to \meta{title}. If you specify \meta{frameoptions}, these will be used when creating the beamer frame.
\end{function}
\begin{function}{\printappxnotes}
@@ -136,7 +136,7 @@ The \pkg{beamerappendixnote} package is available on \fnurl{https://ctan.org/pkg
}%
% \end{macrocode}
%
-% Identify the package and give the over all version information.
+% Identify the package and give the over all version information
% \begin{macrocode}
\ProvidesExplPackage {beamerappendixnote} {2020/05/07} {1.0}
{Create notes in appendix frames}
@@ -149,21 +149,24 @@ The \pkg{beamerappendixnote} package is available on \fnurl{https://ctan.org/pkg
%
% \subsection{Data structures}
%
-% Initialise sequences used to store notes.
+% Initialise sequences used to store notes
% \begin{macrocode}
\seq_new:N \g_ban_titles
\seq_new:N \g_ban_content
+\seq_new:N \g_ban_options
% \end{macrocode}
%
% \subsection{Macros}
-%
% \begin{macro}{\appxnote}
-% Create a new appendix note and insert a link
+% Create a new appendix note (store values) and insert a button
+% Note: using \cs{newcommand} because \cs{NewDocumentCommand} does not support
+% multiple paragraphs
% \begin{macrocode}
-\NewDocumentCommand{\appxnote}{m m}{
- \seq_gput_right:Nn \g_ban_titles {#1}
- \seq_gput_right:Nn \g_ban_content {#2}
- \hyperlink{ban-\seq_count:N \g_ban_titles}{\beamergotobutton{#1}}%
+\newcommand{\appxnote}[3][t]{
+ \seq_gput_right:Nn \g_ban_titles {#2}
+ \seq_gput_right:Nn \g_ban_options {#1}
+ \seq_gput_right:Nn \g_ban_content {#3}
+ \hyperlink{ban-\seq_count:N \g_ban_titles}{\beamergotobutton{#2}}%
\label{ban-back-\seq_count:N \g_ban_titles}
}
% \end{macrocode}
@@ -171,14 +174,26 @@ The \pkg{beamerappendixnote} package is available on \fnurl{https://ctan.org/pkg
%
% \begin{macro}{\@@_print_func:n}
% Print an appendix note
+% Args: title, content, label, back label, options
% \begin{macrocode}
-\cs_set:Npn \print_func:n #1 {
- \begin{frame}[label=ban-#1]{\seq_item:Nn \g_ban_titles {#1}}
- \hyperlink{ ban-back-#1 }{\beamerreturnbutton{Back}}
+\cs_set:Npn \print_func:nnnnn #1 #2 #3 #4 #5 {
+ \def\options{#5}
+ \begin{frame}[\expandafter\options]{#1}\label{#3}
+ \hyperlink{#4}{\beamerreturnbutton{Back}}
\vfill
- \seq_item:Nn \g_ban_content {#1}
+ #2
\end{frame}
}
+% Get title, content, label, back label and options
+% Arg: id
+% \begin{macrocode}
+\cs_set:Npn \expand_func:n #1 {
+ \print_func:nnnnn {\seq_item:Nn \g_ban_titles {#1}}
+ {\seq_item:Nn \g_ban_content {#1}}
+ {ban-#1}
+ {ban-back-#1}
+ {\seq_item:Nn \g_ban_options {#1}}
+}
% \end{macrocode}
% \end{macro}
%
@@ -186,7 +201,7 @@ The \pkg{beamerappendixnote} package is available on \fnurl{https://ctan.org/pkg
% Print all appendix notes
% \begin{macrocode}
\NewDocumentCommand{\printappxnotes}{}{
- \int_step_function:nN {\seq_count:N \g_ban_titles} \print_func:n
+ \int_step_function:nN {\seq_count:N \g_ban_titles} \expand_func:n
}
% \end{macrocode}
% \end{macro}