\font\bold=Helvetica-Bold at 8pt
\font\bbg=Helvetica-Bold at 8.5pt
\font\norm=Helvetica at 8pt\norm
\font\lite=Helvetica-Light at 8pt
\font\num=Helvetica-Light at 12pt
\font\small=Helvetica at 7pt
\font\winzig=Helvetica at 6pt
\font\mikro=Helvetica at 4pt set 5pt
\font\mager=Helvetica-Light at 7pt
\font\gross=Helvetica-Light at 5.5mm set 4.8mm
\font\dotty=Times-Roman at 26pt
\font\Register=Symbol at 5pt

%---------------------------------------------------------------------
\catcode`\Ü=\active	\defÜ{"U}
\catcode`\ü=\active	\defü{"u}
%
\catcode`\Ä=\active	\defÄ{"A}
\catcode`\ä=\active	\defä{"a}
%
\catcode`\Ö=\active	\defÖ{"O}
\catcode`\ö=\active	\defö{"o}
%
\catcode`\ß=\active	\defß{"s}
%
\catcode`\à=\active	\defà{{\char'311}}
\catcode`\á=\active	\defá{{\char'334}}
\catcode`\é=\active	\defé{{\ee}}
\catcode`\â=\active	\defâ{{\char'362}}
\catcode`\è=\active	\defè{{\char'363}}
\catcode`\ê=\active	\defê{{\ec}}
\catcode`\ç=\active	\defç{{\char'366}}
\catcode`\î=\active	\defî{{\char'367}}
\catcode`\ô=\active	\defô{{\char'374}}
\catcode`\û=\active	\defû{{\char'375}}

\def\ee{\accent194e}		% e accent egue
\def\ec{\accent195e}		% e accent circonflex
\def\R{\raise2.2dd\hbox{\hskip.5pt\Register\char226}\ }

\newdimen\Breite
\hsize=348dd
\vsize=240mm
\Breite=175mm

\newdimen\TabBreite
\TabBreite=55mm
\baselineskip=10dd
\parindent=0pt
\parskip=0pt
\def\Keil#1{\setbox0=\hbox{#1}\spaceskip=\wd0\xspaceskip=\spaceskip}
\def\struct{\vrule depth2dd height 6dd width0dd}
\def\structT{\vrule depth4dd height 8dd width0dd}
\def\strsm{\vrule depth4dd height 3dd width0dd}
\def\strin{\vrule depth1dd height 8dd width0dd}
\def\strhad{\special{0.6289 0.6250 0.6835 setrgbcolor}%
     \vrule depth2dd height  8dd width\hsize%
     \special{0 0 0 setrgbcolor}}
\def\strart{\special{0.7968 0.7851 0.8554 setrgbcolor}%
     \vrule depth4dd height 10dd width\hsize%
     \special{0 0 0 setrgbcolor}}
\def\HR{\hrule depth0pt height.4pt width\hsize}
\def\tbe{\hrule depth0pt height.4pt width\hsize\vskip4dd}
\def\LF{\hfill\break}
\def\TR **#1**#2**{\hbox to\hsize{%
       \structT\hbox to 55mm{#1\hfill}%
       \vtop{\advance\hsize by -55mm%
       \structT #2\structT}}}
\def\TH{\vbox{\vskip2dd%
\offinterlineskip\lite%
\hbox to\hsize{\hbox to0pt{\strhad\hss}%
 \hskip2dd\hbox to 92dd{Typ / Aus"uhrung\hfill}%
 \hbox to28dd{\ \hfill}\hbox to80dd{Bestell-Nr.\hfill}%
 \hbox to 72dd{EAN-Nr.\hfill}\hfill EURO/Stk.\hfill}%
\hbox to\hsize{\hbox to0pt{\strhad\hss}\struct\hskip2dd%
 \hbox to 92dd{Bestellbezeichnung\hfill}%
 \hbox to28dd{\ \hfill}\hbox to80dd{\ \hfill}%
 \hbox to 72dd{\ \hfill}\hfill zzgl. gesetzl. MwSt.\hfill}%
}
\vskip3dd}
\def\ART **#1**#2**#3**#4**#5**{\hbox to\hsize{%
 \small\hbox to0pt{\strart\hss}\hskip2dd%
 \hbox to 92dd{#1\hfill}\hbox to28dd{#2\hfill}%
 \hbox to80dd{#3\hfill}\hbox to 72dd{#4\hfill}\hfill #5\hfill}\vskip1dd}
\def\ARK **#1**#2**{\hbox{\struct\bold #1\ #2}\Idx{#1}}
\def\REM **#1**{\vbox{\strin\baselineskip=10pt\bbg\Keil{i}#1\strsm}}
\def\LB **#1**{\hbox{\struct\bold#1}}
\def\dot{\dotty\raise1.5dd\hbox{.}}
\def\LI **#1**{\hbox{{\dot}\hskip1.5dd#1\struct}}
\def\artend{\vskip0dd}
\Keil{i}

\long\def\TABLE #1  #2\par{\def\a{#2}%
                        \ifx\a\empty
                        #1\tbe
                        \else
                        #1\HR
                        \TABLE #2\par
                        \fi}

%\tracingmacros=1
%\tracingoutput=1
\def\ARTTABLE #1\par{\TH\arttable #1\par}
\long\def\arttable #1  #2\par{\def\a{#2}%
                        \ifx\a\empty
                        #1\artend
                        \else
                        #1
                        \arttable #2\par
                        \fi}

\def\rohBild#1{\def\x{#1}%
            \ifx\x\empty%
            \else%
              \hbox to0pt{%
              \vbox to 11mm{\vss%
              \special{save currentpoint translate}%
              \special{.2 .2 scale}
              \special{!include tiffs/#1.ps}
              \special{restore}}\hss}\fi}%

\def\Bild#1{\def\x{#1}%
            \ifx\x\empty%
            \else%
              \hbox to40mm{%
              \vbox to 40mm{\vss%
              \special{save currentpoint translate}%
              \special{.245 .245 scale}
              \special{!include Bilder_EPS/#1.ps}
              \special{restore}}\hss}\fi}%

\def\Picto#1{\def\x{#1}%
            \ifx\x\empty%
              \hbox to20mm{%
              \vbox to12mm{\vrule height12mm depth0mm width0pt\vss}\hss}%
            \else%
              \hbox to20mm{%
              \vbox to12mm{\vrule height12mm depth0mm width0pt\vss%
              \special{save currentpoint translate}%
              \special{.245 .245 scale}
              \special{!include Pictos_EPS/#1.ps}
              \special{restore}}\hss}\fi}%

\def\mwst{Unverbindliche Preisempfehlung auschlie"slich gesetzlicher MwSt = Stand 06/2002}
\def\schaltung{Schaltbilder finden Sie auf Seite 42}

\openout2=index.dat
\def\Idx#1{\write2{\the\count0}}

\output={%
\shipout\hbox{\vbox to 297mm{\hbox to7mm{\vrule width 7mm depth 0.2pt height 0.2pt}
                             \vfill
                             \hbox to7mm{\vrule width 7mm depth 0.2pt height 0.2pt}}%
        \hskip3mm%
        \vbox to 297mm{\vbox to 0pt{\vss\hbox to 21cm{%
         \vrule depth0pt height7mm\hfill\vrule depth0pt height7mm}\vskip3mm}
        \vfill
        \hbox{%
        \ifodd\count0%
         \hbox to0mm{% Daumenleiste
          \vbox to 280mm{\vskip48mm%
          \hbox to 0pt{\hskip-10mm%
           \special{0.894531 0.5625 0.097656 setrgbcolor}%
           \vrule height22mm width20mm%
           \special{0 0 0 setrgbcolor}\hss}\vfill}}
        \fi%
        \hbox to 21cm{\hfill
         \vbox{\vskip6mm% Seitenanfang nach 6mm
               \ifodd\count0
                 \hbox to\Breite{\rohBild{BEG_logo}
                  \hfill
                  \gross AUTOMATIC-STRAHLER\hskip2mm}
               \else
                 \hbox to\Breite{\gross AUTOMATIC-STRAHLER
                  \hfill\rohBild{BEG_logo}\hskip16mm}
               \fi
               \vskip4dd
               \special{1 0 0 setrgbcolor}%
               \hrule height4dd%
               \special{0 0 0 setrgbcolor}
               \vskip8mm
               \vbox to \vsize{\unvbox255}%
               \vskip7mm
               \hrule
               \vskip2dd
               \ifodd\count0
                 \hbox to\Breite{\struct\hfill\mager\mwst}
                 \hbox to\Breite{\struct\hfill\mager\schaltung}
                 \vskip3mm
                 \hbox to\Breite{\num\the\count0\hfill}
               \else
                 \hbox to\Breite{\struct\mager\mwst\hfill}
                 \hbox to\Breite{\struct\mager\schaltung\hfill}
                 \vskip3mm
                 \hbox to\Breite{\hfill\num\the\count0}
               \fi}
         \hfill}%
         \ifodd\count0\else%
          \hbox to0mm{%
           \vbox to 280mm{\vskip48mm%
           \hbox to 0pt{\hskip-10mm%
            \special{0.894531 0.5625 0.097656 setrgbcolor}%
            \vrule height22mm width20mm%
            \special{0 0 0 setrgbcolor}\hss}\vfill}}%
         \fi%
         }
         \vfill
         \vbox to 0pt{\vskip3mm\hbox to 21cm{%
          \vrule depth0pt height7mm\hfill\vrule depth0pt height7mm}\vss}}
         \hskip3mm%
         \vbox to 297mm{\hbox to7mm{\vrule width 7mm depth 0.2pt height 0.2pt}%
                        \vfill%
                        \hbox to7mm{\vrule width 7mm depth 0.2pt height 0.2pt}}}%
\global\advance\count0 by 1}

\newbox\Bilder

\def\bilder #1;#2{\def\x{#2}%
                 \ifx\x\empty%
                   \global\setbox\Bilder=\vbox{\box\Bilder\Bild{#1}}%
                 \else%
                   \global\setbox\Bilder=\vbox{%
                           \box\Bilder\Bild{#1}\vskip6mm\vfill}%
                   \bilder #2
                 \fi}

\def\frame#1{\hbox{%
              \vrule%
              \vbox to4cm{%
               \hrule
               \vfill
               \hbox to 40mm{%
                \hfill%
                \vbox{%
                 \hsize=35mm%
                 \baselineskip=8dd%
                 \Keil{i}%
                 \tolerance=100%
                 \pretolerance=10000%
                 \leftskip=0pt plus40mm%
                 \rightskip=0pt plus40mm%
                 \winzig#1\penalty-10000}
                \hfill}
               \vfill%
               \hrule}%
              \vrule}}

\def\picto#1{\hbox{%
              \vrule%
              \vbox to12mm{%
               \hrule
               \vfill
               \hbox to 20mm{%
                \hfill%
                \vbox{%
                 \hsize=18mm%
                 \baselineskip=4dd%
                 \Keil{i}%
                 \tolerance=100%
                 \pretolerance=10000%
                 \leftskip=0pt plus10mm%
                 \rightskip=0pt plus10mm%
                 \mikro #1\penalty-10000}
                \hfill}
               \vfill%
               \hrule}%
              \vrule}}

\def\BILDER #1;{\global\setbox\Bilder=\vbox{}\bilder #1;}

\openin1 Placement.dat
\newcount\LR
\newcount\LRB\LRB=0
\newdimen\Bildhoehe
\newbox\Produkt
\newif\ifSeitenanfang
\Seitenanfangtrue
\long\def\PRODUKT #1 #2\par{#1%
            \read1 to\LRx\LR=\LRx
            \ifnum\LR>\LRB\Seitenanfangtrue\LRB=\LR\fi
            \setbox\Produkt=\vbox{#2\par}
            \ifodd\LR%
              \ifSeitenanfang
                \ifdim\ht\Produkt < \ht\Bilder
                  \message{Seitenanfang ungerade: Produkt kleiner als Bild}
                  \vbox{\hbox to\Breite{%
                   \vbox to\ht\Bilder{%
                    \box\Produkt\vfill}\hfill\vbox{\unvbox\Bilder}}}%
                \else
                  \message{Seitenanfang ungerade: Produkt groesser als Bild}
                  \vbox{\hbox to\Breite{%
                   \copy\Produkt%
                   \hfill%
                   \vbox to\ht\Produkt{\unvbox\Bilder\vfill}}}%
                \fi
                \Seitenanfangfalse
              \else
                \Bildhoehe=\ht\Bilder\advance\Bildhoehe by -1cm
                \ifdim\ht\Produkt < \Bildhoehe
                  \message{in der Seite ungerade: Produkt kleiner als Bild}
                  \vbox{\hbox to\Breite{%
                   \vbox to\ht\Bilder{%
                    \vfill\box\Produkt\vfill}%
                    \hfill%
                    \vbox{\unvbox\Bilder}}}%
                \else
                  \message{in der Seite ungerade: Produkt groesser als Bild}
                  \vbox{\hbox to\Breite{\copy\Produkt\hfill\box\Bilder}}%
                \fi
                \Seitenanfangfalse
              \fi
            \else%
              \ifSeitenanfang
                \message{Seiteanfang gerade}
                \vbox{\hbox to\Breite{%
                 \vbox to\ht\Produkt{%
                  \unvbox\Bilder\vfill}\hfill\box\Produkt}}%
                \Seitenanfangfalse
              \else
                \message{in der Seite gerade}
                \vbox{\hbox to\Breite{%
                 \vbox to\ht\Produkt{%
                  \vfill\unvbox\Bilder}\hfill\box\Produkt}}%
                \Seitenanfangfalse
              \fi
            \fi
            }%