texlive[45752] Master: gridslides (11nov17)

commits+karl at tug.org commits+karl at tug.org
Sun Nov 12 00:15:56 CET 2017


Revision: 45752
          http://tug.org/svn/texlive?view=revision&revision=45752
Author:   karl
Date:     2017-11-12 00:15:55 +0100 (Sun, 12 Nov 2017)
Log Message:
-----------
gridslides (11nov17)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/gridslides/
    trunk/Master/texmf-dist/doc/latex/gridslides/Makefile
    trunk/Master/texmf-dist/doc/latex/gridslides/README.md
    trunk/Master/texmf-dist/doc/latex/gridslides/compile.pl
    trunk/Master/texmf-dist/doc/latex/gridslides/example.pdf
    trunk/Master/texmf-dist/doc/latex/gridslides/example.tex
    trunk/Master/texmf-dist/doc/latex/gridslides/figures/
    trunk/Master/texmf-dist/doc/latex/gridslides/figures/chain_nontrivial.pdf
    trunk/Master/texmf-dist/doc/latex/gridslides/figures/chain_trivial.pdf
    trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band02.png
    trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band08.png
    trunk/Master/texmf-dist/doc/latex/gridslides/figures/qahe.pdf
    trunk/Master/texmf-dist/doc/latex/gridslides/figures/qshe.pdf
    trunk/Master/texmf-dist/doc/latex/gridslides/figures/skyrmion.pdf
    trunk/Master/texmf-dist/doc/latex/gridslides/figures/trivial.pdf
    trunk/Master/texmf-dist/tex/latex/gridslides/
    trunk/Master/texmf-dist/tex/latex/gridslides/gridslides.cls
    trunk/Master/texmf-dist/tex/latex/gridslides/gridslides.sty
    trunk/Master/tlpkg/tlpsrc/gridslides.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/gridslides/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/Makefile	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/Makefile	2017-11-11 23:15:55 UTC (rev 45752)
