improve the figure&table captions
This commit is contained in:
parent
af951b3597
commit
3b92c1523f
24
macros.tex
24
macros.tex
@ -48,8 +48,14 @@
|
|||||||
\newcommand{\asy}[1]{\mathcal{O}(#1)}
|
\newcommand{\asy}[1]{\mathcal{O}(#1)}
|
||||||
|
|
||||||
% listings and default lstlisting config (remove if unused)
|
% listings and default lstlisting config (remove if unused)
|
||||||
\floatstyle{ruled}
|
\DeclareNewFloatType{listing}{}
|
||||||
\newfloat{listing}{tbp}{lst}
|
\floatsetup[listing]{style=ruled}
|
||||||
|
|
||||||
|
\DeclareCaptionStyle{thesis}{style=base,font={small,sf},labelfont=bf,labelsep=quad}
|
||||||
|
\captionsetup{style=thesis}
|
||||||
|
\captionsetup[algorithm]{style=thesis,singlelinecheck=off}
|
||||||
|
\captionsetup[listing]{style=thesis,singlelinecheck=off}
|
||||||
|
|
||||||
\ifEN\floatname{listing}{Listing}
|
\ifEN\floatname{listing}{Listing}
|
||||||
\else\floatname{listing}{Výpis kódu}\fi
|
\else\floatname{listing}{Výpis kódu}\fi
|
||||||
\lstset{%
|
\lstset{%
|
||||||
@ -62,20 +68,6 @@
|
|||||||
stringstyle=\color{red!50!black},
|
stringstyle=\color{red!50!black},
|
||||||
keywordstyle=\color{blue!75!black}}
|
keywordstyle=\color{blue!75!black}}
|
||||||
|
|
||||||
% re-styling of the captions with the float package
|
|
||||||
\makeatletter
|
|
||||||
\newcommand\floatc@plainb[2]{\setbox\@tempboxa\hbox{{\@fs@cfont #1} #2}%
|
|
||||||
\ifdim\wd\@tempboxa>\hsize {\@fs@cfont #1} #2\par
|
|
||||||
\else\hbox to\hsize{\hfil\box\@tempboxa\hfil}\fi}
|
|
||||||
\newcommand\fs@plainb{\def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@plainb%
|
|
||||||
\def\@fs@pre{}\def\@fs@post{}%
|
|
||||||
\def\@fs@mid{\vspace\abovecaptionskip\relax}%
|
|
||||||
\let\@fs@iftopcapt\iffalse}
|
|
||||||
\makeatother
|
|
||||||
\floatstyle{plainb}
|
|
||||||
\restylefloat{table}
|
|
||||||
\restylefloat{figure}
|
|
||||||
|
|
||||||
% Czech versions of the used cleveref references (It's not as convenient as in
|
% Czech versions of the used cleveref references (It's not as convenient as in
|
||||||
% English because of declension, cleveref is limited to sg/pl nominative. Use
|
% English because of declension, cleveref is limited to sg/pl nominative. Use
|
||||||
% plain \ref to dodge that.)
|
% plain \ref to dodge that.)
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
\newif\ifMFF
|
\newif\ifMFF
|
||||||
\MFFtrue % comment this out for the version with a big UK university logo
|
\MFFtrue % comment this out for the version with a big UK university logo
|
||||||
\def\UKName{Charles University in Prague} %this is used in UK-logo-version
|
\def\UKName{Charles University in Prague} %this is used in UK-logo-version
|
||||||
|
|
||||||
\def\UKFaculty{Faculty of Mathematics and Physics}
|
\def\UKFaculty{Faculty of Mathematics and Physics}
|
||||||
\def\ThesisTypeName{\ifEN BACHELOR THESIS \else BAKALÁŘSKÁ PRÁCE \fi}
|
\def\ThesisTypeName{\ifEN BACHELOR THESIS \else BAKALÁŘSKÁ PRÁCE \fi}
|
||||||
%\def\ThesisTypeName{\ifEN MASTER THESIS \else DIPLOMOVÁ PRÁCE \fi}
|
%\def\ThesisTypeName{\ifEN MASTER THESIS \else DIPLOMOVÁ PRÁCE \fi}
|
||||||
|
@ -43,7 +43,8 @@
|
|||||||
\usepackage{graphicx}
|
\usepackage{graphicx}
|
||||||
\usepackage{xcolor}
|
\usepackage{xcolor}
|
||||||
\usepackage{booktabs}
|
\usepackage{booktabs}
|
||||||
\usepackage{float}
|
\usepackage{caption}
|
||||||
|
\usepackage{floatrow}
|
||||||
|
|
||||||
% load bibliography tools
|
% load bibliography tools
|
||||||
\usepackage[backend=bibtex,natbib,style=numeric,sorting=none]{biblatex}
|
\usepackage[backend=bibtex,natbib,style=numeric,sorting=none]{biblatex}
|
||||||
|
Loading…
Reference in New Issue
Block a user