%%%%%%%%%%%%%%%%%%%%%%%% dipp.sty
%
%  Styl pro sazbu diplomovych praci, v. 1.3
%  Freeware.
%  Omezeni: Pokud kdokoliv provede jakoukoliv modifikaci,
%           nesmi styl sirit pod stejnym jmenem.
%
%  Jiri Rybicka, 31. 8. 2013
%
%%%%%%%%%%%%%%%%%%%%%%%%
%
%  TEST SPRAVNOSTI KODOVANI (kodovani je CP 1250)
%  ---------------------------------------
%  P��li� �lu�ou�k� k�� �p�l ��belsk� �dy.
%  ---------------------------------------
%  Predchozi vetu musite videt spravne.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%% Vno�en� styly

\input graphicx.sty

%%%%%%%%%%%%%%%%%%%%%% Rozm�rov� parametry

\textwidth 150mm \hoffset -5mm
\textheight 220mm \voffset -5mm
\oddsidemargin 14mm
\evensidemargin 6mm

\tolerance 4000
\widowpenalty 5000
\clubpenalty 5000
\raggedbottom

\parindent 2em

%%%%%%%%%%%%%%%%%%%%%% Fonty

\def\markfont{\normalfont\footnotesize\sffamily}
\def\pgfont{\normalfont\bfseries\sffamily}

%%%%%%%%%%%%%%%%%%%%%% Str�nkov�n�

\def\ps@headings{%
       \def\@oddfoot{}%
       \def\@evenfoot{}%
       \let\@mkboth\markboth
       \def\@evenhead{\parbox{\textwidth}{{\pgfont \thepage}
                \hfill{\markfont \leftmark}\smallskip\hrule}}%
       \def\@oddhead{\parbox{\textwidth}{{\markfont
       \rightmark}\hfill{\pgfont \thepage}\smallskip\hrule}}}

\def\ps@plain{%
       \def\@oddhead{}%
       \def\@evenhead{}%
       \def\@evenfoot{\parbox{\textwidth}{\pgfont \thepage}}%
       \def\@oddfoot{\parbox{\textwidth}{\hspace*{\fill}
                   {\pgfont \thepage}}}}

\pagestyle{plain}   % implicitn�

%%%%%%%%%%%%%%%%%%%%%% �vodn� str�nky

\def\typprace{Diplomov�}
\def\bakalarska{\gdef\typprace{Bakal��sk�}}
\def\skola#1{\gdef\@skola{#1}}
\def\fakulta#1{\gdef\@fakulta{#1}}

