texlive[42195] Master/texmf-dist: overlays (2oct16)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 4 00:20:33 CEST 2016


Revision: 42195
          http://tug.org/svn/texlive?view=revision&revision=42195
Author:   karl
Date:     2016-10-04 00:20:33 +0200 (Tue, 04 Oct 2016)
Log Message:
-----------
overlays (2oct16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/overlays/ChangeLog
    trunk/Master/texmf-dist/doc/latex/overlays/README
    trunk/Master/texmf-dist/doc/latex/overlays/overlays.pdf
    trunk/Master/texmf-dist/doc/latex/overlays/overlays.tex
    trunk/Master/texmf-dist/doc/latex/overlays/sample.pdf
    trunk/Master/texmf-dist/doc/latex/overlays/sample.tex
    trunk/Master/texmf-dist/tex/latex/overlays/overlays.sty

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/overlays/TODO

Modified: trunk/Master/texmf-dist/doc/latex/overlays/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/latex/overlays/ChangeLog	2016-10-03 11:46:26 UTC (rev 42194)
+++ trunk/Master/texmf-dist/doc/latex/overlays/ChangeLog	2016-10-03 22:20:33 UTC (rev 42195)
@@ -1,3 +1,12 @@
+2016-10-02:
+ * "\savebetweenoverlays" command for counters not to be incremented between
+   overlays
+ * bump version to 2.2
+
+2016-10-01:
+ * don't increment the "equation" counter between overlays
+ * bump version to 2.1
+
 2016-09-30:
  * "fragileoverlays" environment, providing partial support for verbatim content
  * bump version to 2.0

Modified: trunk/Master/texmf-dist/doc/latex/overlays/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/overlays/README	2016-10-03 11:46:26 UTC (rev 42194)
+++ trunk/Master/texmf-dist/doc/latex/overlays/README	2016-10-03 22:20:33 UTC (rev 42195)
@@ -1,13 +1,16 @@
-The "overlays" LaTeX package (version 2.0)
+The "overlays" LaTeX package (version 2.2)
 ------------------------------------------
 
-The "overlay" allows to write presentations with dynamic slides. It does not
-presuppose any specific document class. Rather, it is a lightweight alternative
-to full-fledged presentation classes like "beamer".
+The "overlay" package allows to write presentations with dynamic slides. It does
+not presuppose any specific document class. Rather, it is a lightweight
+alternative to full-fledged presentation classes like "beamer".
 
-The package is released 'as is' with no warranty under the LaTeX Project Public
-License, version 1.3 [1].
+The package requires the following packages: "color", "environ", and "pgffor"
+(part of "pgf").
 
+It is released 'as is' with no warranty under the LaTeX Project Public License,
+version 1.3 [1].
+
 Andreas Nolda (andreas at nolda.org)
 ----
 [1] Cf. COPYING.

Deleted: trunk/Master/texmf-dist/doc/latex/overlays/TODO
===================================================================
--- trunk/Master/texmf-dist/doc/latex/overlays/TODO	2016-10-03 11:46:26 UTC (rev 42194)
+++ trunk/Master/texmf-dist/doc/latex/overlays/TODO	2016-10-03 22:20:33 UTC (rev 42195)
@@ -1 +0,0 @@
- * preserve linebreaks in the "alltt" environment

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

Modified: trunk/Master/texmf-dist/doc/latex/overlays/overlays.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/overlays/overlays.tex	2016-10-03 11:46:26 UTC (rev 42194)
+++ trunk/Master/texmf-dist/doc/latex/overlays/overlays.tex	2016-10-03 22:20:33 UTC (rev 42195)
@@ -9,7 +9,7 @@
 \begin{document}
 \title{\textsf{overlays} -- incremental slides}
 \author{Andreas Nolda}
-\date{2016/09/30 (v.\,2.0)}
+\date{2016/10/02 (v.\,2.2)}
 \maketitle
 
 \noindent The \textsf{overlay} package allows to write presentations with
@@ -67,6 +67,15 @@
 in the overlay specification, but is absent from unspecified overlays and does
 not take up space there.
 
+\pagebreak
+\DescribeMacro{\savebetweenoverlays}
+The |page| and |equation| counters are not incremented between overlays. Other
+counters can be saved between overlays, too, by means of the following command:
+\begin{quote}
+|\savebetweenoverlays{|\meta{counter name}|}|
+\end{quote}
+Typically, this command would be used in the preamble.
+
 \section{Known limitations}
 
 The |\alert|, |\visible|, and |\only| commands must not contain verbatim
@@ -73,6 +82,11 @@
 commands or environments. They may be used in the content of the |alltt|
 environment, though.
 
+\section{Dependencies}
+
+The \textsf{overlays} package requires the following packages: \textsf{color},
+\textsf{environ}, and \textsf{pgffor} (part of \textsf{pgf}).
+
 \section{Credits}
 
 The code of the \textsf{overlays} package is inspired by Matthias Meister's
@@ -79,9 +93,9 @@
 \textsf{present} package.
 
 In addition, it uses an algorithm by Martin Scharrer for testing numbers in
-numerical ranges (cf. \url{http://tex.stackexchange.com/q/19000/}).
+numerical ranges (cf. \url{http://tex.stackexchange.com/q/19000}).
 
-The code for processing overlays with verbatim content is taken from the
-\textsf{texpower} package, which in turn took it from Till Tantau's
-\textsf{beamer} package.
+The code for saving counters between overlays as well as for overlays with
+verbatim content is taken from the \textsf{texpower} package, which in turn is
+based on Till Tantau's \textsf{beamer} package.
 \end{document}

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

Modified: trunk/Master/texmf-dist/doc/latex/overlays/sample.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/overlays/sample.tex	2016-10-03 11:46:26 UTC (rev 42194)
+++ trunk/Master/texmf-dist/doc/latex/overlays/sample.tex	2016-10-03 22:20:33 UTC (rev 42195)
@@ -6,8 +6,6 @@
             footskip=6mm]{geometry}
 \usepackage{overlays}
 \usepackage[breaklinks,hidelinks]{hyperref}
-\usepackage{url}
-\usepackage[normalem]{ulem}
 \usepackage{doc}
 \usepackage{alltt}
 \lofoot{\hspace{-4mm}%
@@ -21,8 +19,6 @@
 \definecolor{structure}{rgb}{0.1,0.25,0.5}
 \setkomafont{pagefoot}{\color{structure}\normalfont\bfseries\scriptsize}
 \addtokomafont{sectioning}{\color{structure}}
-\let\hrefsave\href
-\renewcommand{\href}[2]{\hrefsave{#1}{\uline{#2}}}
 \frenchspacing
 \sloppy
 
@@ -37,8 +33,8 @@
 \textit{A sample presentation}} \\[\baselineskip]
 Andreas Nolda \\
 \url{http://andreas.nolda.org}}\vfill
-{\small Version 2.0 \\
-30 September 2016}
+{\small Version 2.2 \\
+2 October 2016}
 \clearpage
 
 \begin{fragileoverlays}{6}
@@ -136,7 +132,7 @@
 \begin{fragileoverlays}{3}
 \subsubsection*{Verbatim content}
 For incremental slides with verbatim content, the following environment should
-be used instead of the \texttt{overlay} environment:
+be used instead of the \texttt{overlays} environment:
 \begin{quote}
 \begin{alltt}
 \alert{1}{\textbackslash{}begin\{fragileoverlays\}\{\meta{total overlay number}\}
@@ -156,12 +152,14 @@
 
 \begin{overlays}{6}
 \subsubsection*{Caveats}
-The package expects that the slide content in the \texttt{overlays} environment
-fits on a single page. This can be ensured by means of
+The package expects that the slide content in the \alert{1}{\texttt{overlays}}
+environment fits on a single page. This can be ensured by means of
 \texttt{\textbackslash{}clearpage} commands before or after the environment.
 
-\visible{2-}{The \texttt{page} counter is not incremented between overlays.
-Other counters may give rise to unexpected results.}
+\visible{2-}{The \texttt{page} and \texttt{equation} counters are not
+incremented between overlays. Other counters can be saved between overlays, too,
+by means of the command
+\alert{2}{\texttt{\textbackslash{savebetweenoverlays\{\meta{counter name}\}}}}.}
 
 \visible{3-}{In the \texttt{tabular} environment, the
 \alert{3}{\texttt{\textbackslash{}alert}},
@@ -186,17 +184,17 @@
 
 \begin{overlays}{3}
 \subsubsection*{Credits}
-The code of the \textrm{overlays} package is inspired by
-\href{http://www.ctan.org/pkg/present}{Matthias Meister's \textrm{present}
-package}.
+The code of the \textrm{overlays} package is inspired by Matthias Meister's
+\href{http://www.ctan.org/pkg/present}{\textrm{present} package}.
 
-\visible{2-}{In addition, it uses
-\href{http://tex.stackexchange.com/q/19000/}{an algorithm by Martin Scharrer}
-for testing numbers in numerical ranges.}
+\visible{2-}{In addition, it uses an algorithm by Martin Scharrer for testing
+numbers in numerical ranges (cf. \url{http://tex.stackexchange.com/q/19000}).}
 
-\visible{3}{The code for processing overlays with verbatim content is taken from
-the \textrm{texpower} package, which in turn took it from Till Tantau's
-\textrm{beamer} package.}
+\visible{3}{The code for saving counters between overlays as well as for
+overlays with verbatim content is taken from the
+\href{http://www.ctan.org/pkg/texpower}{\textrm{texpower} package}, which in
+turn is based on Till Tantau's
+\href{http://www.ctan.org/pkg/beamer}{\textrm{beamer} package}.}
 \end{overlays}
 \label{lastpage}
 \end{document}

Modified: trunk/Master/texmf-dist/tex/latex/overlays/overlays.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/overlays/overlays.sty	2016-10-03 11:46:26 UTC (rev 42194)
+++ trunk/Master/texmf-dist/tex/latex/overlays/overlays.sty	2016-10-03 22:20:33 UTC (rev 42195)
@@ -1,9 +1,9 @@
-\ProvidesPackage{overlays}[2016/09/30 v2.0 Incremental slides]
+\ProvidesPackage{overlays}[2016/10/02 v2.2 Incremental slides]
 
 % Copyright (C) 2016 Andreas Nolda
 
 % Author: Andreas Nolda <andreas at nolda.org>
-% Version: 2.0
+% Version: 2.2
 
 % This work may be distributed and/or modified under the conditions of the LaTeX
 % Project Public License, either version 1.3 of this license or (at your option)
@@ -13,53 +13,37 @@
 
 % The following code is inspired by Matthias Meister's "present" package. It
 % uses an algorithm by Martin Scharrer for testing numbers in numerical ranges
-% (http://tex.stackexchange.com/q/19000/). The code for processing overlays with
-% verbatim content is taken from the "texpower" package, which in turn took it
-% from Till Tantau's "beamer" package.
+% (http://tex.stackexchange.com/q/19000). The code for saving counters between
+% overlays as well as for overlays with verbatim content is taken from the
+% "texpower" package, which in turn is based on Till Tantau's "beamer" package.
 
 \RequirePackage{color}
 \RequirePackage{environ}
 \RequirePackage{pgffor}
 
-\definecolor{background}{rgb}{1,1,1}
-\definecolor{alert}{rgb}{1,0,0}
+\def\s at vedcounters{}
 
-\newcount\curoverl at y
-\newcount\maxoverl at y
-\newcount\overl at yspeca
-\newcount\overl at yspecb
-\newcount\saveequ at tion
+\def\s at vecounters%
+  {\begingroup
+     \def\@elt##1{\global\csname c@##1\endcsname\the\csname c@##1\endcsname}%
+     \xdef\restores at vedcounters{\s at vedcounters}%
+   \endgroup}
 
-\def\@getoverl at yspecb-#1\relax%
-  {\ifx\relax#1\relax
-     \overl at yspecb=\maxoverl at y
-   \else
-     \overl at yspecb=#1\relax
-   \fi}
+\newcommand{\savebetweenoverlays}[1]%
+  {\expandafter\def
+     \expandafter\s at vedcounters
+       \expandafter{\s at vedcounters\@elt{#1}}}
 
-\def\getoverl at yspecb%
-  {\@ifnextchar\relax
-     {\overl at yspecb=\overl at yspeca}%
-     {\@getoverl at yspecb}}
+\savebetweenoverlays{page}
+\savebetweenoverlays{equation}
 
-\def\ifinoverl at yspec#1#2%
-  {\global\let\inoverl at yspec\@secondoftwo
-   \foreach \i in {#2}
-     {\afterassignment\getoverl at yspecb
-      \overl at yspeca=0\i\relax
-      \pgfmathtruncatemacro\result{(#1>=\overl at yspeca) && (#1<=\overl at yspecb)}%
-      \ifnum\result=1\relax
-        \breakforeach
-        \global\let\inoverl at yspec\@firstoftwo
-      \fi}%
-   \inoverl at yspec}
+\newcount\curoverl at y
+\newcount\maxoverl at y
 
-\long\def\overl at y#1#2#3{\ifinoverl at yspec{\curoverl at y}{#1}{#2}{#3}}
-
 \NewEnviron{overlays}[1]%
-  {\maxoverl at y=#1%
+  {\s at vecounters
+   \maxoverl at y=#1%
    \curoverl at y=0%
-   \saveequ at tion=\value{equation}%
    \loop
      \advance\curoverl at y by 1%
      \begingroup
@@ -66,10 +50,8 @@
      \BODY
      \endgroup
      \ifnum\curoverl at y<\maxoverl at y%
-       \vfill
        \clearpage
-       \addtocounter{page}{-1}%
-       \setcounter{equation}{\saveequ at tion}%
+       \restores at vedcounters
    \repeat}
 
 \newwrite\verb at timfileout
@@ -84,6 +66,19 @@
    \@makeother\^^L
    \endlinechar`\^^M \catcode`\^^M=12 \processslidefirstline}
 
+\newenvironment{fragileoverlays}[1]
+  {\maxoverl at y=#1%
+   \def\verb at timfilen@me{\jobname.vrb}%
+   \immediate\openout\verb at timfileout=\verb at timfilen@me%
+   \verb at timreadslide}
+  {\immediate\closeout\verb at timfileout%
+   \begin{overlays}{\maxoverl at y}
+   \def\verbatim at nolig@list{\do\`\do\<\do\>\do\'} % don't make "," and "-" active
+   \input{\verb at timfilen@me}%
+   \end{overlays}}
+
+\def\endfr at gileoverl@ys{\endgroup\end{fragileoverlays}}
+
 {\catcode`\^^M=12\endlinechar=-1%
  \long\gdef\processslidefirstline#1^^M%
    {\def\overl at ystest{#1}%
@@ -111,21 +106,48 @@
  \xdef\stopslide{\string\\end\string\{fragileoverlays\string\}}
  \xdef\stopslidefirst{\noexpand\end\string\{fragileoverlays\string\}}}
 
-\newenvironment{fragileoverlays}[1]
-  {\maxoverl at y=#1%
-   \def\verb at timfilen@me{\jobname.vrb}%
-   \immediate\openout\verb at timfileout=\verb at timfilen@me%
-   \verb at timreadslide}
-  {\immediate\closeout\verb at timfileout%
-   \begin{overlays}{\maxoverl at y}
-   \def\verbatim at nolig@list{\do\`\do\<\do\>\do\'} % do not make "," and "-" active
-   \input{\verb at timfilen@me}%
-   \end{overlays}}
+\newcount\overl at yspeca
+\newcount\overl at yspecb
 
-\def\endfr at gileoverl@ys{\endgroup\end{fragileoverlays}}
+\def\@getoverl at yspecb-#1\relax%
+  {\ifx\relax#1\relax
+     \overl at yspecb=\maxoverl at y
+   \else
+     \overl at yspecb=#1\relax
+   \fi}
 
+\def\getoverl at yspecb%
+  {\@ifnextchar\relax
+     {\overl at yspecb=\overl at yspeca}%
+     {\@getoverl at yspecb}}
+
+\def\ifinoverl at yspec#1#2%
+  {\global\let\inoverl at yspec\@secondoftwo
+   \foreach \i in {#2}
+     {\afterassignment\getoverl at yspecb
+      \overl at yspeca=0\i\relax
+      \pgfmathtruncatemacro\result{(#1>=\overl at yspeca) && (#1<=\overl at yspecb)}%
+      \ifnum\result=1\relax
+        \breakforeach
+        \global\let\inoverl at yspec\@firstoftwo
+      \fi}%
+   \inoverl at yspec}
+
+\long\def\overl at y#1#2#3{\ifinoverl at yspec{\curoverl at y}{#1}{#2}{#3}}
+
 \newcommand{\only}[2]{\overl at y{#1}{#2}{\relax}}
 
-\newcommand{\visible}[2]{\overl at y{#1}{#2}{{\color{background}#2\ifvmode\unskip\fi}}}
+\definecolor{background}{rgb}{1,1,1}
+\newcommand{\visible}[2]{\overl at y{#1}{#2}{{\color{background}%
+                                           \let\default at color\current at color
+                                           #2%
+                                           \ifvmode
+                                             \unskip
+                                           \fi}}}
 
-\newcommand{\alert}[2]{\overl at y{#1}{{\color{alert}#2\ifvmode\unskip\fi}}{#2}}
+\definecolor{alert}{rgb}{1,0,0}
+\newcommand{\alert}[2]{\overl at y{#1}{{\color{alert}%
+                                     #2%
+                                     \ifvmode
+                                       \unskip
+                                     \fi}}{#2}}



More information about the tex-live-commits mailing list