@@ -0,0 +1,21 @@
+# Package:     gridslides
+# Description: LaTeX package to create free form slides with blocks placed on a grid
+# File:        Makefile
+# Author:      Daniel Mendler <mail at daniel-mendler.de>
+# Version:     0.1
+# Date:        2017/11/11
+# License:     GPL2 or LPPL1.3 at your option
+# Homepage:    https://github.com/minad/gridslides
+
+example.pdf: example.tex
+	./compile.pl --once example.tex
+
+clean:
+	rm -rf auto output example.pdf gridslides.zip gridslides
+
+dist: clean example.pdf *.cls *.sty README.md
+	mkdir -p gridslides/figures
+	cp `git ls-files | grep -v figures | grep -v .gitignore` gridslides
+	cp `git ls-files | grep figures` gridslides/figures
+	zip -r gridslides.zip gridslides
+	rm -rf gridslides


Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridslides/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/README.md	2017-11-11 23:15:55 UTC (rev 45752)
@@ -0,0 +1,85 @@
+# gridslides: LaTeX package to create free form slides with blocks placed on a grid
+
+This package allows to create free form slides with blocks placed on a grid.
+The blocks can be filled with text, equations, figures etc.
+This allows more flexible slides similar compared to LaTeX beamer.
+Sequential unconvering of elements is supported.
+A compiler script is provided which compiles each slide separately, avoiding long compile times this way.
+
+## Example
+
+See the file `example.tex` and `example.pdf`. Each slide is compiled separately using `compile.pl example.tex`.
+
+## Supported commands
+
+This package provides only a handful of commands, which
+allow to create slides and with blocks at fixed positions.
+
+### Slides/Pages
+
+```latex
+\begin{slide}{Slide title}
+  Slide content
+\end{slide}
+
+\begin{rawslide}
+  Raw slide without title and style
+\end{rawslide}
+
+\begin{style}
+  Define style which underlies all slides.
+  Best used together with \bg{filename}!
+\end{style}
+
+\begin{style}
+  \bg{figure-filename}
+\end{style}
+```
+
+### Slide content blocks
+
+The slide is divided in a 32x24 grid.
+
+```latex
+\bg{figure-filename}
+\txt(x,y){Text content}
+\block(x,y,w){Arbitrary content}
+\fig(x,y,w){figure-filename}
+\eq(x,y){a^2 + b^2 = c^2}
+```
+
+### Sequential uncovering
+
+Each slide can be split in multiple steps by defining blocks with `<n-m>` annotations.
+
+```latex
+\txt<1->(x,y){On slide step 1 to n}
+\block<2>(x,y,w){Only on step 2}
+\only<2-3>{
+  \block(x,y){Block content}
+}
+```
+
+### Metadata
+
+```latex
+\author{Author}            defines \theauthor
+\title{Presentation Title} defines \thetitle
+\date{Date}                defines \thedate
+\institute{Institute}      defines \theinstitute
+\theheadline defined by slide title
+\theslide defined by slide number
+```
+
+## Alternatives
+
+* beamer
+* ffslides
+* prosper
+* pure tikz or pstricks
+
+## License
+
+Copyright (c) 2017 Daniel Mendler. The package is dual-licensed
+under the GNU General Public License, version 2 and
+the LaTeX Project Public License 1.3 at your option.


Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridslides/compile.pl
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/compile.pl	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/compile.pl	2017-11-11 23:15:55 UTC (rev 45752)
@@ -0,0 +1,79 @@
+#!/usr/bin/perl
+# Package:     gridslides
+# Description: LaTeX package to create free form slides with blocks placed on a grid
+# File:        compile.pl
+# Author:      Daniel Mendler <mail at daniel-mendler.de>
+# Version:     0.1
+# Date:        2017/11/11
+# License:     GPL2 or LPPL1.3 at your option
+# Homepage:    https://github.com/minad/gridslides
+
+use strict;
+use Digest::MD5 qw(md5_hex);
+use File::Slurp qw(read_file write_file);
+
+sub load_file {
+    my ($file) = @_;
+    my $code = read_file($file);
+    $code =~ /\A(.*?\\begin\{document\})/s;
+    return ($1, $');
+}
+
+sub compile_slide {
+    my ($format, $slide, $body) = @_;
+
+    my $code = "%&$format\n\\begin{document}\\setcounter{slide}{$slide}\n$body\n\\end{document}\n";
+    my $hash = md5_hex($code);
+    my $pdf = "$hash.pdf";
+    unless (-e $pdf) {
+        my $tex = "$hash.tex";
+        write_file($tex, $code);
+        print "Compiling slide $slide - $tex...\n";
+        `pdflatex -interaction=batchmode $tex; biber $hash; pdflatex -interaction=batchmode $tex; pdflatex -interaction=batchmode $tex`;
+    }
+
+    return $pdf;
+}
+
+my $once = 0;
+my $file;
+if ($ARGV[0] eq "--once") {
+    $file = $ARGV[1];
+    $once = 1;
+} else {
+    $file = $ARGV[0];
+}
+
+my $result = $file;
+$result =~ s/\.tex\Z//g;
+$result .= '.pdf';
+
+my $out = 'output';
+mkdir($out);
+chdir($out);
+$ENV{TEXINPUTS}='..:.:';
+$ENV{BIBINPUTS}='..';
+
+my ($header, $body) = load_file "../$file";
+my $format = "header$file";
+write_file("$format.tex", "$header\n\\end{document}");
+`pdftex -interaction=batchmode -ini -jobname="$format" '&pdflatex' mylatexformat.ltx "$format.tex"`;
+
+do {
+    my @slides = ();
+    my $slide = 1;
+    while ($body =~ /(\\maketitle|\\begin\{.*?slide\}.*?\\end\{.*?slide\})/sg) {
+        my $pdf = compile_slide "$format", $slide, $1;
+        push @slides, $pdf if (-e $pdf);
+        ++$slide;
+    }
+
+    print "Joining $result...\n";
+    `pdfjoin -q -o $result @slides`;
+    rename $result, "../$result";
+
+    unless ($once) {
+        `inotifywait -e modify ../$file`;
+        (my $unused, $body) = load_file "../$file";
+    }
+} until ($once);


Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/compile.pl
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridslides/example.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/gridslides/example.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/example.pdf	2017-11-11 17:45:36 UTC (rev 45751)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/example.pdf	2017-11-11 23:15:55 UTC (rev 45752)

Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/example.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridslides/example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/example.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/example.tex	2017-11-11 23:15:55 UTC (rev 45752)
@@ -0,0 +1,111 @@
+% Package:     gridslides
+% Description: LaTeX package to create free form slides with blocks placed on a grid
+% File:        example.tex
+% Author:      Daniel Mendler <mail at daniel-mendler.de>
+% Version:     0.1
+% Date:        2017/11/11
+% License:     GPL2 or LPPL1.3 at your option
+% Homepage:    https://github.com/minad/gridslides
+\documentclass{gridslides}
+
+\usepackage{cmbright}
+
+\newcommand{\hcterm}{\text{H.c.}}
+\newcommand{\nodag}{{\phantom{\dag}}}
+\newcommand{\hc}{^\dag}
+\newcommand{\trans}{^\intercal}
+\newcommand{\nohc}{^\nodag}
+\newcommand{\OpH}{\ensuremath{\mathcal{H}}\xspace}
+\newcommand{\HH}{\ensuremath{\widehat{\OpH}}\xspace}
+\renewcommand{\vec}[1]{\ensuremath{\boldsymbol{#1}}\xspace}
+
+\newcommand{\border}{
+  \block(0,0,32){\tikz\fill[blue!40!black] (0,0) rectangle (128mm,2mm);}
+  \block(0,0.5,32){\tikz\fill[blue!40!black] (0,0) rectangle (2mm,86mm);}
+  \block(31.5,0.5,1){\tikz\fill[blue!40!black] (0,0) rectangle (2mm,86mm);}
+  \block(0,22,32){\tikz\fill[blue!40!black] (0,0) rectangle (128mm,8mm);}
+}
+
+\author{Author}
+\title{Presentation Title}
+\date{\today}
+\institute{Institute~$\cdot$~University}
+
+\begin{style}
+  \border
+  \txt(26.5,1.5){\Large\textbf{\color{blue!50!black}LOGO}}
+  \block(1.5,2,26){\LARGE\theheadline}
+  \txt(1,22.8){\color{white}\theslide}
+  \txt(4,22.9){\color{white}\scriptsize\theauthor~$\cdot$~\thetitle}
+\end{style}
+
+\begin{document}
+
+\begin{rawslide}
+  \border
+  \txt(26.5,1.5){\Large\textbf{\color{blue!50!black}LOGO}}
+  \block(2,5,28){\LARGE\thetitle}
+  \txt(2,9.5){\theauthor~$\cdot$~\thedate}
+  \txt(2,11.7){\footnotesize\theinstitute}
+\end{rawslide}
+
+\begin{slide}{Overview}
+  \block(1.5,5,29){
+    \begin{enumerate}[1.]
+    \item Topological phases
+    \item 1D p-wave superconductor
+    \end{enumerate}
+  }
+\end{slide}
+
+\begin{slide}{Topological Phases}
+  \fig(3,4,12){qahe}
+  \fig(17,4,12){qshe}
+  \txt(6,11){Conducting edge channels $\longleftrightarrow$ Non-trivial bandstructure}
+
+  \txt<2->(1.5,12.5){QAHE bulk Hamiltonian $\HH(\vec{k}) = \vec{g}(\vec{k})\cdot\vec{\sigma}$}
+  \eq<2->(13,14.2){\vec{g}(k_x,k_y) = \left(\sin k_x, \sin k_y, \cos k_x + \cos k_y - M \right)\trans}
+
+  \only<3>{
+    \fig(0.5,15,16){skyrmion}
+    \eq(4,20){M=1}
+    \block(4,15,5){\tikz \node[fill=white,text=red!90!black,inner sep=0.5mm]
+      {non-trivial};}
+
+    \fig(15,16,16){trivial}
+    \eq(18,21){M=3}
+    \block(20,17.5,2.2){\tikz \node[fill=white,inner sep=0.5mm,text=blue!90!black]
+      {trivial};}
+  }
+\end{slide}
+
+\begin{slide}{1D p-wave-SC}
+  \txt(1.5,11){Lattice}
+  \eq(6.5,10){\OpH = \sum_{i=1}^{n-1} \left [ t c_i\hc c_{i+1}\nohc + \Delta c\nohc_i c\nohc_{i+1} + \hcterm \right] - \mu \sum_{i=1}^n c_i\hc c_i\nohc}
+
+  \fig(2,4,12){chain_trivial}
+  \fig(18,5.5,12){chain_nontrivial}
+
+  \block<2->(26,10.5,4){%
+    \tikz \node[draw=red,inner sep=1mm] {
+      \scriptsize Majorana operators
+      $\begin{aligned}
+        \gamma_j\nohc &= \frac{c_j\nohc + c_j\hc}{2}\\
+        \gamma_j' &= \frac{c_j\nohc - c_j\hc}{2 \imath}
+      \end{aligned}$
+    };
+  }
+
+  \only<3>{
+    \fig(3,13.5,9){kitaev_band02}
+    \txt(5,13.5){t=0.2}
+
+    \fig(16,13.5,9){kitaev_band08}
+    \txt(18,13.5){t=0.8}
+
+    \txt(4,20.5){Bulk}
+    \eq(9,20.3){\HH(k) = (2t \cos k - \mu)\tau_z - 2\Delta\sin k\, \tau_y\qquad\vec{c}_k\hc = \left( c_k\hc,\, c_{-k}\nohc\right)}
+  }
+\end{slide}
+
+\end{document}


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

Index: trunk/Master/texmf-dist/doc/latex/gridslides/figures/chain_nontrivial.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/figures/chain_nontrivial.pdf	2017-11-11 17:45:36 UTC (rev 45751)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/figures/chain_nontrivial.pdf	2017-11-11 23:15:55 UTC (rev 45752)

Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/figures/chain_nontrivial.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridslides/figures/chain_trivial.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/gridslides/figures/chain_trivial.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/figures/chain_trivial.pdf	2017-11-11 17:45:36 UTC (rev 45751)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/figures/chain_trivial.pdf	2017-11-11 23:15:55 UTC (rev 45752)

Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/figures/chain_trivial.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band02.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band02.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band02.png	2017-11-11 17:45:36 UTC (rev 45751)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band02.png	2017-11-11 23:15:55 UTC (rev 45752)

Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band02.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band08.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band08.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band08.png	2017-11-11 17:45:36 UTC (rev 45751)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band08.png	2017-11-11 23:15:55 UTC (rev 45752)

Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band08.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridslides/figures/qahe.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/gridslides/figures/qahe.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/figures/qahe.pdf	2017-11-11 17:45:36 UTC (rev 45751)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/figures/qahe.pdf	2017-11-11 23:15:55 UTC (rev 45752)

Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/figures/qahe.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridslides/figures/qshe.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/gridslides/figures/qshe.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/figures/qshe.pdf	2017-11-11 17:45:36 UTC (rev 45751)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/figures/qshe.pdf	2017-11-11 23:15:55 UTC (rev 45752)

Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/figures/qshe.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridslides/figures/skyrmion.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/gridslides/figures/skyrmion.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/figures/skyrmion.pdf	2017-11-11 17:45:36 UTC (rev 45751)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/figures/skyrmion.pdf	2017-11-11 23:15:55 UTC (rev 45752)

Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/figures/skyrmion.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/gridslides/figures/trivial.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/gridslides/figures/trivial.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/gridslides/figures/trivial.pdf	2017-11-11 17:45:36 UTC (rev 45751)
+++ trunk/Master/texmf-dist/doc/latex/gridslides/figures/trivial.pdf	2017-11-11 23:15:55 UTC (rev 45752)

Property changes on: trunk/Master/texmf-dist/doc/latex/gridslides/figures/trivial.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/gridslides/gridslides.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gridslides/gridslides.cls	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/gridslides/gridslides.cls	2017-11-11 23:15:55 UTC (rev 45752)
@@ -0,0 +1,10 @@
+% Package:     gridslides
+% Description: LaTeX package to create free form slides with blocks placed on a grid
+% File:        gridslides.cls
+% Author:      Daniel Mendler <mail at daniel-mendler.de>
+% Version:     0.1
+% Date:        2017/11/11
+% License:     GPL2 or LPPL1.3 at your option
+% Homepage:    https://github.com/minad/gridslides
+\LoadClass{article}
+\RequirePackage{gridslides}


Property changes on: trunk/Master/texmf-dist/tex/latex/gridslides/gridslides.cls
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/gridslides/gridslides.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gridslides/gridslides.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/gridslides/gridslides.sty	2017-11-11 23:15:55 UTC (rev 45752)
@@ -0,0 +1,235 @@
+% Package:     gridslides
+% Description: LaTeX package to create free form slides with blocks placed on a grid
+% File:        gridslides.sty
+% Author:      Daniel Mendler <mail at daniel-mendler.de>
+% Version:     0.1
+% Date:        2017/11/11
+% License:     GPL2 or LPPL1.3 at your option
+% Homepage:    https://github.com/minad/gridslides
+\RequirePackage[utf8]{inputenc}
+\RequirePackage{amsmath,amsthm,amssymb}
+\RequirePackage{mathtools}
+\RequirePackage[ngerman]{babel}
+\RequirePackage{braket}
+\RequirePackage{siunitx}
+\RequirePackage{xspace}
+\RequirePackage{dsfont}
+\RequirePackage{microtype}
+\RequirePackage{ragged2e}
+\RequirePackage{tikz}
+\RequirePackage[margin=0mm,paperwidth=128mm,paperheight=96mm]{geometry}
+\RequirePackage{xstring}
+\RequirePackage{enumerate}
+\RequirePackage{environ}
+\RequirePackage[pdfusetitle,bookmarksopen]{hyperref}
+\usetikzlibrary{calc}
+
+% support arrows in overlay
+\tikzstyle{every picture}+=[remember picture]
+
+\pagestyle{empty}
+\graphicspath{{figures/}}
+
+\newif\ifgridslides at grid
+%\gridslides at gridtrue
+\gridslides at gridfalse
+
+\newif\ifgridslides at boxes
+%\gridslides at boxestrue
+\gridslides at boxesfalse
+
+\ifgridslides at boxes%
+\tikzset{gridslides at box/.style={draw=blue}}
+\else
+\tikzset{gridslides at box/.style={}}
+\fi
+
+\def\gridslides at xoff{0}
+\def\gridslides at yoff{0}
+
+\long\def\gridslides at block(#1,#2,#3)#4{%
+  \let\oldxoff\gridslides at xoff%
+  \let\oldyoff\gridslides at yoff%
+  \pgfmathsetmacro\xoff{\gridslides at xoff+#1}%
+  \pgfmathsetmacro\yoff{\gridslides at yoff+#2}%
+  \global\let\gridslides at xoff\xoff%
+  \global\let\gridslides at yoff\yoff%
+  \begin{tikzpicture}[overlay,yscale=-1,shift=(current page.north west)]%
+    \node[gridslides at box,rectangle,anchor=north west,inner sep=0pt,text width=#3*4mm] at (4mm*\xoff,4mm*\yoff)%
+    {%
+      \begingroup%
+      #4%
+      \endgroup%
+    };%
+  \end{tikzpicture}%
+  \global\let\gridslides at xoff\oldxoff%
+  \global\let\gridslides at yoff\oldyoff%
+}
+
+\def\gridslides at fig(#1,#2,#3)#4{\gridslides at block(#1,#2,#3){\includegraphics[width=\textwidth]{#4}}}
+
+\long\def\gridslides at eq(#1,#2)#3{%
+  \gridslides at block(#1,#2,32){%
+    $\begin{aligned}#3\end{aligned}$%
+  }%
+}
+
+\long\def\gridslides at txt(#1,#2)#3{\gridslides at block(#1,#2,32){\mbox{#3}}}
+
+\newcounter{gridslides at totalsteps}
+\newcounter{gridslides at step}
+
+\newcommand{\gridslides at setsteps}[1]{%
+  \ifnum#1>\value{gridslides at totalsteps}%
+    \setcounter{gridslides at totalsteps}{#1}%
+  \fi%
+}
+
+\long\def\gridslides at from<#1->#2#3{%
+  \gridslides at setsteps{#1}%
+  \ifnum\value{gridslides at step}<#1%
+    #3%
+  \else%
+    #2%
+  \fi%
+ }
+
+\long\def\gridslides at only<#1-#2>#3#4{%
+  \gridslides at setsteps{#1}%
+  \gridslides at setsteps{#2}%
+  \ifnum\value{gridslides at step}<#1%
+    #4%
+  \else%
+    \ifnum\value{gridslides at step}>#2%
+      #4%
+    \else%
+      #3%
+    \fi%
+  \fi%
+}
+
+\long\def\alt<#1>#2#3{%
+  \IfSubStr{#1}{-}{%
+    \IfBeginWith{#1}{-}{%
+      \gridslides at only<1#1>{#2}{#3}%
+    }{%
+      \IfEndWith{#1}{-}{%
+        \gridslides at from<#1>{#2}{#3}%
+      }{%
+        \gridslides at only<#1>{#2}{#3}%
+      }%
+    }%
+  }{%
+    \gridslides at only<#1-#1>{#2}{#3}%
+  }%
+}
+
+\long\def\only<#1>#2{\alt<#1>{#2}{}}
+
+\long\def\gridslides at blockhelper#1<#2>(#3)#4{\only<#2>{#1(#3){#4}}}
+\def\gridslides at defblock#1{%
+  \long\expandafter\def\csname#1\endcsname{%
+    \@ifnextchar<{\gridslides at blockhelper{\csname gridslides@#1\endcsname}}{\csname gridslides@#1\endcsname}%
+  }%
+}
+
+\gridslides at defblock{block}
+\gridslides at defblock{fig}
+\gridslides at defblock{eq}
+\gridslides at defblock{txt}
+
+\long\def\gridslides at cmdhelper#1#2<#3>#4{\alt<#3>{#1{#4}}{#2{#4}}}
+\def\gridslides at cmd#1#2{%
+  \expandafter\let\csname gridslides@#1\expandafter\endcsname\csname#1\endcsname%
+  \long\expandafter\def\csname#1\endcsname{%
+    \@ifnextchar<{\gridslides at cmdhelper{\csname gridslides@#1\endcsname}{#2}}{\csname gridslides@#1\endcsname}%
+  }%
+}
+
+\newcommand{\rgb}[1]{\definecolor{gridslides at rgb}{HTML}{#1}\color{gridslides at rgb}}
+
+\gridslides at cmd{textbf}{\relax}
+\gridslides at cmd{textit}{\relax}
+\gridslides at cmd{emph}{\relax}
+\gridslides at cmd{underline}{\relax}
+\def\gridslides at ignore#1{}
+\gridslides at cmd{color}{\gridslides at ignore}
+\gridslides at cmd{rgb}{\gridslides at ignore}
+
+\newcounter{slide}
+\stepcounter{slide}
+
+\newcommand{\gridslides at page}[1]{%
+  \setcounter{gridslides at totalsteps}{1}%
+  \setcounter{gridslides at step}{0}%
+  \setlength{\parindent}{0pt}%
+  \setlength{\parskip}{0pt}%
+  \loop\ifnum\value{gridslides at step}<\value{gridslides at totalsteps}%
+    \stepcounter{gridslides at step}%
+    \clearpage%
+    \begingroup%
+    #1%
+    \endgroup%
+  \repeat%
+  \stepcounter{slide}%
+}
+
+\newcommand{\bg}[1]{%
+  \fig(0,0,32){#1}%
+  \ifgridslides at grid%
+  \begin{tikzpicture}[overlay,yscale=-1,shift=(current page.north west)]%
+    \begin{scope}[x=4mm,y=4mm]%
+      \draw[gray,step=1,line width=0.1pt] (0,0) grid (32,24);%
+      \draw[red,step=8,line width=1pt] (0,0) grid (32,24);%
+    \end{scope}%
+  \end{tikzpicture}%
+  \fi%
+}
+
+\def\gridslides at style{}
+\def\theheadline{}
+
+\newcommand{\gridslides at slide}[2]{%
+  \gridslides at page{%
+    \global\def\theheadline{#1}%
+    \gridslides at style%
+    #2%
+    \ifnum\value{gridslides at step}=1%
+      \pdfbookmark[0]{\theheadline}{slide\theslide}%
+    \fi
+    \ifnum\value{gridslides at totalsteps}>1%
+      \pdfbookmark[1]{Step \thegridslides at step}{slide\theslide.step\thegridslides at step}%
+    \fi
+  }%
+}
+
+\NewEnviron{slide}[1]{\gridslides at slide{#1}{\BODY}}
+\NewEnviron{style}{\global\let\gridslides at style\BODY}
+\NewEnviron{rawslide}{\gridslides at page{\BODY}}
+
+\newcommand{\institute}[1]{\newcommand\@institute{#1}}
+\newcommand{\theauthor}{\@author}
+\newcommand{\thedate}{\@date}
+\newcommand{\thetitle}{\@title}
+\newcommand{\theinstitute}{\@institute}
+
+% undefine some commands from article
+\let\tableofcontents\gridslides at undefined
+\let\addcontentsline\gridslides at undefined
+\let\paragraph\gridslides at undefined
+\let\subparagraph\gridslides at undefined
+\let\chapter\gridslides at undefined
+\let\section\gridslides at undefined
+\let\subsection\gridslides at undefined
+\let\subsubsection\gridslides at undefined
+\let\maketitle\gridslides at undefined
+\let\figure\gridslides at undefined
+\let\table\gridslides at undefined
+\let\pagestyle\gridslides at undefined
+\let\footnote\gridslides at undefined
+\let\bf\gridslides at undefined
+\let\it\gridslides at undefined
+\let\cal\gridslides at undefined
+\let\tt\gridslides at undefined
+\let\listoffigures\gridslides at undefined
+\let\listoftables\gridslides at undefined


Property changes on: trunk/Master/texmf-dist/tex/latex/gridslides/gridslides.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-11-11 17:45:36 UTC (rev 45751)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-11-11 23:15:55 UTC (rev 45752)
@@ -309,7 +309,7 @@
     graphics-cfg graphics-def graphics-pln
     graphicx-psmin graphicxbox graphviz grayhints greek-fontenc greek-inputenc
     greekdates greektex greektonoi greenpoint gregoriotex grfpaste
-    grid grid-system gridset grotesq grundgesetze
+    grid grid-system gridset gridslides grotesq grundgesetze
     gsemthesis gtl gtrlib-largetrees gtrcrd
     gu guitar guitarchordschemes guitlogo gzt
   h2020proposal hackthefootline hacm hagenberg-thesis halloweenmath

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2017-11-11 17:45:36 UTC (rev 45751)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2017-11-11 23:15:55 UTC (rev 45752)
@@ -500,6 +500,7 @@
 depend grid
 depend grid-system
 depend gridset
+depend gridslides
 depend guitlogo
 depend halloweenmath
 depend hackthefootline

Added: trunk/Master/tlpkg/tlpsrc/gridslides.tlpsrc
===================================================================


More information about the tex-live-commits mailing list