\def\titul#1#2#3#4{\thispagestyle{empty}
   \vspace*{-20mm}
   \begin{center}
   {\Large \sffamily \@skola\\[8pt]}
   {\Large \sffamily \@fakulta} \par \bigskip \hrule
   \vbox to 165mm{\vspace*{\fill}
   {\Huge\sffamily\bfseries #1\par}\vskip 10mm
   {\large\sffamily\bfseries \typprace{} pr�ce} \par
   \vspace*{\fill}}\par
   \noindent {\large \sffamily
        \begin{tabular}{@{}l}
        Vedouc� pr�ce:\\ #3\end{tabular} \hfill #2}
   \par \vfill {\large \sffamily #4}\end{center}%
   \gdef\@nazprace{#1}%
}

\skola{Mendelova univerzita v~Brn�}
\fakulta{Provozn� ekonomick� fakulta}

\def\prohlaseni#1#2{\cleardoublepage\thispagestyle{empty}\vspace*{\fill}\noindent
      \parbox{\textwidth}{\hspace*{\parindent}#1 \\[15mm]
       #2 \hfill \hbox to 60mm{\tiny\dotfill}}}

\def\prohlasenizena#1{\cleardoublepage\thispagestyle{empty}\vspace*{\fill}\noindent
      \parbox{\textwidth}{{\sffamily\bfseries �estn� prohl�en�}\par\medskip
      Prohla�uji, �e jsem tuto pr�ci: {\bfseries \@nazprace}\\
      vypracovala samostatn� a~ve�ker� pou�it� prameny a~informace jsou uvedeny 
      v~seznamu pou�it� literatury. Souhlas�m, aby moje pr�ce byla zve�ejn�na 
      v~souladu s~\S\,47b z�kona �.\,111/1998 Sb., o~vysok�ch �kol�ch ve zn�n� 
      pozd�j��ch p�edpis�, a~v~souladu s~platnou {\itshape Sm�rnic� o~zve�ej�ov�n� 
      vysoko�kolsk�ch z�v�re�n�ch prac�.}\par
      Jsem si v�doma, �e se na moji pr�ci vztahuje z�kon �.\,121/2000 Sb., autorsk� 
      z�kon, a~�e Mendelova univerzita v~Brn� m� pr�vo na uzav�en� licen�n� 
      smlouvy a~u�it� t�to pr�ce jako �koln�ho d�la podle \S\,60 odst.\,1 
      Autorsk�ho z�kona.\par
      D�le se zavazuji, �e p�ed seps�n�m licen�n� smlouvy o~vyu�it� d�la jinou 
      osobou (subjektem) si vy��d�m p�semn� stanovisko univerzity o~tom, �e 
      p�edm�tn� licen�n� smlouva nen� v~rozporu s~opr�vn�n�mi z�jmy univerzity, 
      a~zavazuji se uhradit p��padn� p��sp�vek na �hradu n�klad� spojen�ch se 
      vznikem d�la, a~to a� do jejich skute�n� v��e.\\[15mm]
      #1 \hfill \hbox to 60mm{\tiny\dotfill}}}

\def\prohlasenimuz#1{\cleardoublepage\thispagestyle{empty}\vspace*{\fill}\noindent
      \parbox{\textwidth}{{\sffamily\bfseries �estn� prohl�en�}\par\medskip
      Prohla�uji, �e jsem tuto pr�ci: {\bfseries \@nazprace}\\
      vypracoval samostatn� a~ve�ker� pou�it� prameny a~informace jsou uvedeny 
      v~seznamu pou�it� literatury. Souhlas�m, aby moje pr�ce byla zve�ejn�na 
      v~souladu s~\S\,47b z�kona �.\,111/1998 Sb., o~vysok�ch �kol�ch ve zn�n� 
      pozd�j��ch p�edpis�, a~v~souladu s~platnou {\itshape Sm�rnic� o~zve�ej�ov�n� 
      vysoko�kolsk�ch z�v�re�n�ch prac�.}\par
      Jsem si v�dom, �e se na moji pr�ci vztahuje z�kon �.\,121/2000 Sb., autorsk� 
      z�kon, a~�e Mendelova univerzita v~Brn� m� pr�vo na uzav�en� licen�n� 
      smlouvy a~u�it� t�to pr�ce jako �koln�ho d�la podle \S\,60 odst.\,1 
      Autorsk�ho z�kona.\par
      D�le se zavazuji, �e p�ed seps�n�m licen�n� smlouvy o~vyu�it� d�la jinou 
      osobou (subjektem) si vy��d�m p�semn� stanovisko univerzity o~tom, �e 
      p�edm�tn� licen�n� smlouva nen� v~rozporu s~opr�vn�n�mi z�jmy univerzity, 
      a~zavazuji se uhradit p��padn� p��sp�vek na �hradu n�klad� spojen�ch se 
      vznikem d�la, a~to a� do jejich skute�n� v��e.\\[15mm]
      #1 \hfill \hbox to 60mm{\tiny\dotfill}}}

\def\podekovani#1{\cleardoublepage\thispagestyle{empty}\vspace*{\fill}#1}

\def\abstract#1#2{\cleardoublepage\vspace*{3cm}{\english
       \noindent {\sffamily\bfseries Abstract}\par\medskip
       \noindent #1 \par \medskip #2}}

\def\abstrakt#1#2{\vspace*{3cm}{\noindent
      {\sffamily\bfseries Abstrakt}\par\medskip
       \noindent #1 \par \medskip #2}}

%%%%%%%%%%%%%%%%%%%%%% Obsah

\def\obsah{\cleardoublepage\tableofcontents\cleardoublepage}

%%%%%%%%%%%%%%%%%%%%%% Odd�ly v textu

\def\cislovat#1{\setcounter{secnumdepth}{#1}\setcounter{tocdepth}{#1}}

\renewcommand\section{\@startsection {section}{1}{\z@}%
                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                   {2.3ex \@plus.2ex}%
                   {\normalfont\sffamily\Large\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                   {-3.25ex\@plus -1ex \@minus -.2ex}%
                   {1.5ex \@plus .2ex}%
                   {\normalfont\sffamily\large\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                   {-3.25ex\@plus -1ex \@minus -.2ex}%
                   {1.5ex \@plus .2ex}%
                   {\normalfont\normalsize\sffamily\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                   {3.25ex \@plus1ex \@minus.2ex}%
                   {-1em}%
                   {\normalfont\normalsize\sffamily\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
                   {3.25ex \@plus1ex \@minus .2ex}%
                   {-1em}%
                   {\normalfont\normalsize\sffamily\bfseries}}

\def\kapitola#1{\clearpage\section{#1}
     \markboth{\thesection\quad \uppercase{#1}}{\thesection\quad
                                \uppercase{#1}}}
\def\sekce#1{\subsection{#1}\markright{\thesubsection\quad #1}}
\def\podsekce#1{\subsubsection{#1}}

\def\appname{P��lohy}

\def\@samstranapriloh{\clearpage\thispagestyle{empty}
        \vspace*{50mm}\begin{center}
        \normalfont\sffamily\LARGE\bfseries
                 \uppercase{\appname}\end{center}
        \addcontentsline{toc}{section}{\appname}
}

\def\prilohy{\@ifnextchar*{\@prilohy{}}{\@prilohy{\@samstranapriloh}}}

\def\@prilohy#1{#1
        \def\thesection{\Alph{section}}\setcounter{section}{0}}
\let\priloha\kapitola


%%%%%%%%%%%%%%%%%%%%%% Literatura

\def\refname{Literatura}

\renewenvironment{thebibliography}[1]
     {\section{\refname}%
      \markboth{\thesection\quad \uppercase{\refname}}{\thesection\quad
                                 \uppercase{\refname}}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \itemindent -2em
            \leftmargin 2em
            \@openbib@code
            %\usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}

\def\@citex[#1]#2{%
  \let\@citea\@empty
  \@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{; }%
     \edef\@citeb{\expandafter\@firstofone\@citeb}%
     \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
     \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
       \G@refundefinedtrue
       \@latex@warning
         {Citation `\@citeb' on page \thepage \space undefined}}%
       {\hbox{\csname b@\@citeb\endcsname}}}}{#1}}

\def\@lbibitem[#1]#2{\item []\if@filesw
      {\let\protect\noexpand
       \immediate
       \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}

\def\@cite#1#2{({\let\hbox\relax #1\if@tempswa , #2\fi})}

\def\autor#1{\textsc{#1}}
\def\nazev#1{\textit{#1}}
\def\akol{\rm}

\newenvironment{literatura}{\newpage\begin{thebibliography}{}}%
               {\end{thebibliography}}

\def\citace#1#2#3{% ident., tvar odkazu, �daje
\bibitem [#2]{#1} #3.
}

%%%%%%%%%%%%%%%%%%%%%% V��ty a seznamy
\newdimen\leftmargini
\newdimen\leftmarginii
\newdimen\leftmarginiii
\newdimen\leftmarginiv
\newdimen\leftmarginv
\newdimen\leftmarginvi
\leftmargini=2em
\leftmarginii=2em
\leftmarginiii=2em
\leftmarginiv=2em
\leftmarginv=2em
\leftmarginvi=2em

\def\@listi{\leftmargin\leftmargini
            \parsep \parskip% 4\p@ \@plus2\p@ \@minus\p@
            \topsep 0.5\baselineskip%\parskip% 8\p@ \@plus2\p@ \@minus4\p@
            \itemsep 0.5\baselineskip}%\parskip}% 4\p@ \@plus2\p@ \@minus\p@}
\let\@listI\@listi
\@listi
\def\@listii {\leftmargin\leftmarginii
              \labelwidth\leftmarginii
              \advance\labelwidth-\labelsep
              \topsep   0.5\baselineskip%\parskip%  4\p@ \@plus2\p@ \@minus\p@
              \parsep   \parskip%  2\p@ \@plus\p@  \@minus\p@
              \itemsep   0.5\baselineskip}%\parsep}

\def\labelenumii{\theenumii)}

\def\@listiii{\leftmargin\leftmarginiii
              \labelwidth\leftmarginiii
              \advance\labelwidth-\labelsep
              \topsep   0.5\baselineskip%\parskip%  2\p@ \@plus\p@\@minus\p@
              \parsep   \parskip%  \z@
              \partopsep\parskip%  \p@ \@plus\z@ \@minus\p@
              \itemsep   0.5\baselineskip}%\topsep}
\def\@listiv {\leftmargin\leftmarginiv
              \labelwidth\leftmarginiv
              \advance\labelwidth-\labelsep}
\def\@listv  {\leftmargin\leftmarginv
              \labelwidth\leftmarginv
              \advance\labelwidth-\labelsep}
\def\@listvi {\leftmargin\leftmarginvi
              \labelwidth\leftmarginvi
              \advance\labelwidth-\labelsep}

%%%%%%%%%%%%%%%%%%%%%% Plovouc� prost�ed�

\def\figurename{Obr.}
\def\tablename{Tab.}

\def\csfigcap#1{\refstepcounter{figure}\parbox{\textwidth}{\small%
       \figurename{} \thefigure: #1}\addcontentsline{lof}{section}{\figurename{} 
       \thefigure: #1}}

\def\csfigcapbez{\refstepcounter{figure}\parbox{\textwidth}{\small%
       \figurename{} \thefigure}\addcontentsline{lof}{section}{\figurename{} 
       \thefigure}}

\def\cstabcap#1{\refstepcounter{table}\parbox{\textwidth}{\small%
       \tablename{} \thetable: #1}\addcontentsline{lot}{section}{\tablename{} 
       \thetable: #1}}

\def\cstabcapbez{\refstepcounter{table}\parbox{\textwidth}{\small%
       \tablename{} \thetable}\addcontentsline{lot}{section}{\tablename{} 
       \thetable}}

\newif\ifjedraft\jedraftfalse
\def\draft{\jedrafttrue}
\def\obrazek{\begin{figure}[htb]\centering }
\def\obrazekp{\begin{figure}[p]\centering }
\def\endobr#1{\par\medskip\csfigcap{#1}\end{figure}}
\def\endobrl#1#2{\par\medskip\csfigcap{#1}\label{#2}\end{figure}}
\def\endobrbez{\par\medskip\csfigcapbez\end{figure}}
\def\vloztif#1{\ifjedraft\else\input #1 \csname set#1\endcsname\fi}
\def\vlozeps#1#2{\ifjedraft \scalebox{#2}{\includegraphics[draft]{#1}}
     \else\scalebox{#2}{\includegraphics{#1}}\fi}
\def\vlozobrbox#1#2#3{\ifjedraft\resizebox{#2}{#3}{\includegraphics[draft]{#1}}
     \else\resizebox{#2}{#3}{\includegraphics{#1}}\fi}

\def\tabulka#1{\begin{table}[htb]\centering\cstabcap{#1}\par\medskip}
\def\tabulkap#1{\begin{table}[p]\centering\cstabcap{#1}\par\medskip}
\def\endtab{\end{table}}

\def\pole#1#2{{\def\arraystretch{.95}\begin{tabular}{@{}#1@{}}
                 #2\end{tabular}}}

\def\polet#1#2{{\def\arraystretch{.95}\begin{tabular}[t]{@{}#1@{}}
                 #2\end{tabular}}}

{\catcode`\!=\active
\gdef\vykricnik{\catcode`\!=\active \def!{\hphantom{0}}}
}

%%%%%%%%%%%%%%%%%%%%%% Speci�ln� znaky

\def\spoj{\discretionary{-}{-}{-}}
\def\az{\discretionary{}{\hbox{a�\ }}{--}}
\def\uvv#1{\symbol{159}#1\symbol{158}}
\def\,{\penalty10000\hskip0.25em}

%%%%%%%%%%%%%%%%%%%%%% konec stylu dipp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
