\RequirePackage{tabularx}[1995/03/20]
\RequirePackage{theorem}[1995/11/23]
\RequirePackage{latexsym}[1995/11/23]

%zvacsi odsadenie cisiel v lof, lot
%2.3em -> 3.3em
\renewcommand*\l@figure{\@dottedtocline{1}{1.5em}{3.3em}}
\let\l@table\l@figure

% desatinna ciarka nema za sebou medzeru
\mathcode`\,="013B

% dx/dt bude stojate d
\newcommand{\dd}{{\text d}}
\newcommand{\rmd}{\dd}
\newcommand{\dt}{\dd{}t}

% Hlava a pata
\RequirePackage{fancyhdr}
%\pagestyle{fancyplain}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\lhead[\fancyplain{}{\bfseries\thepage}]%
  {\fancyplain{}{\bfseries\rightmark}}
\rhead[\fancyplain{}{\bfseries\leftmark}]%
  {\fancyplain{}{\bfseries\thepage}}
\cfoot{}
\setlength{\headheight}{23pt}

% Nech prazdna strana je bez hlavicky a paty
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  \hbox{}
  \thispagestyle{empty}
  \newpage
  \if@twocolumn\hbox{}\newpage\fi\fi\fi}


% List environment for bibliography - change
%bibitem to item and delete its label (if any)
\newenvironment{zozlit}[1]{\begin{list}{}{%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\parsep}{0cm}%
\setlength{\itemsep}{0.5ex}%
}#1
}{\end{list}}

% Environment to describe variables
% Requires tabularx, array styles
% 3 column environment, {llX}, use & to go
% to the next column, \\ to go to the next line
% (as tabular)
\newlength{\mylen}
\newenvironment{popis}[1]%
{\setlength{\parindent}{0pt}%
\renewcommand{\arraystretch}{1.2}%
\settowidth{\mylen}{#1}%
\addtolength{\mylen}{-\textwidth}%
\setlength{\mylen}{-\mylen}%
#1%
\tabularx{\mylen}[t]{@{}ll@{}X@{}}}%
{\endtabularx}%

% trojcislove rovnice, tabulky, obrazky
\@addtoreset{equation}{section}
\def\theequation{\thesection.\arabic{equation}}
\@addtoreset{figure}{section}
\def\thefigure{\thesection.\arabic{figure}}
\@addtoreset{table}{section}
\def\thetable{\thesection.\arabic{table}}

%%===================================================================
% prostredie Priklad
% parameter 1 je nepovinny a pouzijeme ho na upozornenie, ze priklad
% je na webe: nastavime ho napr. ako \marginpar{\fbox{www}} 
\newcounter{exm}[section]
\def\theexm{\thesection.\arabic{exm}}
\newenvironment{priklad}[2][]
{\refstepcounter{exm}
 \vspace{1ex}\begin{sloppypar}\noindent#1{\bfseries Pr\'{\i}klad \theexm:} {\em #2}
 \@beginparpenalty\@M
 \begin{list}{}{\setlength{\topsep}{0ex}}\item[]
 \@beginparpenalty\@endparpenalty
}
{\end{list}\end{sloppypar}\vspace{1ex}}
% prostredie Priklad
%===================================================================

%===================================================================
% prostredie Uloha
\newcounter{ulo}[section]
\def\theulo{\thesection.\arabic{ulo}}
\newenvironment{uloha}[1]
{\refstepcounter{ulo}%
 \vspace{1ex}\begin{sloppypar}\noindent{\bfseries \'Uloha \theulo:} {\em #1}%
 \@beginparpenalty\@M%
  \begin{list}{}{\setlength{\topsep}{0ex}%
  \setlength{\leftmargin}{\rightmargin}}\item[]
 \@beginparpenalty\@endparpenalty%
}
{\end{list}\end{sloppypar}\vspace{1ex}}
% prostredie Uloha
%===================================================================

%{
% \theoremstyle{break}
% \theorembodyfont{\rmfamily}
% \newtheorem{priklad}{Pr\'{\i}klad}[section]
%}
\theoremstyle{plain}
\newtheorem{note}{Pozn\'amka}[section]
\newtheorem{thm}{Veta}[section]
\theoremstyle{break}
\newtheorem{program}{Program}[section]
\newcommand{\prog}[2]{\begin{program}[#1]#2\end{program}}
\theoremstyle{plain}
%===================================================================
% prostredie Dokaz
\newenvironment{proof}
{\vspace{1ex}\begin{sloppypar}\noindent{\bfseries D\^okaz:}
 \@beginparpenalty\@M
  \begin{list}{}{\setlength{\topsep}{0ex}%
  \setlength{\leftmargin}{\rightmargin}}\item[]
 \@beginparpenalty\@endparpenalty
}
{\hfill{}\mbox{$\Box$}\end{list}\end{sloppypar}\vspace{1ex}}
% prostredie Dokaz
%===================================================================

% Tucne, sikme matematicke pismo
\def\ve#1{\mathchoice{\mbox{\boldmath$\displaystyle#1$}}
{\mbox{\boldmath$\textstyle#1$}}
{\mbox{\boldmath$\scriptstyle#1$}}
{\mbox{\boldmath$\scriptscriptstyle#1$}}}

\def\ex#1{E\left\{#1\right\}}
\def\cov#1{\mbox{Cov}\left(#1\right)}
\def\covi#1{\mbox{Cov}_{#1}}
\newcommand{\cova}[2]{\mbox{Cov}_{#1}\left(#2\right)}
\def\hth{\mbox{$\hat{\theta}$}}


\newcommand{\mat}[1]{\left(#1\right)} % matrix - parentheses
\def\vvec#1{\begin{pmatrix}#1\end{pmatrix}} %vertical vector
\newcommand{\mt}[4]{\begin{matrix} #1&#2\\#3&#4 \end{matrix}}
\newcommand{\mx}[4]{\begin{pmatrix}#1 & #2 \\ #3 & #4\end{pmatrix}}

\def\lt#1{{\cal L}\left\{#1\right\}}
\def\ilt#1{\mbox{${\cal L}^{-1}\left\{#1\right\}$}}
\def\zt#1{{\cal Z}\left\{#1\right\}}
\def\izt#1{\mbox{${\cal Z}^{-1}\left\{#1\right\}$}}
\newcommand{\norm}[1]{\left\|#1\right\|}
\newcommand{\tg}{\mathop{\rm tg}\nolimits}
\newcommand{\arctg}{\mathop{\rm arctg}\nolimits}
\newcommand{\adj}{\mathop{\rm adj}\nolimits}
\newcommand{\tr}{\mathop{\rm tr}\nolimits}

\newcommand{\qm}{\mbox{$q^{-1}$}}
\newcommand{\zm}{\mbox{$z^{-1}$}}
\endinput
