From 62dc979b3581324476e859c5193c81c4583e2618 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 27 Jun 2020 03:01:57 +0000 Subject: CTAN sync 202006270301 --- .../beamer-contrib/beamerappendixnote/README.md | 18 +++++--- .../beamerappendixnote/beamerappendixnote.dtx | 49 ++++++++++++++------- .../beamerappendixnote/beamerappendixnote.pdf | Bin 56311 -> 57462 bytes .../beamer-contrib/beamerappendixnote/build.sh | 30 +++++++++++++ .../beamerappendixnote/example-basic.pdf | Bin 9924 -> 9920 bytes .../beamerappendixnote/example-longnote.pdf | Bin 0 -> 16178 bytes .../beamerappendixnote/example-longnote.tex | 12 +++++ 7 files changed, 86 insertions(+), 23 deletions(-) create mode 100755 macros/latex/contrib/beamer-contrib/beamerappendixnote/build.sh create mode 100644 macros/latex/contrib/beamer-contrib/beamerappendixnote/example-longnote.pdf create mode 100644 macros/latex/contrib/beamer-contrib/beamerappendixnote/example-longnote.tex (limited to 'macros/latex/contrib/beamer-contrib') diff --git a/macros/latex/contrib/beamer-contrib/beamerappendixnote/README.md b/macros/latex/contrib/beamer-contrib/beamerappendixnote/README.md index b75eb9c94f..0aff14ca6f 100644 --- a/macros/latex/contrib/beamer-contrib/beamerappendixnote/README.md +++ b/macros/latex/contrib/beamer-contrib/beamerappendixnote/README.md @@ -1,4 +1,8 @@ -Beamer appendix note introduces the `\appxnote` command, which puts the note's content on a separate beamer frame, shown by the command `\printappxnotes`. It also creates interactive buttons to move back and forth between the two frames. +Beamer appendix note introduces the `appxnote` command, which puts the note's content on a separate beamer frame, shown by the command `printappxnotes`. It also creates interactive buttons to move back and forth between the two frames. + +# Documentation + +The package documentation can be found at http://mirrors.ctan.org/macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.pdf. # Licence @@ -6,13 +10,15 @@ The `beamerappendixnote` package is made available under the [LaTeX Project Publ # Installation -To install the package, copy beamersubframe.sty into your `texmf` folder. If you wish to build this file from the source code, follow the following instructions. +To install the package through a package manager (recommended), follow the instructions in the [documentation](http://mirrors.ctan.org/macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.pdf). + +To install the package manually, copy beamerappendixnote.sty into your `texmf` folder. If you wish to build this file from the source code, follow the following instructions or - if you are running a UNIX machine - run `build.sh`. # Build -1. Generate beamersubframe.sty +1. Generate beamerappendixnote.sty ``` -tex beamersubframe.ins +tex beamerappendixnote.ins ``` 2. Compile examples @@ -22,7 +28,7 @@ xelatex example* 3. Compile documentation ``` -xelatex beamersubframe.dtx -xelatex beamersubframe.dtx +xelatex beamerappendixnote.dtx +xelatex beamerappendixnote.dtx ``` 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 @@ % % \ProvidesPackage{beamerappendixnote} %<*package> - [2020/06/07 v1.0.1 updated documentation] + [2020/06/26 v1.1.1 environment and frame options] % %<*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} diff --git a/macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.pdf b/macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.pdf index c6160f5186..fbd99a21f5 100644 Binary files a/macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.pdf and b/macros/latex/contrib/beamer-contrib/beamerappendixnote/beamerappendixnote.pdf differ diff --git a/macros/latex/contrib/beamer-contrib/beamerappendixnote/build.sh b/macros/latex/contrib/beamer-contrib/beamerappendixnote/build.sh new file mode 100755 index 0000000000..0bc9d37a88 --- /dev/null +++ b/macros/latex/contrib/beamer-contrib/beamerappendixnote/build.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +NAME=beamerappendixnote +TEXMF_DIR=~/texmf/tex/latex/$NAME +BUILD_DIR=.tex-build + +# compile sty +mkdir -p $BUILD_DIR +tex -output-directory=$BUILD_DIR $NAME.ins + +# install sty +mkdir -p $TEXMF_DIR +ln -sf "`pwd`/$BUILD_DIR/$NAME.sty" $TEXMF_DIR + +# compile examples +for f in example*.tex + do xelatex -output-directory=$BUILD_DIR $f +done +xelatex -output-directory=$BUILD_DIR example*.tex +ln -sf $BUILD_DIR/example*.pdf ./ + +# compile documentation +xelatex -output-directory=$BUILD_DIR $NAME.dtx +xelatex -output-directory=$BUILD_DIR $NAME.dtx +ln -sf $BUILD_DIR/$NAME.pdf + +# zip for upload +cd .. +rm -f zip $NAME.zip +zip $NAME.zip $NAME/* diff --git a/macros/latex/contrib/beamer-contrib/beamerappendixnote/example-basic.pdf b/macros/latex/contrib/beamer-contrib/beamerappendixnote/example-basic.pdf index 6f96ecb4f2..d07c0a005f 100644 Binary files a/macros/latex/contrib/beamer-contrib/beamerappendixnote/example-basic.pdf and b/macros/latex/contrib/beamer-contrib/beamerappendixnote/example-basic.pdf differ diff --git a/macros/latex/contrib/beamer-contrib/beamerappendixnote/example-longnote.pdf b/macros/latex/contrib/beamer-contrib/beamerappendixnote/example-longnote.pdf new file mode 100644 index 0000000000..08e6a705b1 Binary files /dev/null and b/macros/latex/contrib/beamer-contrib/beamerappendixnote/example-longnote.pdf differ diff --git a/macros/latex/contrib/beamer-contrib/beamerappendixnote/example-longnote.tex b/macros/latex/contrib/beamer-contrib/beamerappendixnote/example-longnote.tex new file mode 100644 index 0000000000..c4b900b1de --- /dev/null +++ b/macros/latex/contrib/beamer-contrib/beamerappendixnote/example-longnote.tex @@ -0,0 +1,12 @@ +\documentclass[20pt]{beamer} +\usepackage{beamerappendixnote} +\usepackage{lipsum} +\begin{document} +\begin{frame}{Main title} + Main content \vfill + \appxnote[allowframebreaks]{Long note}{ + \lipsum[2] + } +\end{frame} +\printappxnotes +\end{document} \ No newline at end of file -- cgit v1.2.3