texlive[55732] Master/texmf-dist: beamerappendixnote (2jul20)

commits+karl at tug.org commits+karl at tug.org
Thu Jul 2 23:47:01 CEST 2020


Revision: 55732
          http://tug.org/svn/texlive?view=revision&revision=55732
Author:   karl
Date:     2020-07-02 23:47:00 +0200 (Thu, 02 Jul 2020)
Log Message:
-----------
beamerappendixnote (2jul20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/beamerappendixnote/beamerappendixnote.pdf
    trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-basic.pdf
    trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-longnote.pdf
    trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-longnote.tex
    trunk/Master/texmf-dist/source/latex/beamerappendixnote/beamerappendixnote.dtx
    trunk/Master/texmf-dist/tex/latex/beamerappendixnote/beamerappendixnote.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-backtop.pdf
    trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-backtop.tex

Modified: trunk/Master/texmf-dist/doc/latex/beamerappendixnote/beamerappendixnote.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-backtop.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-backtop.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-backtop.pdf	2020-07-02 21:46:44 UTC (rev 55731)
+++ trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-backtop.pdf	2020-07-02 21:47:00 UTC (rev 55732)

Property changes on: trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-backtop.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-backtop.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-backtop.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-backtop.tex	2020-07-02 21:47:00 UTC (rev 55732)
@@ -0,0 +1,9 @@
+\documentclass[20pt]{beamer}
+\usepackage[backposition=title]{beamerappendixnote}
+\begin{document}
+\begin{frame}{Main title}
+  Main content \vfill
+  \appxnote{Note title}{Note content}
+\end{frame}
+\printappxnotes
+\end{document}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-backtop.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-basic.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-longnote.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-longnote.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-longnote.tex	2020-07-02 21:46:44 UTC (rev 55731)
+++ trunk/Master/texmf-dist/doc/latex/beamerappendixnote/example-longnote.tex	2020-07-02 21:47:00 UTC (rev 55732)
@@ -1,12 +1,10 @@
 \documentclass[20pt]{beamer}
-\usepackage{beamerappendixnote}
+\usepackage[backposition=title]{beamerappendixnote}
 \usepackage{lipsum}
 \begin{document}
 \begin{frame}{Main title}
   Main content \vfill
-  \appxnote[allowframebreaks]{Long note}{
-    \lipsum[2]
-  }
+  \appxnote[allowframebreaks]{Long note}{\lipsum[3]}
 \end{frame}
 \printappxnotes
 \end{document}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/source/latex/beamerappendixnote/beamerappendixnote.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/beamerappendixnote/beamerappendixnote.dtx	2020-07-02 21:46:44 UTC (rev 55731)
+++ trunk/Master/texmf-dist/source/latex/beamerappendixnote/beamerappendixnote.dtx	2020-07-02 21:47:00 UTC (rev 55732)
@@ -23,7 +23,7 @@
 %</driver>
 %<package> \ProvidesPackage{beamerappendixnote}
 %<*package>
-  [2020/06/26 v1.1.1 environment and frame options]
+  [2020/07/01 v1.2.0 backposition option]
 %</package>
 %<*driver>
 \documentclass{l3doc}
@@ -34,7 +34,7 @@
 % Unicode
 \usepackage{fontspec,unicode-math}
 % Auxiliary
-\usepackage{listings,graphicx}
+\usepackage{listings,graphicx,xparse}
 
 %% Layout
 % Font
@@ -50,6 +50,19 @@
 
 %% Definitions
 \newcommand\fnurl[2]{\href{#1}{#2}\footnote{\url{#1}}}
+\ExplSyntaxOn
+\NewDocumentCommand{\example}{m m o}
+  {
+    \IfNoValueTF{#3} 
+      {\lstinputlisting{example-#1.tex}}
+      {\lstinputlisting[linerange=#3]{example-#1.tex}}
+    \int_step_inline:nn {#2} 
+      {
+        \includegraphics[page=##1,width=.49\linewidth]{example-#1.pdf}
+        \int_if_even:nT {##1} {\newline}
+      }
+  }
+\ExplSyntaxOff
 
 \begin{document}
 
@@ -72,9 +85,7 @@
 
 \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}
-\includegraphics[page=2,width=.49\linewidth]{example-basic.pdf}
+\example{basic}{2}
 
 \clearpage
 \section{Installation}
@@ -99,13 +110,30 @@
   Prints appendix notes in the order they are created using \cs{appxnote}.  Has to be used after the last appendix note.  Uses one frame per note.  Inserts a \cs{beamerreturnbutton} button to the frame where \cs{appxnote} was called, followed by the content, separated by a \cs{vfill}.  
 \end{function}
 
+
+\section{Advanced usage}
+
+\subsection{Change the back button placement}
+
+To move the back button from the body of the appendix notes into the frame title, load the \pkg{beamerappendixnote} package with the \lstinline{backposition=title} option.
+
+\example{backtop}{2}[2-2]
+
+\subsection{Multi-frame notes}
+
+To create appendix notes spanning multiple frames, set \meta{frameoption} to \lstinline{allowframebreaks}.  This works well with the \lstinline{backposition=title} package option, as it makes the back button visible on every frame.
+
+\example{longnote}{4}
+
+
+
 \end{documentation}
 
 
-\begin{implementation}
-  \section{Implementation}
-  \DocInput{beamerappendixnote.dtx}
-\end{implementation}
+%\begin{implementation}
+%  \section{Implementation}
+%  \DocInput{beamerappendixnote.dtx}
+%\end{implementation}
 
 
 \end{document}
@@ -118,12 +146,10 @@
 %
 % \subsection{Dependencies}
 %
-% Load the essential support (\pkg{expl3}).
 %    \begin{macrocode}
 \RequirePackage{expl3}
 %    \end{macrocode}
 %
-% Make sure that the version of \pkg{l3kernel} in use is sufficiently new.
 %    \begin{macrocode}
 \@ifpackagelater {expl3}{2018/04/22} {} {%
   \PackageError {beamerappendixnote} {Support package expl3 too old}
@@ -138,14 +164,29 @@
 %
 % Identify the package and give the over all version information
 %    \begin{macrocode}
-\ProvidesExplPackage {beamerappendixnote} {2020/05/07} {1.0}
+\ProvidesExplPackage {beamerappendixnote} {2020/07/01} {1.2.0}
   {Create notes in appendix frames}
 %    \end{macrocode}
 %
-% User level interfaces are all created by \pkg{xparse}
+% User level interfaces are all created by \pkg{xparse}.
 %    \begin{macrocode}
-\RequirePackage {xparse}
+\RequirePackage{xparse}
+\RequirePackage{l3keys2e}
 %    \end{macrocode}
+% 
+% \subsection{Package options}
+%    \begin{macrocode}
+\keys_define:nn { beamerappendixnote }
+{
+  backposition .choices:nn = { top, bottom, title } { },
+  backposition .tl_set:N = \g_ban_backposition
+}
+\keys_set:nn { beamerappendixnote } 
+{
+  backposition = top
+}
+\ProcessKeysOptions { beamerappendixnote } 
+%    \end{macrocode}
 %
 % \subsection{Data structures}
 %
@@ -154,6 +195,7 @@
 \seq_new:N \g_ban_titles
 \seq_new:N \g_ban_content
 \seq_new:N \g_ban_options
+\cs_generate_variant:Nn \tl_if_eq:nnT { V }
 %    \end{macrocode}
 %
 % \subsection{Macros}
@@ -178,9 +220,22 @@
 %    \begin{macrocode}
 \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
+  \begin{frame}[\expandafter\options]
+    {
+      \tl_if_eq:VnT \g_ban_backposition { title } 
+        {
+          \hyperlink{#4}{\beamerreturnbutton{Back}}~
+        }
+      #1 
+    }
+    \label{#3}
+    
+    \tl_if_eq:VnT \g_ban_backposition { top } 
+      {
+        \hyperlink{#4}{\beamerreturnbutton{Back}}
+        \vfill
+      }
+    
     #2
   \end{frame}
 }

Modified: trunk/Master/texmf-dist/tex/latex/beamerappendixnote/beamerappendixnote.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamerappendixnote/beamerappendixnote.sty	2020-07-02 21:46:44 UTC (rev 55731)
+++ trunk/Master/texmf-dist/tex/latex/beamerappendixnote/beamerappendixnote.sty	2020-07-02 21:47:00 UTC (rev 55732)
@@ -15,7 +15,7 @@
 %% ----------------------------------------------------------------
 %% 
  \ProvidesPackage{beamerappendixnote}
-  [2020/06/26 v1.1.1 environment and frame options]
+  [2020/07/01 v1.2.0 backposition option]
 \RequirePackage{expl3}
 \@ifpackagelater {expl3}{2018/04/22} {} {%
   \PackageError {beamerappendixnote} {Support package expl3 too old}
@@ -26,12 +26,24 @@
     }%
   \endinput
 }%
-\ProvidesExplPackage {beamerappendixnote} {2020/05/07} {1.0}
+\ProvidesExplPackage {beamerappendixnote} {2020/07/01} {1.2.0}
   {Create notes in appendix frames}
-\RequirePackage {xparse}
+\RequirePackage{xparse}
+\RequirePackage{l3keys2e}
+\keys_define:nn { beamerappendixnote }
+{
+  backposition .choices:nn = { top, bottom, title } { },
+  backposition .tl_set:N = \g_ban_backposition
+}
+\keys_set:nn { beamerappendixnote }
+{
+  backposition = top
+}
+\ProcessKeysOptions { beamerappendixnote }
 \seq_new:N \g_ban_titles
 \seq_new:N \g_ban_content
 \seq_new:N \g_ban_options
+\cs_generate_variant:Nn \tl_if_eq:nnT { V }
 \newcommand{\appxnote}[3][t]{
   \seq_gput_right:Nn \g_ban_titles {#2}
   \seq_gput_right:Nn \g_ban_options {#1}
@@ -41,9 +53,22 @@
 }
 \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
+  \begin{frame}[\expandafter\options]
+    {
+      \tl_if_eq:VnT \g_ban_backposition { title }
+        {
+          \hyperlink{#4}{\beamerreturnbutton{Back}}~
+        }
+      #1
+    }
+    \label{#3}
+
+    \tl_if_eq:VnT \g_ban_backposition { top }
+      {
+        \hyperlink{#4}{\beamerreturnbutton{Back}}
+        \vfill
+      }
+
     #2
   \end{frame}
 }



More information about the tex-live-commits mailing list.