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