\documentclass[% Options of scrbook % % Preamble fold starts here, unless 'documentclass' is added to the % g:vimtex_fold_commands option. % % draft, fontsize=12pt, %smallheadings, headings=big, english, paper=a4, twoside, open=right, DIV=14, BCOR=20mm, headinclude=false, footinclude=false, mpinclude=false, pagesize, titlepage, parskip=half, headsepline, chapterprefix=false, appendixprefix=Appendix, appendixwithprefixline=true, bibliography=totoc, toc=graduated, numbers=noenddot, ]{scrbook} % % Fold commands (single) % \hypersetup{ ..., } \tikzset{ testing, tested, } % % Fold commands (single_opt) % \usepackage[ ... ]{test} \usepackage[ backend=biber, style=numeric-comp, maxcitenames=99, doi=false, url=false, giveninits=true, ]{biblatex} % % Fold commands (multi) % \renewcommand{\marginpar}{% \marginnote% } \newcommand*{\StoreCiteField}[3]{% \begingroup \global\let\StoreCiteField@Result\relax \citefield{#2}[StoreCiteField]{#3}% \endgroup \let#1\StoreCiteField@Result } \newenvironment{theo}[1][]{% \stepcounter{theo}% \ifstrempty{#1}{% \mdfsetup{ frametitle={% \tikz[baseline=(current bounding box.east),outer sep=0pt]% \node[anchor=east,rectangle,fill=blue!20] {\strut Theorem~\thetheo};% } }% }% {% else ifstrempty: \mdfsetup{ frametitle={ \tikz[baseline=(current bounding box.east),outer sep=0pt]% \node[anchor=east,rectangle,fill=blue!20]{\strut Theorem~\thetheo:~#1};}% } }% \mdfsetup{ innertopmargin=10pt, linecolor=blue!20, linewidth=2pt,topline=true, frametitleaboveskip=\dimexpr-\ht\strutbox\relax, } \begin{mdframed}[]\relax% }{% \end{mdframed}% } \begin{document} Hello World \end{document}