Merged info and important box listings

This commit is contained in:
Jan Benda 2015-11-17 18:19:54 +01:00
parent ca9082520c
commit b2ad5df871

View File

@ -241,7 +241,7 @@
% The cooler programming language.
\DeclareFloatingEnvironment[
fileext=lob,
listname={\tr{Info Boxes}{Info-Boxen}},
listname={\tr{Info and Important Boxes}{Info- und Merk-Boxen}},
name={Info-Box},
placement=t
]{iboxf}
@ -267,20 +267,20 @@
% results in a nicely colored box with the text inside.
% The optional title of the box "Apples are important"
% also appears in the list of important things.
\DeclareFloatingEnvironment[
fileext=loi,
listname={\tr{Important hints}{Merk-Boxen}},
name={Merk-Box},
placement=t
]{importantf}
% \DeclareFloatingEnvironment[
% fileext=loi,
% listname={\tr{Important hints}{Merk-Boxen}},
% name={Merk-Box},
% placement=t
% ]{importantf}
\newenvironment{important}[1][]%
{\captionsetup{singlelinecheck=off,labelfont={large,sf,it,bf},font={large,sf,it,bf}}
{\captionsetup{singlelinecheck=off,labelformat={empty},labelfont={large,sf,it,bf},font={large,sf,it,bf}}
\ifthenelse{\equal{#1}{}}%
{\begin{mdframed}[linecolor=blue!40,linewidth=1ex,%
backgroundcolor=blue!10,font={\sffamily}]}%
{\begin{mdframed}[linecolor=blue!40,linewidth=1ex,%
backgroundcolor=blue!10,font={\sffamily},%
frametitle={\captionof{importantf}{#1}},frametitleaboveskip=-1ex,%
frametitle={\captionof{iboxf}{#1}},frametitleaboveskip=-1ex,%
frametitlebackgroundcolor=blue!40]}%
}%
{\end{mdframed}}