\makeatletter\def\Hy@xspace@end{}\makeatother
%	\DeclareMathSymbol{,}{\mathord}{letters}{"3B}	%	Predefinovani carku v matmatickem prostredi jako desetinny oddelovac bez automaticke mezery za symbolem
\def\mathcomma{\futurelet\next\mathcommaA}
\def\mathcommaA{\mathchar`, \expandafter\ifx\space\next\,\fi}
{\catcode`,=13 \global\let,=\mathcomma}
\mathcode`,="8000


\def\tilde{\raisebox{-0.5ex}{\textasciitilde}}
\def\captionfont{\normalsize}
\columnsep=0.5ex 
\columnseprule=0.5pt

\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{theorems}[numbered]
\setbeamertemplate{footline}[frame number]

\mode<presentation> {
\usetheme{Brno}
% \usetheme{Warsaw}
% \useoutertheme{brno8}
% \useinnertheme{rounded}
\useinnertheme{rectangles}
% \usecolortheme{Moje}
\usecolortheme{Brno}
% \usefonttheme[onlymath]{serif}
\usefonttheme{structurebold}
%\usefonttheme{default}
%\setbeamercovered{transparent}
%\setbeamercovered{invisible}
% \setbeamertemplate{sidebar canvasl eft}[horizontal shading] [left=white,middle=UniGreen,right=white]
}

\mode<handout>{
\setbeamercolor{background canvas}{bg=black!5}
}

\definecolor{redtwenty}{cmyk}{0,0.15,0.15,0}
\newcommand{\NVr}{\rotatebox{90}{\ensuremath{\vDash}}}
\newcommand{\Nvyb}[2]{\rotatebox{90}{\ensuremath{\vDash}}\ensuremath{\left\{#1_1,\ldots,#1_{#2}\right\}}}
%\newcommand{\Nvybb}[3]{\rotatebox{90}{\ensuremath{\vDash}}\ensuremath{\left\{#1_{#2_{1}},\ldots,#1_{#2_{#3}}\right\}}}
\newcommand{\Rdef}{\stackrel{\scriptsize{\rm def}}{\Leftrightarrow}}

\newcommand{\bs}{\boldsymbol}
\newcommand{\bst}{{\bs\theta}}
\newcommand{\bsth}{(\bst)}
\newcommand{\xth}{(\mathbf{x};\bst)}
\newcommand{\xthn}{(\mathbf{x};\bst_0)}
\newcommand{\xthj}{(\mathbf{x};\bst_1)}
\newcommand{\xtho}{(x;\bst)}
\newcommand{\Xth}{(X;\bst)}
\newcommand{\yth}{(\mathbf{y};\bst)}
\newcommand{\Yth}{(\mathbf{Y};\bst)}
\newcommand{\thy}{(\bst;\mathbf{y})}
\newcommand{\thY}{(\bst;\mathbf{Y})}
\newcommand{\tht}{(\theta)}
\newcommand{\bsb}{\boldsymbol\beta}
\newcommand{\bsT}{\boldsymbol\Theta}
\newcommand{\gbst}{\gamma(\bst)}
\newcommand{\gto}{\gamma(\theta)}
%\newcommand{\mbst}{\mu(\bst)}
\newcommand{\mbst}{\mu}
%\newcommand{\sbst}{\sigma^2(\bst)}
%\newcommand{\ssbst}{\sigma(\bst)}
\newcommand{\sbst}{\sigma^2}
\newcommand{\ssbst}{\sigma}
\newcommand{\p}{\!\raisebox{1ex}{-}}
\newcommand{\pp}{\!\raisebox{1ex}{\ensuremath{\scriptscriptstyle{+}}}}


\newcommand{\hth}{\widehat{\bs\theta}}
\newcommand{\thML}{\widehat{\theta}_{\scriptscriptstyle{\mathrm{ML}}}}
\newcommand{\hthML}{\widehat{\bs\theta}_{\scriptscriptstyle{\mathrm{ML}}}}
\newcommand{\hbeML}{\widehat{\bs\beta}_{\scriptscriptstyle{\mathrm{ML}}}}
\newcommand{\ML}{{\scriptscriptstyle{\mathrm{ML}}}}
%\newcommand{\hthML}{\widehat{\bs\theta}_n^{\scriptscriptstyle{\mathrm{ML}}}}
\newcommand{\T}{^{\scriptscriptstyle{\mathrm{T}}}}

\newcommand{\Freg}{\mathcal{F}_{\text{reg}}^m}
\newcommand{\Fregn}{\mathcal{F}_{\text{reg}}^n}
\newcommand{\Frego}{\mathcal{F}_{\text{reg}}}

\newcommand{\Xnv}{\mathbf{X}=(X_1,\ldots,X_n)'}
\newcommand{\xnv}{\mathbf{x}=(x_1,\ldots,x_n)'}
\newcommand{\Xn}{\ensuremath{X_1,\ldots,X_n}}
\newcommand{\XNV}{\ensuremath{\mathbf{X}=(X_1,\ldots,X_n)'}}
\newcommand{\xNV}{\ensuremath{\mathbf{x}=(x_1,\ldots,x_n)'}}
\newcommand{\asympt}{\ensuremath{\stackrel{A}{\sim}}}
\newcommand{\Xprum}{\ensuremath{\overline{X}_n=\frac{1}{n}\sum\limits_{i=1}^n
X_i}}

\newcommand{\Tn}{T_n=T(X_1, \ldots, X_n)'}

\newcommand{\indp}{\ensuremath{\rotatebox{90}{\ensuremath{\vDash}}}}
\newcommand{\NV}{\ensuremath{\indp\{X_1,\ldots,X_n\}}}
\newcommand{\NVF}{\ensuremath{\NV \simeq F(x;\boldsymbol\theta)}}
\newcommand{\NVN}{\ensuremath{\NV \simeq N(\mu,\sigma^2)}}
\newcommand{\NVLb}{\ensuremath{\NV \simeq \mathcal{L}(\mu,\sigma^2)}}
\newcommand{\NVL}{\ensuremath{\NV \simeq \mathcal{L}(\mbst,\sbst)}}
\newcommand{\Ylrm}{\mathbf{Y}\sim \mathcal{L}(\mathbf{X}\boldsymbol\beta,\sigma^2\mathbf{I}_n)}
\newcommand{\Ynlrm}{\mathbf{Y}\sim N_n(\mathbf{X}\boldsymbol\beta,\sigma^2\mathbf{I}_n)}
\newcommand{\YAlrm}{\mathbf{Y}\sim \mathcal{L}(\mathbf{X}\boldsymbol\beta,\sigma^2\mathbf{W}^{-1})}
\newcommand{\YAnlrm}{\mathbf{Y}\sim N_n(\mathbf{X}\boldsymbol\beta,\sigma^2\mathbf{W}^{-1})}
\newcommand{\Yilrm}{\mathbf{Y}_{(i)}\sim \mathcal{L}(\mathbf{X}_{(i)}\boldsymbol\beta_{(i)},\sigma^2\mathbf{I}_{n-1})}
\newcommand{\bols}{\widehat{\boldsymbol\beta}_{OLS}}
\newcommand{\bolsa}{\widehat{\boldsymbol\beta}_{OLS,1}}
\newcommand{\bolsb}{\widehat{\boldsymbol\beta}_{OLS,2}}
\newcommand{\bolsj}{\widehat{\beta}_{OLS,j}}
\newcommand{\bbeta}{\widehat{\boldsymbol\beta}}

\def\tabhframe{\noalign{\hrule height 1pt}}

\newcommand{\konv}[1]{\stackrel{#1}{\rightarrow}}
\newcommand{\qqRqq}{\qquad\Rightarrow\qquad}
\newcommand{\qwq}{\quad\wedge\quad}

\newtheorem{cccp}{Příklad}[section]
\newtheorem{cviceni}[cccp]{\textbf{Příklad}}


\mode<handout> { \setbeamercolor{background canvas}{bg=white} }
\fboxsep=1pt \fboxrule=1pt \fboxsep=2pt \arrayrulewidth=1pt
\newenvironment{condlist}{\par\noindent\begin{list}{{\usebeamercolor[fg]{palette sidebar primary}\(\blacktriangleright\)}}{\leftmargin=1em\labelsep=1ex\itemsep=0.5ex\parsep=0em}}{\end{list}}
\newenvironment{boxalertenv}{\begin{altenv}{\usebeamertemplate{alerted text begin}\usebeamercolor[fg]{alerted text}\usebeamerfont{alerted text}}{\usebeamertemplate{alerted text end}}{\color{.}}{}}{\end{altenv}}
\newenvironment{aboxalertenv}{\begin{altenv}{\usebeamertemplate{alerted text begin}\usebeamercolor[fg]{alerted text}\usebeamerfont{alerted text}\colorbox{bg}}{\usebeamertemplate{alerted text end}}{\color{.}}{}}{\end{altenv}}
\newcommand<>{\aabox}[1]{{\begin{aboxalertenv}#2{\textbf{#1}}\end{aboxalertenv}}}  % puvodni
\newcommand<>{\abox}[1]{\textbf{\textcolor{darkgreen}{#1}}}
\definecolor{greenryb}{rgb}{0.4, 0.69, 0.2}
\newcommand<>{\ebox}[1]{\textbf{\textcolor{greenryb}{#1}}}
\newcommand<>{\italbox}[1]{{\begin{boxalertenv}#2{\emph{#1}}\end{boxalertenv}}}
\def\bbox#1{\abox{\textbf{#1.}}}
\def\ibox#1{\item[\bbox{#1}]}
\def\currtime{\insertshortdate}
\def\currslide{\insertframenumber{}\,{/}\,\inserttotalframenumber{}}
\def\fontinhead{\fontfamily{phv}\bfseries\selectfont}
\def\fontinfoot{\fontfamily{phv}\bfseries\selectfont}

\makeatletter
\begingroup
\catcode`\-=\active
\def\x{\endgroup
\let\cs@cline\@cline
\expandafter\def\expandafter\@cline
  \expandafter##\expandafter1\expandafter
    -\expandafter##\expandafter2\expandafter\@nil\expandafter
      {\expandafter\cs@cline\expandafter##\expandafter1\minus##2\@nil}
}\x \makeatother

\def\bdot{{\displaystyle\cdot}}
\def\avg#1{\overline{#1}}
\def\est#1{\widehat{#1}}
\def\mle#1{\widehat{#1}_{\mathsf{ML}}}
\def\mme#1{\widehat{#1}_{\mathsf{MM}}}
\def\sumn{\sum_{i=1}^n}
\def\sumk{\sum_{i=1}^n}
\def\sumnj{\sum_{j=1}^n}
\def\summj{\sum_{j=1}^m}
\def\argmin{\mathop{\rm arg\,min}}
\newcommand{\bX}{\mathbf{X}}
\newcommand{\bx}{\mathbf{x}}
\newcommand{\bY}{\mathbf{Y}}
\newcommand{\by}{\mathbf{y}}
\newcommand{\bh}{\mathbf{h}}
\newcommand{\Xposl}{\ensuremath{\{X_n\}_{n=1}^\infty}}
\newcommand{\Xpr}{\ensuremath{\overline{X}_n}}
\newcommand{\xn}{x_1,\ldots,x_n}
%\newcommand{\Tn}{T_n=T(X_1, \ldots, X_n)'}
\newcommand{\mds}[1]{$\displaystyle{#1}$}
\newcommand{\bxm}[1]{\mbox{$\displaystyle{\;#1\;}$}}
\newcommand{\bxmc}[1]{\begin{center}{{$\displaystyle{\;#1\;}$}}\end{center}}
%   \chardef\clqq=254  %\sfcode254=0 \lccode254=0
%    \chardef\crqq=255  %\sfcode255=0 \lccode255=0

%\uselanguage{spanish}
%\languagepath{spanish}
\deftranslation[to=czech]{Definition}{Definice}
\newtheorem{pozn}[theorem]{Poznámka}
\newtheorem{veta}[theorem]{\textbf{Věta}}
\newtheorem{dusl}[theorem]{\textbf{Důsledek}}
\newtheorem{priklad}[section]{\textbf{Příklad}}
\newtheorem{navod}[theorem]{\textbf{Návod}}
\DeclareMathAlphabet{\mib}{OT1}{cmr}{bx}{it}
\newcommand*{\theorembreak}{\usebeamertemplate{theorem end}\framebreak\usebeamertemplate{theorem begin}}
\newcommand{\Ynv}{\mathbf{Y}_n=(Y_1,\ldots,Y_n)\T}
\newcommand{\jevpole}{\ensuremath{(\Omega,\mathcal{A})}}
\newcommand{\pstpr}{\ensuremath{(\Omega,\mathcal{A},P)}}
\newcommand{\An}{\ensuremath{\left\{A_n \right\}_{n=1}^\infty}}
\newcommand{\Ain}{\ensuremath{\left\{A_i \right\}_{i=1}^n}}
\newcommand{\lsAn}{\ensuremath{\limsup\limits_{n\to\infty} A_n}}
\newcommand{\liAn}{\ensuremath{\liminf\limits_{n\to\infty} A_n}}
% \definecolor{darkgreen}{rgb}{0.0, 0.4, 0.0}
\newcommand{\kulicka}[1]{\put(0,2){\color{darkgreen}\circle*{#1}}}
\newcommand{\kulickacer}[1]{\put(0,2){\color{red}\circle*{#1}}}
\newcommand{\kulickaor}[1]{\put(0,2){\color{orange}\circle*{#1}}}
%\definecolor{lightgray}{rgb}{0.83, 0.83, 0.83}

% \def\captionfont{\normalsize}
% \columnsep=1ex
% \columnseprule=0mm
% \setbeamertemplate{navigation symbols}{}
% \mode<presentation>
% {
% \useinnertheme{rectangles}
% % \usetheme{Warsaw}
% \useoutertheme{brno8}
% \usecolortheme{brno}
% \usefonttheme{serif,structurebold}
% % \setbeamercovered{transparent}
% \setbeamercovered{invisible}
% }
% \mode<handout>{
% \setbeamercolor{background canvas}{bg=black!5}
% }

% \makeatletter
% \begingroup
%   \catcode`\-=\active
%   \def\x{\endgroup
%   \let\cs@cline\@cline
%   \expandafter\def\expandafter\@cline
%     \expandafter##\expandafter1\expandafter
%       -\expandafter##\expandafter2\expandafter\@nil\expandafter
%         {\expandafter\cs@cline\expandafter##\expandafter1\minus##2\@nil}
% }\x
% \makeatother 

\lstset{
	escapeinside=__, 
	showlines=false, 
	basicstyle=\small\ttfamily\upshape,
	breaklines=true,
	tabsize=2,showtabs=false,showspaces=false,showstringspaces=false,
% 	numbers=left,numbersep=2ex,numberstyle=\scriptsize\color{orange},xleftmargin=2ex,
	numbers=none,numbersep=0ex,numberstyle=\scriptsize\color{orange},xleftmargin=0ex,
	keywordstyle=\bfseries\color{darkgreen},commentstyle=\rmfamily\itshape\color{gray},identifierstyle=\color{blue},stringstyle=\color{red},
	alsoother={$},
	otherkeywords={==,!=,~,$,+,*,\&,\%/\%,\%*\%,\%\%,<-,<<-,/,-,<,>},
	deletekeywords={c},
	morecomment=[l]\#,
	morestring=[d]",
	morestring=[d]'
}
 
% \DeclareTextFontCommand{\FAi}{\fontencoding{T1}\fontfamily{awesome}\fontseries{m}\fontshape{n}\selectfont}
% \DeclareTextFontCommand{\FAii}{\fontencoding{T1}\fontfamily{awesome}\fontseries{bx}\fontshape{n}\selectfont}
% \DeclareTextFontCommand{\FAiii}{\fontencoding{T1}\fontfamily{awesome}\fontseries{m}\fontshape{it}\selectfont}
% \DeclareTextFontCommand{\FAiv}{\fontencoding{T1}\fontfamily{awesome}\fontseries{m}\fontshape{sl}\selectfont}

\fboxsep=1pt
\fboxrule=0.5pt
\fboxsep=1pt
\arrayrulewidth=0.5pt
% \newenvironment{clist}{\par\noindent\begin{list}{{\usebeamercolor[fg]{structure}\scriptsize\FAiii{\char116}}}{\leftmargin=2.5ex\labelsep=0.5ex\itemsep=0ex\parsep=0em}}{\end{list}}
% \newenvironment{boxalertenv}{\begin{altenv}{\usebeamertemplate{alerted text begin}\usebeamercolor[fg]{alerted text}\usebeamerfont{alerted text}\colorbox{bg}}{\usebeamertemplate{alerted text end}}{\color{.}}{}}{\end{altenv}}
% \newcommand<>{\AB}[1]{{\begin{boxalertenv}#2{\vphantom{I}#1}\end{boxalertenv}}}
% \newcommand<>{\MB}[1]{{\begin{boxalertenv}#2{\ensuremath{\vphantom{1_0^2}#1}}\end{boxalertenv}}}

\def\currslide{\insertframenumber{}\,{/}\,\inserttotalframenumber{}}
% \def\currtime{\factorclockfont{1.1}\tdhours\raisebox{-0.3pt}{\hskip0.5pt\textbf{.}\hskip0.5pt}\tdminutes}
% \def\currtime{\factorclockfont{1.0}\tdhours\hspace*{0.5pt}\textbf{.}\,\tdminutes\,(\cronoMinutes)}
\def\fontinhead{\fontfamily{phv}\bfseries\selectfont}
\def\fontinfoot{\fontfamily{phv}\bfseries\selectfont}
\def\currslide{\insertframenumber{}\,$/$\,\inserttotalframenumber{}}
% \def\currtime{\factorclockfont{1.0}\tdhours\raisebox{-0.3pt}{\hskip0.5pt\textbf{.}\hskip0.5pt}\tdminutes}
\def\currtime{\relax}
% \def\icontitle{\scalebox{0.5}{\FAiv{\char104}} }
% \def\iconauthor{\scalebox{0.5}{\FAi{\char92}} }
% \def\iconslide{\scalebox{0.5}{\FAi{\char54}} }
% \def\icontime{\scalebox{0.7}{\FAi{\char55}} }
% \def\iconsection{\qquad\scalebox{0.5}{\FAi{\char90}} }
\def\tilde{\raisebox{-0.8ex}{\textasciitilde}}
\def\bdot{{\displaystyle\cdot}}
\def\avg#1{\overline{#1}}
\def\est#1{\widehat{#1}}
\def\code#1{ \scalebox{0.9}[1.0]{\ttfamily\bfseries #1} }
\def\median#1{\ensuremath{\overset{\sim}{#1}}}
\def\rmd{\ensuremath{\,\mathrm{d}}}
\def\rme{\ensuremath{\mathrm{e}}}
\def\mdot{\ensuremath{\,\cdot\,}}
