diff options
author | Karl Berry <karl@freefriends.org> | 2020-06-27 21:03:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-06-27 21:03:48 +0000 |
commit | cf8bd6e1ef6fe958941b909299e8db15bae9caef (patch) | |
tree | 287476ced82bc9fc2b283b5eb0e22e25d86b072a /Master/texmf-dist/source | |
parent | 5dfedeed3b702aa29663082dfe7d6d020e2b7700 (diff) |
beamerappendixnote (27jun20)
git-svn-id: svn://tug.org/texlive/trunk@55676 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/beamerappendixnote/beamerappendixnote.dtx | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/Master/texmf-dist/source/latex/beamerappendixnote/beamerappendixnote.dtx b/Master/texmf-dist/source/latex/beamerappendixnote/beamerappendixnote.dtx index 206897ec5d5..8f58aee73bc 100644 --- a/Master/texmf-dist/source/latex/beamerappendixnote/beamerappendixnote.dtx +++ b/Master/texmf-dist/source/latex/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} |