summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/csbulletin/csbulv1.cls
blob: 6c4ebf5414b0d7dd90fbefc3d301659599e32eb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
%% $Id$
\ProvidesClass{csbulv1}[2008/12/08 V1]
\newif\if@JenVnitrek
\DeclareOption{jenvnitrek}{\@JenVnitrektrue}
\ProcessOptions
\LoadClass{article}
\RequirePackage[a4,Landscape,margins=0mm,strictheight]{zwpagelayout}
\RequirePackage{zwtools,graphicx}
\newdimen\Vonedim  \Vonedim\z@
\newcommand\Vtwo[1][3mm]{\Vonedim #1\relax}
\def\bul@v{\hskip -\Vonedim \relax}
\parindent 0mm
\pagestyle{empty}
\newcount\zw@odd
\newcount\zw@even
\newcommand\Skladej[1][bul.pdf]{\ZWPDFgetnum #1 \ZW@pgnum
  \zw@odd=\ZW@pgnum
  \ifodd\zw@odd\else
    \zw@even=\zw@odd
    \divide\zw@even 2
    \ifodd\zw@even
      \advance\zw@odd\@ne
    \else
      \advance\zw@odd\m@ne
    \fi
  \fi
  \zw@even=2
  \if@JenVnitrek
    \advance\zw@even 2
    \advance\zw@odd -2
  \fi
  \loop
    \noindent\hbox to .5\linewidth{\ifnum\zw@odd>\ZW@pgnum\else \bul@v
                        \reflectbox{\includegraphics[page=\number\zw@odd]{#1}}\fi\hss}%
             \hbox to .5\linewidth{\hss
                        \reflectbox{\includegraphics[page=\number\zw@even]{#1}}\bul@v}\par
    \advance\zw@even 2
    \advance\zw@odd -2
    \ifnum\zw@odd>1
  \repeat}