Commit e455ad22 authored by Simon de Givry's avatar Simon de Givry
Browse files

add printing version with notes

parent 7562ea93
No preview for this file type
......@@ -14,8 +14,8 @@
\animfalse
\newif\ifimprime
%\imprimetrue
\imprimefalse
\imprimetrue
%\imprimefalse
\newif\ifintro
\introtrue
......@@ -55,10 +55,11 @@
\ifimprime
\documentclass[handout]{beamer}
\usepackage{handoutWithNotes}
\usepackage{etex}
\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm, landscape]
%\pgfpagesuselayout{2 on 1}[a4paper,portrait,border shrink=5mm]
%\pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm, landscape]
\pgfpagesuselayout{2 on 1 with notes}[a4paper,border shrink=5mm]
\else
\documentclass{beamer}
\usepackage{etex}
......@@ -4504,7 +4505,7 @@ On a $c(T) \leq c(H^*)$
\begin{itemize}
\item Any NP-complete problem is a potential target language
\item But not all are equally easy to use
\item Reduce $\iff$ model
%% \item Reduce $\iff$ model
\end{itemize}
\end{block}
\end{frame}
......@@ -4564,6 +4565,7 @@ On a $c(T) \leq c(H^*)$
\end{frame}
\shrink{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Modeling \emph{anything} with Constraint Satisfaction}
......@@ -4584,6 +4586,7 @@ On a $c(T) \leq c(H^*)$
\end{block}
\end{frame}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
......@@ -4592,6 +4595,7 @@ On a $c(T) \leq c(H^*)$
\item Gecode: \href{https://www.gecode.org/}{https://www.gecode.org/} (C++)
\item Google OR Tools: \href{https://developers.google.com/optimization}{https://developers.google.com/optimization} (C++)
\item Choco: \href{https://choco-solver.org/}{https://choco-solver.org/} (Java)
\item Minizinc: https://www.minizinc.org (modeling language and interface to solvers gecode, or-tools, choco, cplex,..)
\end{itemize}
\end{frame}
......@@ -4674,7 +4678,7 @@ On a $c(T) \leq c(H^*)$
\item Scopes/factors as (hyper)edges
\end{enumerate}
Or bipartite incidence graph~\parencite{kschischang2001}
Or bipartite incidence graph\parencite{kschischang2001}
\end{block}
\end{column}
\begin{column}{3cm}
......@@ -4700,7 +4704,7 @@ On a $c(T) \leq c(H^*)$
\item Variables and domains as usual
\item Cost functions $F\ni f_S: D^S \to \textbf{\{0,\ldots,k\}}$ ($k$ finite or
not)
\item Cost combined by (bounded) addition~\parencite{Schiex95a,cooper.ea04}.
\item Cost combined by (bounded) addition\parencite{Schiex95a,cooper.ea04}.
$$cost(t) = \min(\sum_{f_S\in F} f_S(t[S]), k)$$
\end{itemize}
......@@ -4786,7 +4790,7 @@ On a $c(T) \leq c(H^*)$
\shrink{
\begin{frame}{Binary CFN as 01LP (infinite $k$, finite costs)}
\begin{block}{The CFN/MRF local polytope~\parencite{Sch76,Koster99b,Wer07}}
\begin{block}{The CFN/MRF local polytope\parencite{Sch76,Koster99b,Wer07}}
\begin{align}
\mbox{Minimize} & \sum_{i,a} f_i(a)\cdot x_{ia} + &\sum_{\myatop{f_{ij}\in F}{a\in D^i, b\in D^j}} f_{ij}(a,b)\cdot y_{iajb} \ \ \mbox{ subject to }\nonumber \\[3mm]
&\sum_{a\in D^i} x_{ia} = 1 &\forall i \in \{1,\ldots,n\} \nonumber\\
......@@ -4948,7 +4952,7 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\begin{itemize}
\item Revise from leaves and back
\item All domains: values part of a solution only
\item Resulting problem solved backtrack-free~\parencite{Freuder82,Freuder85}
\item Resulting problem solved backtrack-free\parencite{Freuder82,Freuder85}
\end{itemize}
\end{block}
\end{column}
......@@ -4993,7 +4997,7 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
% Can be used directly on DP based globals.
\begin{block}{Global decomposable constraints~\parencite{bacchus2007,quimper2006}}
\begin{block}{Global decomposable constraints\parencite{bacchus2007,quimper2006}}
\begin{itemize}
\item Automata/CFG parsers, Knapsack: DP based.
\item Enforcing AC on the global can be directly done by
......@@ -5008,9 +5012,9 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\end{center}}
\begin{block}<3>{}
AllDiff (matching~\parencite{Regin94}) not
decomposable~\parencite{decompo2009}. GCC (max flow~\parencite{Regin96}),
AllDiff with Cost variable (min-cost flow~\parencite{van2006})
AllDiff (matching\parencite{Regin94}) not
decomposable\parencite{decompo2009}. GCC (max flow\parencite{Regin96}),
AllDiff with Cost variable (min-cost flow\parencite{van2006})
\end{block}
\end{frame}
......@@ -5030,7 +5034,7 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\begin{columns}
\begin{column}{6cm}
\begin{block}{MP - Dynamic Programming~\parencite{Pearl88}}
\begin{block}{MP - Dynamic Programming\parencite{Pearl88}}
\begin{enumerate}
\item Use DP to compute the cost of an optimal solution that
goes from $x_1$ to $a\in D_i$ knowing those for $x_{i-1}$
......@@ -5053,8 +5057,8 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\begin{enumerate}
\item Solves Berge acyclic MRF
\item Does not converge on graphs (Loopy Belief Propagation)
\item Massively used to produce ``good'' solutions (turbo-decoding~\parencite{turbo2001})
\item Not an equivalence preserving transformation~\parencite{Pearl88}
\item Massively used to produce ``good'' solutions (turbo-decoding\parencite{turbo2001})
\item Not an equivalence preserving transformation\parencite{Pearl88}
\end{enumerate}
\end{block}
......@@ -5107,7 +5111,7 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\begin{enumerate}
\item MRF message passing but\ldots
\item use $f_\varnothing$ and $f_i(a)$ to store optimum cost from $x_1$ to $x_i$
\item Preserves equivalence by ``cost shifting''~\parencite{Schiex00b,Sch76}
\item Preserves equivalence by ``cost shifting''\parencite{Schiex00b,Sch76}
\end{enumerate}
\end{block}
......@@ -5216,12 +5220,12 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\begin{block}{Breaking the loops}
\begin{enumerate}
\item Arc consistency $O(ed^3)$: prevent loops at the arc level~\parencite{Schiex00b}
\item Node consistency~\parencite{Larrosa2002}
\item Directional AC $O(ed^2)$: prevent loops at a global level~\parencite{CooperFCSP,Larrosa2003,DBLP:journals/ai/LarrosaS04}
\item Combine AC and DAC into FDAC~\parencite{Larrosa2003,DBLP:journals/ai/LarrosaS04}
\item Pool costs from all stars to $f_\varnothing$ in EAC~\parencite{Larrosa2005}
\item Combine AC+DAC+EAC in EDAC~\parencite{Larrosa2005}
\item Arc consistency $O(ed^3)$: prevent loops at the arc level\parencite{Schiex00b}
\item Node consistency\parencite{Larrosa2002}
\item Directional AC $O(ed^2)$: prevent loops at a global level\parencite{CooperFCSP,Larrosa2003,DBLP:journals/ai/LarrosaS04}
\item Combine AC and DAC into FDAC\parencite{Larrosa2003,DBLP:journals/ai/LarrosaS04}
\item Pool costs from all stars to $f_\varnothing$ in EAC\parencite{Larrosa2005}
\item Combine AC+DAC+EAC in EDAC\parencite{Larrosa2005}
\end{enumerate}
\end{block}
......@@ -5243,7 +5247,7 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\begin{block}<2>{}
Can be enforced on global cost functions too (by emulating DP, or
using graph algorithms)~\parencite{DBLP:conf/aaai/LeeL10,lee2012,boizumault2012}.
using graph algorithms)\parencite{DBLP:conf/aaai/LeeL10,lee2012,boizumault2012}.
\end{block}
\end{frame}
}
......@@ -5251,7 +5255,7 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Optimal set of EPTs}
\begin{block}{Finding an optimal order~\parencite{cooper.ea04}}
\begin{block}{Finding an optimal order\parencite{cooper.ea04}}
Finding an optimal sequence of integer arc EPTs that maximizes the
lower bound is NP-hard.
\end{block}
......@@ -5293,7 +5297,7 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\end{align}
\end{block}
\shrink{
See~\parencite{Sch76,Koster99b,CdG07,Wer07,cooper2010}.
See\parencite{Sch76,Koster99b,CdG07,Wer07,cooper2010}.
}
\end{frame}
......@@ -5316,7 +5320,7 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\shrink{
\begin{frame}{OSAC and the local polytope}
\begin{block}{The MRF local polytope~\parencite{Wer07}}
\begin{block}{The MRF local polytope\parencite{Wer07}}
\begin{align}
\mbox{Minimize} & \sum_{i,a} f_i(a)\cdot x_{ia} + &\sum_{\myatop{f_{ij}\in F}{a\in D^i, b\in D^j}} f_{ij}(a,b)\cdot y_{iajb} \ \ \mbox{s.t}\nonumber \\[3mm]
&\sum_{a\in D^i} x_{ia} = 1 &\forall i \in \{1,\ldots,n\} \\
......@@ -5361,10 +5365,10 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\begin{block}{}
\begin{itemize}[<+->]
\item The local polytope and its dual have been intensely studied,
starting with the ``Ukrainian'' school~\parencite{Sch76,MSD1975,koval1976,Wer07}.
starting with the ``Ukrainian'' school\parencite{Sch76,MSD1975,koval1976,Wer07}.
\item A variety of non-smooth convex optimization algorithms have
been tried with the hope of ``faster than LP''
resolution~\parencite{schlesinger2007solving,komodakis2007mrf,savchynskyy2011,kappes2012}.
resolution\parencite{schlesinger2007solving,komodakis2007mrf,savchynskyy2011,kappes2012}.
\item \parencite{prusa2015} showed that any ``normal'' LP can be reduced
to such a polytope in linear time (constructive proof).
\end{itemize}
......@@ -5389,7 +5393,7 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Can we organize our EPTs better w/o LP?}
\begin{block}{Bool($P$)~\parencite{VAC2008}}
\begin{block}{Bool($P$)\parencite{VAC2008}}
Given a CFN $P=(X,D,F,k)$, Bool$(P)$ is the CSP
$(X,D,C-\{f_\varnothing\},1)$.\\[2mm]
......@@ -5402,9 +5406,9 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\begin{block}<3>{Virtual AC}
Same fixpoint as a variety of converging reformulating BP algorithms
in MRF: TRW-S~\parencite{TRWS}, MPLP1\parencite{MPLP},
SRMP~\parencite{SRMP}, Max-Sum
diffusion~\parencite{MSD1975,cooper2010}, Aug-DAG\parencite{koval1976}\ldots
in MRF: TRW-S\parencite{TRWS}, MPLP1\parencite{MPLP},
SRMP\parencite{SRMP}, Max-Sum
diffusion\parencite{MSD1975,cooper2010}, Aug-DAG\parencite{koval1976}\ldots
\end{block}
\end{frame}
......@@ -5490,8 +5494,8 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\item Bool($P$) is 2-SAT (in $P$).
\item Minimal propagation DAG made of disjoint paths.
\item Related to Ford-Fulkerson (specific graph),
\item Similar to the ``roof-dual'' lower bound of QPBO (LP or flow based~\parencite{boros02})
\item Similar to `Graph Cut'' for binary pairwise supermodular MRF (flow based~\parencite{kolmogorov2007})
\item Similar to the ``roof-dual'' lower bound of QPBO (LP or flow based\parencite{boros02})
\item Similar to `Graph Cut'' for binary pairwise supermodular MRF (flow based\parencite{kolmogorov2007})
\item naturally incremental, thanks to EPTs.
\end{enumerate}
\end{block}
......@@ -5575,16 +5579,16 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\item black box solver (à la SAT/01LP)
\item table cost functions (tables, lists)
\item global cost functions (Weighted AllDiff, GCC, Regular\ldots)
\item (treewidth aware) DFBB and Hybrid BFS~\parencite{allouche2015}
\item (treewidth aware) DFBB and Hybrid BFS\parencite{allouche2015}
\item Updated Optimality gap (HBFS), anytime behavior
\item Default clever horizontal (value) ordering
\item Weighted degree + last conflict vertical ordering heuristics
\item Maintains NC, AC, DAC, FDAC, EDAC and VAC.
\item Maintains non-dominance (aka substitutability aka DEE)
\item (On the fly) Variable elimination (degree $\leq 3$)
\item Local search upper bounding (INCOP~\parencite{incop})
\item Local search upper bounding (INCOP\parencite{incop})
\item Table cost function decomposition
\item Parallel VNS search~\parencite{ouali2014}
\item Parallel VNS search\parencite{ouali2014}
\end{enumerate}
\end{block}
......@@ -5597,23 +5601,23 @@ $nd+e.d^r$ variables. $n+2ed$ contraintes.
\item First/second in approximate graphical model MRF/MAP
challenges (2010, 2012, 2014).
\item Bioinformatics: pedigree
debugging~\parencite{DBLP:journals/constraints/SanchezGS08},
debugging\parencite{DBLP:journals/constraints/SanchezGS08},
Haplotyping (QTLMap), structured RNA gene
finding~\parencite{darn}, Computational Protein
Design~\parencite{CPD-BI} (now in OSPREY)
finding\parencite{darn}, Computational Protein
Design\parencite{CPD-BI} (now in OSPREY)
\item RLFAP: closed all CELAR min-interference RLFAP
instances~\href{http://fap.zib.de/problems/CALMA/}{fap.zib.de/problems/CALMA}
\item Inductive Logic Programming~\parencite{rouveirol}, Natural
\item Inductive Logic Programming\parencite{rouveirol}, Natural
Langage
Processing~(in \href{https://code.google.com/p/hltdi-l3}{hltdi-l3}),
Multi-agent and cost-based
planning~\parencite{zilberstein,cooper}, Model
Abstraction~\parencite{struss},
diagnostic~\parencite{sachenbacher}, Music
processing and Markov Logic~\parencite{tzanetakis1,tzanetakis2}, Data
mining~\parencite{metivier}, Partially observable Markov
Decision Processes~\parencite{charpillet}, Probabilistic
counting~\parencite{ermon} and inference~\parencite{maier},
planning\parencite{zilberstein,cooper}, Model
Abstraction\parencite{struss},
diagnostic\parencite{sachenbacher}, Music
processing and Markov Logic\parencite{tzanetakis1,tzanetakis2}, Data
mining\parencite{metivier}, Partially observable Markov
Decision Processes\parencite{charpillet}, Probabilistic
counting\parencite{ermon} and inference\parencite{maier},
\ldots
\end{enumerate}
\end{block}
......
% Copyright 2009 by Guido Diepen <guido@guidodiepen.nl>
% Parts provided by Edson Valle
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% Changelog
% 20180920 - Refactored to work with different slide sizes
% 20091202 - Added "1 on 1 with notes" layout, provided by Harald Welte
% 20091108 - Added "2 on 1 with notes landscape" layout, provided by Edson Valle
% 20091104 - Added "3 on 1 with notes" layout
% 20091104 - Added "2 on 1 with notes" layout
% 20091104 - Added "1 on 1 with notes landscape" layout, provided by Edson Valle
% 20090101 - Initial Version
\RequirePackage{pgfpages}
% 1 on 1 with notes landscape
% ----------------------------------------
% | %%%%%%%%%%%%%%%%%% __________________ |
% | %%%%%%%%%%%%%%%%%% __________________ |
% | %%%%%%%%%%%%%%%%%% __________________ |
% | %%%%%%%%%%%%%%%%%% __________________ |
% | %%%%%%%%%%%%%%%%%% __________________ |
% | %%%%%%%%%%%%%%%%%% __________________ |
% | %%%%%%%%%%%%%%%%%% __________________ |
% | %%%%%%%%%%%%%%%%%% __________________ |
% | %%%%%%%%%%%%%%%%%% __________________ |
% | %%%%%%%%%%%%%%%%%% __________________ |
% ----------------------------------------
\pgfpagesdeclarelayout{1 on 1 with notes landscape} {
\edef\pgfpageoptionheight{\the\paperwidth}
\edef\pgfpageoptionwidth{\the\paperheight}
\edef\pgfpageoptionborder{0pt}
}
{
\setkeys{pgfpagesuselayoutoption}{landscape}
\pgfpagesphysicalpageoptions
{%
logical pages=2,%
physical height=\pgfpageoptionheight,%
physical width=\pgfpageoptionwidth,%
last logical shipout=1%
}
\pgfpageslogicalpageoptions{1}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.5\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{2}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.5\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight},%
copy from=2
}%
\AtBeginDocument{
\newbox\notesbox
\setbox\notesbox=\vbox{
\hsize=\paperwidth
\vskip-1in\hskip-1in\vbox{
\vskip.05\paperheight
Notes\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth
}
}
\pgfpagesshipoutlogicalpage{2}\copy\notesbox
}
}
% 4 on 1 with notes
% --------------------------
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% --------------------------
\pgfpagesdeclarelayout{4 on 1 with notes} {
\edef\pgfpageoptionheight{\the\paperheight}
\edef\pgfpageoptionwidth{\the\paperwidth}
\edef\pgfpageoptionborder{0pt}
}
{
\pgfpagesphysicalpageoptions
{%
logical pages=8,%
physical height=\pgfpageoptionheight,%
physical width=\pgfpageoptionwidth,%
last logical shipout=4%
}
\pgfpageslogicalpageoptions{1}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.875\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{2}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.625\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{3}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.375\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{4}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.125\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{5}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.875\pgfphysicalheight},%
copy from=5
}%
\pgfpageslogicalpageoptions{6}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.625\pgfphysicalheight},%
copy from=6
}%
\pgfpageslogicalpageoptions{7}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.375\pgfphysicalheight},%
copy from=7
}%
\pgfpageslogicalpageoptions{8}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.125\pgfphysicalheight},%
copy from=8
}%
\AtBeginDocument{
\newbox\notesbox
\setbox\notesbox=\vbox{
\hsize=\paperwidth
\vskip-1in\hskip-1in\vbox{
\vskip.05\paperheight
Notes\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth
}
}
\pgfpagesshipoutlogicalpage{5}\copy\notesbox
\pgfpagesshipoutlogicalpage{6}\copy\notesbox
\pgfpagesshipoutlogicalpage{7}\copy\notesbox
\pgfpagesshipoutlogicalpage{8}\copy\notesbox
}
}
% 2 on 1 with notes
% --------------------------
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% --------------------------
\pgfpagesdeclarelayout{2 on 1 with notes} {
\edef\pgfpageoptionheight{\the\paperheight}
\edef\pgfpageoptionwidth{\the\paperwidth}
\edef\pgfpageoptionborder{0pt}
}
{
\pgfpagesphysicalpageoptions
{%
logical pages=4,%
physical height=\pgfpageoptionheight,%
physical width=\pgfpageoptionwidth,%
last logical shipout=2%
}
\pgfpageslogicalpageoptions{1}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.5\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.75\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{2}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.5\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.25\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{3}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.5\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.75\pgfphysicalheight},%
copy from=3
}%
\pgfpageslogicalpageoptions{4}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.5\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.25\pgfphysicalheight},%
copy from=4
}%
\AtBeginDocument{
\newbox\notesbox
\setbox\notesbox=\vbox{
\hsize=\paperwidth
\vskip-1in\hskip-1in\vbox{
\vskip.05\paperheight
Notes\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth\vskip.1\paperheight
\hrule width\paperwidth
}
}
\pgfpagesshipoutlogicalpage{3}\copy\notesbox
\pgfpagesshipoutlogicalpage{4}\copy\notesbox
}
}
% 3 on 1 with notes
% --------------------------
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% | %%%%%%%%%%% ___________ |
% --------------------------
\pgfpagesdeclarelayout{3 on 1 with notes} {
\edef\pgfpageoptionheight{\the\paperheight}
\edef\pgfpageoptionwidth{\the\paperwidth}
\edef\pgfpageoptionborder{0pt}
}
{
\pgfpagesphysicalpageoptions
{%
logical pages=6,%
physical height=\pgfpageoptionheight,%
physical width=\pgfpageoptionwidth,%
last logical shipout=3%
}
\pgfpageslogicalpageoptions{1}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.33\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.83\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{2}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.33\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.50\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{3}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=.33\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.17\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{4}
{%
border shrink=\pgfpageoptionborder,%