summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/gridslides
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-11 23:15:55 +0000
committerKarl Berry <karl@freefriends.org>2017-11-11 23:15:55 +0000
commitcddb15c8413b400589d6b4fb6587ad9d06b39024 (patch)
tree8a15c612ce6e0bc03fd687f00782a4e0f8d56b66 /Master/texmf-dist/doc/latex/gridslides
parent6b4ac9ddeb57d6ddf1115869635ba7eefbbd8f61 (diff)
gridslides (11nov17)
git-svn-id: svn://tug.org/texlive/trunk@45752 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/gridslides')
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/Makefile21
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/README.md85
-rwxr-xr-xMaster/texmf-dist/doc/latex/gridslides/compile.pl79
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/example.pdfbin0 -> 436207 bytes
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/example.tex111
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/figures/chain_nontrivial.pdfbin0 -> 60498 bytes
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/figures/chain_trivial.pdfbin0 -> 62665 bytes
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band02.pngbin0 -> 58080 bytes
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band08.pngbin0 -> 60724 bytes
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/figures/qahe.pdfbin0 -> 11709 bytes
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/figures/qshe.pdfbin0 -> 12077 bytes
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/figures/skyrmion.pdfbin0 -> 35132 bytes
-rw-r--r--Master/texmf-dist/doc/latex/gridslides/figures/trivial.pdfbin0 -> 34798 bytes
13 files changed, 296 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/gridslides/Makefile b/Master/texmf-dist/doc/latex/gridslides/Makefile
new file mode 100644
index 00000000000..1666331977e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/Makefile
@@ -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@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
diff --git a/Master/texmf-dist/doc/latex/gridslides/README.md b/Master/texmf-dist/doc/latex/gridslides/README.md
new file mode 100644
index 00000000000..5b286c44e2d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/README.md
@@ -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.
diff --git a/Master/texmf-dist/doc/latex/gridslides/compile.pl b/Master/texmf-dist/doc/latex/gridslides/compile.pl
new file mode 100755
index 00000000000..fa9ee628897
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/compile.pl
@@ -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@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);
diff --git a/Master/texmf-dist/doc/latex/gridslides/example.pdf b/Master/texmf-dist/doc/latex/gridslides/example.pdf
new file mode 100644
index 00000000000..73a59bcc501
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/gridslides/example.tex b/Master/texmf-dist/doc/latex/gridslides/example.tex
new file mode 100644
index 00000000000..624c73d4bb7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/example.tex
@@ -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@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}
diff --git a/Master/texmf-dist/doc/latex/gridslides/figures/chain_nontrivial.pdf b/Master/texmf-dist/doc/latex/gridslides/figures/chain_nontrivial.pdf
new file mode 100644
index 00000000000..bf9fa3cd2bc
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/figures/chain_nontrivial.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/gridslides/figures/chain_trivial.pdf b/Master/texmf-dist/doc/latex/gridslides/figures/chain_trivial.pdf
new file mode 100644
index 00000000000..a04ed750f58
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/figures/chain_trivial.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band02.png b/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band02.png
new file mode 100644
index 00000000000..f6be7deb375
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band02.png
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band08.png b/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band08.png
new file mode 100644
index 00000000000..8626561dc8f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/figures/kitaev_band08.png
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/gridslides/figures/qahe.pdf b/Master/texmf-dist/doc/latex/gridslides/figures/qahe.pdf
new file mode 100644
index 00000000000..605632a1501
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/figures/qahe.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/gridslides/figures/qshe.pdf b/Master/texmf-dist/doc/latex/gridslides/figures/qshe.pdf
new file mode 100644
index 00000000000..5545f850cf4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/figures/qshe.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/gridslides/figures/skyrmion.pdf b/Master/texmf-dist/doc/latex/gridslides/figures/skyrmion.pdf
new file mode 100644
index 00000000000..52703ab33c9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/figures/skyrmion.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/gridslides/figures/trivial.pdf b/Master/texmf-dist/doc/latex/gridslides/figures/trivial.pdf
new file mode 100644
index 00000000000..2a58adda9f9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gridslides/figures/trivial.pdf
Binary files differ