% EXPLANATION AND EXAMPLES OF NEWCOMMANDS
% CREATED FOR THE NMM WORKSHOP AT PZI

% COULD YOU PLEASE TRANSLATE THE EXPLANATIONS IN YOUR NATIVE LANGUAGE

\sectiontitle{doublepage}

\section{use}

This command spreads an image over a double page. Takes 3 parametres,
automatic recognition of even and odd pages is buggy, has been removed 
and should be done by eye and hand.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CODE BLOCK USING THE PACKAGE LSTLISTING %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% THIS IS THE CODE FOR THE COMMAND AND    %
% INCLUDED AS EXAMPLE                     %
% SPECIAL CHARACTERS ESCAPED              %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\codeline{language=TeX}{\\doublepage\{path/to/image\}\{2.5\}\{-200\}}

\codeline{language=TeX}{\\doublepage\{1\}\{2\}\{3\}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{itemize}
\item \textbf{1} is the path to an image
\item \textbf{2} is the scale factor
\item \textbf{3} is the vertical
\end{itemize}

\section{macro code}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CODE BLOCK USING THE PACKAGE LSTLISTING %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% THIS IS THE CODE FOR THE COMMAND AND    %
% INCLUDED AS EXAMPLE                     %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\lstset{language=TeX}
\begin{lstlisting}
\newcommand{\doublepage}[3]{
\ifthispageodd{
%\hardpagebreak
% DOPPELSEITE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \includepdf[scale=#2,offset=-260 #3]
 {#1}
 \includepdf[scale=#2,offset=-300 #3]
 {#1}
% DOPPELSEITE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\twocolumn[] % DEATH PROOF PAGEBREAK
}{
% DOPPELSEITE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\includepdf[scale=#2,offset=-260 #3]
{#1}
\includepdf[scale=#2,offset=-300 #3]
{#1}
% DOPPELSEITE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\twocolumn[] % DEATH PROOF PAGEBREAK
\clearpage
}}
\end{lstlisting}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{examples}

\doublepage{i/a/stock/2007/beletons/LAFKON_070725--beletond.pdf}{2.5}{-200}