summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mdframed
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-06-23 23:43:14 +0000
committerKarl Berry <karl@freefriends.org>2013-06-23 23:43:14 +0000
commit0ade4baaa2b1857abfa6b1385ca4a72b9c68a08b (patch)
tree8e34059b97843eedf3e5760dff025d89d19a98de /Master/texmf-dist/tex/latex/mdframed
parentf42dda28c8d669e48f9adcba4a7809d26e210bea (diff)
mdframed (23jun13)
git-svn-id: svn://tug.org/texlive/trunk@30868 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mdframed')
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls195
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf142
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf1000
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf172
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf172
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/mdframed.sty716
6 files changed, 949 insertions, 1448 deletions
diff --git a/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls b/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls
index d5d59e938fb..cad31bf5c8e 100644
--- a/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls
+++ b/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls
@@ -59,7 +59,7 @@
\RequirePackage{fontspec}
\setmonofont[Mapping=tex-text]{DejaVu Sans}
}
-
+\ExplSyntaxOff
\RequirePackage[french=quotes]{csquotes}
\RequirePackage{xspace}
\begingroup
@@ -69,14 +69,15 @@
\xspaceaddexceptions{\xspace@check@icr}
\RequirePackage{multicol}\columnseprule0.4pt
\RequirePackage{scrpage2}
-\RequirePackage{listings}
\RequirePackage[inline]{enumitem}
\RequirePackage{amsmath}
+\RequirePackage{listings}
\RequirePackage[amsmath]{ntheorem}
\RequirePackage{array,booktabs}
\RequirePackage{xcolor,tikz}
\RequirePackage{graphicx}
\RequirePackage[numbered]{hypdoc}
+\ExplSyntaxOn
%set columns of index
\c@IndexColumns = 2
@@ -112,76 +113,6 @@
\providecommand\mdfrevision{1}
\ifoot{{\mdfmaindate}\qquad revision:~{\mdfrevision}\qquad{\jobname}}
-
-%Tikz und Farbe
-%tikzlibrary needs special handling
-\ExplSyntaxOff
-\usetikzlibrary{calc,backgrounds,arrows,matrix}
-\ExplSyntaxOn
-\colorlet{ltxmdfblue}{blue!30!black}
-
-\lstset{keywordstyle=\bfseries}
-\lstdefinestyle{lstltxmdf}{%
- basicstyle=\small\ttfamily,
- language={[LaTeX]TeX},
- basicstyle=\small,%
- xleftmargin=20pt,%
- xrightmargin=20pt,%
- frame=none,%
- rulecolor=\color{ltxmdfblue},%
- framesep=5pt,%
- framerule=1.2pt,%
- texcsstyle=*\color{red!50!black}\bfseries,
- moretexcs=intertext,
- keywordstyle=\color{blue!60!black}\bfseries,%
- columns=fullflexible,%
- fontadjust=true,%
- basewidth=0.65em,%
- breakatwhitespace=true,
- morekeywords=[2]{@length},
- keywordstyle=[2]\color{red!50!black}\bfseries,
- morekeywords={outerlinewidth,leftmargin,rightmargin,backgroundcolor,
- outerlinecolor,innertopmargin,splittopskip,skipbelow,
- skipabove,ntheorem,theorem,lemma,mdframed,linecolor,
- frametitle,infobox,innerlinewidth,roundcorner,leftline,
- topline,splitbottomskip,middlelinewidth,middlelinecolor,
- tikzsetting,rightline,bottomline,innerrightmargin,style,
- linewidth,lem,section,definedstyle,mdfapptodefinestyle,
- needspace,mdf@globalstyle@cnt,framemethod,ExampleText,
- titregris,draw,gray,thick,fill,white,shading,exersicetitle,
- exersicebackground,color,green,black,exercise,exercisepoints,
- text,rectangle,rounded,corners,right,minimum,height,xshift,
- at,exercisestyle,settings,frametitlefont,innerbottommargin,
- innerleftmargin,frametitlerule,frametitlebelowskip,
- frametitleaboveskip,frametitlebackgroundcolor,
- frametitlerulecolor,picins,figure,hidealllines,fontcolor,
- firstextra,secondextra,middleextra,singleextra,overlay,node,
- pstricksappsetting,apptotikzsetting,frametitlerulewidth,
- userdefinedwidth,mdfbackground,append,mdfframetitlebackground,
- left,shade,align,exampledefault},
- moretexcs={newmdtheoremenv,newmdenv,theoremstyle,mdfsetup,@length,
- md@putbox@single,@tempboxa,mdf@,mdf@linewidth,
- mdf@leftmargin@length,interruptlength,setlength,newrobustcmd,
- overlaplines,appto,md@frame@leftline@singe,color,
- md@frame@leftline@single,mdf@innerbottommargin@length,
- mdf@middlelinewidth@length,mdfboundingboxheight,
- md@frame@rightline@single,mdfboundingboxwidth,
- mdf@innerrightmargin@length,mdfdefinestyle,
- mdfapptodefinestyle,defcounter,tikzstyle,
- pgfdeclarehorizontalshading,theexercise,mdf@@exercisepoints,
- define@key,renewrobustcmd,mdfcreateextratikz,node,ifdefempty,
- mdf@frametitlefont,dimexpr,mdframedtitleenv,ifstrempty,
- @undefined,mdtheorem,surroundwithmdframed,@captype,@dblarg,
- @newcaption,newcaption,mdflength,tikzset,path,p1,p2,
- IfFileExists,includegraphics,mdfsubtitle,%
- },%
-}
-
-
-\lstnewenvironment{tltxmdfexample}[1][]
- {\lstset{style=lstltxmdf,#1}}%
- {}
-
%%Maketitle angepasst:
\prop_new:N \l_ltxmdf_maketitleinformation_prop
\cs_set:Npn \title #1
@@ -258,7 +189,10 @@
\tl_gput_left:Nn \theCodelineNo { \color{gray} }
\dim_set:Nn \MacroTopsep { 10pt }
\tl_gput_right:Nn \MacroFont { \color{ltxmdfblue} }
-
+\NewDocumentCommand \MacroFontExpl {}
+ {
+ \MacroFont\color{ltxmdfblue}\bfseries
+ }
%Anweisung zur Darstellung
@@ -292,7 +226,6 @@
\newline{\small~This~works~only~with~\Opt{framemethod=#1}.}
}
-
\NewDocumentCommand \ExplOpt { o m }
{
\par
@@ -302,7 +235,7 @@
{
\skip_horizontal:n { -2em }
\@bsphack
- \MacroFont #2
+ \MacroFontExpl #2
\SpecialOptIndex{#2}
\@esphack
}
@@ -325,7 +258,7 @@
{
\skip_horizontal:n { -2em }
\@bsphack
- \MacroFont #2
+ \MacroFontExpl #2
\SpecialEnvIndex{#2}
\@esphack
}
@@ -348,7 +281,7 @@
{
\skip_horizontal:n { -2em }
\@bsphack
- \MacroFont\textbackslash #2
+ \MacroFontExpl\textbackslash #2
\SpecialUsageIndex{#2}
\@esphack
}
@@ -371,6 +304,109 @@
\ExplSyntaxOff
+%Tikz und Farbe
+%tikzlibrary needs special handling
+
+
+
+\usetikzlibrary{calc,backgrounds,arrows,matrix}
+
+\colorlet{ltxmdfblue}{blue!30!black}
+
+
+\lst@RequireAspects{writefile}
+
+\lstset{keywordstyle=\bfseries}
+\lstdefinestyle{lstltxmdf}{%
+ basicstyle=\small\ttfamily,
+ language={[LaTeX]TeX},
+ basicstyle=\small,%
+ xleftmargin=20pt,%
+ xrightmargin=20pt,%
+ frame=none,%
+ rulecolor=\color{ltxmdfblue},%
+ framesep=5pt,%
+ framerule=1.2pt,%
+ texcsstyle=*\color{red!50!black}\bfseries,
+ moretexcs=intertext,
+ keywordstyle=\color{blue!60!black}\bfseries,%
+ columns=fullflexible,%
+ fontadjust=true,%
+ basewidth=0.65em,%
+ breakatwhitespace=true,
+ morekeywords=[2]{@length},
+ keywordstyle=[2]\color{red!50!black}\bfseries,
+ morekeywords={outerlinewidth,leftmargin,rightmargin,backgroundcolor,
+ outerlinecolor,innertopmargin,splittopskip,skipbelow,
+ skipabove,ntheorem,theorem,lemma,mdframed,linecolor,
+ frametitle,infobox,innerlinewidth,roundcorner,leftline,
+ topline,splitbottomskip,middlelinewidth,middlelinecolor,
+ tikzsetting,rightline,bottomline,innerrightmargin,style,
+ linewidth,lem,section,definedstyle,mdfapptodefinestyle,
+ needspace,mdf@globalstyle@cnt,framemethod,ExampleText,
+ titregris,draw,gray,thick,fill,white,shading,exersicetitle,
+ exersicebackground,color,green,black,exercise,exercisepoints,
+ text,rectangle,rounded,corners,right,minimum,height,xshift,
+ at,exercisestyle,settings,frametitlefont,innerbottommargin,
+ innerleftmargin,frametitlerule,frametitlebelowskip,
+ frametitleaboveskip,frametitlebackgroundcolor,
+ frametitlerulecolor,picins,figure,hidealllines,fontcolor,
+ firstextra,secondextra,middleextra,singleextra,overlay,node,
+ pstricksappsetting,apptotikzsetting,frametitlerulewidth,
+ userdefinedwidth,mdfbackground,append,mdfframetitlebackground,
+ left,shade,align,exampledefault},
+ moretexcs={newmdtheoremenv,newmdenv,theoremstyle,mdfsetup,@length,
+ md@putbox@single,@tempboxa,mdf@,mdf@linewidth,
+ mdf@leftmargin@length,interruptlength,setlength,newrobustcmd,
+ overlaplines,appto,md@frame@leftline@singe,color,
+ md@frame@leftline@single,mdf@innerbottommargin@length,
+ mdf@middlelinewidth@length,mdfboundingboxheight,
+ md@frame@rightline@single,mdfboundingboxwidth,
+ mdf@innerrightmargin@length,mdfdefinestyle,
+ mdfapptodefinestyle,defcounter,tikzstyle,
+ pgfdeclarehorizontalshading,theexercise,mdf@@exercisepoints,
+ define@key,renewrobustcmd,mdfcreateextratikz,node,ifdefempty,
+ mdf@frametitlefont,dimexpr,mdframedtitleenv,ifstrempty,
+ @undefined,mdtheorem,surroundwithmdframed,@captype,@dblarg,
+ @newcaption,newcaption,mdflength,tikzset,path,p1,p2,
+ IfFileExists,includegraphics,mdfsubtitle,lipsum,kant,%
+ Examplesec,%
+ },%
+}
+
+
+\lstnewenvironment{tltxmdfexample}[1][]
+ {\lstset{style=lstltxmdf,#1}}%
+ {}
+
+\def\mdf@sampleInput#1{%
+ \MakePercentComment\catcode`\^^M=10\relax%
+ {\setkeys{lst}{SelectCharTable=\lst@ReplaceInput{\^\^I}%
+ {\lst@ProcessTabulator}}%
+ \leavevmode \input{#1}}\MakePercentIgnore}
+\def\highlightinputenv{flushleft}
+\lstnewenvironment{tltxmdfexample*}[1][]%
+ {%
+ \begingroup%
+ \lstset{style=lstltxmdf,#1}%
+ \setbox\@tempboxa\hbox\bgroup
+ \lst@BeginWriteFile{\jobname.tmp}%
+ }%
+ {
+ \lst@EndWriteFile\egroup%
+ \begin{\highlightinputenv}
+ \lstinputlisting{\jobname.tmp}%
+ \end{\highlightinputenv}
+ \mdf@sampleInput{\jobname.tmp}%
+ \endgroup%
+ }
+
+
+\lstnewenvironment{exltxmdfexample}[1][]
+ {\lstset{style=lstltxmdf,#1}}%
+ {}
+
+
\lstMakeShortInline[basicstyle=\small\ttfamily\color{blue!60!black}]{|}
\def\macro#1{%
\MakePrivateLetters
@@ -408,7 +444,6 @@
(option)\encapchar usage}%
\index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
usage}\@esphack}
-\ExplSyntaxOn
@@ -498,6 +533,6 @@
%%%%
-
-\tex_endinput:D
+\endinput
+%\tex_endinput:D
diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf
index ae92366d67b..1c79a61cf66 100644
--- a/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf
+++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf
@@ -1,3 +1,4 @@
+
%% Style file for mdframed for package option `framemethod=default`
%%
%% This package may be distributed under the terms of the LaTeX Project
@@ -47,122 +48,27 @@
}%
}%
-\newrobustcmd\mdfsubtitle[2][]%
-{%
- \begingroup
- \penalty-9995%set a breakpoint before the subtitle
- \parindent\z@\relax%
- \mdfsetup{#1}%only for subtitle options
- \setbox\z@=\vbox{\mdf@subtitlefont{#2}\relax}%
- \dimen@=\linewidth\relax%
- \advance\dimen@ by \mdf@innerleftmargin@length\relax%
- \advance\dimen@ by \mdf@innerrightmargin@length\relax%
- \dimen@i=\mdf@subtitleinneraboveskip@length\relax%
- \advance\dimen@i by \mdf@subtitleinnerbelowskip@length\relax
- \advance\dimen@i by \ht\z@\relax%
- \advance\dimen@i by \dp\z@\relax%
- \ifbool{mdf@subtitleaboveline}{}%
- {\mdfsetup{subtitleabovelinewidth=\z@}}%
- \ifbool{mdf@subtitlebelowline}{}%
- {\mdfsetup{subtitlebelowlinewidth=\z@}}%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleaboveskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \color{\mdf@subtitleabovelinecolor}%
- \rule{\dimen@}{\mdf@subtitleabovelinewidth@length}%
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleinneraboveskip@length
- \leavevmode\rlap%
- {%
- \smash{%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \color{\mdf@subtitlebackgroundcolor}%
- \rule[\dimexpr-\dp\z@-\mdf@subtitleinnerbelowskip@length\relax]
- {\dimen@}{\dimen@i}%
- \endgroup%
- }%
- }%
- \box\z@\relax%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleinnerbelowskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \color{\mdf@subtitlebelowlinecolor}%
- \rule{\dimen@}{\mdf@subtitlebelowlinewidth@length}%
- \color@endgroup
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitlebelowskip@length
- \penalty 9995
- \endgroup
+\def\mdf@drawsubtitleaboveline{%
+ \rlap{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \color{\mdf@subtitleabovelinecolor}%
+ \rule{\mdf@templength}{\mdf@subtitleabovelinewidth@length}%
+ }%
}
-
-\newrobustcmd\mdfsubsubtitle[2][]%
-{%
- \begingroup
- \penalty-9995%set a breakpoint before the subsubtitle
- \parindent\z@\relax%
- \mdfsetup{#1}%only for subsubtitle options
- \setbox\z@=\vbox{\mdf@subsubtitlefont{#2}\relax}%
- \dimen@=\linewidth\relax%
- \advance\dimen@ by \mdf@innerleftmargin@length\relax%
- \advance\dimen@ by \mdf@innerrightmargin@length\relax%
- \dimen@i=\mdf@subsubtitleinneraboveskip@length\relax%
- \advance\dimen@i by \mdf@subsubtitleinnerbelowskip@length\relax
- \advance\dimen@i by \ht\z@\relax%
- \advance\dimen@i by \dp\z@\relax%
- \ifbool{mdf@subsubtitleaboveline}{}%
- {\mdfsetup{subsubtitleabovelinewidth=\z@}}%
- \ifbool{mdf@subsubtitlebelowline}{}%
- {\mdfsetup{subsubtitlebelowlinewidth=\z@}}%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleaboveskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \color{\mdf@subsubtitleabovelinecolor}%
- \rule{\dimen@}{\mdf@subsubtitleabovelinewidth@length}%
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleinneraboveskip@length
- \leavevmode\rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \smash{%
- \begingroup%
- \color{\mdf@subsubtitlebackgroundcolor}%
- \rule[\dimexpr-\dp\z@-\mdf@subtitleinnerbelowskip@length\relax]
- {\dimen@}{\dimen@i}%
- \endgroup%
- }%
- }%
- \box\z@\relax%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleinnerbelowskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \color{\mdf@subsubtitlebelowlinecolor}%
- \rule{\dimen@}{\mdf@subsubtitlebelowlinewidth@length}%
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitlebelowskip@length
- \penalty 9995
- \endgroup
+\def\mdf@drawsubtitlebelowline{%
+ \rlap{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \color{\mdf@subtitlebelowlinecolor}%
+ \rule{\mdf@templength}{\mdf@subtitlebelowlinewidth@length}%
+ }%
+}
+\def\mdf@drawsubtitlebackground{%
+ \rlap{\smash{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \color{\mdf@subtitlebackgroundcolor}%
+ \rule[-\mdfsubtitleheight]{\mdf@templength}{\mdfsubtitleheight}%
+ }}%
}
-
\def\mdf@frame@background@single{%
\ifbool{mdf@shadow}%
{%
@@ -340,6 +246,8 @@
}{}%
{\box\mdf@splitbox@one}%
}%
+ \mdf@extra%
+ \mdf@singleextra
\mdf@makeboxalign@right%
}%
\fi%
@@ -551,6 +459,8 @@
}{}%
{\box\mdf@splitbox@two}%
}%
+ \mdf@extra%
+ \mdf@firstextra%
\mdf@makeboxalign@right%
}%
\fi%
@@ -745,6 +655,8 @@
}{}%
{\box\mdf@splitbox@one}%
}%
+ \mdf@extra%
+ \mdf@secondextra%
\mdf@makeboxalign@right%
}%
\fi%
@@ -940,6 +852,8 @@
}{}%
{\box\mdf@splitbox@two}%
}%
+ \mdf@extra%
+ \mdf@middleextra%
\mdf@makeboxalign@right%
}%
\fi%
diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf
index ec948c974a0..db84ca8c611 100644
--- a/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf
+++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf
@@ -1,3 +1,4 @@
+
%% Style file for mdframed for package option `framemethod=tikz`
%%
%% This package may be distributed under the terms of the LaTeX Project
@@ -46,7 +47,7 @@
shadow yshift=-\mdf@shadowsize@length+2pt,
fill=\mdf@shadowcolor,
every shadow }}}%
- \mdf@tikzset@local
+ \mdf@tikzset@local%
\tikzset{mdfmiddleline/.style={}}%
\ifdimgreater{\mdf@middlelinewidth@length}{\z@}
{\tikzset{mdfmiddleline/.append style={%
@@ -74,50 +75,102 @@
\path[mdfinnerline,mdfcorners]#1;%
\end{scope}%
\path[mdfmiddleline,mdfcorners]#1;}%
-%%\newrobustcmd*\mdf@testdraftmode{%
-%% \ifbool{mdf@draft}%
-%% {%
-%% \renewrobustcmd*\mdf@tikzbox@tfl[1]{%three or four borders
-%% \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);%
-%% \begin{scope}[mdfcorners]%
-%% \clip[preaction=mdfouterline]%
-%% [postaction=mdfbackground]%
-%% [postaction=mdfinnerline]##1;%
-%% \end{scope}%
-%% \path[mdfmiddleline,mdfcorners]##1;
-%% }%
-%% \renewrobustcmd*\mdf@tikzbox@otl[2]{%one or two borders
-%% \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);%
-%% \begin{scope}
-%% \path[mdfouterline,mdfcorners]##1;%
-%% \clip[postaction=mdfbackground]##2;%
-%% \path[mdfinnerline,mdfcorners]##1;%
-%% \end{scope}%
-%% \path[mdfmiddleline,mdfcorners]##1;%
-%% }%
-%% }{%
-%% \ifdimgreater{\overfullrule}{0pt}{%
-%% \renewrobustcmd*\mdf@tikzbox@tfl[1]{%three or four borders
-%% \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);%
-%% \begin{scope}[mdfcorners]%
-%% \clip[preaction=mdfouterline]%
-%% [postaction=mdfbackground]%
-%% [postaction=mdfinnerline]##1;%
-%% \end{scope}%
-%% \path[mdfmiddleline,mdfcorners]##1;
-%% }%
-%% \renewrobustcmd*\mdf@tikzbox@otl[2]{%one or two borders
-%% \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);%
-%% \begin{scope}
-%% \path[mdfouterline,mdfcorners]##1;%
-%% \clip[postaction=mdfbackground]##2;%
-%% \path[mdfinnerline,mdfcorners]##1;%
-%% \end{scope}%
-%% \path[mdfmiddleline,mdfcorners]##1;%
-%% }%
-%% }{}%
-%% }%
-%%}
+\newrobustcmd*\mdf@drawframe@whole{%
+ \mdf@test@ltrb{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)--cycle}}{}%
+ \mdf@test@ltb{\mdf@tikzbox@tfl{(P|-O)--(O)--(O|-P)--(P)}}{}%
+ \mdf@test@trb{\mdf@tikzbox@tfl{(O|-P)--(P)--(P|-O)--(O)}}{}%
+ \mdf@test@ltr{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)}}{}%
+ \mdf@test@lrb{\mdf@tikzbox@tfl{(P-|O)--(O)--(O-|P)--(P)}}{}%
+ \mdf@test@lb{\mdf@tikzbox@otl{(P|-O)--(O)--(O|-P)}%
+ {(P)--(P|-O)[mdfcorners]--(O)--(O|-P)}%
+ }{}%
+ \mdf@test@rb{\mdf@tikzbox@otl{(P)--(P|-O)--(O)}%
+ {(O|-P)--(P)[mdfcorners]--(P|-O)--(O)}%
+ }{}%
+ \mdf@test@tr{\mdf@tikzbox@otl{(O-|P)--(P)--(P-|O)}%
+ {(O)--(O|-P)[mdfcorners]--(P)--(P|-O)}%
+ }{}%
+ \mdf@test@lt{\mdf@tikzbox@otl{(O)--(O|-P)--(P)}%
+ {(P|-O)--(O)[mdfcorners]--(O|-P)--(P)}%
+ }{}%
+ \mdf@test@lr{\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}%
+ {(O)rectangle(P)}%
+ }{}%
+ \mdf@test@tb{\mdf@tikzbox@otl{(O)--(O-|P)(O|-P)--(P)}%
+ {(O)rectangle(P)}%
+ }{}%
+ \mdf@test@l{\mdf@tikzbox@otl{(O)--(O|-P)}%
+ {(O)rectangle(P)}%
+ }{}%
+ \mdf@test@r{\mdf@tikzbox@otl{(O-|P)--(P)}%
+ {(O)rectangle(P)}%
+ }{}%
+ \mdf@test@t{\mdf@tikzbox@otl{(O|-P)--(P)}%
+ {(O)rectangle(P)}%
+ }{}%
+ \mdf@test@b{\mdf@tikzbox@otl{(O)--(O-|P)}%
+ {(O)rectangle(P)}%
+ }{}%
+ \mdf@test@noline{\path[mdfbackground,mdfcorners](O)rectangle(P);}{}%
+}
+\newrobustcmd*\mdf@predtikzcalc{%
+ %%width
+ \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@one}%
+ \mdf@dolist{\mdf@advancelength@add{\mdfboundingboxwidth}}%
+ {innerleftmargin,innerrightmargin}%
+ \ifbool{mdf@leftline}{%
+ \mdf@dolist{\mdf@advancelength@add{\mdfboundingboxwidth}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}}{}%
+ \ifbool{mdf@rightline}{%
+ \mdf@dolist{\mdf@advancelength@add{\mdfboundingboxwidth}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}}{}%
+ %%height
+ \setlength\mdfboundingboxheight%
+ {\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}%
+ \mdf@dolist{\mdf@advancelength@add{\mdfboundingboxheight}}%
+ {innertopmargin,innerbottommargin}%
+ \ifbool{mdf@topline}{%
+ \mdf@dolist{\mdf@advancelength@add{\mdfboundingboxheight}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}}{}%
+ \ifbool{mdf@bottomline}{%
+ \mdf@dolist{\mdf@advancelength@add{\mdfboundingboxheight}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}}{}%
+}
+
+\newrobustcmd*\mdf@innertikzcalc{%
+ \pgfmathsetlengthmacro\mdf@Ax{+\mdf@innerleftmargin@length}%
+ \pgfmathsetlengthmacro\mdf@Ay{+\mdf@innerbottommargin@length}%
+ \pgfmathsetlengthmacro\mdf@Ox{+0pt}%
+ \pgfmathsetlengthmacro\mdf@Oy{+0pt}%
+ \pgfmathsetlengthmacro\mdf@Px{+\mdfboundingboxwidth}%
+ \pgfmathsetlengthmacro\mdf@Py{+\mdfboundingboxheight}%
+ \ifbool{mdf@leftline}%
+ {%
+ \pgfmathsetlengthmacro\mdf@Ax%
+ {\mdf@Ax+\mdf@outerlinewidth@length+%
+ \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}%
+ \pgfmathsetlengthmacro\mdf@Ox%
+ {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}%
+ }{}%
+ \ifbool{mdf@rightline}%
+ {%
+ \pgfmathsetlengthmacro\mdf@Px%
+ {\mdf@Px-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}%
+ }{}%
+ \ifbool{mdf@bottomline}%
+ {%
+ \pgfmathsetlengthmacro\mdf@Ay%
+ {\mdf@Ay+\mdf@outerlinewidth@length+\mdf@middlelinewidth@length%
+ +\mdf@innerlinewidth@length}%
+ \pgfmathsetlengthmacro\mdf@Oy%
+ {\mdf@Oy+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}%
+ }{}%
+ \ifbool{mdf@topline}%
+ {%
+ \pgfmathsetlengthmacro\mdf@Py%
+ {\mdf@Py-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}%
+ }{}%
+}
\tikzset{mdfframetitlerule/.style={%
draw=none,
fill=\mdf@frametitlerulecolor,
@@ -151,285 +204,63 @@
}%
}%
-\tikzset{mdfsubtitleaboverule/.style={%
- draw=none,
- fill=\mdf@subtitleabovelinecolor,
- }%
-}
-\tikzset{mdfsubtitlebelowrule/.style={%
- draw=none,
- fill=\mdf@subtitlebelowlinecolor,
- }%
-}
-\tikzset{mdfsubtitlebackground/.style={%
- draw=\mdf@subtitlebackgroundcolor,
- fill=\mdf@subtitlebackgroundcolor,
- }%
-}
-\newrobustcmd\mdfsubtitle[2][]%
-{%
- \begingroup
- \penalty-9995%set a breakpoint before the subtitle
- \parindent\z@\relax%
- \mdfsetup{#1}%only for subtitle options
- \setbox\z@=\vbox{\mdf@subtitlefont{#2}\relax}%
- \pgfmathsetlength{\dimen@}%
- {%
- \linewidth%
- +\mdf@innerleftmargin@length%
- +\mdf@innerrightmargin@length%
- }%
- \ifbool{mdf@subtitleaboveline}{}%
- {\mdfsetup{subtitleabovelinewidth=\z@}}%
- \ifbool{mdf@subtitlebelowline}{}%
- {\mdfsetup{subtitlebelowlinewidth=\z@}}%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleaboveskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \tikz\draw[mdfsubtitleaboverule] (0,0)%
- rectangle (\dimen@,\mdf@subtitleabovelinewidth@length);
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleinneraboveskip@length
- \leavevmode\hspace*{-\mdf@innerleftmargin@length}%
- \tikz[overlay]%
- \draw[mdfsubtitlebackground]
- (0,-\mdf@subtitleinnerbelowskip@length-\dp\z@)
- rectangle(\dimen@,\ht\z@+\mdf@subtitleinneraboveskip@length);%
- \hspace*{+\mdf@innerleftmargin@length}%
- \box\z@\relax%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleinnerbelowskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \tikz\draw[mdfsubtitlebelowrule] (0,0)%
- rectangle (\dimen@,\mdf@subtitlebelowlinewidth@length);
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitlebelowskip@length
- \penalty 9995
- \endgroup
-}
-
-\tikzset{mdfsubsubtitleaboverule/.style={%
- draw=none,
- fill=\mdf@subsubtitleabovelinecolor,
- }%
-}
-\tikzset{mdfsubsubtitlebelowrule/.style={%
- draw=none,
- fill=\mdf@subsubtitlebelowlinecolor,
- }%
-}
-\tikzset{mdfsubsubtitlebackground/.style={%
- draw=\mdf@subsubtitlebackgroundcolor,
- fill=\mdf@subsubtitlebackgroundcolor,
- }%
-}
-\newrobustcmd\mdfsubsubtitle[2][]%
-{%
- \begingroup
- \penalty-9995%set a breakpoint before the subsubtitle
- \parindent\z@\relax%
- \mdfsetup{#1}%only for subsubtitle options
- \setbox\z@=\vbox{\mdf@subsubtitlefont{#2}\relax}%
- \pgfmathsetlength{\dimen@}%
- {%
- \linewidth%
- +\mdf@innerleftmargin@length%
- +\mdf@innerrightmargin@length%
- }%
- \ifbool{mdf@subsubtitleaboveline}{}%
- {\mdfsetup{subsubtitleabovelinewidth=\z@}}%
- \ifbool{mdf@subsubtitlebelowline}{}%
- {\mdfsetup{subsubtitlebelowlinewidth=\z@}}%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleaboveskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \tikz\draw[mdfsubsubtitleaboverule] (0,0)%
- rectangle (\dimen@,\mdf@subsubtitleabovelinewidth@length);
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleinneraboveskip@length
- \hspace*{-\mdf@innerleftmargin@length}%
- \tikz[overlay]%
- \draw[mdfsubtitlebackground]
- (0,-\mdf@subsubtitleinnerbelowskip@length-\dp\z@)
- rectangle(\dimen@,\ht\z@+\mdf@subsubtitleinneraboveskip@length);%
- \hspace*{+\mdf@innerleftmargin@length}%
- \box\z@\relax%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleinnerbelowskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \tikz\draw[mdfsubsubtitlebelowrule] (0,0)%
- rectangle (\dimen@,\mdf@subsubtitlebelowlinewidth@length);
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitlebelowskip@length
- \penalty 9995
- \endgroup
-}
-
\def\mdf@putbox@single{%
\ifvoid\mdf@splitbox@one
\else%
\mdf@makebox@out{%
\mdf@makeboxalign@left%
\mdf@tikz@settings%
- \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@one}%
- \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax%
- \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax%
- \ifbool{mdf@leftline}{%
- \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}%
- \ifbool{mdf@rightline}{%
- \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}%
- \setlength\mdfboundingboxheight%
- {\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}%
- \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax%
- \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax%
- \ifbool{mdf@topline}{%
- \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}%
- \ifbool{mdf@bottomline}{%
- \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}%
+ \mdf@predtikzcalc%
\mdf@makebox@in[\mdfboundingboxwidth]{%
\null%
\begin{tikzpicture}[remember picture]%
- \pgfmathsetlengthmacro\mdf@Ax{+\mdf@innerleftmargin@length}%
- \pgfmathsetlengthmacro\mdf@Ay{+\mdf@innerbottommargin@length}%
- \pgfmathsetlengthmacro\mdf@Ox{+0pt}%
- \pgfmathsetlengthmacro\mdf@Oy{+0pt}%
- \pgfmathsetlengthmacro\mdf@Px{+\mdfboundingboxwidth}%
- \pgfmathsetlengthmacro\mdf@Py{+\mdfboundingboxheight}%
- \ifbool{mdf@leftline}%
- {%
- \pgfmathsetlengthmacro\mdf@Ax%
- {\mdf@Ax+\mdf@outerlinewidth@length+%
- \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}%
- \pgfmathsetlengthmacro\mdf@Ox%
- {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}%
- }{}%
- \ifbool{mdf@rightline}%
- {%
- \pgfmathsetlengthmacro\mdf@Px%
- {\mdf@Px-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}%
- }{}%
- \ifbool{mdf@bottomline}%
- {%
- \pgfmathsetlengthmacro\mdf@Ay%
- {\mdf@Ay+\mdf@outerlinewidth@length+\mdf@middlelinewidth@length%
- +\mdf@innerlinewidth@length}%
- \pgfmathsetlengthmacro\mdf@Oy%
- {\mdf@Oy+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}%
- }{}%
- \ifbool{mdf@topline}%
- {%
- \pgfmathsetlengthmacro\mdf@Py%
- {\mdf@Py-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}%
- }{}%
+ \mdf@innertikzcalc
\coordinate(O)at(\mdf@Ox,\mdf@Oy);%
\coordinate(P)at(\mdf@Px,\mdf@Py);%
\ifbool{mdf@shadow}
{\path[mdfshadow,mdfcorners](O) rectangle (P);}{}%
- \begin{scope}
- \begin{scope}[use as bounding box]
- \mdf@test@ltrb{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)--cycle}}{}%
- \mdf@test@ltb{\mdf@tikzbox@tfl{(P|-O)--(O)--(O|-P)--(P)}}{}%
- \mdf@test@trb{\mdf@tikzbox@tfl{(O|-P)--(P)--(P|-O)--(O)}}{}%
- \mdf@test@ltr{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)}}{}%
- \mdf@test@lrb{\mdf@tikzbox@tfl{(P-|O)--(O)--(O-|P)--(P)}}{}%
- \mdf@test@lb{\mdf@tikzbox@otl{(P|-O)--(O)--(O|-P)}%
- {(P)--(P|-O)[mdfcorners]--(O)--(O|-P)}%
- }{}%
- \mdf@test@rb{\mdf@tikzbox@otl{(P)--(P|-O)--(O)}%
- {(O|-P)--(P)[mdfcorners]--(P|-O)--(O)}%
- }{}%
- \mdf@test@tr{\mdf@tikzbox@otl{(O-|P)--(P)--(P-|O)}%
- {(O)--(O|-P)[mdfcorners]--(P)--(P|-O)}%
- }{}%
- \mdf@test@lt{\mdf@tikzbox@otl{(O)--(O|-P)--(P)}%
- {(P|-O)--(O)[mdfcorners]--(O|-P)--(P)}%
- }{}%
- \mdf@test@lr{\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@tb{\mdf@tikzbox@otl{(O)--(O-|P)(O|-P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@l{\mdf@tikzbox@otl{(O)--(O|-P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@r{\mdf@tikzbox@otl{(O-|P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@t{\mdf@tikzbox@otl{(O|-P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@b{\mdf@tikzbox@otl{(O)--(O-|P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@noline{\path[mdfbackground,mdfcorners](O)rectangle(P);}{}%
- %Frametitlebackground
+ \begin{scope}
+ \begin{scope}[use as bounding box]
+ \mdf@drawframe@whole
\drawbrackgroundframetitle@single
- \end{scope}
- \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};%output
- \end{scope}
- %HIER KOMMT EIN WEITERES MAKRO
- \mdf@singleextra
- \mdfcreateextratikz
+ \end{scope}
+ \node[mdfbox] (mdfframe) at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};
+ \end{scope}
+ %HIER KOMMT EIN WEITERES MAKRO
+ \mdf@extra%
+ \mdf@singleextra%
+ \mdfcreateextratikz
\end{tikzpicture}%
}%
\mdf@makeboxalign@right%
}%
- \fi
+ \fi%
}%
+
\def\drawbrackgroundframetitle@single{%
\ifdefempty{\mdf@frametitle}{}{%
\drawbrackgroundframetitle@@single%
}%
}%
\def\drawbrackgroundframetitle@@single{%
- \begin{scope}%background frame title
- \ifbool{mdf@leftline}{
- \pgfmathsetlengthmacro\mdf@Ox%
- {\mdf@Ox+\mdf@innerlinewidth@length+0.5\mdf@middlelinewidth@length}
- }{}%
- \ifbool{mdf@rightline}{%
- \pgfmathsetlengthmacro\mdf@Px%
- {\mdf@Px-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length}
- }{}%
- \ifbool{mdf@topline}{%
- \pgfmathsetlengthmacro\mdf@Py%
- {\mdf@Py-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length}
- }{}%
- \pgfmathsetlengthmacro\mdf@Fy
- {\mdf@Py-\mdfframetitleboxtotalheight}
- \path[mdfframetitlebackground]
- (\mdf@Ox,\mdf@Fy) -- (\mdf@Ox,\mdf@Py)%
- --(\mdf@Px,\mdf@Py) --(\mdf@Px,\mdf@Fy);
- \end{scope}
+ \begin{scope}%background frame title
+ \ifbool{mdf@leftline}{
+ \pgfmathsetlengthmacro\mdf@Ox%
+ {\mdf@Ox+\mdf@innerlinewidth@length+0.5\mdf@middlelinewidth@length}%
+ }{}%
+ \ifbool{mdf@rightline}{%
+ \pgfmathsetlengthmacro\mdf@Px%
+ {\mdf@Px-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length}%
+ }{}%
+ \ifbool{mdf@topline}{%
+ \pgfmathsetlengthmacro\mdf@Py%
+ {\mdf@Py-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length}%
+ }{}%
+ \pgfmathsetlengthmacro\mdf@Fy%
+ {\mdf@Py-\mdfframetitleboxtotalheight}%
+ \path[mdfframetitlebackground]%
+ (\mdf@Ox,\mdf@Fy)--(\mdf@Ox,\mdf@Py)--(\mdf@Px,\mdf@Py)--(\mdf@Px,\mdf@Fy);
+ \end{scope}
}
\def\drawbrackgroundframetitle@first{%
{%
@@ -475,7 +306,7 @@
+\mdf@frametitlebelowskip@length
+\mdf@splitbottomskip@length
%% +\mdf@splittopskip@length
- -\dp\strutbox%
+%% -\dp\strutbox%
}%
}%
}%
@@ -508,156 +339,54 @@
\else%
\mdf@makebox@out{%
\mdf@makeboxalign@left%
+ %Special for first frame -- used other savebox
+ \let\mdf@splitbox@one\mdf@splitbox@two%
\mdf@tikz@settings%
- \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@two}%
- \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax%
- \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax%
- \ifbool{mdf@leftline}{%
- \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}%
- \ifbool{mdf@rightline}{%
- \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}%
- \setlength\mdfboundingboxheight%
- {\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}%
- \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax%
- \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax%
- \ifbool{mdf@topline}{%
- \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}%
-%%%%%%%%%
- \ifbool{mdf@everyline}{%
+ %Special for first frame -- no innerbottommargin but splitbottomskip
+ \let\mdf@innerbottommargin@length\mdf@splitbottomskip@length
+ \mdf@predtikzcalc%calc with all lines
+ %Special for first frame -- no bottom line without everyline true
+ % if every line false -- test if bottomline is in use and remove the width
+ \ifbool{mdf@everyline}{}{%
\ifbool{mdf@bottomline}{%
- \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}%
- }{}%
-%%%%%%%%%%%%%%
- %\ifdimequal{\pagegoal}{\maxdimen}{\enlargethispage{\baselineskip}}{}% ???
+ \mdf@dolist{\mdf@advancelength@sub{\mdfboundingboxheight}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}}{}%
+ }%
\ifdimgreater{\pagegoal-\maxdimen}{0pt}{}{\enlargethispage{\baselineskip}}%
\mdf@makebox@in[\mdfboundingboxwidth]{%
\null%
\begin{tikzpicture}[remember picture]
- \pgfmathsetlengthmacro\mdf@Ax{+\mdf@innerleftmargin@length}%
- \pgfmathsetlengthmacro\mdf@Ay{+\mdf@splitbottomskip@length}%
- \pgfmathsetlengthmacro\mdf@Ox{+0pt}%
- \pgfmathsetlengthmacro\mdf@Oy{+0pt}%
- \pgfmathsetlengthmacro\mdf@Px{+\mdfboundingboxwidth}%
- \pgfmathsetlengthmacro\mdf@Py{+\mdfboundingboxheight}%
- \ifbool{mdf@leftline}
- {%
- \pgfmathsetlengthmacro\mdf@Ax%
- {\mdf@Ax+\mdf@outerlinewidth@length+%
- \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}%
- \pgfmathsetlengthmacro\mdf@Ox%
- {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}%
- }{}%
- \ifbool{mdf@rightline}{%
- \pgfmathsetlengthmacro\mdf@Px%
- {\mdf@Px-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}%
- }{}%
- \ifbool{mdf@topline}{%
- \pgfmathsetlengthmacro\mdf@Py%
- {\mdf@Py-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}%
- }{}%
-%%
- \ifbool{mdf@everyline}{%
- \ifbool{mdf@bottomline}%
- {%
- \pgfmathsetlengthmacro\mdf@Ay%
- {\mdf@Ay+\mdf@outerlinewidth@length+\mdf@middlelinewidth@length%
- +\mdf@innerlinewidth@length}%
- \pgfmathsetlengthmacro\mdf@Oy%
- {\mdf@Oy+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}%
- }{}%
- }{}%
-%%
+ \mdf@innertikzcalc
+ %Special for first frame -- no bottom line without everyline true
+ \ifbool{mdf@everyline}{}{%
+ \ifbool{mdf@bottomline}%
+ {%
+ \pgfmathsetlengthmacro\mdf@Ay%
+ {\mdf@Ay-\mdf@outerlinewidth@length-\mdf@middlelinewidth@length%
+ -\mdf@innerlinewidth@length}%
+ \pgfmathsetlengthmacro\mdf@Oy%
+ {\mdf@Oy-\mdf@outerlinewidth@length
+ -0.5\mdf@middlelinewidth@length}%
+ }{}%
+ }%
\coordinate(O)at(\mdf@Ox,\mdf@Oy);%
\coordinate(P)at(\mdf@Px,\mdf@Py);%
\ifbool{mdf@shadow}
{\path[mdfshadow] (O) -- (O|-P) to[mdfcorners] (P) -- (P|-O) -- (O);}{}%
- \begin{scope}
- \begin{scope}[use as bounding box]
-%%%%%%%%%%%%
- \ifbool{mdf@everyline}{%
- \mdf@test@ltrb{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)--cycle}}{}%
- \mdf@test@ltb{\mdf@tikzbox@tfl{(P|-O)--(O)--(O|-P)--(P)}}{}%
- \mdf@test@trb{\mdf@tikzbox@tfl{(O|-P)--(P)--(P|-O)--(O)}}{}%
- \mdf@test@ltr{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)}}{}%
- \mdf@test@lrb{\mdf@tikzbox@tfl{(P-|O)--(O)--(O-|P)--(P)}}{}%
- \mdf@test@lb{\mdf@tikzbox@otl{(P|-O)--(O)--(O|-P)}%
- {(P)--(P|-O)[mdfcorners]--(O)--(O|-P)}%
- }{}%
- \mdf@test@rb{\mdf@tikzbox@otl{(P)--(P|-O)--(O)}%
- {(O|-P)--(P)[mdfcorners]--(P|-O)--(O)}%
- }{}%
- \mdf@test@tr{\mdf@tikzbox@otl{(O-|P)--(P)--(P-|O)}%
- {(O)--(O|-P)[mdfcorners]--(P)--(P|-O)}%
- }{}%
- \mdf@test@lt{\mdf@tikzbox@otl{(O)--(O|-P)--(P)}%
- {(P|-O)--(O)[mdfcorners]--(O|-P)--(P)}%
- }{}%
- \mdf@test@lr{\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@tb{\mdf@tikzbox@otl{(O)--(O-|P)(O|-P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@l{\mdf@tikzbox@otl{(O)--(O|-P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@r{\mdf@tikzbox@otl{(O-|P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@t{\mdf@tikzbox@otl{(O|-P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@b{\mdf@tikzbox@otl{(O)--(O-|P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@noline{\path[mdfbackground,mdfcorners](O)rectangle(P);}{}%
- }{
- \ifboolexpr{test {\mdf@test@ltrb} or test {\mdf@test@ltr}}%
- {\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)}}%
- {}%
- \ifboolexpr{test {\mdf@test@ltb} or test {\mdf@test@lt}}%
- {%
- \mdf@tikzbox@otl{(O)--(O|-P)--(P)}
- {(P|-O)--(O)[mdfcorners]--(O|-P)--(P)}
- }%
- {}%
- \ifboolexpr{test {\mdf@test@trb} or test {\mdf@test@tr}}%
- {%
- \mdf@tikzbox@otl{(O-|P)--(P)--(P-|O)}%
- {(O)--(O|-P)[mdfcorners]--(P)--(P|-O)}}%
- {}%
- \ifboolexpr{test {\mdf@test@lrb} or test {\mdf@test@lr}}%
- {\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}{(O)rectangle(P)}}%
- {}%
- \ifboolexpr{test {\mdf@test@tb} or test {\mdf@test@t}}%
- {\mdf@tikzbox@otl{(O|-P)--(P)}{(O)rectangle(P)}}%
- {}%
- \ifboolexpr{test {\mdf@test@lb} or test {\mdf@test@l}}%
- {\mdf@tikzbox@otl{(O)--(O|-P)}{(O)rectangle(P)}}%
- {}%
- \ifboolexpr{test {\mdf@test@rb} or test {\mdf@test@r}}%
- {\mdf@tikzbox@otl{(O-|P)--(P)}{(O)rectangle(P)}}%
- {}%
- \mdf@test@b{\path[mdfbackground](O)rectangle(P);}{}%
- \mdf@test@noline{\path[mdfbackground,mdfcorners]%
- (O)--(O|-P)--(P)--(P|-O);}%
- {}%
- }
-%%%%%%%%%%%%
+ \begin{scope}
+ \begin{scope}[use as bounding box]
+ %Special for first frame
+ \ifbool{mdf@everyline}{}{%
+ \mdfsetup{bottomline=false}%
+ }
+ \mdf@drawframe@whole
\drawbrackgroundframetitle@first
\end{scope}
- \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};%
+ \node[mdfbox] (mdfframe) at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};%
\end{scope}
%HIER KOMMT EIN WEITERES MAKRO
- \mdf@firstextra
+ \mdf@extra%
+ \mdf@firstextra%
\mdfcreateextratikz%
\end{tikzpicture}%
}%
@@ -742,136 +471,62 @@
\def\mdf@putbox@middle{%
\ifvoid\mdf@splitbox@two
\else%
- \mdf@makebox@out{%
+ \mdf@makebox@out{%
\mdf@makeboxalign@left%
\mdf@tikz@settings%
- \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@two}%
- \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax%
- \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax%
- \ifbool{mdf@leftline}{%
- \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}%
- \ifbool{mdf@rightline}{%
- \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}%
- \setlength\mdfboundingboxheight%
- {\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}%
- \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax%
-%%%%%%%%%
- \ifbool{mdf@everyline}{%
- \ifbool{mdf@topline}{%
- \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}%
- \ifbool{mdf@bottomline}{%
- \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}%
- }{}%
-%%%%%%%%%%%%%%
+ %Special for middle frame -- used other savebox
+ \let\mdf@splitbox@one\mdf@splitbox@two%
+ %Special for middle frame -- no innertopmargin -- done by splittopskip
+ % in box and no bottommargin instead splitbottomskip
+ \setlength{\mdf@innertopmargin@length}{\z@}%
+ \let\mdf@innerbottommargin@length\mdf@splitbottomskip@length
+ \mdf@predtikzcalc%
+ %Special for middle frame -- remove topline and bottomline if no everyline
+ \ifbool{mdf@everyline}{}{%
+ \ifbool{mdf@topline}{%
+ \mdf@dolist{\mdf@advancelength@sub{\mdfboundingboxheight}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}}{}%
+ \ifbool{mdf@bottomline}{%
+ \mdf@dolist{\mdf@advancelength@sub{\mdfboundingboxheight}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}}{}%
+ }%
\mdf@makebox@in[\mdfboundingboxwidth]{%
\null%
\begin{tikzpicture}[remember picture]
- \pgfmathsetlengthmacro\mdf@Ax{+\mdf@innerleftmargin@length}%
- \pgfmathsetlengthmacro\mdf@Ay{+\mdf@splitbottomskip@length}%
- \pgfmathsetlengthmacro\mdf@Ox{+0pt}%
- \pgfmathsetlengthmacro\mdf@Oy{+0pt}%
- \pgfmathsetlengthmacro\mdf@Px{+\mdfboundingboxwidth}%
- \pgfmathsetlengthmacro\mdf@Py{+\mdfboundingboxheight}%
- \ifbool{mdf@leftline}%
- {%
- \pgfmathsetlengthmacro\mdf@Ax%
- {\mdf@Ax+\mdf@outerlinewidth@length+%
- \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}%
- \pgfmathsetlengthmacro\mdf@Ox%
- {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}%
- }{}%
- \ifbool{mdf@rightline}%
- {%
- \pgfmathsetlengthmacro\mdf@Px%
- {\mdf@Px-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}%
- }{}%
-%%
- \ifbool{mdf@everyline}{%
- \ifbool{mdf@bottomline}%
- {%
- \pgfmathsetlengthmacro\mdf@Ay%
- {\mdf@Ay+\mdf@outerlinewidth@length+\mdf@middlelinewidth@length%
- +\mdf@innerlinewidth@length}%
- \pgfmathsetlengthmacro\mdf@Oy%
- {\mdf@Oy+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}%
- }{}%
+ \mdf@innertikzcalc%
+ %Special for middle frame
+ \ifbool{mdf@everyline}{}{%
+ \ifbool{mdf@bottomline}%
+ {%
+ \pgfmathsetlengthmacro\mdf@Ay%
+ {\mdf@Ay-\mdf@outerlinewidth@length-\mdf@middlelinewidth@length%
+ -\mdf@innerlinewidth@length}%
+ \pgfmathsetlengthmacro\mdf@Oy%
+ {\mdf@Oy-\mdf@outerlinewidth@length
+ -0.5\mdf@middlelinewidth@length}%
+ }{}%
\ifbool{mdf@topline}%
{%
\pgfmathsetlengthmacro\mdf@Py%
{\mdf@Py-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}%
}{}%
- }{}%
-%%
+ }{}%
\coordinate(O)at(\mdf@Ox,\mdf@Oy);%
\coordinate(P)at(\mdf@Px,\mdf@Py);%
- \ifbool{mdf@shadow}
- {\path[mdfshadow](O) rectangle (P);}{}%
- \begin{scope}
- \begin{scope}[use as bounding box]
-%%%%%%%%%%%%
- \ifbool{mdf@everyline}{%
- \mdf@test@ltrb{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)--cycle}}{}%
- \mdf@test@ltb{\mdf@tikzbox@tfl{(P|-O)--(O)--(O|-P)--(P)}}{}%
- \mdf@test@trb{\mdf@tikzbox@tfl{(O|-P)--(P)--(P|-O)--(O)}}{}%
- \mdf@test@ltr{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)}}{}%
- \mdf@test@lrb{\mdf@tikzbox@tfl{(P-|O)--(O)--(O-|P)--(P)}}{}%
- \mdf@test@lb{\mdf@tikzbox@otl{(P|-O)--(O)--(O|-P)}%
- {(P)--(P|-O)[mdfcorners]--(O)--(O|-P)}%
- }{}%
- \mdf@test@rb{\mdf@tikzbox@otl{(P)--(P|-O)--(O)}%
- {(O|-P)--(P)[mdfcorners]--(P|-O)--(O)}%
- }{}%
- \mdf@test@tr{\mdf@tikzbox@otl{(O-|P)--(P)--(P-|O)}%
- {(O)--(O|-P)[mdfcorners]--(P)--(P|-O)}%
- }{}%
- \mdf@test@lt{\mdf@tikzbox@otl{(O)--(O|-P)--(P)}%
- {(P|-O)--(O)[mdfcorners]--(O|-P)--(P)}%
- }{}%
- \mdf@test@lr{\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@tb{\mdf@tikzbox@otl{(O)--(O-|P)(O|-P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@l{\mdf@tikzbox@otl{(O)--(O|-P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@r{\mdf@tikzbox@otl{(O-|P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@t{\mdf@tikzbox@otl{(O|-P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@b{\mdf@tikzbox@otl{(O)--(O-|P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@noline{\path[mdfbackground,mdfcorners](O)rectangle(P);}{}%
- }{
- \ifboolexpr{bool {mdf@leftline} and bool {mdf@rightline}}%
- {\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}{(O)rectangle(P)}}{}%
- \ifboolexpr{bool {mdf@leftline} and not (bool {mdf@rightline})}%
- {\mdf@tikzbox@otl{(O)--(O|-P)}{(O)rectangle(P)}}{}%
- \ifboolexpr{not (bool {mdf@leftline}) and bool {mdf@rightline}}%
- {\mdf@tikzbox@otl{(P)--(P|-O)}{(O)rectangle(P)}}{}%
- \ifboolexpr{not (bool {mdf@leftline}) and not (bool {mdf@rightline})}%
- {\path[mdfbackground](O)rectangle(P);}{}%
- }
-%%%%%%%%
- \drawbrackgroundframetitle@middle
- \end{scope}
- \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};%
- \end{scope}
- \mdf@middleextra
- %HIER KOMMT EIN WEITERES MAKRO
- \mdfcreateextratikz
+ \ifbool{mdf@shadow}{\path[mdfshadow](O) rectangle (P);}{}%
+ \begin{scope}
+ \begin{scope}[use as bounding box]
+ %%Special for middle frame
+ \ifbool{mdf@everyline}{}{\mdfsetup{topline=false,bottomline=false}}%
+ \mdf@drawframe@whole
+ \drawbrackgroundframetitle@middle
+ \end{scope}
+ \node[mdfbox] (mdfframe) at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};%
+ \end{scope}
+ \mdf@extra%
+ \mdf@middleextra%
+ %HIER KOMMT EIN WEITERES MAKRO
+ \mdfcreateextratikz
\end{tikzpicture}%
}%
\mdf@makeboxalign@right%
@@ -919,16 +574,16 @@
}%
\def\drawbrackgroundframetitle@@second{%
\begin{scope}%background frame title
- \ifbool{mdf@leftline}{
+ \ifbool{mdf@leftline}{%
\pgfmathsetlengthmacro\mdf@Ox%
{\mdf@Ox+\mdf@innerlinewidth@length+0.5\mdf@middlelinewidth@length}
}{}%
\ifbool{mdf@rightline}{%
\pgfmathsetlengthmacro\mdf@Px%
- {\mdf@Px-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length}
+ {\mdf@Px-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length}%
}{}%
\pgfmathsetlengthmacro\mdf@Fy
- {\mdf@Py-\mdfframetitleboxtotalheight}
+ {\mdf@Py-\mdfframetitleboxtotalheight}%
\path[mdfframetitlebackground,rounded corners=\z@]
(\mdf@Ox,\mdf@Fy) -- (\mdf@Ox,\mdf@Py)%
--(\mdf@Px,\mdf@Py) --(\mdf@Px,\mdf@Fy);
@@ -937,165 +592,112 @@
\def\mdf@putbox@second{%
\ifvoid\mdf@splitbox@one
\else%
- \mdf@makebox@out{%
+ \mdf@makebox@out{%
\mdf@makeboxalign@left%
\mdf@tikz@settings%
- \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@one}%
- \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax%
- \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax%
- \ifbool{mdf@leftline}{%
- \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}%
- \ifbool{mdf@rightline}{%
- \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}%
- \setlength\mdfboundingboxheight%
- {\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}%
- \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax%
- \ifbool{mdf@bottomline}{%
- \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}%
-%%%%%%%%%
- \ifbool{mdf@everyline}{%
+ %Special for middle frame -- no innertopmargin -- done by splittopskip
+ \setlength{\mdf@innertopmargin@length}{\z@}%
+ \mdf@predtikzcalc%
+ %Special for second frame -- no top line without everyline true
+ \ifbool{mdf@everyline}{}{%
\ifbool{mdf@topline}{%
- \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax%
- \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}%
- }{}%
-%%%%%%%%%%%%%%
+ \mdf@dolist{\mdf@advancelength@sub{\mdfboundingboxheight}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}}{}%
+ }%
\mdf@makebox@in[\mdfboundingboxwidth]{%
\null%
\begin{tikzpicture}[remember picture]
- \pgfmathsetlengthmacro\mdf@Ax{+\mdf@innerleftmargin@length}%
- \pgfmathsetlengthmacro\mdf@Ay{+\mdf@innerbottommargin@length}%
- \pgfmathsetlengthmacro\mdf@Ox{+0pt}%
- \pgfmathsetlengthmacro\mdf@Oy{+0pt}%
- \pgfmathsetlengthmacro\mdf@Px{+\mdfboundingboxwidth}%
- \pgfmathsetlengthmacro\mdf@Py{+\mdfboundingboxheight}%
- \ifbool{mdf@leftline}%
- {%
- \pgfmathsetlengthmacro\mdf@Ax%
- {\mdf@Ax+\mdf@outerlinewidth@length+%
- \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}%
- \pgfmathsetlengthmacro\mdf@Ox%
- {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}%
- }{}%
- \ifbool{mdf@rightline}%
- {%
- \pgfmathsetlengthmacro\mdf@Px%
- {\mdf@Px-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}%
- }{}%
- \ifbool{mdf@bottomline}%
- {%
- \pgfmathsetlengthmacro\mdf@Ay%
- {\mdf@Ay+\mdf@outerlinewidth@length+%
- \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}%
- \pgfmathsetlengthmacro\mdf@Oy%
- {\mdf@Oy+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}%
- }{}%
-%%
- \ifbool{mdf@everyline}{%
- \ifbool{mdf@topline}%
+ \mdf@innertikzcalc
+ %Special for second frame
+ \ifbool{mdf@everyline}{}{%
+ \ifbool{mdf@topline}%
{%
\pgfmathsetlengthmacro\mdf@Py%
- {\mdf@Py-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}%
+ {\mdf@Py+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}%
}{}%
- }{}%
-%%
+ }%
\coordinate(O)at(\mdf@Ox,\mdf@Oy);%
\coordinate(P)at(\mdf@Px,\mdf@Py);%
\ifbool{mdf@shadow}
{%
- \path[mdfshadow] (O|-P) to[mdfcorners] (O)
- to[mdfcorners] (P|-O) -- (P) -- (O|-P);%
+ \path[mdfshadow] (O|-P) to[mdfcorners] (O) to[mdfcorners] (P|-O)
+ -- (P) -- (O|-P);%
}{}%
- \begin{scope}
- \begin{scope}[use as bounding box]
-%%%%%%%%%%%%
- \ifbool{mdf@everyline}{%
- \mdf@test@ltrb{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)--cycle}}{}%
- \mdf@test@ltb{\mdf@tikzbox@tfl{(P|-O)--(O)--(O|-P)--(P)}}{}%
- \mdf@test@trb{\mdf@tikzbox@tfl{(O|-P)--(P)--(P|-O)--(O)}}{}%
- \mdf@test@ltr{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)}}{}%
- \mdf@test@lrb{\mdf@tikzbox@tfl{(P-|O)--(O)--(O-|P)--(P)}}{}%
- \mdf@test@lb{\mdf@tikzbox@otl{(P|-O)--(O)--(O|-P)}%
- {(P)--(P|-O)[mdfcorners]--(O)--(O|-P)}%
- }{}%
- \mdf@test@rb{\mdf@tikzbox@otl{(P)--(P|-O)--(O)}%
- {(O|-P)--(P)[mdfcorners]--(P|-O)--(O)}%
- }{}%
- \mdf@test@tr{\mdf@tikzbox@otl{(O-|P)--(P)--(P-|O)}%
- {(O)--(O|-P)[mdfcorners]--(P)--(P|-O)}%
- }{}%
- \mdf@test@lt{\mdf@tikzbox@otl{(O)--(O|-P)--(P)}%
- {(P|-O)--(O)[mdfcorners]--(O|-P)--(P)}%
- }{}%
- \mdf@test@lr{\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@tb{\mdf@tikzbox@otl{(O)--(O-|P)(O|-P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@l{\mdf@tikzbox@otl{(O)--(O|-P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@r{\mdf@tikzbox@otl{(O-|P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@t{\mdf@tikzbox@otl{(O|-P)--(P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@b{\mdf@tikzbox@otl{(O)--(O-|P)}%
- {(O)rectangle(P)}%
- }{}%
- \mdf@test@noline{\path[mdfbackground,mdfcorners](O)rectangle(P);}{}%
- }{%
- \ifboolexpr{test {\mdf@test@ltrb} or test {\mdf@test@lrb}}%
- {\mdf@tikzbox@tfl{(P-|O)--(O)--(O-|P)--(P)}}%
- {}%
- \ifboolexpr{test {\mdf@test@ltb} or test {\mdf@test@lb}}%
- {%
- \mdf@tikzbox@otl{(P-|O)--(O)--(O-|P)}%
- {(P)--(P|-O)[mdfcorners]--(O)--(O|-P)}%
- }%
- {}%
- \ifboolexpr{test {\mdf@test@trb} or test {\mdf@test@rb}}%
- {%
- \mdf@tikzbox@otl{(P)--(P|-O)--(O)}%
- {(O|-P)--(P)[mdfcorners]--(P|-O)--(O)}%
- }%
- {}%
- \ifboolexpr{test {\mdf@test@ltr} or test {\mdf@test@lr}}%
- {\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}{(O)rectangle(P)}}%
- {}%
- \ifboolexpr{test {\mdf@test@tb} or test {\mdf@test@b}}%
- {\mdf@tikzbox@otl{(O)--(O-|P)}{(O)rectangle(P)}}%
- {}%
- \ifboolexpr{test {\mdf@test@lt} or test {\mdf@test@l}}%
- {\mdf@tikzbox@otl{(O)--(O|-P)}{(O)rectangle(P)}}%
- {}%
- \ifboolexpr{test {\mdf@test@tr} or test {\mdf@test@r}}%
- {\mdf@tikzbox@otl{(O-|P)--(P)}{(O)rectangle(P)}}%
- {}%
- \mdf@test@t{\path[mdfbackground,mdfcorners](O|-P)--(O)--(O-|P)--(P);}{}%
- \mdf@test@noline{\path[mdfbackground,mdfcorners]%
- (O|-P)--(O)--(O-|P)--(P);}%
- {}%
- }%
- \drawbrackgroundframetitle@second
- \end{scope}
- \node[mdfbox] at (\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};%
- \end{scope}
- \mdf@secondextra
- %HIER KOMMT EIN WEITERES MAKRO
- \mdfcreateextratikz
+ \begin{scope}
+ \begin{scope}[use as bounding box]
+ \ifbool{mdf@everyline}{}{\mdfsetup{topline=false}}%
+ \mdf@drawframe@whole
+ \drawbrackgroundframetitle@second
+ \end{scope}
+ \node[mdfbox] (mdfframe) at (\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};%
+ \end{scope}
+ \mdf@extra%
+ \mdf@secondextra%
+ %HIER KOMMT EIN WEITERES MAKRO
+ \mdfcreateextratikz
\end{tikzpicture}%
}%
\mdf@makeboxalign@right%
}%
- \fi
+ \fi%
}%
+
+\tikzset{mdfsubtitleaboverule/.style={%
+ draw=none,
+ fill=\mdf@subtitleabovelinecolor,
+ }%
+}
+
+\tikzset{mdfsubtitlebelowrule/.style={%
+ draw=none,
+ fill=\mdf@subtitlebelowlinecolor,
+ }%
+}
+
+\tikzset{mdfsubtitlebackground/.style={%
+ draw=\mdf@subtitlebackgroundcolor,
+ fill=\mdf@subtitlebackgroundcolor,
+ }%
+}
+
+\tikzset{mdfsubsubtitleaboverule/.style={%
+ draw=none,
+ fill=\mdf@subsubtitleabovelinecolor,
+ }%
+}
+
+\tikzset{mdfsubsubtitlebelowrule/.style={%
+ draw=none,
+ fill=\mdf@subsubtitlebelowlinecolor,
+ }%
+}
+
+\tikzset{mdfsubsubtitlebackground/.style={%
+ draw=none,
+ fill=\mdf@subsubtitlebackgroundcolor,
+ }%
+}
+
+\def\mdf@drawsubtitleaboveline{%
+ \rlap{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \tikz\draw[mdfsubsubtitleaboverule](0,0) rectangle
+ (\mdf@templength,\mdf@subtitleabovelinewidth@length);%
+ }%
+}
+\def\mdf@drawsubtitlebelowline{%
+ \rlap{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \tikz\draw[mdfsubsubtitleaboverule](0,0) rectangle
+ (\mdf@templength,\mdf@subtitlebelowlinewidth@length);%
+ }%
+}
+\def\mdf@drawsubtitlebackground{%
+ \rlap{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \tikz\draw[overlay,mdfsubtitlebackground](0,0) rectangle
+ (\mdf@templength,-\mdfsubtitleheight);%
+ }%
+}
+
\endinput
diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf
index 52eb36485a6..86e4d4c1145 100644
--- a/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf
+++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf
@@ -1,3 +1,4 @@
+
%% Style file for mdframed for package option `framemethod=pstricks`
%%
%% This package may be distributed under the terms of the LaTeX Project
@@ -158,168 +159,69 @@
\par\unskip\vskip\mdf@innertopmargin@length%
}%
}%
+\def\mdf@drawsubtitleaboveline{%
+ \rlap{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \begin{pspicture}(0,0)(\mdf@templength,\mdf@subtitleabovelinewidth@length)
+ \psframe[style=mdfsubtitleaboverule]%
+ (0,0)(\mdf@templength,\mdf@subtitleabovelinewidth@length)%
+ \end{psicture}%
+ }%
+}
+\def\mdf@drawsubtitlebelowline{%
+ \rlap{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \begin{pspicture}(0,0)(\mdf@templength,\mdf@subtitlebelowlinewidth@length)
+ \psframe[style=mdfsubtitlebelowrule]%
+ (0,0)(\mdf@templength,\mdf@subtitleabovelinewidth@length)%
+ \end{psicture}%
+ }%
+}
+\def\mdf@drawsubtitlebackground{%
+ \rlap{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \begin{pspicture}(0,0)(0,0)
+ \psframe[style=mdfsubtitlebackground]%
+ (0,0)(\mdf@templength,-\mdfsubtitleheight)%
+ \end{psicture}%
+ }%
+}
+
\newpsstyle{mdfsubtitleaboverule}{%
linecolor=\mdf@subtitleabovelinecolor,
fillcolor=\mdf@subtitleabovelinecolor,
fillstyle=solid,dimen=outer,%
}
+
\newpsstyle{mdfsubtitlebelowrule}{%
linecolor=\mdf@subtitlebelowlinecolor,
fillcolor=\mdf@subtitlebelowlinecolor,
fillstyle=solid,dimen=outer,%
}
+
\newpsstyle{mdfsubtitlebackground}{%
linecolor=\mdf@subtitlebackgroundcolor,
fillcolor=\mdf@subtitlebackgroundcolor,
fillstyle=solid,linestyle=none,
}
-\newrobustcmd\mdfsubtitle[2][]%
-{%
- \begingroup
- \penalty-9995%set a breakpoint before the subtitle
- \parindent\z@\relax%
- \mdfsetup{#1}%only for subtitle options
- \setbox\z@=\vbox{\mdf@subtitlefont{#2}\relax}%
- \dimen@=\linewidth\relax%
- \advance\dimen@ by \mdf@innerleftmargin@length\relax%
- \advance\dimen@ by \mdf@innerrightmargin@length\relax%
- \dimen@i=\mdf@subtitleinneraboveskip@length\relax%
- \advance\dimen@i by \mdf@subtitleinnerbelowskip@length\relax%
- \advance\dimen@i by \ht\z@\relax%
- \advance\dimen@i by \dp\z@\relax%
- \ifbool{mdf@subtitleaboveline}{}%
- {\mdfsetup{subtitleabovelinewidth=\z@}}%
- \ifbool{mdf@subtitlebelowline}{}%
- {\mdfsetup{subtitlebelowlinewidth=\z@}}%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleaboveskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \begin{pspicture}(0,0)(\dimen@,\mdf@subtitleabovelinewidth@length)
- \ifbool{mdf@subtitleaboveline}%
- {%
- \psframe[style=mdfsubtitleaboverule]%
- (0,0)(\dimen@,\mdf@subtitleabovelinewidth@length)%
- }{}
- \end{pspicture}
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleinneraboveskip@length
- \hspace*{-\mdf@innerleftmargin@length}%
- \begin{pspicture}%
- (0,0)%
- (0,\ht\z@)
- \psframe[style=mdfsubtitlebackground]%
- (0,\dimexpr-\dp\z@-\mdf@subtitleinnerbelowskip@length\relax)%
- (\dimen@,\dimen@i)
- \end{pspicture}
- \hspace*{+\mdf@innerleftmargin@length}%
- \box\z@\relax%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleinnerbelowskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \begin{pspicture}(0,0)(\dimen@,\mdf@subtitlebelowlinewidth@length)
- \ifbool{mdf@subtitlebelowline}%
- {%
- \psframe[style=mdfsubtitlebelowrule]%
- (0,0)(\dimen@,\mdf@subtitlebelowlinewidth@length)%
- }{}%
- \end{pspicture}
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitlebelowskip@length
- \penalty 9995
- \endgroup
-}
\newpsstyle{mdfsubsubtitleaboverule}{%
linecolor=\mdf@subtitleabovelinecolor,
fillcolor=\mdf@subtitleabovelinecolor,
fillstyle=solid,dimen=outer,%
}
+
\newpsstyle{mdfsubsubtitlebelowrule}{%
linecolor=\mdf@subtitlebelowlinecolor,
fillcolor=\mdf@subtitlebelowlinecolor,
fillstyle=solid,dimen=outer,%
}
+
\newpsstyle{mdfsubsubtitlebackground}{%
linecolor=\mdf@subtitlebackgroundcolor,
fillcolor=\mdf@subtitlebackgroundcolor,
fillstyle=solid,linestyle=none,
}
-\newrobustcmd\mdfsubsubtitle[2][]%
-{%
- \begingroup
- \penalty-9995%set a breakpoint before the subsubtitle
- \parindent\z@\relax%
- \mdfsetup{#1}%only for subsubtitle options
- \setbox\z@=\vbox{\mdf@subsubtitlefont{#2}\relax}%
- \dimen@=\linewidth\relax%
- \advance\dimen@ by \mdf@innerleftmargin@length\relax%
- \advance\dimen@ by \mdf@innerrightmargin@length\relax%
- \dimen@i=\mdf@subsubtitleinneraboveskip@length\relax%
- \advance\dimen@i by \mdf@subsubtitleinnerbelowskip@length\relax%
- \advance\dimen@i by \ht\z@\relax%
- \advance\dimen@i by \dp\z@\relax%
- \ifbool{mdf@subsubtitleaboveline}{}%
- {\mdfsetup{subsubtitleabovelinewidth=\z@}}%
- \ifbool{mdf@subsubtitlebelowline}{}%
- {\mdfsetup{subsubtitlebelowlinewidth=\z@}}%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleaboveskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \begin{pspicture}(0,0)(\dimen@,\mdf@subsubtitleabovelinewidth@length)
- \ifbool{mdf@subsubtitleaboveline}%
- {%
- \psframe[style=mdfsubsubtitleaboverule]%
- (0,0)(\dimen@,\mdf@subsubtitleabovelinewidth@length)%
- }{}
- \end{pspicture}
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleinneraboveskip@length
- \hspace*{-\mdf@innerleftmargin@length}%
- \begin{pspicture}(0,-\dp\z@)(0,\dimen@i
- \begin{pspicture}%
- (0,0)%
- (0,\ht\z@)
- \psframe[style=mdfsubsubtitlebackground]%
- (0,\dimexpr-\dp\z@-\mdf@subsubtitleinnerbelowskip@length\relax)%
- (\dimen@,\dimen@i)
- \end{pspicture}
- \hspace*{+\mdf@innerleftmargin@length}%
- \box\z@\relax%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleinnerbelowskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \begin{pspicture}(0,0)(\dimen@,\mdf@subsubtitlebelowlinewidth@length)
- \ifbool{mdf@subsubtitlebelowline}%
- {%
- \psframe[style=mdfsubsubtitlebelowrule]%
- (0,0)(\dimen@,\mdf@subsubtitlebelowlinewidth@length)%
- }{}%
- \end{pspicture}
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitlebelowskip@length
- \penalty 9995
- \endgroup
-}
\def\mdf@putbox@single{%
\ifvoid\mdf@splitbox@one\relax
@@ -431,6 +333,7 @@
\drawbrackgroundframetitle@single
%output%
\rput[bl](mdf@A){\box\mdf@splitbox@one}
+ \mdf@extra%
\mdf@singleextra
\end{pspicture}%
}%
@@ -616,7 +519,8 @@
\drawbrackgroundframetitle@first
%output%
\rput[bl](mdf@A){\box\mdf@splitbox@two}
- \mdf@firstextra
+ \mdf@extra%
+ \mdf@firstextra%
\end{pspicture}
}%
\mdf@makeboxalign@right%
@@ -824,7 +728,8 @@
%\psdot(mdf@A)\uput[90](mdf@A){mdf at A}
%\psdot(mdf@P)\uput[90](mdf@P){mdf at P}
%\psdot(mdf@O)\uput[90](mdf@O){mdf at O}
- \mdf@middleextra
+ \mdf@extra%
+ \mdf@middleextra%
\end{pspicture}%
}%
\mdf@makeboxalign@right%
@@ -1033,6 +938,7 @@
\drawbrackgroundframetitle@second
%output%
\rput[bl](mdf@A){\box\mdf@splitbox@one}
+ \mdf@extra%
\mdf@secondextra
\end{pspicture}%
}%
diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf
index 52eb36485a6..86e4d4c1145 100644
--- a/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf
+++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf
@@ -1,3 +1,4 @@
+
%% Style file for mdframed for package option `framemethod=pstricks`
%%
%% This package may be distributed under the terms of the LaTeX Project
@@ -158,168 +159,69 @@
\par\unskip\vskip\mdf@innertopmargin@length%
}%
}%
+\def\mdf@drawsubtitleaboveline{%
+ \rlap{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \begin{pspicture}(0,0)(\mdf@templength,\mdf@subtitleabovelinewidth@length)
+ \psframe[style=mdfsubtitleaboverule]%
+ (0,0)(\mdf@templength,\mdf@subtitleabovelinewidth@length)%
+ \end{psicture}%
+ }%
+}
+\def\mdf@drawsubtitlebelowline{%
+ \rlap{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \begin{pspicture}(0,0)(\mdf@templength,\mdf@subtitlebelowlinewidth@length)
+ \psframe[style=mdfsubtitlebelowrule]%
+ (0,0)(\mdf@templength,\mdf@subtitleabovelinewidth@length)%
+ \end{psicture}%
+ }%
+}
+\def\mdf@drawsubtitlebackground{%
+ \rlap{%
+ \hspace*{-\mdf@innerleftmargin@length}%
+ \begin{pspicture}(0,0)(0,0)
+ \psframe[style=mdfsubtitlebackground]%
+ (0,0)(\mdf@templength,-\mdfsubtitleheight)%
+ \end{psicture}%
+ }%
+}
+
\newpsstyle{mdfsubtitleaboverule}{%
linecolor=\mdf@subtitleabovelinecolor,
fillcolor=\mdf@subtitleabovelinecolor,
fillstyle=solid,dimen=outer,%
}
+
\newpsstyle{mdfsubtitlebelowrule}{%
linecolor=\mdf@subtitlebelowlinecolor,
fillcolor=\mdf@subtitlebelowlinecolor,
fillstyle=solid,dimen=outer,%
}
+
\newpsstyle{mdfsubtitlebackground}{%
linecolor=\mdf@subtitlebackgroundcolor,
fillcolor=\mdf@subtitlebackgroundcolor,
fillstyle=solid,linestyle=none,
}
-\newrobustcmd\mdfsubtitle[2][]%
-{%
- \begingroup
- \penalty-9995%set a breakpoint before the subtitle
- \parindent\z@\relax%
- \mdfsetup{#1}%only for subtitle options
- \setbox\z@=\vbox{\mdf@subtitlefont{#2}\relax}%
- \dimen@=\linewidth\relax%
- \advance\dimen@ by \mdf@innerleftmargin@length\relax%
- \advance\dimen@ by \mdf@innerrightmargin@length\relax%
- \dimen@i=\mdf@subtitleinneraboveskip@length\relax%
- \advance\dimen@i by \mdf@subtitleinnerbelowskip@length\relax%
- \advance\dimen@i by \ht\z@\relax%
- \advance\dimen@i by \dp\z@\relax%
- \ifbool{mdf@subtitleaboveline}{}%
- {\mdfsetup{subtitleabovelinewidth=\z@}}%
- \ifbool{mdf@subtitlebelowline}{}%
- {\mdfsetup{subtitlebelowlinewidth=\z@}}%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleaboveskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \begin{pspicture}(0,0)(\dimen@,\mdf@subtitleabovelinewidth@length)
- \ifbool{mdf@subtitleaboveline}%
- {%
- \psframe[style=mdfsubtitleaboverule]%
- (0,0)(\dimen@,\mdf@subtitleabovelinewidth@length)%
- }{}
- \end{pspicture}
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleinneraboveskip@length
- \hspace*{-\mdf@innerleftmargin@length}%
- \begin{pspicture}%
- (0,0)%
- (0,\ht\z@)
- \psframe[style=mdfsubtitlebackground]%
- (0,\dimexpr-\dp\z@-\mdf@subtitleinnerbelowskip@length\relax)%
- (\dimen@,\dimen@i)
- \end{pspicture}
- \hspace*{+\mdf@innerleftmargin@length}%
- \box\z@\relax%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitleinnerbelowskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \begin{pspicture}(0,0)(\dimen@,\mdf@subtitlebelowlinewidth@length)
- \ifbool{mdf@subtitlebelowline}%
- {%
- \psframe[style=mdfsubtitlebelowrule]%
- (0,0)(\dimen@,\mdf@subtitlebelowlinewidth@length)%
- }{}%
- \end{pspicture}
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subtitlebelowskip@length
- \penalty 9995
- \endgroup
-}
\newpsstyle{mdfsubsubtitleaboverule}{%
linecolor=\mdf@subtitleabovelinecolor,
fillcolor=\mdf@subtitleabovelinecolor,
fillstyle=solid,dimen=outer,%
}
+
\newpsstyle{mdfsubsubtitlebelowrule}{%
linecolor=\mdf@subtitlebelowlinecolor,
fillcolor=\mdf@subtitlebelowlinecolor,
fillstyle=solid,dimen=outer,%
}
+
\newpsstyle{mdfsubsubtitlebackground}{%
linecolor=\mdf@subtitlebackgroundcolor,
fillcolor=\mdf@subtitlebackgroundcolor,
fillstyle=solid,linestyle=none,
}
-\newrobustcmd\mdfsubsubtitle[2][]%
-{%
- \begingroup
- \penalty-9995%set a breakpoint before the subsubtitle
- \parindent\z@\relax%
- \mdfsetup{#1}%only for subsubtitle options
- \setbox\z@=\vbox{\mdf@subsubtitlefont{#2}\relax}%
- \dimen@=\linewidth\relax%
- \advance\dimen@ by \mdf@innerleftmargin@length\relax%
- \advance\dimen@ by \mdf@innerrightmargin@length\relax%
- \dimen@i=\mdf@subsubtitleinneraboveskip@length\relax%
- \advance\dimen@i by \mdf@subsubtitleinnerbelowskip@length\relax%
- \advance\dimen@i by \ht\z@\relax%
- \advance\dimen@i by \dp\z@\relax%
- \ifbool{mdf@subsubtitleaboveline}{}%
- {\mdfsetup{subsubtitleabovelinewidth=\z@}}%
- \ifbool{mdf@subsubtitlebelowline}{}%
- {\mdfsetup{subsubtitlebelowlinewidth=\z@}}%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleaboveskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \begin{pspicture}(0,0)(\dimen@,\mdf@subsubtitleabovelinewidth@length)
- \ifbool{mdf@subsubtitleaboveline}%
- {%
- \psframe[style=mdfsubsubtitleaboverule]%
- (0,0)(\dimen@,\mdf@subsubtitleabovelinewidth@length)%
- }{}
- \end{pspicture}
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleinneraboveskip@length
- \hspace*{-\mdf@innerleftmargin@length}%
- \begin{pspicture}(0,-\dp\z@)(0,\dimen@i
- \begin{pspicture}%
- (0,0)%
- (0,\ht\z@)
- \psframe[style=mdfsubsubtitlebackground]%
- (0,\dimexpr-\dp\z@-\mdf@subsubtitleinnerbelowskip@length\relax)%
- (\dimen@,\dimen@i)
- \end{pspicture}
- \hspace*{+\mdf@innerleftmargin@length}%
- \box\z@\relax%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitleinnerbelowskip@length
- \rlap%
- {%
- \hspace*{-\mdf@innerleftmargin@length}%
- \begingroup%
- \begin{pspicture}(0,0)(\dimen@,\mdf@subsubtitlebelowlinewidth@length)
- \ifbool{mdf@subsubtitlebelowline}%
- {%
- \psframe[style=mdfsubsubtitlebelowrule]%
- (0,0)(\dimen@,\mdf@subsubtitlebelowlinewidth@length)%
- }{}%
- \end{pspicture}
- \endgroup%
- }%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
- \vskip\mdf@subsubtitlebelowskip@length
- \penalty 9995
- \endgroup
-}
\def\mdf@putbox@single{%
\ifvoid\mdf@splitbox@one\relax
@@ -431,6 +333,7 @@
\drawbrackgroundframetitle@single
%output%
\rput[bl](mdf@A){\box\mdf@splitbox@one}
+ \mdf@extra%
\mdf@singleextra
\end{pspicture}%
}%
@@ -616,7 +519,8 @@
\drawbrackgroundframetitle@first
%output%
\rput[bl](mdf@A){\box\mdf@splitbox@two}
- \mdf@firstextra
+ \mdf@extra%
+ \mdf@firstextra%
\end{pspicture}
}%
\mdf@makeboxalign@right%
@@ -824,7 +728,8 @@
%\psdot(mdf@A)\uput[90](mdf@A){mdf at A}
%\psdot(mdf@P)\uput[90](mdf@P){mdf at P}
%\psdot(mdf@O)\uput[90](mdf@O){mdf at O}
- \mdf@middleextra
+ \mdf@extra%
+ \mdf@middleextra%
\end{pspicture}%
}%
\mdf@makeboxalign@right%
@@ -1033,6 +938,7 @@
\drawbrackgroundframetitle@second
%output%
\rput[bl](mdf@A){\box\mdf@splitbox@one}
+ \mdf@extra%
\mdf@secondextra
\end{pspicture}%
}%
diff --git a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
index 36295b6ca84..112c389e61c 100644
--- a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
+++ b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
@@ -23,7 +23,7 @@
%% HEIKO OBERDIEK
%% HERBERT VOSS
%%
-%% Copyright (c) 2010 Marco Daniel
+%% Copyright (c) 2010-2013 Marco Daniel
%%
%% This package may be distributed under the terms of the LaTeX Project
%% Public License, as described in lppl.txt in the base LaTeX distribution.
@@ -48,14 +48,14 @@
%% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
%% ==================================================
%%
-\def\mdversion{1.8}
+
+\def\mdversion{1.9a}
\def\mdframedpackagename{mdframed}
-\def\mdfmaindate{2013/03/09}
-\def\mdfrevision{ 172}% Done by github: git rev-list HEAD | wc -l
+\def\mdfmaindate{2013/06/21}
+\def\mdfrevision{ 208}% Done by github: git rev-list HEAD | wc -l
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mdframed}%
- [\mdfmaindate\ %
- \mdversion: \mdframedpackagename]
+ [\mdfmaindate\space \mdversion: \mdframedpackagename]
\newcommand*\mdf@PackageError[1]{\PackageError{\mdframedpackagename}{#1}}
\newcommand*\mdf@PackageWarning[1]{\PackageWarning{\mdframedpackagename}{#1}}
\newcommand*\mdf@PackageInfo[1]{\PackageInfo{\mdframedpackagename}{#1}}
@@ -67,7 +67,7 @@
but needed by \mdframedpackagename\MessageBreak
see documentation fo further information
}%
- }
+ }%
}
\RequirePackage{kvoptions}
\RequirePackage{xparse}
@@ -75,7 +75,7 @@
\RequirePackage{zref-abspage}
\RequirePackage{color}
\SetupKeyvalOptions{family=mdf,prefix=mdf@}
-
+\def\mdf@definestyle@defaultoptions{}%
\newlength{\mdf@templength}
\def\mdf@iflength#1{%
\afterassignment\mdf@iflength@check%
@@ -93,10 +93,20 @@
}
\def\mdf@iflength@cleanup#1\relax{}
\DeclareListParser*{\mdf@dolist}{,}
+\def\mdf@do@lengthoption#1{%
+ \mdf@lengthoption@doubledo#1\@nil%
+}
+\def\mdf@lengthoption@doubledo#1==#2\@nil{%
+ \mdf@option@length{#1}{#2}%
+ \mdf@define@key@length{#1}%
+ \gappto\mdf@definestyle@defaultoptions{#1=#2,}%
+}
+
\newrobustcmd*{\mdf@option@length}[2]{%
\expandafter\newlength\csname mdf@#1@length\endcsname%
\expandafter\setlength\csname mdf@#1@length\endcsname{#2}%
}
+
\newrobustcmd*{\mdf@define@key@length}[1]{%
\define@key{mdf}{#1}{%
\def\@tempa{##1}
@@ -106,13 +116,7 @@
\setlength{\csname mdf@#1@length\endcsname}{\csname mdfl@#1\endcsname}%
}%
}
-\def\mdf@do@lengthoption#1{%
- \mdf@lengthoption@doubledo#1\@nil%
-}
-\def\mdf@lengthoption@doubledo#1==#2\@nil{%
- \mdf@option@length{#1}{#2}%
- \mdf@define@key@length{#1}%
-}
+
\def\mdf@do@stringoption#1{%
\mdf@stringoption@doubledo#1\@nil%
}
@@ -121,6 +125,7 @@
\define@key{mdf}{#1}{%
\csdef{mdf@#1}{##1}%
}%
+ \gappto\mdf@definestyle@defaultoptions{#1=#2,}%
}
\def\mdf@do@booloption#1{%
\mdf@booloption@doubledo#1\@nil%
@@ -130,32 +135,17 @@
\define@key{mdf}{#1}[#2]{%
\setbool{mdf@#1}{##1}%
}%
-}
-\def\mdf@do@alignoption#1{%
- \mdf@alignoption@tripledo#1\@nil%
-}
-\def\mdf@alignoption@tripledo#1==#2==#3\@nil{%
- \csdef{mdf@align@#1@left}{\null\hspace*{#2}}%
- \csdef{mdf@align@#1@right}{\hspace*{#3}\null}%
+ \gappto\mdf@definestyle@defaultoptions{#1=#2,}%
}
\newcounter{mdf@globalstyle@cnt}
-\defcounter{mdf@globalstyle@cnt}{0}
-\newcommand*\mdfglobal@style{0}
+\defcounter{mdf@globalstyle@cnt}{-99}
+
\define@key{mdf}{style}{%
\mdf@PackageWarning{package option style is depreciated^^J
+ at this point and will be ignored^^J
use framemethod instead\MessageBreak}%
- \renewcommand*\mdfglobal@style{#1}%
- \defcounter{mdf@globalstyle@cnt}{#1}%
- \ifcase\value{mdf@globalstyle@cnt}\relax
- \or\mdf@LoadFile@IfExist{tikz}%=1
- \or\mdf@LoadFile@IfExist{pstricks-add}%=2
- \or\defcounter{mdf@globalstyle@cnt}{2}%=3
- \mdf@LoadFile@IfExist{pst-node}%
- \or\mdf@LoadFile@IfExist{pst-node}%=4
- \else%%>4
- \mdf@PackageWarning{Unknown global style \value{mdf@globalstyle@cnt}}%
- \fi%
}
+
\providecommand*\mdf@framemethod{}
\def\mdf@framemethod@i{}%
\def\mdf@framemethod@ii{}%
@@ -168,29 +158,47 @@
\xifinlist{\mdf@tempa}{\mdf@framemethod@i}%
{\def\mdf@@framemethod{default}\defcounter{mdf@globalstyle@cnt}{0}}%
{\xifinlist{\mdf@tempa}{\mdf@framemethod@ii}%
- {\def\mdf@@framemethod{tikz}\defcounter{mdf@globalstyle@cnt}{1}}%
+ {\def\mdf@@framemethod{tikz}%
+ \defcounter{mdf@globalstyle@cnt}{1}\mdf@LoadFile@IfExist{tikz}}%
{\xifinlist{\mdf@tempa}{\mdf@framemethod@iii}%
- {\def\mdf@@framemethod{pstricks}\defcounter{mdf@globalstyle@cnt}{2}}%
+ {\def\mdf@@framemethod{pstricks}%
+ \defcounter{mdf@globalstyle@cnt}{2}\mdf@LoadFile@IfExist{pst-node}}%
{\mdf@LoadFile@IfExist{#1}}%
}%
}%
\ifcase\value{mdf@globalstyle@cnt}\relax%
- \or\mdf@LoadFile@IfExist{tikz}%=1
- \or\mdf@LoadFile@IfExist{pst-node}%=2
- \or\mdf@LoadFile@IfExist{pst-node}%=3
+ \input{md-frame-0.mdf}%
+ \or\input{md-frame-1.mdf}%
+ \or\input{md-frame-2.mdf}%
+ \or\input{md-frame-3.mdf}%
+ \else%
+ \IfFileExists{md-frame-\value{mdf@globalstyle@cnt}.mdf}%
+ {\input{md-frame-\value{mdf@globalstyle@cnt}.mdf}}%
+ {%
+ \input{md-frame-0.mdf}%
+ \mdf@PackageWarning{The style number \value{mdf@globalstyle@cnt}
+ does not exist^^J
+ mdframed ues instead style=0 \mdframedpackagename}%
+ }%
\fi%
}
+\DeclareVoidOption{tikz}{\setkeys{mdf}{framemethod=tikz}}
+\DeclareVoidOption{TikZ}{\setkeys{mdf}{framemethod=tikz}}
+\DeclareVoidOption{ps}{\setkeys{mdf}{framemethod=pstricks}}
+\DeclareVoidOption{pstricks}{\setkeys{mdf}{framemethod=pstricks}}
+\DeclareVoidOption{PSTricks}{\setkeys{mdf}{framemethod=pstricks}}
+
\mdf@dolist{\mdf@do@lengthoption}{%
- {skipabove==\z@},%
- {skipbelow==\z@},%
+ {skipabove==\topsep},%
+ {skipbelow==\topsep},%
{leftmargin==\z@},%
{rightmargin==\z@},%
{innerleftmargin==10pt},%
{innerrightmargin==10pt},%
{innertopmargin==0.4\baselineskip},%
{innerbottommargin==0.4\baselineskip},%
- {splittopskip==\z@},%
- {splitbottomskip==\z@},%
+ {splittopskip==10pt},%
+ {splitbottomskip==10pt},%
{outermargin==\z@},%
{innermargin==\z@},%
{linewidth==0.4pt},%
@@ -222,6 +230,9 @@
}
\mdf@dolist{\mdf@do@stringoption}{%
{frametitle=={}},%
+ {firstframetitle=={}},%
+ {framefoot=={}},%
+ {lastframefoot=={}},%
{defaultunit==pt},%
{linecolor==black},%
{backgroundcolor==white},%
@@ -245,10 +256,21 @@
{theoremcountersep=={.}},%
{theoremtitlefont=={}},%
{theoremspace=={\space}},%
- {singleextra=={}},
- {firstextra=={}},
- {middleextra=={}},
- {secondextra=={}},
+ {extra=={}},%
+ {singleextra=={}},%
+ {firstextra=={}},%
+ {middleextra=={}},%
+ {secondextra=={}},%
+ {beforesingleframe=={}},%
+ {aftersingleframe=={}},%
+ {beforebreak=={}},%
+ {afterbreak=={}},%
+ {beforelastframe=={}},%
+ {afterlastframe=={}},%
+ {startcode=={}},%
+ {startinnercode=={}},%
+ {endinnercode=={}},%
+ {endcode=={}},%
{subtitlefont==\normalfont\bfseries},%
{subsubtitlefont==\normalfont},%
{subtitlebackgroundcolor==white},%
@@ -290,7 +312,18 @@
\ifbool{mdf@hidealllines}{%
\kvsetkeys{mdf}{leftline=false,topline=false,%
rightline=false,bottomline=false}%
- }{}%
+ }{%
+ \kvsetkeys{mdf}{leftline=true,topline=true,%
+ rightline=true,bottomline=true}%
+ }%
+}
+\appto\mdf@definestyle@defaultoptions{hidealllines=false,}%
+\def\mdf@do@alignoption#1{%
+ \mdf@alignoption@tripledo#1\@nil%
+}
+\def\mdf@alignoption@tripledo#1==#2==#3\@nil{%
+ \csdef{mdf@align@#1@left}{\null\hspace*{#2}}%
+ \csdef{mdf@align@#1@right}{\hspace*{#3}\null}%
}
\mdf@dolist{\mdf@do@alignoption}{%
{left==\mdf@leftmargin@length==\z@},%
@@ -353,6 +386,9 @@
\DeclareDefaultOption{%
\mdf@PackageError{Unknown Option '\CurrentOption' for mdframed}}
\ProcessKeyvalOptions*\relax
+\ifnum\c@mdf@globalstyle@cnt<0
+ \kvsetkeys{mdf}{framemethod=default,}
+\fi
\newrobustcmd*{\mdfsetup}{\kvsetkeys{mdf}}
\define@key{mdf}{style}{%
\ifcsundef{mdf@definestyle@#1}{%
@@ -364,6 +400,22 @@
{\expandafter\expandafter\expandafter\mdfsetup\expandafter%
\expandafter\expandafter{\csname mdf@definestyle@#1\endcsname}}%
}%
+\DeclareVoidOption{default}{%
+ \expandafter\expandafter\expandafter\mdfsetup\expandafter%
+ \expandafter\expandafter{\csname mdf@definestyle@defaultoptions\endcsname}%
+}%
+
+\ifnum\c@mdf@globalstyle@cnt>0
+ \define@key{mdf}{linewidth}{%
+ \def\@tempa{#1}
+ \mdf@iflength{\@tempa}%
+ {\csxdef{mdfl@linewidth}{\the\mdf@templength}}%
+ {\csxdef{mdfl@linewidth}{\the\mdf@templength}}%
+ \setlength{\csname mdf@middlelinewidth@length\endcsname}%
+ {\csname mdfl@linewidth\endcsname}%
+ }%
+\fi
+
\let\mdf@PackageNoInfo\@gobble
\newrobustcmd*\mdf@ifstrequal@expand{%
\expandafter\ifstrequal\expandafter{\mdf@printheight}%
@@ -389,6 +441,7 @@
\newsavebox\mdf@splitbox@one
\newsavebox\mdf@splitbox@two
\newsavebox\mdf@splitbox@save
+
\newlength\mdfsplitboxwidth
\newlength\mdfsplitboxtotalwidth
\newlength\mdfsplitboxheight
@@ -404,31 +457,32 @@
\newlength\mdffootnoteboxheight
\newlength\mdffootnoteboxdepth
\newlength\mdffootnoteboxtotalheight
-
\newlength\mdftotallinewidth
-
\newlength\mdfboundingboxwidth
\newlength\mdfboundingboxtotalwidth
-
\newlength\mdfboundingboxheight
\newlength\mdfboundingboxdepth
\newlength\mdfboundingboxtotalheight
-
\newlength\mdf@freevspace@length
\newlength\mdf@horizontalwidthofbox@length
\newlength\mdf@verticalmarginwhole@length
+\newlength\mdf@horizontalspaceofbox
+\newlength\mdfsubtitleheight
+\newlength\mdfsubsubtitleheight
-\newtoggle{mdf@notfirstframetitle}%
-\togglefalse{mdf@notfirstframetitle}%
+\newbool{mdfsingleframe}\boolfalse{mdfsingleframe}
+\newbool{mdffirstframe}\boolfalse{mdffirstframe}
+\newbool{mdfmiddleframe}\boolfalse{mdfmiddleframe}
+\newbool{mdflastframe}\boolfalse{mdflastframe}
+\newtoggle{mdf@notfirstframetitle}\togglefalse{mdf@notfirstframetitle}%
+\newtoggle{mdflastframe}\togglefalse{mdflastframe}
+
+\newcounter{mdfcountframes}\setcounter{mdfcountframes}{0}
\newrobustcmd\mdfcreateextratikz{}
\def\mdf@lrbox#1{%
-%%patch to work with amsthm
- \mdf@patchamsthm
-%%%end patch
- \edef\mdf@restoreparams{%
- \parindent=\the\parindent\relax \parskip=\the\parskip\relax}%
+ \mdf@patchamsthm%patch amsthm
\setbox#1\vbox\bgroup%
\color@begingroup%
\mdf@horizontalmargin@equation%
@@ -447,22 +501,24 @@
\baselineskip\normalbaselineskip%
%% \sloppy%
\let\\\@normalcr%
- \mdf@restoreparams\relax%
+ \mdf@par@local%New feature to restore parskip/parindent local in save box
+ \ifbool{mdf@suppressfirstparskip}{\vspace*{-\parskip}}{}%
\@afterindentfalse%
- \@afterheading%
+ %\@afterheading%
}
-
\def\endmdf@lrbox{\color@endgroup\egroup}
-
\newrobustcmd*\mdf@ignorevbadness{%
\edef\mdf@currentvbadness{\the\vbadness}%
\vbadness=\@M%
\afterassignment\mdf@restorevbadness}
+
\newrobustcmd*\mdf@restorevbadness{\vbadness=\mdf@currentvbadness\relax}
+\let\mdf@patchamsthm\relax
+\AtBeginDocument{%
\@ifpackageloaded{amsthm}%
-{%
- \newrobustcmd\mdf@patchamsthm{%
- \let\mdf@deferred@thm@head\deferred@thm@head
+ {%
+ \newrobustcmd\mdf@patchamsthm{%
+ \let\mdf@deferred@thm@head\deferred@thm@head%
\pretocmd{\deferred@thm@head}{\@inlabelfalse}%
{\mdf@PackageInfo{mdframed detected package amsthm ^^J
changed the theorem header of amsthm\MessageBreak}%
@@ -472,10 +528,16 @@
failed\MessageBreak}%
}%
}%
-}{\let\mdf@patchamsthm\relax}%
+ }{}%
+}
\def\mdf@trivlist#1{%
- \edef\x{\topsep=\the\topsep\relax\partopsep=\the\partopsep\relax\parsep=\the\parsep\relax}
+ \edef\mdf@temp{%
+ \topsep=\the\topsep\relax%
+ \partopsep=\the\partopsep\relax%
+ \parsep=\the\parsep\relax%
+ }%
\setlength{\topsep}{#1}%
+ \topskip\z@%
\partopsep\z@%
\parsep\z@%
\@nmbrlistfalse%
@@ -485,9 +547,7 @@
\itemindent\z@%
\let\@itemlabel\@empty%
\def\makelabel##1{##1}%
- \item\relax\x\relax\leavevmode\hrule \@height\z@ \@width\linewidth\relax%
-%% \item\mbox{}\relax% second version
-%% \item\relax\x% first Version
+ \item\relax\mdf@temp\relax%
}
\let\endmdf@trivlist\endtrivlist
\patchcmd\endmdf@trivlist\@endparenv\mdf@endparenv{%
@@ -499,7 +559,6 @@
}
\def\mdf@endparenv{%
\addpenalty\@endparpenalty\addvspace\mdf@skipbelow@length\@endpetrue}
-
\newrobustcmd*\mdf@makebox@out[2][\linewidth]{%
\noindent\hb@xt@\z@{%
\noindent\makebox[\dimexpr #1\relax][l]{#2}%
@@ -534,7 +593,7 @@
\expandafter\let\csname #2\endcsname\relax%
\expandafter\let\csname end#2\endcsname\relax%
\newmdenv[#1]{#2}%
- }%
+}%
\DeclareDocumentCommand\newmdtheoremenv{O{} m o m o }{%
\ifboolexpr{ test {\IfNoValueTF {#3}} and test {\IfNoValueTF {#5}} }%
{\newtheorem{#2}{#4}}{%
@@ -551,6 +610,15 @@
\@ifpackageloaded{ntheorem}%
{\renewrobustcmd*\mdf@thm@caption{\thm@thmcaption}}{}%
}
+\newrobustcmd*\mdf@checkntheorem{%
+ \ifbool{mdf@ntheorem}%
+ {\ifundef{\theorempreskipamount}%
+ {\mdf@PackageWarning{You have not loaded ntheorem yet}}%
+ {\setlength{\theorempreskipamount}{\z@}%
+ \setlength{\theorempostskipamount}{\z@}%
+ }%
+ }{}%
+}
\DeclareDocumentCommand{\mdtheorem}{ O{} m o m o }%
{\ifcsdef{#2}%
{\mdf@PackageWarning{Environment #2 already exits\MessageBreak}}%
@@ -639,40 +707,38 @@
}
\newrobustcmd\mdfframedtitleenv[1]{%
- \mdf@lrbox{\mdf@frametitlebox}%
+ \mdf@lrbox{\mdf@frametitlebox}%
+ \begingroup
+ %%\parindent\z@\parskip\z@%
+ \@afterheading
\mdf@frametitlealignment%
- \leavevmode\color{\mdf@frametitlefontcolor}%
- \normalfont\mdf@frametitlefont{#1}
- \ifbool{mdf@ignorelastdescenders}%
- {%
- \par\strut\par
- \unskip\unskip\setbox0=\lastbox
- \vspace*{\dimexpr\ht\strutbox-\baselineskip\relax}%
- }{}%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%%
- \endmdf@lrbox\relax%
- \mdf@ignorevbadness%
- \setbox\mdf@frametitlebox=\vbox{\unvbox\mdf@frametitlebox}%
- \mdfframetitleboxwidth=\wd\mdf@frametitlebox\relax%
- \mdfframetitleboxheight=\ht\mdf@frametitlebox\relax%
- \mdfframetitleboxdepth=\dp\mdf@frametitlebox\relax%
- \mdfframetitleboxtotalheight=\dimexpr
+ \leavevmode\color{\mdf@frametitlefontcolor}%
+ \normalfont\mdf@frametitlefont{#1}%
+ \mdf@@ignorelastdescenders%
+ \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%%
+ \endgroup
+ \endmdf@lrbox\relax%
+ \mdf@ignorevbadness%
+ \setbox\mdf@frametitlebox=\vbox{\unvbox\mdf@frametitlebox}%
+ \mdfframetitleboxwidth=\wd\mdf@frametitlebox\relax%
+ \mdfframetitleboxheight=\ht\mdf@frametitlebox\relax%
+ \mdfframetitleboxdepth=\dp\mdf@frametitlebox\relax%
+ \mdfframetitleboxtotalheight=\dimexpr
\ht\mdf@frametitlebox
+\dp\mdf@frametitlebox%
+\mdf@frametitleaboveskip@length
+\mdf@frametitlebelowskip@length
\relax%
+ \setbox\mdf@frametitlebox=%prevent frametitle to expand glue
+ \vbox to \dimexpr\mdfframetitleboxheight+\mdfframetitleboxdepth\relax%
+ {\unvbox\mdf@frametitlebox}%
}
-\newrobustcmd*\mdf@@frametitle{%
- \mdfframedtitleenv{\mdf@frametitle}%
-}
-
-\newrobustcmd*\mdf@@frametitle@use{%
- \parskip\z@\relax%
- \parindent\z@\relax%
+\newrobustcmd\mdf@@frametitle@use{%
\mdf@ignorevbadness%
\setbox\mdf@splitbox@one=\vbox{%
+ \parskip\z@\relax%
+ \parindent\z@\relax%
\offinterlineskip\relax%
\unvcopy\mdf@frametitlebox\relax%
\mdf@@frametitlerule\relax%
@@ -682,18 +748,10 @@
\setbox\mdf@splitbox@one=\vbox{\unvbox\mdf@splitbox@one}%
\mdfsetup{innertopmargin=\mdf@frametitleaboveskip@length}%
}
-\newrobustcmd*\mdf@checkntheorem{%
- \ifbool{mdf@ntheorem}%
- {\ifundef{\theorempreskipamount}%
- {\mdf@PackageWarning{You have not loaded ntheorem yet}}%
- {\setlength{\theorempreskipamount}{\z@}%
- \setlength{\theorempostskipamount}{\z@}%
- }%
- }{}%
-}
\newrobustcmd*\mdf@footnoterule{%
\kern0\p@%
\hrule \@width 1in \kern 2.6\p@}
+
\newrobustcmd*\mdf@footnoteoutput{%
\ifvoid\@mpfootins\else%
\nobreak%
@@ -703,30 +761,13 @@
\unvbox\@mpfootins%
\fi%
}
+
\newrobustcmd*\mdf@footnoteinput{%
\def\@mpfn{mpfootnote}%
\def\thempfn{\thempfootnote}%
\c@mpfootnote\z@%
\let\@footnotetext\@mpfootnotetext%
}
-\newrobustcmd*\mdf@load@style{%
-\ifcase\value{mdf@globalstyle@cnt}\relax%
- \input{md-frame-0.mdf}%
- \or\input{md-frame-1.mdf}%
- \or\input{md-frame-2.mdf}%
- \or\input{md-frame-3.mdf}%
- \else%
- \IfFileExists{md-frame-\value{mdf@globalstyle@cnt}.mdf}%
- {\input{md-frame-\value{mdf@globalstyle@cnt}.mdf}}%
- {%
- \input{md-frame-0.mdf}%
- \mdf@PackageWarning{The style number \value{mdf@globalstyle@cnt}
- does not exist^^J
- mdframed ues instead style=0 \mdframedpackagename}%
- }%
-\fi%
-}%
-\mdf@load@style
\newrobustcmd*\mdf@styledefinition{%AVOID!!!Needed for framemethod=default
\ifnumequal{\value{mdf@globalstyle@cnt}}{0}%
{\deflength{\mdf@innerlinewidth@length}{\z@}%
@@ -741,15 +782,15 @@
\newrobustcmd*\detected@mdf@put@frame{%
\ifmdf@nobreak%Option nobreak=true?
\def\mdf@reserved@a{\mdf@put@frame@standalone}%
- \else
+ \else%
\def\mdf@reserved@a{\mdf@put@frame}%
- \ifx\@captype\@undefined
+ \ifx\@captype\@undefined%
\def\mdf@reserved@a{\mdf@put@frame}%
- \else
+ \else%
\mdf@PackageInfo{mdframed inside float ^^J
mdframed uses option nobreak \mdframedpackagename}%
\def\mdf@reserved@a{\mdf@put@frame@standalone}%
- \fi
+ \fi%
\if@minipage%
\mdf@PackageInfo{mdframed inside minipage ^^J
mdframed uses option nobreak \mdframedpackagename}%
@@ -766,18 +807,20 @@
\newcount\mdf@envdepth \mdf@envdepth=0
\@definecounter{mdf@env@i}
\@definecounter{mdf@env@ii}
-\newenvironment{mdframed}[1][]{%
-\color@begingroup%
- \mdfsetup{userdefinedwidth=\linewidth,#1}%
+\newrobustcmd*\mdf@preenvsetting{%
\mdf@twoside@checklength%
+ \edef\mdf@par@local{%
+ \parskip=\the\parskip\relax%
+ \parindent=\the\parindent\relax}%
+ \parskip\z@%
+ \parindent\z@%
\let\width\z@%
\let\height\z@%
\mdf@checkntheorem%
- \ifbool{mdf@draft}%
- {%
- \ifdimgreater{\overfullrule}{0pt}{}{\setlength\overfullrule{5pt}}%
- }{}%
- \ifnum\mdf@envdepth >\tw@\@toodeep\else
+ \ifbool{mdf@draft}{%
+ \ifdimgreater{\overfullrule}{0pt}{}{\setlength\overfullrule{5pt}}}{}%
+ %% Nested environments and provide an extra counter.
+ \ifnum\mdf@envdepth >\tw@\@toodeep\else%
\advance\mdf@envdepth\@ne
\edef\mdf@depthctr{mdf@env@\romannumeral\the\mdf@envdepth}%
\fi
@@ -785,44 +828,61 @@
\mdf@footnoteinput%
\color{\mdf@fontcolor}%
\mdf@font%
+}
+\newrobustcmd*\mdf@@ignorelastdescenders{%
+ \ifbool{mdf@ignorelastdescenders}%
+ {%
+ \par\strut\par%
+ \unskip\unskip\setbox0=\lastbox
+ \vspace*{\dimexpr\ht\strutbox-\baselineskip\relax}%
+ }{}%
+}
+\newenvironment{mdframed}[1][]{%
+ \color@begingroup%
+ \mdfsetup{userdefinedwidth=\linewidth,#1}%
+ \mdf@startcode%
+ \mdf@preenvsetting%
+ \ifdefempty{\mdf@firstframetitle}{}%
+ {\let\mdf@frametitlesave\mdf@frametitle%
+ \let\mdf@frametitle\mdf@firstframetitle%
+ }%
\ifvmode\nointerlineskip\fi%
\mdf@trivlist{\mdf@skipabove@length}%%
- \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle}%
\mdf@settings%
- \ifbool{mdf@suppressfirstparskip}{\addtolength{\mdf@innertopmargin@length}{-\parskip}}{}%
\mdf@lrbox{\mdf@splitbox@one}%
+ \mdf@startinnercode%
}%
{%
- \ifbool{mdf@ignorelastdescenders}%
- {%
- \par\strut\par
- \unskip\unskip\setbox0=\lastbox
- \vspace*{\dimexpr\ht\strutbox-\baselineskip\relax}%
- }{}%
- \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%%
- \ifmdf@footnoteinside%
+ \mdf@@ignorelastdescenders%
+ \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%%
+ \ifmdf@footnoteinside%
\def\mdf@reserveda{%
\mdf@footnoteoutput%
+ \mdf@endinnercode%
\endmdf@lrbox%
- \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle@use}%
+ \ifdefempty{\mdf@frametitle}{}%
+ {\mdfframedtitleenv{\mdf@frametitle}\mdf@@frametitle@use}%
\detected@mdf@put@frame}%
- \else%
+ \else%
\def\mdf@reserveda{%
+ \mdf@endinnercode%
\endmdf@lrbox%
- \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle@use}%
+ \ifdefempty{\mdf@frametitle}{}%
+ {\mdfframedtitleenv{\mdf@frametitle}\mdf@@frametitle@use}%
\detected@mdf@put@frame%
\mdf@footnoteoutput%
}%
- \fi%
- \mdf@reserveda%
- \endmdf@trivlist%
-\color@endgroup\@doendpe%
+ \fi%
+ \mdf@reserveda%
+ \aftergroup\endmdf@trivlist%
+ \color@endgroup%
+ \mdf@endcode%
}
\newtoggle{md:checktwoside}
\settoggle{md:checktwoside}{false}
\newrobustcmd*\mdf@twoside@checklength{%
- \if@twoside
+ \if@twoside%
\ifbool{mdf@usetwoside}%
{\mdf@PackageInfo{mdframed works in twoside mode}%
\settoggle{md:checktwoside}{true}%
@@ -840,7 +900,7 @@
\zref@newprop*{mdf@pagevalue}[0]{\number\value{page}}
\zref@addprop{\ZREF@mainlist}{mdf@pagevalue}
\newrobustcmd*\mdf@zref@label{%
- \stepcounter{mdf@zref@counter}
+ \stepcounter{mdf@zref@counter}%
\zref@label{mdf@pagelabel-\number\value{mdf@zref@counter}}%
}
\newrobustcmd*\if@mdf@pageodd{%
@@ -869,81 +929,65 @@
\addtolength\mdf@freevspace@length{\dimexpr-\parskip\relax}\relax%
}%
}
-\newrobustcmd*\mdf@advancelength@horizontalmargin@sub[1]{%
- \advance\mdf@horizontalspaceofbox by -\csname mdf@#1@length\endcsname\relax%
+\newrobustcmd*\mdf@advancelength@sub[2]{%
+ \advance #1 by -\csname mdf@#2@length\endcsname\relax%
+}
+\newrobustcmd*\mdf@advancelength@add[2]{%
+ \advance #1 by \csname mdf@#2@length\endcsname\relax%
}
-\newlength\mdf@horizontalspaceofbox
\newrobustcmd*\mdf@horizontalmargin@equation{%
\setlength{\mdf@horizontalspaceofbox}{\mdf@userdefinedwidth@length}%
- \mdf@dolist{\mdf@advancelength@horizontalmargin@sub}{%
+ \mdf@dolist{\mdf@advancelength@sub{\mdf@horizontalspaceofbox}}{%
leftmargin,outerlinewidth,middlelinewidth,%
innerlinewidth,innerleftmargin,innerrightmargin,%
innerlinewidth,middlelinewidth,outerlinewidth,%
rightmargin}%
\notbool{mdf@leftline}%
- {%
- \advance\mdf@horizontalspaceofbox by \mdf@innerlinewidth@length\relax%
- \advance\mdf@horizontalspaceofbox by \mdf@middlelinewidth@length\relax%
- \advance\mdf@horizontalspaceofbox by \mdf@outerlinewidth@length\relax%
- }{}%
+ {%
+ \mdf@dolist{\mdf@advancelength@add{\mdf@horizontalspaceofbox}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}%
+ }{}%
\notbool{mdf@rightline}%
- {%
- \advance\mdf@horizontalspaceofbox by \mdf@innerlinewidth@length\relax%
- \advance\mdf@horizontalspaceofbox by \mdf@middlelinewidth@length\relax%
- \advance\mdf@horizontalspaceofbox by \mdf@outerlinewidth@length\relax%
- }{}%
- \ifdimless{\mdf@horizontalspaceofbox}{3cm}%
- {\mdf@PackageWarning{You have only a width of 3cm}}{}%
+ {%
+ \mdf@dolist{\mdf@advancelength@add{\mdf@horizontalspaceofbox}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}%
+ }{}%
\hsize=\mdf@horizontalspaceofbox%
}
\newrobustcmd*\mdf@keeplines@single{%
\notbool{mdf@topline}%
{%
- \advance\mdf@verticalmarginwhole@length %
- by -\mdf@innerlinewidth@length\relax%
- \advance\mdf@verticalmarginwhole@length %
- by -\mdf@middlelinewidth@length\relax%
- \advance\mdf@verticalmarginwhole@length %
- by -\mdf@outerlinewidth@length\relax%
+ \mdf@dolist{\mdf@advancelength@sub{\mdf@verticalmarginwhole@length}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}%
}{}%
\notbool{mdf@bottomline}%
{%
- \advance\mdf@verticalmarginwhole@length %
- by -\mdf@innerlinewidth@length\relax%
- \advance\mdf@verticalmarginwhole@length %
- by -\mdf@middlelinewidth@length\relax%
- \advance\mdf@verticalmarginwhole@length %
- by -\mdf@outerlinewidth@length\relax%
+ \mdf@dolist{\mdf@advancelength@sub{\mdf@verticalmarginwhole@length}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}%
}{}%
}
-\newrobustcmd*\mdf@advancelength@verticalmarginwhole[1]{%
- \advance\mdf@verticalmarginwhole@length %
- by \csname mdf@#1@length\endcsname\relax%
-}
-\newrobustcmd*\mdf@advancelength@freevspace@sub[1]{%
- \advance\dimen@ by -\csname mdf@#1@length\endcsname\relax%
-}
-\newrobustcmd*\mdf@advancelength@freevspace@add[1]{%
- \advance\dimen@ by \csname mdf@#1@length\endcsname\relax%
-}
-\protected@edef\mdf@reset{\boxmaxdepth\the\boxmaxdepth
+\protected@edef\mdf@reset{\boxmaxdepth\the\boxmaxdepth%
\splittopskip\the\splittopskip}%
\newrobustcmd*\mdf@put@frame@standalone{\relax%
- \ifvoid\mdf@splitbox@one\relax
+ \ifvoid\mdf@splitbox@one\relax%
\mdf@PackageWarning{The environment is empty\MessageBreak}%
- \let\mdf@reserved@a\relax%
- \else
+ \else%
%Hier berechnung Box-Inhalt+Rahmen oben und unten
\setlength{\mdf@verticalmarginwhole@length}%
{\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}%
- \mdf@dolist{\mdf@advancelength@verticalmarginwhole}{%
+ \mdf@dolist{\mdf@advancelength@add{\mdf@verticalmarginwhole@length}}{%
outerlinewidth,middlelinewidth,innerlinewidth,%
innertopmargin,innerbottommargin,innerlinewidth,%
- middlelinewidth,outerlinewidth}%
+ middlelinewidth,outerlinewidth,extratopheight}%
\mdf@keeplines@single%
- \def\mdf@reserved@a{\mdf@putbox@single}%
- \fi
- \mdf@reserved@a%
+ \begingroup%
+ \mdf@@setzref%
+ \booltrue{mdfsingleframe}%
+ \mdf@beforesingleframe%
+ \mdf@putbox@single%
+ \mdf@aftersingleframe%
+ \endgroup%Output no break
+ \fi%
}
\def\mdf@put@frame{\relax%
\ifvoid\mdf@splitbox@one\relax
@@ -956,78 +1000,78 @@
\mdf@PackageInfoSpace{\the\mdf@freevspace@length before the
beginning of \MessageBreak
the environment ending on input line \MessageBreak}%
- \ifdimless{\mdf@freevspace@length}{2\baselineskip}
+ \ifdimless{\mdf@freevspace@length}{2\baselineskip}%
{%
- \mdf@PackageInfo{Not enough space on this page}
+ \mdf@PackageInfo{Not enough space on this page}%
\vfill\eject%
\def\mdf@reserved@a{\mdf@put@frame}%
}{%
%Hier berechnung Box-Inhalt+Rahmen oben und unten
\setlength{\mdf@verticalmarginwhole@length}%
{\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}%
- \mdf@dolist{\mdf@advancelength@verticalmarginwhole}%
+ \mdf@dolist{\mdf@advancelength@add{\mdf@verticalmarginwhole@length}}%
{%
outerlinewidth,middlelinewidth,innerlinewidth,%
innertopmargin,innerbottommargin,%
- innerlinewidth,middlelinewidth,outerlinewidth}%
+ innerlinewidth,middlelinewidth,outerlinewidth,extratopheight}%
\mdf@keeplines@single%
\ifdimless{\mdf@verticalmarginwhole@length}{\mdf@freevspace@length}%
- {%passt auf Seite%
- \begingroup\mdf@@setzref\mdf@putbox@single\endgroup%Output no break
+ {%enough space / no break
+ \begingroup%
+ \mdf@@setzref%
+ \booltrue{mdfsingleframe}%
+ \mdf@beforesingleframe%
+ \mdf@putbox@single%
+ \mdf@aftersingleframe%
+ \endgroup%Output no break
\let\mdf@reserved@a\relax%
}%
{%
- \def\mdf@reserved@a{\mdf@put@frame@i}%passt nicht auf Seite
- }
+ \def\mdf@reserved@a{\mdf@put@frame@i}%need to split
+ }%
}%
-\fi
+\fi%
\mdf@reserved@a%
}
\def\mdf@put@frame@i{%Box must be splitted
\mdf@freepagevspace%gives \mdf@freevspace@length
\dimen@=\the\mdf@freevspace@length\relax%
\dimen@i=\mdf@innertopmargin@length\relax%
- \advance\dimen@i by \mdf@innerlinewidth@length\relax%
- \advance\dimen@i by \mdf@middlelinewidth@length\relax%
- \advance\dimen@i by \mdf@outerlinewidth@length\relax%
+ \mdf@dolist{\mdf@advancelength@add{\dimen@i}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}%
\advance\dimen@i by 2\baselineskip\relax%
\ifdimless{\dimen@}{\dimen@i}%
{\hrule \@height\z@ \@width\hsize%
- \vfill\eject%
+ \vfill\eject%no room for two lines
\def\mdf@reserved@a{\mdf@put@frame}%
}%
- {%
- \mdf@dolist{\mdf@advancelength@freevspace@sub}{%calculate with \dimen@
- outerlinewidth,middlelinewidth,innerlinewidth,%
- innertopmargin,splitbottomskip}%
- \ifbool{mdf@everyline}%
- {%
- \ifbool{mdf@bottomline}%
- {%
- \advance\dimen@ by -\mdf@innerlinewidth@length%
- \advance\dimen@ by -\mdf@middlelinewidth@length%
- \advance\dimen@ by -\mdf@outerlinewidth@length%
- }{}%
+ {%enough space for first part
+ \mdf@dolist{\mdf@advancelength@sub{\dimen@}}{%calculate with \dimen@
+ outerlinewidth,middlelinewidth,innerlinewidth,%width of top rule
+ innertopmargin,splitbottomskip}%width of length
+ \ifboolexpr{ bool {mdf@everyline} and bool {mdf@bottomline} }%
+ {%need space for bottomline
+ \mdf@dolist{\mdf@advancelength@sub{\dimen@}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}%
}{}%
- \notbool{mdf@topline}%
+ \notbool{mdf@topline}%no top line
{%
- \advance\dimen@ by \mdf@innerlinewidth@length%
- \advance\dimen@ by \mdf@middlelinewidth@length%
- \advance\dimen@ by \mdf@outerlinewidth@length%
+ \mdf@dolist{\mdf@advancelength@add{\dimen@}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}%
}{}%
- \advance\dimen@.8\pageshrink
+ \advance\dimen@.8\pageshrink%
\ifdimless{\ht\mdf@splitbox@one+\dp\mdf@splitbox@one}{\dimen@}%
{\mdf@PackageWarning{You got a bad break\MessageBreak
because the last box will be empty\MessageBreak
- you have to change it manually\MessageBreak
- by changing the text, the space\MessageBreak
- or something else}%
+ you have to change it manually\MessageBreak
+ by changing the text, the space\MessageBreak
+ or something else}%
\advance\dimen@ by -1.8\baselineskip\relax%needed????????????????????
}{}%
- \setbox\mdf@splitbox@save=\vbox{\unvcopy\mdf@splitbox@one}%
+ \setbox\mdf@splitbox@save=\vbox{\unvcopy\mdf@splitbox@one}%save original
\splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length%
\mdf@ignorevbadness%
- \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \dimen@
+ \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \dimen@\relax%
\setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two}%
\setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}%
\ifdimgreater{\ht\mdf@splitbox@two+\dp\mdf@splitbox@two}{\dimen@}%
@@ -1036,12 +1080,12 @@
starting loop to iterate
the splitting point\MessageBreak}%
\setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}%
- \dimen@i=\dimen@%\relax
- \@tempcnta=\z@\relax
+ \dimen@i=\dimen@\relax%
+ \@tempcnta=\z@\relax%
\loop
\ifdim\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax>\dimen@
- \advance\dimen@i by -\p@\relax
- \advance\@tempcnta by \@ne\relax
+ \advance\dimen@i by -\p@\relax%
+ \advance\@tempcnta by \@ne\relax%
%% \wlog{***mdframed \string\@tempcnta=\the\@tempcnta***}
%% \wlog{***mdframed \string\dimen@i=\the\dimen@i***}
\mdf@ignorevbadness%
@@ -1052,10 +1096,10 @@
\setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two}%
\setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}%
\ifnum\@tempcnta>100
- \let\iterate\relax
+ \let\iterate\relax%
\mdf@PackageWarning{correct box splittet fails^^J
It seems you are using a non splittable
- contents\MessageBreak}
+ contents\MessageBreak}%
\setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}%
\setbox\mdf@splitbox@two=\vbox{}%
\def\mdf@reserved@a{\mdf@put@frame}%
@@ -1073,33 +1117,44 @@
\enlargethispage{\baselineskip}%
\def\mdf@reserved@a{\mdf@put@frame}%
\fi%
+ % Test if first splitted frame doesn't have the original with.
+ % occurs with math
\ifdim\wd\mdf@splitbox@two=\wd\mdf@splitbox@one\relax
\else%
\mdf@PackageInfo{You first box width is to small^^J
mdframed fixed it\MessageBreak}%
\setbox\mdf@splitbox@two=\vbox%
{%
- \hrule \@height\z@ \@width\mdfboundingboxwidth\relax
+ \hrule \@height\z@ \@width\mdfboundingboxwidth\relax%
\unvcopy\mdf@splitbox@two%
}%
\fi%
\ifvoid\mdf@splitbox@two\relax%
- {\hrule \@height\f@size pt \@width\z@%
+ {%
+ \hrule \@height\f@size pt \@width\z@%
\hrule \@height\z@ \@width\hsize}%
\setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}%
- \def\mdf@reserved@a{\mdf@put@frame}%
+ \def\mdf@reserved@a{\mdf@put@frame%
+ }%
\else%
\ifdimequal{\ht\mdf@splitbox@two}{0pt}%
- {\hrule \@height\z@ \@width\hsize%
+ {%
+ \hrule \@height\z@ \@width\hsize%
\vfill\eject%
\setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}%
\def\mdf@reserved@a{\mdf@put@frame}%
}%
{%
- \begingroup\mdf@@setzref\mdf@putbox@first\endgroup%
- \hrule \@height\z@ \@width\hsize%
- \vfill\eject%
- \def\mdf@reserved@a{\mdf@put@frame@ii}%
+ \begingroup%
+ \mdf@@setzref%
+ \mdf@beforebreak%
+ \booltrue{mdffirstframe}%
+ \mdf@putbox@first%
+ \mdf@afterbreak%
+ \endgroup%
+ \hrule \@height\z@ \@width\hsize%
+ \vfill\eject%
+ \def\mdf@reserved@a{\mdf@put@frame@ii}%
}%
\fi%
}%
@@ -1108,16 +1163,18 @@
\def\mdf@put@frame@ii{%
\setlength{\mdf@freevspace@length}{\vsize}%
\ifbool{mdf@repeatframetitle}%
- {%
+ {%repeating title -- more robust using hooks.
\toggletrue{mdf@notfirstframetitle}%
\splitmaxdepth\z@ \splittopskip\z@%
\setbox\mdf@splitbox@one=\vbox{\break\unvbox\mdf@splitbox@one}%
\mdf@ignorevbadness%
\setbox0=\vsplit\mdf@splitbox@one to \z@\relax%
- \setbox\mdf@splitbox@one=\vbox{\unvbox\mdf@splitbox@one}
+ \setbox\mdf@splitbox@one=\vbox{\unvbox\mdf@splitbox@one}%
\setbox\mdf@splitbox@one\vbox%
{%
- \vbox to \mdf@frametitleaboveskip@length{}
+ \parskip\z@\relax%
+ \parindent\z@\relax%
+ \vskip\mdf@frametitleaboveskip@length%
\unvcopy\mdf@frametitlebox\relax%
\mdf@@frametitlerule\relax%
\unvbox\mdf@splitbox@one\relax%
@@ -1125,51 +1182,40 @@
\setbox\mdf@splitbox@one=\vbox{\unvbox\mdf@splitbox@one}%
}{}%
\setlength{\dimen@}{\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}%
- \mdf@dolist{\mdf@advancelength@freevspace@add}%
- {%used \dimen@
- innerbottommargin,innerlinewidth,middlelinewidth,outerlinewidth,%
- }%
- \ifbool{mdf@everyline}%
+ \mdf@dolist{\mdf@advancelength@add{\dimen@}}%
+ {innerbottommargin,innerlinewidth,middlelinewidth,outerlinewidth}%
+ \ifboolexpr { bool {mdf@everyline} and bool {mdf@topline} }%
{%
- \ifbool{mdf@topline}%
- {%
- \advance\dimen@ by \mdf@innerlinewidth@length\relax%
- \advance\dimen@ by \mdf@middlelinewidth@length\relax%
- \advance\dimen@ by \mdf@outerlinewidth@length\relax%
- }{}%
+ \mdf@dolist{\mdf@advancelength@add{\dimen@}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}%
}{}%
- \notbool{mdf@bottomline}%
+ \notbool{mdf@bottomline}%remove bottom if neccessary
{%
- \advance\dimen@ by -\mdf@innerlinewidth@length\relax%
- \advance\dimen@ by -\mdf@middlelinewidth@length\relax%
- \advance\dimen@ by -\mdf@outerlinewidth@length\relax%
- \relax%
+ \mdf@dolist{\mdf@advancelength@sub{\dimen@}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}%
}{}%
\ifdimgreater{\dimen@}{\mdf@freevspace@length}%
{%have a middle box
\advance\mdf@freevspace@length by -\mdf@splitbottomskip@length\relax%
- \ifbool{mdf@everyline}%
+ \ifbool{mdf@everyline}%regard top and bottom if everyline is used
{%
\ifbool{mdf@topline}%
{%
- \advance\mdf@freevspace@length by -\mdf@innerlinewidth@length\relax%
- \advance\mdf@freevspace@length by -\mdf@middlelinewidth@length\relax%
- \advance\mdf@freevspace@length by -\mdf@outerlinewidth@length\relax%
+ \mdf@dolist{\mdf@advancelength@sub{\mdf@freevspace@length}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}%
}{}%
\ifbool{mdf@bottomline}%
{%
- \advance\mdf@freevspace@length by -\mdf@innerlinewidth@length\relax%
- \advance\mdf@freevspace@length by -\mdf@middlelinewidth@length\relax%
- \advance\mdf@freevspace@length by -\mdf@outerlinewidth@length\relax%
- \relax
+ \mdf@dolist{\mdf@advancelength@sub{\mdf@freevspace@length}}%
+ {innerlinewidth,middlelinewidth,outerlinewidth}%
}{}%
}{}%
\setbox\mdf@splitbox@save=\vbox{\unvcopy\mdf@splitbox@one}%
\splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length%
\mdf@ignorevbadness%
- \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \mdf@freevspace@length
- \setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two}
- \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}
+ \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \mdf@freevspace@length%
+ \setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two}%
+ \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}%
\ifdimgreater{\ht\mdf@splitbox@two+\dp\mdf@splitbox@two}%
{\mdf@freevspace@length}%
{%splitted wrong
@@ -1183,8 +1229,6 @@
\mdf@freevspace@length\relax
\advance\dimen@i by -\p@\relax%
\advance\@tempcnta by \@ne\relax%
-%% \wlog{***mdframed \string\@tempcnta=\the\@tempcnta***}
-%% \wlog{***mdframed \string\dimen@i=\the\dimen@i***}
\ifnum\@tempcnta>100
\let\iterate\relax%
\mdf@PackageWarning{correct box splittet fails^^J
@@ -1213,10 +1257,16 @@
\else
\setbox\mdf@splitbox@two=\vbox%
{%
- \hrule \@height\z@ \@width\mdfboundingboxwidth\relax
+ \hrule \@height\z@ \@width\mdfboundingboxwidth\relax%
\unvcopy\mdf@splitbox@two%
}%
- \begingroup\mdf@@setzref\mdf@putbox@middle\endgroup%
+ \begingroup%
+ \mdf@@setzref%
+ \booltrue{mdfmiddleframe}%
+ \mdf@beforebreak%
+ \mdf@putbox@middle%
+ \mdf@afterbreak%
+ \endgroup%
\hrule \@height\z@ \@width\hsize%
\vfill\eject%
\def\mdf@reserved@a{\mdf@put@frame@ii}%
@@ -1246,13 +1296,103 @@
\hrule \@height\z@ \@width\mdfboundingboxwidth
}%
}{}%
- \begingroup\mdf@@setzref\mdf@putbox@second\endgroup%
+ \begingroup%
+ \toggletrue{mdflastframe}%
+ \mdf@beforebreak%
+ \begingroup%
+ \mdf@@setzref%
+ \booltrue{mdflastframe}%
+ \mdf@beforelastframe%
+ \mdf@putbox@second%
+ \mdf@afterlastframe%
+ \endgroup%
\hrule \@height\z@ \@width\hsize%
+ \mdf@afterbreak%
+ \endgroup%
\let\mdf@reserved@a\relax%
}%
\mdf@reserved@a%
}
+\newrobustcmd\mdfsubtitle[2][]%
+{%
+ \begingroup
+ \penalty-9995%set a breakpoint before the subtitle
+ \parindent\z@\relax%
+ \parskip\z@\relax%
+ \mdfsetup{#1}%only for subtitle options
+ \par\addvspace{\mdf@subtitleaboveskip@length}%
+ \setbox\z@=\vbox{%
+ \mdf@frametitlealignment%
+ \mdf@subtitlefont{#2}%
+ \mdf@@ignorelastdescenders%
+ \relax}%
+ \setbox\z@=\vbox{\unvbox\z@}%
+ \setbox\z@=\vbox{%
+ \parskip\z@\relax%
+ \parindent\z@\relax%
+ \offinterlineskip\relax%
+ \vbox to \mdf@subtitleinneraboveskip@length{}%
+ \unvbox\z@\relax%
+ \vbox to \mdf@subtitleinnerbelowskip@length{}%
+ }%\z@ contains the subtitle+required length
+ \setlength{\mdfsubtitleheight}{\dimexpr\ht\z@+\dp\z@\relax}
+ \setbox\z@=\vbox to \mdfsubtitleheight {\unvbox\z@}%
+ % \dimen@ is now the complete width
+ \mdf@templength=\linewidth\relax%
+ \mdf@dolist{\mdf@advancelength@add{\mdf@templength}}%
+ {innerleftmargin,innerrightmargin}%
+ \offinterlineskip\relax%
+ \ifbool{mdf@subtitleaboveline}{\mdf@drawsubtitleaboveline\par}{}%
+ \mdf@drawsubtitlebackground%
+ \box\z@%
+ \ifbool{mdf@subtitlebelowline}{\mdf@drawsubtitlebelowline}{}%
+ \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
+ \penalty 9995%
+ \addvspace{\mdf@subtitlebelowskip@length}%
+ \endgroup%
+ \@afterheading%
+}
+
+\newrobustcmd\mdfsubsubtitle[2][]%
+{%
+ \begingroup
+ \penalty-9995%set a breakpoint before the subtitle
+ \parindent\z@\relax%
+ \parskip\z@\relax%
+ \mdfsetup{#1}%only for subtitle options
+ \par\addvspace{\mdf@subsubtitleaboveskip@length}%
+ \setbox\z@=\vbox{%
+ \mdf@frametitlealignment%
+ \mdf@subsubtitlefont{#2}%
+ \mdf@@ignorelastdescenders%
+ \relax}%
+ \setbox\z@=\vbox{\unvbox\z@}%
+ \setbox\z@=\vbox{%
+ \parskip\z@\relax%
+ \parindent\z@\relax%
+ \offinterlineskip\relax%
+ \vbox to \mdf@subsubtitleinneraboveskip@length{}%
+ \unvbox\z@\relax%
+ \vbox to \mdf@subsubtitleinnerbelowskip@length{}%
+ }%\z@ contains the subtitle+required length
+ \setlength{\mdfsubsubtitleheight}{\dimexpr\ht\z@+\dp\z@\relax}
+ \setbox\z@=\vbox to \mdfsubsubtitleheight {\unvbox\z@}%
+ % \dimen@ is now the complete width
+ \mdf@templength=\linewidth\relax%
+ \mdf@dolist{\mdf@advancelength@add{\mdf@templength}}%
+ {innerleftmargin,innerrightmargin}%
+ \offinterlineskip\relax%
+ \ifbool{mdf@subsubtitleaboveline}{\mdf@drawsubtitleaboveline\par}{}%
+ \mdf@drawsubtitlebackground%
+ \box\z@%
+ \ifbool{mdf@subsubtitlebelowline}{\mdf@drawsubtitlebelowline}{}%
+ \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%
+ \penalty 9995%
+ \addvspace{\mdf@subsubtitlebelowskip@length}%
+ \endgroup%
+ \@afterheading%
+}
%%%% _____t_____
%%%% | |
%%%% | |
@@ -1262,7 +1402,6 @@
%%%% | |
%%%% |___________|
%%%% b
-%%Zusammenhaenge abfragen:
\newrobustcmd*\mdf@test@ltrb{%
\ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline})
and (bool {mdf@leftline}) and (bool {mdf@rightline})}}
@@ -1317,7 +1456,6 @@
test {\mdf@test@lrb} or test {\mdf@test@lb} or
test {\mdf@test@rb} or test {\mdf@test@tr} or
test {\mdf@test@lt} ) }}
-\DisableKeyvalOption[action=warning,package=mdframed]{mdf}{framemethod}%
\DisableKeyvalOption[action=warning,package=mdframed]{mdf}{xcolor}%
\endinput