%% Fonty
\font\tt=cc at 10pt
\font\it=ptmri8z at 7pt

%% Vypocet hodiny a minuty
\newcount\hour \newcount\minute \newcount\hhour
\hour=\time \minute=\time
\divide\hour by 60
\hhour=\hour \multiply\hhour by 60
\advance\minute by -\hhour

%% Paticka
\csaccents
\footline={\it u\v zivatel: \user, \hskip4em
           dne: \the\day. \the\month. \the\year, 
           \the\hour:\ifnum\minute<10 0\fi\the\minute 
           \hfill strana: \the\pageno \hskip1cm}

%% Rozmery zrcadla
\hoffset=-1in \advance\hoffset by 1.5cm
\voffset=-1in \advance\voffset by .8cm
\advance\hsize by 2.2cm \advance\vsize by3.3cm
\overfullrule=0pt
\baselineskip=11.7pt
\parindent=0pt

%% Makro pro tabulator
\newdimen\lastlinewidth  \newcount\tabwidth
\setbox0=\hbox{\tt xxxxxxxx} \tabwidth=\wd0 %% kazdych 8 znaku je zarazka
\predisplaypenalty=10000 \postdisplaypenalty=10000
\def\tab{$$\advance\predisplaysize by-2em
         \global\lastlinewidth=\predisplaysize
         \abovedisplayskip=-\baselineskip \belowdisplayskip=-\baselineskip
         \predisplaysize=\maxdimen$$
         \divide\lastlinewidth by\tabwidth
         \advance\lastlinewidth by1sp
         \multiply\lastlinewidth by\tabwidth
         \hskip\lastlinewidth\null}

%% Priprava na verbatim
{\obeyspaces \gdef\activespace{\obeyspaces\let =\ }
 \catcode`\^^I=13 \catcode`\^^L=13
 \catcode`\^^a0=13 \global\let^^a0=\ %
 \gdef^^I{\tab}
 \gdef^^L#1{\endgraf\vfill\break}
}
\def\setverb{\def\do##1{\catcode`##1=12}\dospecials}

%% Nacteni souboru jako verbatim: 
%% csplain \def\file{nazev.txt}\def\user{uzivatel}\input verbtisk \act\end
\def\act{\bgroup \setverb \activespace 
  \catcode`\^^I=13 \catcode`\^^L=13 \catcode`\^^a0=13
  \def\par{\endgraf\leavevmode} 
  \obeylines \tt \leavevmode
  \input\file\space 
  \egroup} 
