diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/mdframed')
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls | 649 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf | 1130 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf | 482 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf | 509 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf | 509 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/mdframed.sty | 890 |
6 files changed, 2844 insertions, 1325 deletions
diff --git a/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls b/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls index 6790bafe75d..967dc754c9a 100644 --- a/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls +++ b/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls @@ -2,56 +2,63 @@ %% This documentclass isn't maintanened or efficient for writing %% %% -%% Copyright (c) 2010 Marco Daniel +%% Copyright (c) 2012 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. %% Either version 1.0 or, at your option, any later version. -%%$Id: ltxmdf.cls 374 2012-04-08 10:47:37Z marco $ -%%$Rev: 374 $ +%%$Id: ltxmdf.cls 421 2012-05-31 15:51:38Z marco $ +%%$Rev: 421 $ %%$Author: marco $ -%%$Date: 2012-04-08 12:47:37 +0200 (So, 08. Apr 2012) $ - - -%% Allgemeine Angaben -\def\ltxmdf@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ltxmdf}[\ltxmdf@svn$Id: ltxmdf.cls 374 2012-04-08 10:47:37Z marco $ ltxmdf] -\DeclareOption{tocdepthsec}{\def\ltxmdf@tocdepth{1}} -\DeclareOption{tocdepthsub}{\def\ltxmdf@tocdepth{2}} -\newif\ifltxmdf@lipsum -\ltxmdf@lipsumfalse -\DeclareOption{ltxlipsum}{\ltxmdf@lipsumtrue} -\newif\ifltxmdf@showframe -\ltxmdf@showframefalse -\DeclareOption{ltxshowframe}{\ltxmdf@showframetrue} -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}} -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}} -\ExecuteOptions{tocdepthsub} -\ProcessOptions\relax -\LoadClass{scrartcl} -\RequirePackage{selinput} -\SelectInputMappings{ - adieresis={ä}, - germandbls={ß}, - Euro={€}, -} +%%$Date: 2012-05-31 17:51:38 +0200 (Do, 31 Mai 2012) $ + +\RequirePackage{expl3} +\GetIdInfo$Id: ltxmdf.cls 421 2012-05-31 15:51:38Z marco $ + {documentation class for Marco Daniel} + +\ProvidesExplClass{\ExplFileName} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} + +\RequirePackage{l3keys2e,xparse} +\keys_define:nn { ltxmdf } + { + tocdepth .int_set:N = \l_ltxmdf_tocdepth_int , + lipsum .bool_set:N = \l_ltxmdf_lipsum_bool , + showframe .bool_set:N = \l_ltxmdf_showframe_bool , + } +\keys_set:nn { ltxmdf } + { + tocdepth = 2 + } + +\ProcessKeysOptions { ltxmdf } + +\LoadClassWithOptions { scrartcl } + +\RequirePackage{ifxetex,ifluatex} \RequirePackage{etoolbox} -%Required Packages no font / no language -%\RequirePackage[nofancy,draft,notoday]{svninfo} \RequirePackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm]{geometry} -\ifltxmdf@showframe - \RequirePackage{showframe} -\fi -\ifltxmdf@lipsum - \RequirePackage{lipsum} -\fi -\RequirePackage[T1]{fontenc} -\RequirePackage[scaled=0.82]{beramono} -\RequirePackage{microtype} + +\pdftex_if_engine:TF + { + \RequirePackage{selinput} + \SelectInputMappings{ + adieresis = {ä} , + germandbls = {ß} , + Euro = {€} , + } + \RequirePackage[T1]{fontenc} + \RequirePackage[scaled=0.82]{beramono} + \RequirePackage{microtype} + } + { + \RequirePackage{fontspec} + \setmonofont[Mapping=tex-text]{DejaVu Sans} + } + \RequirePackage[french=quotes]{csquotes} \RequirePackage{xspace} \begingroup @@ -68,42 +75,47 @@ \RequirePackage{array,booktabs} \RequirePackage{xcolor,tikz} \RequirePackage{graphicx} - \RequirePackage[numbered]{hypdoc} %set columns of index \c@IndexColumns = 2 - \hypersetup{% +\hypersetup{% breaklinks=true, pdftitle={Documenation of mdframed},% pdfauthor={Marco Daniel},% colorlinks=true,% linkcolor=ltxmdfblue, urlcolor=cyan, - bookmarksdepth=\ltxmdf@tocdepth, - } - + bookmarksdepth= \int_use:N \l_ltxmdf_tocdepth_int, +} +\bool_if:NT \l_ltxmdf_showframe_bool + { + \RequirePackage{showframe} + } +\bool_if:NT \l_ltxmdf_lipsum_bool + { + \RequirePackage{lipsum} + \RequirePackage{kantlipsum} + } %Kopf- und Fusszeilen \clearscrheadfoot \pagestyle{scrheadings} \automark[subsection]{section} \renewcommand{\sectionmark}[1]{\markboth{\sectionmarkformat #1}{}}% -\renewcommand{\subsectionmark}[1]{\markright{\subsectionmarkformat #1}} %nur Titel ohne Nr. +\renewcommand{\subsectionmark}[1]{\markright{\subsectionmarkformat #1}} \ihead{\rightmark} \ohead{\leftmark} \ofoot{\pagemark} - -\def\ltxmdfsetifoot$#1: #2 #3 #4-#5-#6 #7 #8${% - \ifoot{#2 #3 #4-#5-#6 #7 #8} -} - -\ltxmdfsetifoot$Id: ltxmdf.cls 374 2012-04-08 10:47:37Z marco $ +\ifoot{{\ExplFileDate}\qquad SVN~version:~{\ExplFileVersion}\qquad{\ExplFileName}} %Tikz und Farbe +%tikzlibrary needs special handling +\ExplSyntaxOff \usetikzlibrary{calc,backgrounds,arrows,matrix} +\ExplSyntaxOn \colorlet{ltxmdfblue}{blue!30!black} \lstset{keywordstyle=\bfseries} @@ -126,32 +138,36 @@ 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,% - frametitlerule,frametitlebelowskip,frametitleaboveskip,% - frametitlebackgroundcolor,frametitlerulecolor,picins,figure},% - 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,% + 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}, + 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% },% } @@ -160,159 +176,199 @@ {\lstset{style=lstltxmdf,#1}}% {} -\lstMakeShortInline[basicstyle=\small\ttfamily\color{blue!60!black}]{|} - -%table of contens anpassen: -\renewcommand\tableofcontents{% - \setcounter{tocdepth}{\ltxmdf@tocdepth}% - \begin{multicols}{2}[\centering\textbf{\sffamily\Large\contentsname}] - \@starttoc{toc} - \end{multicols} -} %%Maketitle angepasst: -\def\title#1{\def\@title{#1}} -\def\subtitle#1{\def\@subtitle{#1}} -\def\author#1{\def\@author{#1}} -\def\version#1{\def\@version{#1}} -\def\date#1{\def\@date{#1}} -\def\@@date$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6} -\date{\@@date$Id: ltxmdf.cls 374 2012-04-08 10:47:37Z marco $} -\let\mdfdateID\@@date - - -\long\def\introduction#1{\def\@introduction{#1}} +\prop_new:N \l_ltxmdf_maketitleinformation_prop +\cs_set:Npn \title #1 + { + \prop_put:Nnn \l_ltxmdf_maketitleinformation_prop { title } { #1 } + } +\cs_set:Npn \subtitle #1 + { + \prop_put:Nnn \l_ltxmdf_maketitleinformation_prop { subtitle } { #1 } + } +\cs_set:Npn \author #1 + { + \prop_put:Nnn \l_ltxmdf_maketitleinformation_prop { author } { #1 } + } +\cs_set:Npn \version #1 + { + \prop_put:Nnn \l_ltxmdf_maketitleinformation_prop { version } { #1 } + } +\cs_set:Npn \date #1 + { + \prop_put:Nnn \l_ltxmdf_maketitleinformation_prop { date } { #1 } + } +\cs_set:Npn \introduction #1 + { + \prop_put:Nnn \l_ltxmdf_maketitleinformation_prop { introduction } { #1 } + } \def\maketitle{% \clearpage \thispagestyle{empty} - \begingroup - \begingroup - \parindent\z@ + \group_begin: + \group_begin: + \pdfbookmark[1]{Title}{titlebook} + \parindent\c_zero_dim \centering - \color{ltxmdfblue}\Large\bfseries\sffamily\@title - \par\kern.5\baselineskip - \normalfont\large\normalcolor\@subtitle - \par\kern.5\baselineskip - \null\quad\@author\hfill\@version\hfill\@date\quad\null - \endgroup - \par\kern.5\baselineskip + \color{ltxmdfblue}\Large\bfseries\sffamily + \prop_get:Nn \l_ltxmdf_maketitleinformation_prop { title } + \par + \skip_vertical:n {.5\baselineskip} + \normalfont\large\normalcolor + \prop_get:Nn \l_ltxmdf_maketitleinformation_prop { subtitle } + \par\kern.5\baselineskip\null\quad + \prop_get:Nn \l_ltxmdf_maketitleinformation_prop { author } + \hfill + \prop_get:Nn \l_ltxmdf_maketitleinformation_prop { version } + \hfill + \prop_get:Nn \l_ltxmdf_maketitleinformation_prop { date } + \hfill\quad\null + \group_end: + \par + \skip_vertical:n {.5\baselineskip} \begin{abstract} - \@introduction + \prop_get:Nn \l_ltxmdf_maketitleinformation_prop { introduction } \end{abstract} - \par\kern.2\baselineskip + \par + \skip_vertical:n {.2\baselineskip} \pdfbookmark[1]{\contentsname}{tocbook} \tableofcontents - \endgroup + \group_end: } -%Own Appendix -\def\ltxmdfappendix{% - \clearpage - %\newgeometry{left=5.5cm,}% -} -%Modifkation of code -\preto\theCodelineNo{\color{gray}} -\setlength\MacroTopsep{10pt} -\appto\MacroFont{\color{ltxmdfblue}} - - -\DoNotIndex{\@captype,\@endparenv,\@endparpenalty,\@endpetrue,\@floatpenalty,\@footnotetext,\@ifnextchar,\@undefined,\@tempboxa} -\DoNotIndex{\@M,\@empty,\@height,\@mpfn,\@mpfootins,\@mpfootnotetext,\@nil,\@plus,\@width} - -\DoNotIndex{\@captype,\@endparenv,\@endparpenalty,\@endpetrue,\@floatpenalty} -\DoNotIndex{\@footnotetext,\@ifnextchar,\@undefined,\@tempboxa} -\DoNotIndex{\@M,\@empty,\@height,\@mpfn,\@mpfootins,\@mpfootnotetext,\@nil,\@plus,\@width} -\DoNotIndex{\@afterheading,\@afterindentfalse,\@firstoftwo,\@gobble,\@ifpackageloaded} -\DoNotIndex{\@nobreaktrue,\@nobreakfalse,\@secondoftwo,\@tempa,\@tempdima} - -\DoNotIndex{\addpenalty,\addvspace,\advance,\afterassignment,\AfterEndEnvironment,\appto} - -\DoNotIndex{\baselineskip,\begin,\boolfalse,\begingroup,\box} -\DoNotIndex{\BeforeBeginEnvironment,\bfseries,\bgroup,\boxmaxdepth} - -\DoNotIndex{\color@endgroup,\color@setgroup,\columnwidth,\csdef,\c@mpfootnote,\csname} -\DoNotIndex{\clip,\color,\color@begingroup,\coordinate,\csappta,\csuse,\csxdef,\Currentoption} - -\DoNotIndex{\dimexpr,\DeclareBoolOption,\DeclareListParser,\def,\define@key,\dimen@,\dimen@i,\dp,\deflength} -\DoNotIndex{\DeclareDefaultOption,\defcounter,\DisableKeyvaloption} - -\DoNotIndex{\eject,\end,\endtrivlist,\edef,\else,\endcsname,\endinput,\expandafter,\endgroup\egroup,\enlargethispage} - -\DoNotIndex{\fwd@reserved@a,\fwd@reserveda,\fi,\fill,\forcsvlist} - -\DoNotIndex{\gdef} - -\DoNotIndex{\hbox,\height,\hrule,\hsize,\hspace,\ht,\hb@xt@,\hss} - -\DoNotIndex{\if@minipage,\if@twocolumn,\if@twoside,\ifbool,\ifdim,\ifdimequal} -\DoNotIndex{\ifdimgreater,\ifdimless,\iffwd@footnoteinside,\ifinner,\ifnum,\ifodd} -\DoNotIndex{\ifblank,\ifboolexpr,\ifcase,\ifcsundef,\IfFileExists,\ifnumequal,\ifstrequal} -\DoNotIndex{\iftoggle,\ifundef,\input,\kernel@ifnextchar,\ifvoid,\ifx,\item} - -\DoNotIndex{\kern} - -\DoNotIndex{\leftline,\let,\linewidth,\lrbox,\large,\letcs,\listadd,\llap,\lowercase} - -\DoNotIndex{\maxdimen,\medskipamount,\MessageBreak,\makebox} - -\DoNotIndex{\NeedsTeXFormat,\newcounter,\newlength,\newrobustcmd,\nobreak,\normalcolor,\number} -\DoNotIndex{\newbool,\newcommand,\newenvironment,\newtheorem,\newtoggle,\node,\noindent} -\DoNotIndex{\notblank,\notbool,\null,\newpsstyle} -\DoNotIndex{\next} - -\DoNotIndex{\or} - -\DoNotIndex{\p@,\PackageInfo,\PackageWarning,\pagegoal,\pagetotal,\partopsep,\patchcmd,\penalty} -\DoNotIndex{\ProcessKeyvalOptions,\ProvidesPackage,\providecommand,\path} -\DoNotIndex{\protected@edef,\ProvidesFile,\psframe,\psline,\psset,\pst@number,\psxunit} -\DoNotIndex{\par,\parfillskip,\parindent,\PassOptionsToPackage,\pgfmathsetlengthmacro} - -\DoNotIndex{\relax,\RequirePackage,\raggedright,\renewcommand,\rlap,\rput,\rule} +%table of contens anpassen: +\renewcommand\tableofcontents{% + \int_set_eq:NN \c@tocdepth \l_ltxmdf_tocdepth_int +%\int_use:N \l_ltxmdf_tocdepth_int +%\setcounter{tocdepth}{\l_ltxmdf_tocdepth_int}% + \begin{multicols}{2}[\centering\textbf{\sffamily\Large\contentsname}] + \@starttoc{toc} + \end{multicols} +} -\DoNotIndex{\setbox,\setkeys,\setlength,\SetupKeyvalOptions,\splitmaxdepth,\splittopskip,\stepcounter,\strutbox} -\DoNotIndex{\setbool,\settoggle,\space,\string} -\DoNotIndex{\textwidth,\the,\thempfn,\thempfootnote,\topsep,\trivlist,\tw@,\tikzset} +%Modifkation of code +\tl_gput_left:Nn \theCodelineNo { \color{gray} } +\dim_set:Nn \MacroTopsep { 10pt } +\tl_gput_right:Nn \MacroFont { \color{ltxmdfblue} } -\DoNotIndex{\unskip,\unvbox} -\DoNotIndex{\value,\vbox,\vfill,\vsize,\vskip,\vsplit} +%Anweisung zur Darstellung -\DoNotIndex{\width,\wd} +\NewDocumentCommand \Opt { m } + { + {\MacroFont #1}\xspace + } + +\NewDocumentCommand \Env { m } + { + {\MacroFont #1}\xspace + } + +\NewDocumentCommand \Cmd { m } + { + {\MacroFont\textbackslash #1}\xspace + } + +\NewDocumentCommand \Pack { m } + { + \texttt { #1 } \xspace + } + +\NewDocumentCommand \NOTE {} + { + \minisec{Note} + } + +\NewDocumentCommand \limitation { O{TikZ} } + { + \newline{\small~This~works~only~with~\Opt{framemethod=#1}.} + } + + +\NewDocumentCommand \ExplOpt { o m } + { + \par + \skip_vertical:n { .2\baselineskip } + \noindent + \hbox_to_wd:nn { \c_zero_dim } + { + \skip_horizontal:n { -2em } + \@bsphack + \MacroFont #2 + \SpecialOptIndex{#2} + \@esphack + } + \hfill\null + \IfNoValueF { #1 } + { + \hbox:n { \small default=\ttfamily #1 } + } + \par + \skip_vertical:n { .5ex } + \noindent\ignorespaces + } + +\NewDocumentCommand \ExplEnv { o m } + { + \par + \skip_vertical:n { .2\baselineskip } + \noindent + \hbox_to_wd:nn { \c_zero_dim } + { + \skip_horizontal:n { -2em } + \@bsphack + \MacroFont #2 + \SpecialEnvIndex{#2} + \@esphack + } + \hfill\null + \IfNoValueF { #1 } + { + \hbox:n { \small default=\ttfamily #1 } + } + \par + \skip_vertical:n { .5ex } + \noindent\ignorespaces + } + +\NewDocumentCommand \ExplCmd { o m } + { + \par + \skip_vertical:n { .2\baselineskip } + \noindent + \hbox_to_wd:nn { \c_zero_dim } + { + \skip_horizontal:n { -2em } + \@bsphack + \MacroFont\textbackslash #2 + \SpecialUsageIndex{#2} + \@esphack + } + \hfill\null + \IfNoValueF { #1 } + { + \hbox:n { \small default=\ttfamily #1 } + } + \par + \skip_vertical:n { .5ex } + \noindent\ignorespaces + } + + +\IndexPrologue{ + \section*{Index}% + \markboth{Index}{Index} + The~index~only~collect~package~relevant~words. +} -\DoNotIndex{\xifinlist} - -\DoNotIndex{\z@,\z@skip,\zref@addprop,\zref@extract,\zref@label,\zref@newprop,\zref@refused,\ZREF@mainlist} - -\IndexPrologue{\section*{Index}% - \markboth{Index}{Index}The index only collect package relevant words.} -%\DoNotIndex{\newrobustcmd,\DeclareBoolOption,\DeclareListParser,\deflength} -%\DoNotIndex{\z@,\@ne,\@M} -%\DoNotIndex{\define@key} -%\DoNotIndex{\@nil,\dimen@,\dimen@i} -%\DoNotIndex{\@mpfn,\@mpfootins,\@mpfootnotetext,\c@mpfootnote} -%\DoNotIndex{\advance,\begingroup,\ifx,\fi,\else,\@plus,\@height,\@width,\dp,\ht,\wd} -%\DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup,\csname,\endcsname,\endinput} -%\DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global} -%\DoNotIndex{\if,\ifnum,\ifdim,\ifcat,\ifmmode,\ifvmode,\ifhmode,% -% \iftrue,\iffalse,\ifvoid,\ifx,\ifeof,\ifcase,\else,\or,\fi} -%\DoNotIndex{\box,\copy,\setbox,\unvbox,\unhbox,\hbox,% -% \vbox,\vtop,\vcenter} -%\DoNotIndex{\@empty,\immediate,\write} -%\DoNotIndex{\egroup,\bgroup,\expandafter,\begingroup,\endgroup} -%\DoNotIndex{\divide,\advance,\multiply,\count,\dimen} -%\DoNotIndex{\relax,\space,\string} -%\DoNotIndex{\csname,\endcsname,\@spaces,\openin,\openout,% -% \closein,\closeout} -%\DoNotIndex{\catcode,\endinput} -%\DoNotIndex{\jobname,\message,\read,\the,\m@ne,\noexpand} -%\DoNotIndex{\hsize,\vsize,\hskip,\vskip,\kern,\hfil,\hfill,\hss} -%\DoNotIndex{\m@ne,\z@,\z@skip,\@ne,\tw@,\p@} -%\DoNotIndex{\dp,\wd,\ht,\vss,\unskip} +\ExplSyntaxOff +\lstMakeShortInline[basicstyle=\small\ttfamily\color{blue!60!black}]{|} \def\macro#1{% - \MakePrivateLetters + \MakePrivateLetters \topsep\MacroTopsep \trivlist \edef\saved@macroname{#1}% \def\makelabel##1{\makebox[0pt][l]{\kern-2em ##1}}% @@ -342,95 +398,100 @@ \ignorespaces} - -%Anweisung zur Darstellung -\newcommand*\Opt[1]{{\MacroFont #1}\xspace} -\newcommand*\Env[1]{{\MacroFont #1}\xspace} -\newcommand*\Cmd[1]{{\MacroFont\textbackslash #1}\xspace} -\newcommand*\Pack[1]{\texttt{#1}\xspace} - -\newcommand*\ExplCmd[2][]{% - \par\kern\baselineskip% - \noindent\makebox[0pt][l]{\kern-2em% - \@bsphack - \MacroFont\textbackslash #2% - \SpecialUsageIndex{#2}% - \@esphack - }% - \hfill\mbox{% - \ifx\relax#1\relax - \space - \else - {\small default=\ttfamily #1} - \fi - }% - \par\kern.5ex\noindent\ignorespaces - } -\newcommand*\ExplEnv[2][]{% - \par\kern\baselineskip% - \noindent\makebox[0pt][l]{\kern-2em% - \@bsphack - \MacroFont #2% - \SpecialEnvIndex{#2}% - \@esphack - }% - \hfill\mbox{% - \ifx\relax#1\relax - \space - \else - {\small default=\ttfamily #1} - \fi - }% - \par\kern.5ex\noindent\ignorespaces - } - \def\SpecialOptIndex#1{\@bsphack \index{#1\actualchar{\protect\ttfamily#1} (option)\encapchar usage}% \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar usage}\@esphack} -\newcommand*\ExplOpt[2][]{% - \par\kern\baselineskip% - \noindent\makebox[0pt][l]{\kern-2em% - \@bsphack - \MacroFont #2% - \SpecialOptIndex{#2}% - \@esphack - }% - \hfill\mbox{% - \ifx\relax#1\relax - \space - \else - {\small default=\ttfamily #1} - \fi - }% - \par\kern.5ex\noindent\ignorespaces - } - -% % \newcommand*\mdoption[1]{\textsf{\color{ltxmdfblue}#1}} -% % \newcommand*\mdname{\textsf{mdframed}\xspace} -% % \newcommand*\mdpack[1]{\texttt{#1}\xspace} -% % \newcommand*\mdsetting[1]{\textsf{#1}\xspace} -% % \newcommand*\mdcommand[1]{\texttt{\textbackslash #1}\xspace} -% % -% % \newcommand*\mdDescribeMacro[2][]{\par\kern\baselineskip% -% % \noindent\makebox[0pt][l]{\kern-2em% -% % \textsf{\bfseries\color{ltxmdfblue}#2}% -% % }\hfill\mbox{\mdDefault{#1}}\par\kern.5ex\noindent\ignorespaces} -% % \newcommand*{\mdDefault}[1]{% -% % \ifx\relax#1\relax\else{\small\mdsetting{default=#1}}\fi} -% % -% % \newcommand*\mdDescribeCmd[2][]{\par\kern\baselineskip% -% % \noindent\makebox[0pt][l]{\kern-2em% -% % \textsf{\bfseries\color{ltxmdfblue}\textbackslash #2}% -% % }{#1}\hfill\mbox{\mdDefault{#1}}\par\kern.5ex\noindent\ignorespaces} - - -\newcommand\NOTE{\minisec{Note}} - -\newcommand\limitation[1][TikZ]{\newline{\small This works only with \Opt{framemethod=#1}.}} - - +\ExplSyntaxOn + + + +%%NOT IN INDEX +%@ +\DoNotIndex{\@captype,\@endparenv,\@endparpenalty,\@endpetrue,\@floatpenalty, + \@footnotetext,\@ifnextchar,\@undefined,\@tempboxa,\@M,\@empty, + \@height,\@mpfn,\@mpfootins,\@mpfootnotetext,\@nil,\@plus,\@width, + \@afterheading,\@afterindentfalse,\@firstoftwo,\@gobble, + \@ifpackageloaded,\@nobreaktrue,\@nobreakfalse,\@secondoftwo, + \@tempa,\@tempdima} +%A +\DoNotIndex{\addpenalty,\addvspace,\advance,\afterassignment, + \AfterEndEnvironment,\appto} +%B +\DoNotIndex{\baselineskip,\begin,\boolfalse,\begingroup,\box, + \BeforeBeginEnvironment,\bfseries,\bgroup,\boxmaxdepth} +%C +\DoNotIndex{\color@endgroup,\color@setgroup,\columnwidth,\csdef,\c@mpfootnote, + \csname,\clip,\color,\color@begingroup,\coordinate,\csappta,\csuse, + \csxdef,\Currentoption} +%D +\DoNotIndex{\dimexpr,\DeclareBoolOption,\DeclareListParser,\def,\define@key, + \dimen@,\dimen@i,\dp,\deflength,\DeclareDefaultOption,\defcounter, + \DisableKeyvaloption} +%E +\DoNotIndex{\eject,\end,\endtrivlist,\edef,\endcsname,\endinput + \expandafter,\endgroup,\egroup,\enlargethispage} +%F +\DoNotIndex{\fwd@reserved@a,\fwd@reserveda,\fill,\forcsvlist} +%G +\DoNotIndex{\gdef} +%H +\DoNotIndex{\hbox,\height,\hrule,\hsize,\hspace,\ht,\hb@xt@,\hss} +%I +\DoNotIndex{\if@minipage,\if@twocolumn,\if@twoside,\ifbool,\ifdim,\ifdimequal, + \ifdimgreater,\ifdimless,\iffwd@footnoteinside,\ifinner,\ifnum, + \ifodd,\ifblank,\ifboolexpr,\ifcase,\ifcsundef,\IfFileExists, + \ifnumequal,\ifstrequal,\iftoggle,\ifundef,\input, + \kernel@ifnextchar,\ifvoid,\ifx,\item} +%J +\DoNotIndex{} +%K +\DoNotIndex{\kern} +%L +\DoNotIndex{\leftline,\let,\linewidth,\lrbox,\large,\letcs,\listadd,\llap, + \lowercase} +%M +\DoNotIndex{\maxdimen,\medskipamount,\MessageBreak,\makebox} +%N +\DoNotIndex{\NeedsTeXFormat,\newcounter,\newlength,\newrobustcmd,\nobreak, + \normalcolor,\number,\newbool,\newcommand,\newenvironment, + \newtheorem,\newtoggle,\node,\noindent,\notblank,\notbool,\null, + \newpsstyle,\next} +%O +\DoNotIndex{\or} +%P +\DoNotIndex{\p@,\PackageInfo,\PackageWarning,\pagegoal,\pagetotal,\partopsep, + \patchcmd,\penalty,\ProcessKeyvalOptions,\ProvidesPackage, + \providecommand,\path,\protected@edef,\ProvidesFile,\psframe, + \psline,\psset,\pst@number,\psxunit,\par,\parfillskip,\parindent, + \PassOptionsToPackage,\pgfmathsetlengthmacro} +%Q +\DoNotIndex{} +%R +\DoNotIndex{\relax,\RequirePackage,\raggedright,\renewcommand,\rlap,\rput,\rule} +%S +\DoNotIndex{\setbox,\setkeys,\setlength,\SetupKeyvalOptions,\splitmaxdepth, + \splittopskip,\stepcounter,\strutbox,\setbool,\settoggle,\space, + \string} +%T +\DoNotIndex{\textwidth,\the,\thempfn,\thempfootnote,\topsep,\trivlist,\tw@, + \tikzset} +%U +\DoNotIndex{\unskip,\unvbox} +%V +\DoNotIndex{\value,\vbox,\vfill,\vsize,\vskip,\vsplit,\vspace,\version} +%W +\DoNotIndex{\width,\wd} +%X +\DoNotIndex{\xifinlist,\xdef,\x} +%Y +\DoNotIndex{\y} +%Z +\DoNotIndex{\z@,\z@skip,\zref@addprop,\zref@extract,\zref@label,\zref@newprop, + \zref@refused,\ZREF@mainlist} +%%%% +\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 d3d6da57411..9173d48a003 100644 --- a/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf @@ -5,11 +5,11 @@ %% Either version 1.0 or, at your option, any later version. %% %% -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \def\mdframedOpackagename{md-frame-0} \def\mdf@frameOdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{md-frame-0.mdf}% - [\mdf@frameOdate@svn$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $% + [\mdf@frameOdate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $% \mdversion: \mdframedOpackagename] \def\mdf@background@default{\color{\mdf@backgroundcolor}} \def\mdf@frametitlebackground@default{\color{\mdf@frametitlebackgroundcolor}} @@ -21,7 +21,7 @@ \let\mdf@linecolor@default\mdf@middlelinecolor@default \def\mdf@@frametitlerule{% \ifbool{mdf@frametitlerule}{% - \vbox to \mdf@frametitlerulewidth@length {\hsize\mdfframetitleboxwidth% + \vbox{\hsize\mdfframetitleboxwidth% \par\unskip\vskip\mdf@frametitlebelowskip@length% \rlap{\noindent\hspace*{-\mdf@innerleftmargin@length}% \mdf@frametitlerulecolor@default% @@ -29,450 +29,922 @@ +\mdf@innerleftmargin@length +\mdf@innerrightmargin@length\relax }{\mdf@frametitlerulewidth@length}% - }}% - }{} - \par\unskip\vskip\mdf@innertopmargin@length% + }\hrule \@height\z@ \@width\hsize}% + }{% + \vbox{\hsize\mdfframetitleboxwidth% + \par\unskip\vskip\mdf@frametitlebelowskip@length% + \rlap{\noindent\hspace*{-\mdf@innerleftmargin@length}% + \mdf@frametitlerulecolor@default% + \rule{\dimexpr\mdfframetitleboxwidth% + +\mdf@innerleftmargin@length + +\mdf@innerrightmargin@length\relax + }{\z@}% + }\hrule \@height\z@ \@width\hsize}% + }% + \iftoggle{mdf@notfirstframetitle}% + {% + \par\unskip\vskip\mdf@splittopskip@length% + }% + {% + \par\unskip\vskip\mdf@innertopmargin@length% + }% }% +\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 +} + +\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@frame@background@single{% - \ifbool{mdf@shadow}{% - \rlap{\smash{\mdf@shadow@default% - \rule[\dimexpr-\mdfboundingboxdepth - -\mdf@shadowsize@length - \ifbool{mdf@bottomline}{-\mdf@middlelinewidth@length}{}\relax]% - {\dimexpr\mdfboundingboxtotalwidth - +\mdf@shadowsize@length - \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}\relax}% - {\dimexpr\mdfboundingboxtotalheight - +\mdf@shadowsize@length - \ifbool{mdf@bottomline}{+\mdf@middlelinewidth@length}{}\relax}% - }% - }}{}% - \rlap{\mdf@background@default% - \rule[-\mdfboundingboxdepth]% - {\mdfboundingboxtotalwidth}% - {\mdfboundingboxtotalheight}% + \ifbool{mdf@shadow}% + {% + \rlap% + {% + \smash% + {% + \mdf@shadow@default% + \rule[\dimexpr + -\mdfboundingboxdepth + -\mdf@shadowsize@length + \ifbool{mdf@bottomline}{-\mdf@middlelinewidth@length}{} + \relax]% + {\dimexpr + \mdfboundingboxtotalwidth + +\mdf@shadowsize@length + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{} + \relax}% + {\dimexpr + \mdfboundingboxtotalheight + +\mdf@shadowsize@length + \ifbool{mdf@bottomline}{+\mdf@middlelinewidth@length}{} + \relax}% + }% }% + }{}% + \rlap% + {% + \mdf@background@default% + \rule[-\mdfboundingboxdepth]% + {\mdfboundingboxtotalwidth}% + {\mdfboundingboxtotalheight}% + }% }% \def\mdf@frame@frametitlebackground@single{% - \rlap{\mdf@frametitlebackground@default% - \rule[\dimexpr-\mdfboundingboxdepth+\mdfboundingboxtotalheight-\mdfframetitleboxtotalheight\relax]% - {\mdfboundingboxtotalwidth}% - {\mdfframetitleboxtotalheight}% + \rlap% + {% + \mdf@frametitlebackground@default% + \rule[\dimexpr + -\mdfboundingboxdepth + +\mdfboundingboxtotalheight + -\mdfframetitleboxtotalheight + \relax]% + {\mdfboundingboxtotalwidth}% + {\mdfframetitleboxtotalheight}% }% }% - \def\mdf@frame@topline@single{% - \rlap{\mdf@linecolor@default% - \ifbool{mdf@topline}{% - \rule[\dimexpr\mdfboundingboxheight-\mdfboundingboxdepth% - +\mdf@innerbottommargin@length+\mdf@innertopmargin@length\relax]% - {\mdfboundingboxtotalwidth}% - {\mdf@middlelinewidth@length}}% - {}% - }% + \rlap% + {% + \mdf@linecolor@default% + \ifbool{mdf@topline}% + {% + \rule[\dimexpr + \mdfboundingboxheight + -\mdfboundingboxdepth% + +\mdf@innerbottommargin@length + +\mdf@innertopmargin@length + \relax]% + {\mdfboundingboxtotalwidth}% + {\mdf@middlelinewidth@length}% + }{}% + }% }% \def\mdf@frame@bottomline@single{% - \rlap{\ifbool{mdf@leftline}{\hspace*{-\mdf@middlelinewidth@length}}{}\mdf@linecolor@default% - \ifbool{mdf@bottomline}{% - \rule[\dimexpr-\mdfboundingboxdepth-\mdf@middlelinewidth@length\relax]% - {\dimexpr\mdfboundingboxtotalwidth - \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% - \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{}\relax}% - {\mdf@middlelinewidth@length}}% - {}% - }% + \rlap% + {% + \ifbool{mdf@leftline}% + {% + \hspace*{-\mdf@middlelinewidth@length}% + }{}% + \mdf@linecolor@default% + \ifbool{mdf@bottomline}% + {% + \rule[\dimexpr + -\mdfboundingboxdepth + -\mdf@middlelinewidth@length + \relax]% + {\dimexpr + \mdfboundingboxtotalwidth + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% + \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{}% + \relax}% + {\mdf@middlelinewidth@length}% + }{}% + }% }% \def\mdf@frame@leftline@single{% - \llap{\mdf@linecolor@default% - \rule[-\mdfboundingboxdepth]% - {\mdf@middlelinewidth@length}% - {\dimexpr\mdfboundingboxtotalheight% - \ifbool{mdf@topline}{+\mdf@middlelinewidth@length}{}\relax}% - }% + \llap% + {% + \mdf@linecolor@default% + \rule[-\mdfboundingboxdepth]% + {\mdf@middlelinewidth@length}% + {\dimexpr + \mdfboundingboxtotalheight% + \ifbool{mdf@topline}{+\mdf@middlelinewidth@length}{}% + \relax}% + }% }% \def\mdf@frame@rightline@single{% - \rlap{\mdf@linecolor@default% - \hspace*{\mdfboundingboxwidth}% - \hspace*{\mdf@innerrightmargin@length}% - \rule[\dimexpr-\mdfboundingboxdepth% - \relax]% - {\mdf@middlelinewidth@length}% - {\dimexpr\mdfboundingboxtotalheight% - +\ifbool{mdf@topline}{\mdf@middlelinewidth@length}{0pt}\relax}% - }% + \rlap% + {% + \mdf@linecolor@default% + \hspace*{\mdfboundingboxwidth}% + \hspace*{\mdf@innerrightmargin@length}% + \rule[\dimexpr + -\mdfboundingboxdepth% + \relax]% + {\mdf@middlelinewidth@length}% + {\dimexpr + \mdfboundingboxtotalheight% + \ifbool{mdf@topline}{+\mdf@middlelinewidth@length}{}% + \relax}% + }% }% -\def\mdf@putbox@single{%%%%% Ausgabe der ungesplitteten Gesamtbox - \ifvoid\mdf@splitbox@one +\def\mdf@putbox@single{% + \ifvoid\mdf@splitbox@one\relax \else% - \mdf@makebox@out{% + \mdf@makebox@out% + {% \mdf@makeboxalign@left% \setlength{\mdfboundingboxwidth}% - {\wd\mdf@splitbox@one}% + {\wd\mdf@splitbox@one}% \setlength{\mdfboundingboxtotalwidth}% - {\dimexpr\mdfboundingboxwidth+\mdf@innerleftmargin@length% - +\mdf@innerrightmargin@length\relax}% + {\dimexpr + \mdfboundingboxwidth + +\mdf@innerleftmargin@length% + +\mdf@innerrightmargin@length + \relax}% \setlength{\mdfboundingboxheight}% - {\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% + {\dimexpr + \ht\mdf@splitbox@one + +\dp\mdf@splitbox@one + \relax}% \setlength{\mdfboundingboxdepth}% - {\dimexpr\dp\mdf@splitbox@one+\mdf@innerbottommargin@length\relax}% + {\dimexpr + \dp\mdf@splitbox@one + +\mdf@innerbottommargin@length + \relax}% \setlength{\mdfboundingboxtotalheight}% - {\dimexpr\mdfboundingboxheight+\mdf@innertopmargin@length% - +\mdf@innerbottommargin@length\relax}% - \setlength{\mdftotallinewidth}{% - \dimexpr\mdf@innerlinewidth@length+\mdf@middlelinewidth@length% - +\mdf@outerlinewidth@length}% + {\dimexpr + \mdfboundingboxheight + +\mdf@innertopmargin@length% + +\mdf@innerbottommargin@length + \relax}% + \setlength{\mdftotallinewidth}% + {\dimexpr + \mdf@innerlinewidth@length + +\mdf@middlelinewidth@length% + +\mdf@outerlinewidth@length + \relax}% \noindent% - \setlength{\@tempdima}{\dimexpr\mdfboundingboxtotalwidth% - +\ifbool{mdf@leftline}% - {\mdf@middlelinewidth@length}{\z@}% - +\ifbool{mdf@rightline}% - {\mdf@middlelinewidth@length}{\z@}\relax}% - \mdf@makebox@in[\@tempdima]{% + \setlength{\@tempdima}% + {\dimexpr + \mdfboundingboxtotalwidth% + \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{}% + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{} + \relax}% + \mdf@makebox@in[\@tempdima]% + {% \null% - \ifbool{mdf@leftline}{% + \ifbool{mdf@leftline}% + {% \hspace*{\mdftotallinewidth}% \mdf@frame@leftline@single% - }{}% + }{}% \mdf@frame@topline@single% \mdf@frame@background@single% \mdf@frame@bottomline@single% \ifdefempty{\mdf@frametitle}{}{\mdf@frame@frametitlebackground@single}% \hspace*{\mdf@innerleftmargin@length}% - \ifbool{mdf@rightline}{% + \ifbool{mdf@rightline}% + {% \mdf@frame@rightline@single% - }{}% + }{}% {\box\mdf@splitbox@one}% - }% - \mdf@makeboxalign@right% - }% + }% + \mdf@makeboxalign@right% + }% \fi% } \def\mdf@frame@background@first{% - \ifbool{mdf@shadow}{% - \rlap{\smash{\mdf@shadow@default% - \rule[\dimexpr-\mdfboundingboxdepth - -\mdf@shadowsize@length\relax]% - {\dimexpr\mdfboundingboxtotalwidth - +\mdf@shadowsize@length - \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}\relax}% - {\dimexpr\mdfboundingboxtotalheight - +\mdf@shadowsize@length\relax}% + \ifbool{mdf@shadow}% + {% + \rlap% + {% + \smash% + {% + \mdf@shadow@default% + \rule[\dimexpr + -\mdfboundingboxdepth + -\mdf@shadowsize@length + \relax]% + {\dimexpr + \mdfboundingboxtotalwidth + +\mdf@shadowsize@length + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{} + \relax}% + {\dimexpr + \mdfboundingboxtotalheight + +\mdf@shadowsize@length + \relax}% + }% }% - }}{}% - \rlap{\mdf@background@default% - \rule[-\mdfboundingboxdepth]% - {\mdfboundingboxtotalwidth}% - {\mdfboundingboxtotalheight}% - }% + }{}% + \rlap% + {% + \mdf@background@default% + \rule[-\mdfboundingboxdepth]% + {\mdfboundingboxtotalwidth}% + {\mdfboundingboxtotalheight}% + }% }% \def\mdf@frame@frametitlebackground@first{% - \ifdimless{\mdfframetitleboxtotalheight}{\mdfboundingboxtotalheight}% - {% - \rlap{\mdf@frametitlebackground@default% - \rule[\dimexpr-\mdfboundingboxdepth+\mdfboundingboxtotalheight-\mdfframetitleboxtotalheight\relax]% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \rlap% + {% + \mdf@frametitlebackground@default% + \rule[\dimexpr + -\mdfboundingboxdepth + +\mdfboundingboxtotalheight + -\mdfframetitleboxtotalheight + \relax]% {\mdfboundingboxtotalwidth}% {\mdfframetitleboxtotalheight}% - }% - \global\mdfframetitleboxtotalheight=-\p@\relax% - }{\mdf@PackageWarning{You got a page break inside the frame title\MessageBreak - Current this isn't well supported}% - \rlap{\mdf@frametitlebackground@default% + }% + }% + {%repeating title = false -- maybe splitted + \ifdimless{\mdfframetitleboxtotalheight}{\mdfboundingboxtotalheight}% + {% + \rlap% + {% + \mdf@frametitlebackground@default% + \rule[\dimexpr + -\mdfboundingboxdepth + +\mdfboundingboxtotalheight + -\mdfframetitleboxtotalheight + \relax]% + {\mdfboundingboxtotalwidth}% + {\mdfframetitleboxtotalheight}% + }% + \global\mdfframetitleboxtotalheight=-\p@\relax% + }% + {% + \mdf@PackageWarning{You got a page break inside the title\MessageBreak + Current this isn't well supported}% + \rlap% + {% + \mdf@frametitlebackground@default% \rule[-\mdfboundingboxdepth]% {\mdfboundingboxtotalwidth}% {\mdfboundingboxtotalheight}% - }% - \global\mdfframetitleboxtotalheight=\dimexpr\mdfframetitleboxtotalheight - -\mdfboundingboxheight - +\mdf@frametitlebelowskip@length - +.5\baselineskip-1pt - \relax% + }% + \global\mdfframetitleboxtotalheight=% + \dimexpr% + \mdfframetitleboxtotalheight + -\mdfboundingboxheight + +\mdf@frametitlebelowskip@length + +.5\baselineskip-1pt + \relax% + }% }% }% \def\mdf@frame@leftline@first{% - \llap{\mdf@linecolor@default% - \rule[-\mdfboundingboxdepth]% - {\mdf@middlelinewidth@length}% - {\dimexpr\mdfboundingboxtotalheight% - +\ifbool{mdf@topline}{\mdf@middlelinewidth@length}{0pt}\relax}% - }% + \llap% + {% + \mdf@linecolor@default% + \rule[-\mdfboundingboxdepth]% + {\mdf@middlelinewidth@length}% + {\dimexpr + \mdfboundingboxtotalheight% + \ifbool{mdf@topline}{+\mdf@middlelinewidth@length}{} + \relax}% + }% }% \def\mdf@frame@topline@first{% - \rlap{\mdf@linecolor@default% - \rule[\dimexpr\mdfboundingboxheight-\mdfboundingboxdepth+% - \mdf@splitbottomskip@length+\mdf@innertopmargin@length\relax]% - {\mdfboundingboxtotalwidth}% - {\mdf@middlelinewidth@length}% - }% + \rlap% + {% + \mdf@linecolor@default% + \rule[\dimexpr + \mdfboundingboxheight + -\mdfboundingboxdepth + +\mdf@splitbottomskip@length + +\mdf@innertopmargin@length + \relax]% + {\mdfboundingboxtotalwidth}% + {\mdf@middlelinewidth@length}% + }% } \def\mdf@frame@rightline@first{% - \rlap{\mdf@linecolor@default\hspace*{\mdfboundingboxwidth}% - \hspace*{\mdf@innerrightmargin@length}% - \rule[-\mdfboundingboxdepth]% - {\mdf@middlelinewidth@length}% - {\dimexpr\mdfboundingboxtotalheight% - +\ifbool{mdf@topline}{\mdf@middlelinewidth@length}{0pt}\relax}% - }% + \rlap% + {% + \mdf@linecolor@default% + \hspace*{\mdfboundingboxwidth}% + \hspace*{\mdf@innerrightmargin@length}% + \rule[-\mdfboundingboxdepth]% + {\mdf@middlelinewidth@length}% + {\dimexpr + \mdfboundingboxtotalheight% + \ifbool{mdf@topline}{+\mdf@middlelinewidth@length}{} + \relax}% + }% }% \def\mdf@frame@bottomline@first{% - \rlap{\ifbool{mdf@leftline}{\hspace*{-\mdf@middlelinewidth@length}}{}\mdf@linecolor@default% - \ifbool{mdf@bottomline}{% - \rule[\dimexpr-\mdfboundingboxdepth-\mdf@middlelinewidth@length\relax]% - {\dimexpr\mdfboundingboxtotalwidth - \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% - \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{}\relax}% - {\mdf@middlelinewidth@length}}% - {}% - }% + \rlap% + {% + \ifbool{mdf@leftline}% + {% + \hspace*{-\mdf@middlelinewidth@length}% + }{}% + \mdf@linecolor@default% + \ifbool{mdf@bottomline}% + {% + \rule[\dimexpr + -\mdfboundingboxdepth + -\mdf@middlelinewidth@length + \relax]% + {\dimexpr + \mdfboundingboxtotalwidth + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% + \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{} + \relax}% + {\mdf@middlelinewidth@length}% + }{}% + }% }% -\def\mdf@putbox@first{%%%% Ausgabe der Teilbox 1 - \ifvoid\mdf@splitbox@two +\def\mdf@putbox@first{% + \ifvoid\mdf@splitbox@two\relax \else% - \mdf@makebox@out[\linewidth]{% + \mdf@makebox@out[\linewidth]% + {% \mdf@makeboxalign@left% - \setlength{\mdfboundingboxwidth}{\wd\mdf@splitbox@two}% + \setlength{\mdfboundingboxwidth} + {\wd\mdf@splitbox@two}% \setlength{\mdfboundingboxtotalwidth}% - {\dimexpr\mdfboundingboxwidth+\mdf@innerleftmargin@length% - +\mdf@innerrightmargin@length\relax}% - \setlength{\mdfboundingboxheight}{\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}% + {\dimexpr + \mdfboundingboxwidth + +\mdf@innerleftmargin@length% + +\mdf@innerrightmargin@length + \relax}% + \setlength{\mdfboundingboxheight} + {\dimexpr + \ht\mdf@splitbox@two + +\dp\mdf@splitbox@two + \relax}% \setlength{\mdfboundingboxdepth}% - {\dimexpr\dp\mdf@splitbox@two+\mdf@splitbottomskip@length\relax}% + {\dimexpr + \dp\mdf@splitbox@two + +\mdf@splitbottomskip@length + \relax}% \setlength{\mdfboundingboxtotalheight}% - {\dimexpr\mdfboundingboxheight+\mdf@innertopmargin@length% - +\mdf@splitbottomskip@length\relax}% + {\dimexpr + \mdfboundingboxheight + +\mdf@innertopmargin@length% + +\mdf@splitbottomskip@length + \relax}% \setlength{\@tempdima}% - {\dimexpr\mdfboundingboxtotalwidth% - +\ifbool{mdf@leftline}{\mdf@middlelinewidth@length}{\z@}% - +\ifbool{mdf@rightline}{\mdf@middlelinewidth@length}{\z@}% - \relax}% - \mdf@makebox@in[\@tempdima]{% - \null% - \ifbool{mdf@leftline}{% - \hspace*{\mdf@middlelinewidth@length}% - \mdf@frame@leftline@first}{}% - \ifbool{mdf@everyline}% - {\mdf@frame@bottomline@first}{}% - \ifbool{mdf@topline}{% - \mdf@frame@topline@first}{}% - \mdf@frame@background@first% - \ifdefempty{\mdf@frametitle}{}{\mdf@frame@frametitlebackground@first}% - \hspace*{\mdf@innerleftmargin@length}% - \ifbool{mdf@rightline}{% - \mdf@frame@rightline@first}{}% - {\box\mdf@splitbox@two}% - }% - \mdf@makeboxalign@right% - }% + {\dimexpr + \mdfboundingboxtotalwidth% + \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{}% + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% + \relax}% + \mdf@makebox@in[\@tempdima]% + {% + \null% + \ifbool{mdf@leftline}% + {% + \hspace*{\mdf@middlelinewidth@length}% + \mdf@frame@leftline@first% + }{}% + \ifbool{mdf@everyline}% + {% + \mdf@frame@bottomline@first% + }{}% + \ifbool{mdf@topline}% + {% + \mdf@frame@topline@first% + }{}% + \mdf@frame@background@first% + \ifdefempty{\mdf@frametitle}{}{\mdf@frame@frametitlebackground@first}% + \hspace*{\mdf@innerleftmargin@length}% + \ifbool{mdf@rightline}% + {% + \mdf@frame@rightline@first% + }{}% + {\box\mdf@splitbox@two}% + }% + \mdf@makeboxalign@right% + }% \fi% } \def\mdf@frame@background@second{% - \ifbool{mdf@shadow}{% - \rlap{\smash{\mdf@shadow@default% - \rule[\dimexpr-\mdfboundingboxdepth - -\mdf@shadowsize@length - \ifbool{mdf@bottomline}{-\mdf@middlelinewidth@length}{}\relax]% - {\dimexpr\mdfboundingboxtotalwidth - +\mdf@shadowsize@length - \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}\relax}% - {\dimexpr\mdfboundingboxtotalheight - +\mdf@shadowsize@length\relax}% - }% - }}{}% - \rlap{\mdf@background@default% - \rule[-\mdfboundingboxdepth]% - {\mdfboundingboxtotalwidth}% - {\mdfboundingboxtotalheight}% - }% + \ifbool{mdf@shadow}% + {% + \rlap% + {% + \smash% + {% + \mdf@shadow@default% + \rule[\dimexpr + -\mdfboundingboxdepth + -\mdf@shadowsize@length + \ifbool{mdf@bottomline}{-\mdf@middlelinewidth@length}{} + \relax]% + {\dimexpr + \mdfboundingboxtotalwidth + +\mdf@shadowsize@length + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{} + \relax}% + {\dimexpr + \mdfboundingboxtotalheight + +\mdf@shadowsize@length + \relax}% + }% + }% + }{}% + \rlap% + {% + \mdf@background@default% + \rule[-\mdfboundingboxdepth]% + {\mdfboundingboxtotalwidth}% + {\mdfboundingboxtotalheight}% + }% }% \def\mdf@frame@frametitlebackground@second{% - \ifdimless{\mdfframetitleboxtotalheight}{\z@}% - {}% - {\rlap{\mdf@frametitlebackground@default% - \rule[\dimexpr-\mdfboundingboxdepth+\mdfboundingboxtotalheight-\mdfframetitleboxtotalheight\relax]% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \rlap% + {% + \mdf@frametitlebackground@default% + \rule[\dimexpr + -\mdfboundingboxdepth + +\mdfboundingboxtotalheight + -\mdfframetitleboxtotalheight + \relax]% {\mdfboundingboxtotalwidth}% {\mdfframetitleboxtotalheight}% }% }% + {%repeating title = false -- maybe splitted + \ifdimless{\mdfframetitleboxtotalheight}{\z@}% + {}% + {% + \rlap% + {% + \mdf@frametitlebackground@default% + \rule[\dimexpr + -\mdfboundingboxdepth + +\mdfboundingboxtotalheight + -\mdfframetitleboxtotalheight + \relax]% + {\mdfboundingboxtotalwidth}% + {\mdfframetitleboxtotalheight}% + }% + }% + }% }% \def\mdf@frame@leftline@second{% - \llap{\mdf@linecolor@default% - \rule[-\mdfboundingboxdepth]% - {\mdf@middlelinewidth@length}% - {\dimexpr\mdfboundingboxtotalheight}% - }% + \llap% + {% + \mdf@linecolor@default% + \rule[-\mdfboundingboxdepth]% + {\mdf@middlelinewidth@length}% + {\dimexpr\mdfboundingboxtotalheight}% + }% }% \def\mdf@frame@bottomline@second{% - \rlap{\ifbool{mdf@leftline}{\hspace*{-\mdf@middlelinewidth@length}}{}\mdf@linecolor@default% - \rule[\dimexpr-\mdfboundingboxdepth-\mdf@middlelinewidth@length\relax]% - {\dimexpr\mdfboundingboxtotalwidth - \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{} - \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{}\relax}% - {\mdf@middlelinewidth@length}% - }% + \rlap% + {% + \ifbool{mdf@leftline}% + {% + \hspace*{-\mdf@middlelinewidth@length}% + }{}% + \mdf@linecolor@default% + \rule[\dimexpr + -\mdfboundingboxdepth + -\mdf@middlelinewidth@length + \relax]% + {\dimexpr + \mdfboundingboxtotalwidth + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{} + \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{} + \relax}% + {\mdf@middlelinewidth@length}% + }% }% \def\mdf@frame@rightline@second{% - \rlap{\mdf@linecolor@default\hspace*{\mdfboundingboxwidth}% - \hspace*{\mdf@innerrightmargin@length}% - \rule[-\mdfboundingboxdepth]% - {\mdf@middlelinewidth@length}% - {\mdfboundingboxtotalheight}% - }% + \rlap% + {% + \mdf@linecolor@default\hspace*{\mdfboundingboxwidth}% + \hspace*{\mdf@innerrightmargin@length}% + \rule[-\mdfboundingboxdepth]% + {\mdf@middlelinewidth@length}% + {\mdfboundingboxtotalheight}% + }% }% \def\mdf@frame@topline@second{% - \rlap{\ifbool{mdf@leftline}{\hspace*{-\mdf@middlelinewidth@length}}{}\mdf@linecolor@default% - \ifbool{mdf@topline}{% - \rule[\dimexpr\mdfboundingboxheight-\mdfboundingboxdepth% - +\mdf@innerbottommargin@length\relax]% - {\dimexpr\mdfboundingboxtotalwidth - \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% - \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{}\relax - }% - {\mdf@middlelinewidth@length}}% - {}% - }% + \rlap% + {% + \ifbool{mdf@leftline}% + {% + \hspace*{-\mdf@middlelinewidth@length}% + }{}% + \mdf@linecolor@default% + \ifbool{mdf@topline}% + {% + \rule[\dimexpr + \mdfboundingboxheight + -\mdfboundingboxdepth% + +\mdf@innerbottommargin@length + \relax]% + {\dimexpr + \mdfboundingboxtotalwidth + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% + \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{} + \relax}% + {\mdf@middlelinewidth@length}% + }{}% + }% }% \def\mdf@putbox@second{% - \ifvoid\mdf@splitbox@one% + \ifvoid\mdf@splitbox@one\relax% \else - \mdf@makebox@out{% + \mdf@makebox@out% + {% \mdf@makeboxalign@left% - \setlength{\mdfboundingboxwidth}{\wd\mdf@splitbox@one}% + \setlength{\mdfboundingboxwidth}% + {\wd\mdf@splitbox@one}% \setlength{\mdfboundingboxtotalwidth}% - {\dimexpr\mdfboundingboxwidth+\mdf@innerleftmargin@length% - +\mdf@innerrightmargin@length\relax}% - \setlength{\mdfboundingboxheight}{\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% + {\dimexpr + \mdfboundingboxwidth + +\mdf@innerleftmargin@length% + +\mdf@innerrightmargin@length + \relax}% + \setlength{\mdfboundingboxheight}% + {\dimexpr + \ht\mdf@splitbox@one + +\dp\mdf@splitbox@one + \relax}% \setlength{\mdfboundingboxdepth}% - {\dimexpr\dp\mdf@splitbox@one+\mdf@innerbottommargin@length\relax}% + {\dimexpr + \dp\mdf@splitbox@one + +\mdf@innerbottommargin@length + \relax}% \setlength{\mdfboundingboxtotalheight}% - {\dimexpr\mdfboundingboxheight+\mdf@innerbottommargin@length\relax}% - \setlength{\@tempdima}{\dimexpr\mdfboundingboxtotalwidth% - +\ifbool{mdf@leftline}{\mdf@middlelinewidth@length}{\z@}% - +\ifbool{mdf@rightline}{\mdf@middlelinewidth@length}{\z@}% - \relax}% - \mdf@makebox@in[\@tempdima]{% - \null% - \ifbool{mdf@leftline}{% + {\dimexpr + \mdfboundingboxheight + +\mdf@innerbottommargin@length + \relax}% + \setlength{\@tempdima}% + {\dimexpr + \mdfboundingboxtotalwidth% + \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{}% + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% + \relax}% + \mdf@makebox@in[\@tempdima]% + {% + \null% + \ifbool{mdf@leftline}% + {% \hspace*{\mdf@middlelinewidth@length}% - \mdf@frame@leftline@second}{}% + \mdf@frame@leftline@second% + }{}% \ifbool{mdf@everyline}% - {\mdf@frame@topline@second}{}% + {% + \mdf@frame@topline@second + }{}% \mdf@frame@background@second% - \ifbool{mdf@bottomline}{% - \mdf@frame@bottomline@second}{}% + \ifbool{mdf@bottomline}% + {% + \mdf@frame@bottomline@second% + }{}% \ifdefempty{\mdf@frametitle}{}{\mdf@frame@frametitlebackground@second}% \hspace*{\mdf@innerleftmargin@length}% - \ifbool{mdf@rightline}{% - \mdf@frame@rightline@second}{}% + \ifbool{mdf@rightline}% + {% + \mdf@frame@rightline@second% + }{}% {\box\mdf@splitbox@one}% - }% - \mdf@makeboxalign@right% - }% + }% + \mdf@makeboxalign@right% + }% \fi% }% \def\mdf@frame@leftline@middle{% - \llap{\mdf@linecolor@default% - \rule[-\mdfboundingboxdepth]% - {\mdf@middlelinewidth@length}% - {\mdfboundingboxtotalheight}% + \llap% + {% + \mdf@linecolor@default% + \rule[-\mdfboundingboxdepth]% + {\mdf@middlelinewidth@length}% + {\mdfboundingboxtotalheight}% }% }% \def\mdf@frame@background@middle{% - \ifbool{mdf@shadow}{% - \rlap{\smash{\mdf@shadow@default% - \rule[\dimexpr-\mdfboundingboxdepth - -\mdf@shadowsize@length\relax]% - {\dimexpr\mdfboundingboxtotalwidth - +\mdf@shadowsize@length - \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}\relax}% - {\dimexpr\mdfboundingboxtotalheight\relax}% - }% - }}{}% - \rlap{\mdf@background@default% - \rule[-\mdfboundingboxdepth]% - {\mdfboundingboxtotalwidth}% - {\mdfboundingboxtotalheight}% - }% + \ifbool{mdf@shadow}% + {% + \rlap% + {% + \smash% + {% + \mdf@shadow@default% + \rule[\dimexpr + -\mdfboundingboxdepth + -\mdf@shadowsize@length + \relax]% + {\dimexpr + \mdfboundingboxtotalwidth + +\mdf@shadowsize@length + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{} + \relax}% + {\mdfboundingboxtotalheight}% + }% + }% + }{}% + \rlap% + {% + \mdf@background@default% + \rule[-\mdfboundingboxdepth]% + {\mdfboundingboxtotalwidth}% + {\mdfboundingboxtotalheight}% + }% }% \def\mdf@frame@frametitlebackground@middle{% - \ifdimless{\mdfframetitleboxtotalheight}{\z@}% - {}% - {\rlap{\mdf@frametitlebackground@default% - \rule[\dimexpr-\mdfboundingboxdepth+\mdfboundingboxtotalheight-\mdfframetitleboxtotalheight\relax]% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \rlap% + {% + \mdf@frametitlebackground@default% + \rule[\dimexpr + -\mdfboundingboxdepth + +\mdfboundingboxtotalheight + -\mdfframetitleboxtotalheight + \relax]% {\mdfboundingboxtotalwidth}% {\mdfframetitleboxtotalheight}% }% - \global\mdfframetitleboxtotalheight=-\p@\relax% }% + {%repeating title = false -- maybe splitted + \ifdimless{\mdfframetitleboxtotalheight}{\z@}% + {}% + {% + \rlap% + {% + \mdf@frametitlebackground@default% + \rule[\dimexpr + -\mdfboundingboxdepth + +\mdfboundingboxtotalheight + -\mdfframetitleboxtotalheight + \relax]% + {\mdfboundingboxtotalwidth}% + {\mdfframetitleboxtotalheight}% + }% + \global\mdfframetitleboxtotalheight=-\p@\relax% + }% + }% }% \def\mdf@frame@rightline@middle{% - \rlap{\mdf@linecolor@default\hspace*{\mdfboundingboxwidth}% - \hspace*{\mdf@innerrightmargin@length}% - \rule[-\mdfboundingboxdepth]% - {\mdf@middlelinewidth@length}% - {\mdfboundingboxtotalheight}% - }% + \rlap% + {% + \mdf@linecolor@default% + \hspace*{\mdfboundingboxwidth}% + \hspace*{\mdf@innerrightmargin@length}% + \rule[-\mdfboundingboxdepth]% + {\mdf@middlelinewidth@length}% + {\mdfboundingboxtotalheight}% + }% }% \def\mdf@frame@topline@middle{% - \rlap{\ifbool{mdf@leftline}{\hspace*{-\mdf@middlelinewidth@length}}{}\mdf@linecolor@default% - \ifbool{mdf@topline}{% - \rule[\dimexpr\mdfboundingboxtotalheight-\mdfboundingboxdepth\relax]% - {\dimexpr\mdfboundingboxtotalwidth - \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% - \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{}\relax - }% - {\mdf@middlelinewidth@length}}% - {}% - }% + \rlap% + {% + \ifbool{mdf@leftline}% + {% + \hspace*{-\mdf@middlelinewidth@length}% + }{}% + \mdf@linecolor@default% + \ifbool{mdf@topline}% + {% + \rule[\dimexpr + \mdfboundingboxtotalheight + -\mdfboundingboxdepth + \relax]% + {\dimexpr + \mdfboundingboxtotalwidth + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% + \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{} + \relax}% + {\mdf@middlelinewidth@length}% + }{}% + }% }% \def\mdf@frame@bottomline@middle{% - \rlap{\ifbool{mdf@leftline}{\hspace*{-\mdf@middlelinewidth@length}}{}\mdf@linecolor@default% - \ifbool{mdf@bottomline}{% - \rule[\dimexpr-\mdfboundingboxdepth-\mdf@middlelinewidth@length\relax]% - {\dimexpr\mdfboundingboxtotalwidth - \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% - \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{}\relax}% - {\mdf@middlelinewidth@length}}% - {}% - }% + \rlap% + {% + \ifbool{mdf@leftline}% + {% + \hspace*{-\mdf@middlelinewidth@length}% + }{}% + \mdf@linecolor@default% + \ifbool{mdf@bottomline}% + {% + \rule[\dimexpr + -\mdfboundingboxdepth + -\mdf@middlelinewidth@length + \relax]% + {\dimexpr + \mdfboundingboxtotalwidth + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% + \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{} + \relax}% + {\mdf@middlelinewidth@length}% + }{}% + }% }% \def\mdf@putbox@middle{% - \ifvoid\mdf@splitbox@two% + \ifvoid\mdf@splitbox@two\relax% \else - \mdf@makebox@out{% + \mdf@makebox@out% + {% \mdf@makeboxalign@left% - \setlength{\mdfboundingboxwidth}{\wd\mdf@splitbox@two}% + \setlength{\mdfboundingboxwidth} + {\wd\mdf@splitbox@two}% \setlength{\mdfboundingboxtotalwidth}% - {\dimexpr\mdfboundingboxwidth+\mdf@innerleftmargin@length% - +\mdf@innerrightmargin@length\relax}% - \setlength{\mdfboundingboxheight}{\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}% + {\dimexpr + \mdfboundingboxwidth + +\mdf@innerleftmargin@length% + +\mdf@innerrightmargin@length + \relax}% + \setlength{\mdfboundingboxheight} + {\dimexpr + \ht\mdf@splitbox@two + +\dp\mdf@splitbox@two + \relax}% \setlength{\mdfboundingboxdepth}% - {\dimexpr\dp\mdf@splitbox@two+\mdf@splitbottomskip@length\relax}% + {\dimexpr + \dp\mdf@splitbox@two + +\mdf@splitbottomskip@length + \relax}% \setlength{\mdfboundingboxtotalheight}% - {\dimexpr\mdfboundingboxheight+\mdf@splitbottomskip@length\relax}% - \setlength{\@tempdima}{\dimexpr\mdfboundingboxtotalwidth% - +\ifbool{mdf@leftline}{\mdf@middlelinewidth@length}{\z@}% - +\ifbool{mdf@rightline}{\mdf@middlelinewidth@length}{\z@}% - \relax}% - \mdf@makebox@in[\@tempdima]{% - \null% - \ifbool{mdf@leftline}{% - \hspace*{\mdf@middlelinewidth@length}% - \mdf@frame@leftline@middle}{}% - \mdf@frame@background@middle% - \ifbool{mdf@everyline}% - {\mdf@frame@topline@middle}{}% - \ifdefempty{\mdf@frametitle}{}{\mdf@frame@frametitlebackground@middle}% - \ifbool{mdf@everyline}% - {\mdf@frame@bottomline@middle}{}% - \hspace*{\mdf@innerleftmargin@length}% - \ifbool{mdf@rightline}{% - \mdf@frame@rightline@middle}{}% - {\box\mdf@splitbox@two}% - }% - \mdf@makeboxalign@right% - } + {\dimexpr + \mdfboundingboxheight + +\mdf@splitbottomskip@length + \relax}% + \setlength{\@tempdima} + {\dimexpr + \mdfboundingboxtotalwidth% + \ifbool{mdf@leftline}{+\mdf@middlelinewidth@length}{}% + \ifbool{mdf@rightline}{+\mdf@middlelinewidth@length}{}% + \relax}% + \mdf@makebox@in[\@tempdima]% + {% + \null% + \ifbool{mdf@leftline}% + {% + \hspace*{\mdf@middlelinewidth@length}% + \mdf@frame@leftline@middle% + }{}% + \mdf@frame@background@middle% + \ifbool{mdf@everyline}% + {% + \mdf@frame@topline@middle + }{}% + \ifdefempty{\mdf@frametitle}{} + {\mdf@frame@frametitlebackground@middle}% + \ifbool{mdf@everyline}% + {% + \mdf@frame@bottomline@middle% + }{}% + \hspace*{\mdf@innerleftmargin@length}% + \ifbool{mdf@rightline}% + {% + \mdf@frame@rightline@middle% + }{}% + {\box\mdf@splitbox@two}% + }% + \mdf@makeboxalign@right% + }% \fi% } \endinput 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 cc13eab36cc..8a1c2910a40 100644 --- a/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf @@ -5,25 +5,34 @@ %% Either version 1.0 or, at your option, any later version. %% %% -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \def\mdframedIpackagename{md-frame-1} \def\mdf@frameIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{md-frame-1.mdf}% - [\mdf@frameIdate@svn$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ % - \mdversion: \mdframedIpackagename] + [\mdf@frameIdate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ % + \mdversion: \mdframedIpackagename] \def\mdf@tikz@settings{% \tikzset{mdfbox/.style={anchor=south west,% inner sep=0pt,% outer sep=0pt,% - \mdf@fontcolor,}}% anchor der Ausgabebox ist unten links + \mdf@fontcolor,% + }% + }% anchor der Ausgabebox ist unten links \tikzset{mdfcorners/.style={rounded corners=\mdf@roundcorner@length}}% \tikzset{mdfbackground/.style={fill=\mdf@backgroundcolor,% - draw=\mdf@backgroundcolor}}% - \tikzset{mdfframetitlebackground/.style={fill=\mdf@frametitlebackgroundcolor,% - draw=none,% - rounded corners={max(\mdf@roundcorner@length% - -\mdf@innerlinewidth@length% - -.5\mdf@middlelinewidth@length,0)}}}% + draw=\mdf@backgroundcolor% + }% + }% + \tikzset{mdfframetitlebackground/.style=% + {% + fill=\mdf@frametitlebackgroundcolor,% + draw=none,% + rounded corners={max(\mdf@roundcorner@length% + -\mdf@innerlinewidth@length% + -.5\mdf@middlelinewidth@length,0)% + }% + }% + }% \tikzset{mdfouterline/.style={}}% \ifdimgreater{\mdf@outerlinewidth@length}{\z@} {\tikzset{mdfouterline/.append style={% @@ -78,15 +87,162 @@ \par\unskip\vskip\mdf@frametitlebelowskip@length \noindent\rlap{\hspace*{-\mdf@innerleftmargin@length}% \begingroup% - \pgfmathsetlength{\dimen@}{\mdfframetitleboxwidth+\mdf@innerleftmargin@length+\mdf@innerrightmargin@length}% + \pgfmathsetlength{\dimen@}{\mdfframetitleboxwidth + +\mdf@innerleftmargin@length + +\mdf@innerrightmargin@length}% \tikz\draw[mdfframetitlerule] (0,0)% rectangle (\dimen@,\mdf@frametitlerulewidth@length); \endgroup} }% - }{} - \par\unskip\vskip\mdf@innertopmargin@length% + }{% + \vbox{\hsize0pt + \par\unskip\vskip\mdf@frametitlebelowskip@length + \noindent\rlap{} + }% + }% + \iftoggle{mdf@notfirstframetitle}% + {% + \par\unskip\vskip\mdf@splittopskip@length% + }% + {% + \par\unskip\vskip\mdf@innertopmargin@length% + }% }% +\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% @@ -104,7 +260,8 @@ \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}% + \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}{% @@ -127,28 +284,28 @@ \ifbool{mdf@leftline}% {% \pgfmathsetlengthmacro\mdf@Ax% - {\mdf@Ax+\mdf@outerlinewidth@length+% - \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% + {\mdf@Ax+\mdf@outerlinewidth@length+% + \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% \pgfmathsetlengthmacro\mdf@Ox% - {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}% + {\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}% + {\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}% + {\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@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@Py-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}% }{}% \coordinate(O)at(\mdf@Ox,\mdf@Oy);% \coordinate(P)at(\mdf@Px,\mdf@Py);% @@ -193,7 +350,7 @@ \mdf@test@noline{\path[mdfbackground,mdfcorners](O)rectangle(P);}{}% %Frametitlebackground \drawbrackgroundframetitle@single - \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};% Ausgabebox einfuegen + \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};%output \end{scope} %HIER KOMMT EIN WEITERES MAKRO \mdf@singleextra @@ -213,54 +370,87 @@ \begin{scope}%background frame title \ifbool{mdf@leftline}{ \pgfmathsetlengthmacro\mdf@Ox% - {\mdf@Ox+\mdf@innerlinewidth@length+0.5\mdf@middlelinewidth@length} + {\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} }{}% \ifbool{mdf@topline}{% \pgfmathsetlengthmacro\mdf@Py% - {\mdf@Py-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length} + {\mdf@Py-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length} }{}% \pgfmathsetlengthmacro\mdf@Fy - {\mdf@Py-\mdfframetitleboxtotalheight} + {\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{% - \ifdefempty{\mdf@frametitle}{}{% - \ifdimgreater{\mdfboundingboxheight}{\mdfframetitleboxtotalheight}% {% - \drawbrackgroundframetitle@@first - \pgfmathsetlength{\global\mdfframetitleboxtotalheight}{-\p@}% - }{\mdf@PackageWarning{You got a page break inside the frame title\MessageBreak - Currently this isn't well supported}% - \drawbrackgroundframetitle@@first - \pgfmathsetlength{\global\mdfframetitleboxtotalheight}% - {\mdfframetitleboxtotalheight-\mdfboundingboxheight- - \mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length% - +\mdf@frametitlebelowskip@length+\mdf@splitbottomskip@length+\mdf@splittopskip@length - +\dp\strutbox% - }% - }% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \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-.5\mdf@middlelinewidth@length} + }{}% + \pgfmathsetlengthmacro\mdf@Fy + {\mdf@Py-\mdfframetitleboxtotalheight} + \coordinate(P)at(\mdf@Px,\mdf@Py);% + \path[mdfframetitlebackground] + (\mdf@Ox,\mdf@Fy) -- (\mdf@Ox,\mdf@Py)% + --(\mdf@Px,\mdf@Py) --(\mdf@Px,\mdf@Fy); + \end{scope} + }% + {% + \ifdefempty{\mdf@frametitle}{}% + {% + \ifdimgreater{\mdfboundingboxheight}{\mdfframetitleboxtotalheight}% + {% + \drawbrackgroundframetitle@@first + \pgfmathsetlength{\global\mdfframetitleboxtotalheight}{-\p@}% + }{\mdf@PackageWarning% + {You got a page break inside the frame title\MessageBreak + Currently this isn't well supported}% + \drawbrackgroundframetitle@@first + \pgfmathsetlength{\global\mdfframetitleboxtotalheight}% + {\mdfframetitleboxtotalheight + -\mdfboundingboxheight + -\mdf@innerlinewidth@length + -0.5\mdf@middlelinewidth@length% + +\mdf@frametitlebelowskip@length + +\mdf@splitbottomskip@length + +\mdf@splittopskip@length + +\dp\strutbox% + }% + }% + }% + }% }% }% \def\drawbrackgroundframetitle@@first{% \begin{scope}%background frame title \ifbool{mdf@leftline}{% \pgfmathsetlengthmacro\mdf@Ox% - {\mdf@Ox+\mdf@innerlinewidth@length+0.5\mdf@middlelinewidth@length} + {\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} }{}% \ifbool{mdf@topline}{% \pgfmathsetlengthmacro\mdf@Py% - {\mdf@Py-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length} + {\mdf@Py-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length} }{}% \pgfmathsetlengthmacro\mdf@Fy {max(0,\mdf@Py-\mdfframetitleboxtotalheight)} @@ -286,7 +476,8 @@ \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}% + \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}{% @@ -315,40 +506,35 @@ \ifbool{mdf@leftline} {% \pgfmathsetlengthmacro\mdf@Ax% - {\mdf@Ax+\mdf@outerlinewidth@length+% - \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% + {\mdf@Ax+\mdf@outerlinewidth@length+% + \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% \pgfmathsetlengthmacro\mdf@Ox% - {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}% + {\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}% + {\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}% + {\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}% + {\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@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);}{}% + {\path[mdfshadow] (O) -- (O|-P) to[mdfcorners] (P) -- (P|-O) -- (O);}{}% \begin{scope}[use as bounding box] %%%%%%%%%%%% \ifbool{mdf@everyline}{% @@ -393,10 +579,15 @@ {\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)}}% + {% + \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)}}% + {% + \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)}}% @@ -411,11 +602,13 @@ {\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);}{}% + \mdf@test@noline{\path[mdfbackground,mdfcorners]% + (O)--(O|-P)--(P)--(P|-O);}% + {}% } %%%%%%%%%%%% \drawbrackgroundframetitle@first - \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};% Ausgabebox einfuegen + \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};% \end{scope} %HIER KOMMT EIN WEITERES MAKRO \mdf@firstextra @@ -427,23 +620,54 @@ \fi }% \def\drawbrackgroundframetitle@middle{% - \ifdefempty{\mdf@frametitle}{}{% - \ifdimless{\mdfframetitleboxtotalheight}{\z@} - {}{% - \drawbrackgroundframetitle@@middle% - \pgfmathsetlength{\global\mdfframetitleboxtotalheight}{-\p@}% - }% - }% + \ifdefempty{\mdf@frametitle}{}% + {% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \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@everyline}% + {% + \ifbool{mdf@topline}{% + \pgfmathsetlengthmacro\mdf@Py% + {\mdf@Py-\mdf@innerlinewidth@length% + -.5\mdf@middlelinewidth@length} + }{}% + }{}% + \pgfmathsetlengthmacro\mdf@Fy + {\mdf@Py-\mdfframetitleboxtotalheight} + \coordinate(P)at(\mdf@Px,\mdf@Py);% + \path[mdfframetitlebackground] + (\mdf@Ox,\mdf@Fy) -- (\mdf@Ox,\mdf@Py)% + --(\mdf@Px,\mdf@Py) --(\mdf@Px,\mdf@Fy); + \end{scope} + }% + {% + \ifdimless{\mdfframetitleboxtotalheight}{\z@} + {}% + {% + \drawbrackgroundframetitle@@middle% + \pgfmathsetlength{\global\mdfframetitleboxtotalheight}{-\p@}% + }% + }% + }% }% \def\drawbrackgroundframetitle@@middle{% \begin{scope}%background frame title - \ifbool{mdf@leftline}{ + \ifbool{mdf@leftline}{% \pgfmathsetlengthmacro\mdf@Ox% - {\mdf@Ox+\mdf@innerlinewidth@length+0.5\mdf@middlelinewidth@length} + {\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} @@ -456,11 +680,11 @@ \begin{scope}%background frame title \ifbool{mdf@leftline}{ \pgfmathsetlengthmacro\mdf@Ox% - {\mdf@Ox+\mdf@innerlinewidth@length+0.5\mdf@middlelinewidth@length} + {\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} @@ -486,7 +710,8 @@ \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}% + \setlength\mdfboundingboxheight% + {\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}% \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax% %%%%%%%%% \ifbool{mdf@everyline}{% @@ -512,30 +737,30 @@ \ifbool{mdf@leftline}% {% \pgfmathsetlengthmacro\mdf@Ax% - {\mdf@Ax+\mdf@outerlinewidth@length+% - \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% + {\mdf@Ax+\mdf@outerlinewidth@length+% + \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% \pgfmathsetlengthmacro\mdf@Ox% - {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}% + {\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}% + {\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}% + {\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@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@Py-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}% }{}% }{}% %% @@ -594,7 +819,7 @@ } %%%%%%%% \drawbrackgroundframetitle@middle - \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};% Ausgabebox einfuegen + \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};% \end{scope} \mdf@middleextra %HIER KOMMT EIN WEITERES MAKRO @@ -606,22 +831,53 @@ \fi }% \def\drawbrackgroundframetitle@second{% - \ifdefempty{\mdf@frametitle}{}{% - \ifdimless{\mdfframetitleboxtotalheight}{\z@} - {}{% - \drawbrackgroundframetitle@@second% - }% - }% + \ifdefempty{\mdf@frametitle}{}% + {% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \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@everyline}% + {% + \ifbool{mdf@topline}{% + \pgfmathsetlengthmacro\mdf@Py% + {\mdf@Py-\mdf@innerlinewidth@length% + -.5\mdf@middlelinewidth@length} + }{}% + }{}% + \pgfmathsetlengthmacro\mdf@Fy + {\mdf@Py-\mdfframetitleboxtotalheight} + \coordinate(P)at(\mdf@Px,\mdf@Py);% + \path[mdfframetitlebackground] + (\mdf@Ox,\mdf@Fy) -- (\mdf@Ox,\mdf@Py)% + --(\mdf@Px,\mdf@Py) --(\mdf@Px,\mdf@Fy); + \end{scope} + }% + {% + \ifdimless{\mdfframetitleboxtotalheight}{\z@} + {}% + {% + \drawbrackgroundframetitle@@second% + }% + }% + }% }% \def\drawbrackgroundframetitle@@second{% \begin{scope}%background frame title \ifbool{mdf@leftline}{ \pgfmathsetlengthmacro\mdf@Ox% - {\mdf@Ox+\mdf@innerlinewidth@length+0.5\mdf@middlelinewidth@length} + {\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} @@ -647,7 +903,8 @@ \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}% + \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% @@ -673,37 +930,40 @@ \ifbool{mdf@leftline}% {% \pgfmathsetlengthmacro\mdf@Ax% - {\mdf@Ax+\mdf@outerlinewidth@length+% - \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% + {\mdf@Ax+\mdf@outerlinewidth@length+% + \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% \pgfmathsetlengthmacro\mdf@Ox% - {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}% + {\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}% + {\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}% + {\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@Oy+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}% }{}% %% \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}[use as bounding box] %%%%%%%%%%%% \ifbool{mdf@everyline}{% @@ -748,10 +1008,16 @@ {\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)}}% + {% + \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)}}% + {% + \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)}}% @@ -766,10 +1032,12 @@ {\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);}{}% + \mdf@test@noline{\path[mdfbackground,mdfcorners]% + (O|-P)--(O)--(O-|P)--(P);}% + {}% }% \drawbrackgroundframetitle@second - \node[mdfbox] at (\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};% Ausgabebox einfuegen + \node[mdfbox] at (\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};% \end{scope} \mdf@secondextra %HIER KOMMT EIN WEITERES MAKRO 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 3afbb9a71d4..7609c34e420 100644 --- a/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf @@ -5,14 +5,16 @@ %% Either version 1.0 or, at your option, any later version. %% %% -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \def\mdframedIIpackagename{md-frame-2} \def\mdf@frameIIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{md-frame-2.mdf}% - [\mdf@frameIIdate@svn$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ % - \mdversion: \mdframedIIpackagename] + [\mdf@frameIIdate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ % + \mdversion: \mdframedIIpackagename] \def\mdf@ptlength@to@pscode#1{\pst@number{#1} \pst@number\psxunit div } -\def\mdf@ptlength@to@pscode@length#1{\pst@number{\csname mdf@#1@length\endcsname} \pst@number\psxunit div } +\def\mdf@ptlength@to@pscode@length#1{% + \pst@number{\csname mdf@#1@length\endcsname} + \pst@number\psxunit div\space} \let\ptTps\mdf@ptlength@to@pscode\relax \let\ptTpsL\mdf@ptlength@to@pscode@length\relax \def\mdfpstricks@settings{%expand by \addtopsstyle @@ -36,18 +38,21 @@ \ifdimgreater{\mdf@outerlinewidth@length}{\z@} {\newpsstyle{mdfouterlinestyle}{% linecolor=\mdf@outerlinecolor,% - linewidth=\dimexpr2\mdf@outerlinewidth@length+\mdf@middlelinewidth@length\relax, + linewidth=\dimexpr2\mdf@outerlinewidth@length + +\mdf@middlelinewidth@length\relax, dimen=middle, }}{}% \newpsstyle{mdfinnerlinestyle}{linestyle=none}% \ifdimgreater{\mdf@innerlinewidth@length}{\z@}% {\newpsstyle{mdfinnerlinestyle}{% linecolor=\mdf@innerlinecolor,% - linewidth=\dimexpr2\mdf@innerlinewidth@length+\mdf@middlelinewidth@length\relax, + linewidth=\dimexpr2\mdf@innerlinewidth@length + +\mdf@middlelinewidth@length\relax, dimen=middle, }}{}% \newpsstyle{mdfmiddlelinestyle}{linestyle=none}% - \newpsstyle{mdfshadow}{shadow=true,shadowcolor=\mdf@shadowcolor,shadowsize=\mdf@shadowsize@length}% + \newpsstyle{mdfshadow}{shadow=true,shadowcolor=\mdf@shadowcolor, + shadowsize=\mdf@shadowsize@length}% \ifdimgreater{\mdf@middlelinewidth@length}{\z@}% {\newpsstyle{mdfmiddlelinestyle}{% linewidth=\mdf@middlelinewidth@length,% @@ -134,17 +139,193 @@ \noindent\rlap{% \begingroup% \begin{pspicture}(0,0)(0,\mdf@frametitlerulewidth@length) - \psframe[style=mdfframetitlerule](!\ptTpsL{innerleftmargin} neg 0)% - (! \ptTpsL{innerrightmargin} - \ptTps{\mdfframetitleboxwidth} add \ptTpsL{frametitlerulewidth}) + \psframe[style=mdfframetitlerule]% + (!\ptTpsL{innerleftmargin} neg 0)% + (!\ptTpsL{innerrightmargin} + \ptTps{\mdfframetitleboxwidth} add + \ptTpsL{frametitlerulewidth}) \end{pspicture} - \endgroup} + \endgroup}% }% - }{} - \par\unskip\vskip\mdf@innertopmargin@length% + }{% + \vbox{\hsize0pt + \par\unskip\vskip\mdf@frametitlebelowskip@length + \noindent\rlap{} + }% + }% + \iftoggle{mdf@notfirstframetitle}% + {% + \par\unskip\vskip\mdf@splittopskip@length% + }% + {% + \par\unskip\vskip\mdf@innertopmargin@length% + }% }% +\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 + \ifvoid\mdf@splitbox@one\relax \else% \mdf@makebox@out{% \mdf@makeboxalign@left% @@ -159,7 +340,8 @@ \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}% + \setlength\mdfboundingboxheight% + {\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax% \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax% \ifbool{mdf@topline}{% @@ -180,7 +362,8 @@ \mdfpstricks@settings% \psset{linearc=\mdf@roundcorner@length,cornersize=absolut,}% \expandafter\psset\expandafter{\mdf@psset@local}% - \pnode(\mdf@innerleftmargin@length,\mdf@innerbottommargin@length){mdf@A} + \pnode(\mdf@innerleftmargin@length,\mdf@innerbottommargin@length) + {mdf@A} \pnode(0,0){mdf@O} \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} \ifbool{mdf@leftline}% @@ -214,19 +397,27 @@ %Four lines \mdf@test@ltrb{\mdf@pstricksbox@fl{mdf@O}{mdf@P}}{} %three lines - \mdf@test@ltb{\mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} - \mdf@test@trb{\mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} - \mdf@test@ltr{\mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% - \mdf@test@lrb{\mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% + \mdf@test@ltb{% + \mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@trb{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} + \mdf@test@ltr{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% + \mdf@test@lrb{% + \mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% %two lines combinded - \mdf@test@lb{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} - \mdf@test@rb{\mdf@pstricksbox@tcl{(mdf@P)(mdf@O|mdf@P)(mdf@O)}% - {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} - \mdf@test@tr{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} - \mdf@test@lt{\mdf@pstricksbox@tcl{(mdf@O)(mdf@P|mdf@O)(mdf@P)}% - {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@lb{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} + \mdf@test@rb{\mdf@pstricksbox@tcl% + {(mdf@P)(mdf@O|mdf@P)(mdf@O)}% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} + \mdf@test@tr{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} + \mdf@test@lt{\mdf@pstricksbox@tcl% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}% + {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} %two lines not combinded combinded \mdf@test@lr{\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)} }{} @@ -291,7 +482,8 @@ \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}% + \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}{% @@ -352,8 +544,10 @@ %%%%%%%%%% \ifbool{mdf@shadow} {\pscustom[style=mdfshadow,linestyle=none]{% - \psline[linejoin=2,linecap=1,](mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)% - \psline[linejoin=2,linecap=1,linearc=\z@](mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O) + \psline[linejoin=2,linecap=1,]% + (mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)% + \psline[linejoin=2,linecap=1,linearc=\z@]% + (mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O) \closedshadow } }{} @@ -362,19 +556,27 @@ %Four lines \mdf@test@ltrb{\mdf@pstricksbox@fl{mdf@O}{mdf@P}}{} %three lines - \mdf@test@ltb{\mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} - \mdf@test@trb{\mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} - \mdf@test@ltr{\mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% - \mdf@test@lrb{\mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% + \mdf@test@ltb{% + \mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@trb{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} + \mdf@test@ltr{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% + \mdf@test@lrb{% + \mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% %two lines combinded - \mdf@test@lb{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} - \mdf@test@rb{\mdf@pstricksbox@tcl{(mdf@P)(mdf@O|mdf@P)(mdf@O)}% - {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} - \mdf@test@tr{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} - \mdf@test@lt{\mdf@pstricksbox@tcl{(mdf@O)(mdf@P|mdf@O)(mdf@P)}% - {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@lb{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} + \mdf@test@rb{\mdf@pstricksbox@tcl% + {(mdf@P)(mdf@O|mdf@P)(mdf@O)}% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} + \mdf@test@tr{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} + \mdf@test@lt{\mdf@pstricksbox@tcl% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}% + {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} %two lines not combinded combinded \mdf@test@lr{\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)} }{} @@ -425,22 +627,33 @@ \fi }% \def\drawbrackgroundframetitle@first{% - \ifdefempty{\mdf@frametitle}{}{% - \ifdimgreater{\mdfboundingboxheight}{\mdfframetitleboxtotalheight}% + \ifdefempty{\mdf@frametitle}{}% {% - \drawbrackgroundframetitle@@first - \global\mdfframetitleboxtotalheight=-\p@% - }{\mdf@PackageWarning{You got a page break inside the frame title\MessageBreak - Currently this isn't well supported}% - \drawbrackgroundframetitle@@first - \global\mdfframetitleboxtotalheight=\dimexpr\mdfframetitleboxtotalheight - -\mdfboundingboxheight - -\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length% - +\mdf@frametitlebelowskip@length+\mdf@splitbottomskip@length - +\mdf@splittopskip@length - +\dp\strutbox\relax% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \drawbrackgroundframetitle@@@first + }% + {% + \ifdimgreater{\mdfboundingboxheight}{\mdfframetitleboxtotalheight}% + {% + \drawbrackgroundframetitle@@first + \global\mdfframetitleboxtotalheight=-\p@% + }{\mdf@PackageWarning{You got a page break inside the frame + title\MessageBreak + Currently this isn't well supported}% + \drawbrackgroundframetitle@@first + \global\mdfframetitleboxtotalheight=\dimexpr + \mdfframetitleboxtotalheight + -\mdfboundingboxheight + -\mdf@innerlinewidth@length + -0.5\mdf@middlelinewidth@length% + +\mdf@frametitlebelowskip@length + +\mdf@splitbottomskip@length + +\mdf@splittopskip@length + +\dp\strutbox\relax% + }% + }% }% - }% }% \def\drawbrackgroundframetitle@@first{% \begingroup% @@ -463,6 +676,25 @@ (mdf@P)(mdf@P|mdf@F)% \endgroup } +\def\drawbrackgroundframetitle@@@first{% + \begingroup% + \ifbool{mdf@leftline}{% + \nodexn{(mdf@O)+(\mdf@innerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O}% + }{}% + \ifbool{mdf@rightline}{% + \nodexn{(mdf@P)-(\mdf@innerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% + }{}% + \ifbool{mdf@topline}{% + \nodexn{(mdf@P)-(0,\mdf@innerlinewidth@length) + -0.5(0,\mdf@middlelinewidth@length)}{mdf@P}% + }{}% + \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% + \psline[style=mdfframetitlebackgroundstyle](mdf@O|mdf@F)(mdf@O|mdf@P) + (mdf@P)(mdf@P|mdf@F)% + \endgroup +} \def\mdf@putbox@middle{% \ifvoid\mdf@splitbox@two \else% @@ -479,7 +711,8 @@ \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}% + \setlength\mdfboundingboxheight% + {\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}% \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax% %%%%%%%%% \ifbool{mdf@everyline}{% @@ -545,17 +778,24 @@ %Four lines \mdf@test@ltrb{\mdf@pstricksbox@fl{mdf@O}{mdf@P}}{} %three lines - \mdf@test@ltb{\mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} - \mdf@test@trb{\mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} - \mdf@test@ltr{\mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% - \mdf@test@lrb{\mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% + \mdf@test@ltb{% + \mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@trb{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} + \mdf@test@ltr{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% + \mdf@test@lrb{% + \mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% %two lines combinded - \mdf@test@lb{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} - \mdf@test@rb{\mdf@pstricksbox@tcl{(mdf@P)(mdf@O|mdf@P)(mdf@O)}% - {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} - \mdf@test@tr{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} + \mdf@test@lb{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} + \mdf@test@rb{\mdf@pstricksbox@tcl% + {(mdf@P)(mdf@O|mdf@P)(mdf@O)}% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} + \mdf@test@tr{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} \mdf@test@lt{\mdf@pstricksbox@tcl{(mdf@O)(mdf@P|mdf@O)(mdf@P)}% {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} %two lines not combinded combinded @@ -584,6 +824,9 @@ \drawbrackgroundframetitle@middle %output% \rput[bl](mdf@A){\box\mdf@splitbox@two} + %\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 \end{pspicture}% }% @@ -592,12 +835,20 @@ \fi }% \def\drawbrackgroundframetitle@middle{% - \ifdefempty{\mdf@frametitle}{}{% - \ifdimless{\mdfframetitleboxtotalheight}{\z@} - {}{% - \drawbrackgroundframetitle@@middle - \global\mdfframetitleboxtotalheight=-\p@\relax% - }% + \ifdefempty{\mdf@frametitle}{}% + {% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \drawbrackgroundframetitle@@@middle + }% + {% + \ifdimless{\mdfframetitleboxtotalheight}{\z@} + {}% + {% + \drawbrackgroundframetitle@@middle + \global\mdfframetitleboxtotalheight=-\p@\relax% + }% + }% }% }% \def\drawbrackgroundframetitle@@middle{% @@ -611,7 +862,29 @@ -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% }{}% \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% - \psline[style=mdfframetitlebackgroundstyle,linearc=\z@](mdf@O|mdf@F)(mdf@O|mdf@P) + \psline[style=mdfframetitlebackgroundstyle,linearc=\z@]% + (mdf@O|mdf@F)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@F)% + \endgroup +} +\def\drawbrackgroundframetitle@@@middle{% + \begingroup% + \ifbool{mdf@leftline}{% + \nodexn{(mdf@O)+(\mdf@innerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O}% + }{}% + \ifbool{mdf@rightline}{% + \nodexn{(mdf@P)-(\mdf@innerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% + }{}% + \ifbool{mdf@everyline}% + {% + \ifbool{mdf@topline}{% + \nodexn{(mdf@P)-(0,\mdf@innerlinewidth@length) + -0.5(0,\mdf@middlelinewidth@length)}{mdf@P}% + }{}% + }{}% + \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% + \psline[style=mdfframetitlebackgroundstyle](mdf@O|mdf@F)(mdf@O|mdf@P) (mdf@P)(mdf@P|mdf@F)% \endgroup } @@ -631,7 +904,8 @@ \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}% + \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% @@ -652,7 +926,8 @@ \mdfpstricks@settings% \psset{linearc=\mdf@roundcorner@length,cornersize=absolut,}% \expandafter\psset\expandafter{\mdf@psset@local}% - \pnode(\mdf@innerleftmargin@length,\mdf@innerbottommargin@length){mdf@A} + \pnode(\mdf@innerleftmargin@length,\mdf@innerbottommargin@length) + {mdf@A} \pnode(0,0){mdf@O} \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} \ifbool{mdf@leftline}% @@ -688,7 +963,8 @@ %% \ifbool{mdf@shadow} {\pscustom[style=mdfshadow,linestyle=none]{% - \psline[linejoin=2,linecap=1,](mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)% + \psline[linejoin=2,linecap=1,](mdf@O|mdf@P)(mdf@O)% + (mdf@P|mdf@O)(mdf@P)% \psline[linejoin=2,linecap=1,linearc=\z@](mdf@O|mdf@P)(mdf@P) \closedshadow } @@ -698,19 +974,27 @@ %Four lines \mdf@test@ltrb{\mdf@pstricksbox@fl{mdf@O}{mdf@P}}{} %three lines - \mdf@test@ltb{\mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} - \mdf@test@trb{\mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} - \mdf@test@ltr{\mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% - \mdf@test@lrb{\mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% + \mdf@test@ltb{% + \mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@trb{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} + \mdf@test@ltr{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% + \mdf@test@lrb{% + \mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% %two lines combinded - \mdf@test@lb{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} - \mdf@test@rb{\mdf@pstricksbox@tcl{(mdf@P)(mdf@O|mdf@P)(mdf@O)}% - {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} - \mdf@test@tr{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} - \mdf@test@lt{\mdf@pstricksbox@tcl{(mdf@O)(mdf@P|mdf@O)(mdf@P)}% - {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@lb{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} + \mdf@test@rb{\mdf@pstricksbox@tcl% + {(mdf@P)(mdf@O|mdf@P)(mdf@O)}% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} + \mdf@test@tr{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} + \mdf@test@lt{\mdf@pstricksbox@tcl% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}% + {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} %two lines not combinded combinded \mdf@test@lr{\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)} }{} @@ -730,10 +1014,10 @@ %Two combinded \ifboolexpr{test {\mdf@test@ltb} or test {\mdf@test@lb}}% {\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} + {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} \ifboolexpr{test {\mdf@test@trb} or test {\mdf@test@rb}}% {\mdf@pstricksbox@tcl{(mdf@P)(mdf@O|mdf@P)(mdf@O)}% - {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} %Two not combinded \ifboolexpr{test {\mdf@test@ltr} or test {\mdf@test@lr}}% {\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)}}{}% @@ -760,11 +1044,18 @@ \fi }% \def\drawbrackgroundframetitle@second{% - \ifdefempty{\mdf@frametitle}{}{% - \ifdimless{\mdfframetitleboxtotalheight}{\z@} - {}{% - \drawbrackgroundframetitle@@second - }% + \ifdefempty{\mdf@frametitle}{}% + {% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \drawbrackgroundframetitle@@@second + }% + {% + \ifdimless{\mdfframetitleboxtotalheight}{\z@} + {}{% + \drawbrackgroundframetitle@@second + }% + }% }% }% \def\drawbrackgroundframetitle@@second{% @@ -778,7 +1069,29 @@ -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% }{}% \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% - \psline[style=mdfframetitlebackgroundstyle,linearc=\z@](mdf@O|mdf@F)(mdf@O|mdf@P) + \psline[style=mdfframetitlebackgroundstyle,linearc=\z@]% + (mdf@O|mdf@F)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@F)% + \endgroup +} +\def\drawbrackgroundframetitle@@@second{% + \begingroup% + \ifbool{mdf@leftline}{% + \nodexn{(mdf@O)+(\mdf@innerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O}% + }{}% + \ifbool{mdf@rightline}{% + \nodexn{(mdf@P)-(\mdf@innerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% + }{}% + \ifbool{mdf@everyline}% + {% + \ifbool{mdf@topline}{% + \nodexn{(mdf@P)-(0,\mdf@innerlinewidth@length) + -0.5(0,\mdf@middlelinewidth@length)}{mdf@P}% + }{}% + }{}% + \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% + \psline[style=mdfframetitlebackgroundstyle](mdf@O|mdf@F)(mdf@O|mdf@P) (mdf@P)(mdf@P|mdf@F)% \endgroup } 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 3afbb9a71d4..7609c34e420 100644 --- a/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf @@ -5,14 +5,16 @@ %% Either version 1.0 or, at your option, any later version. %% %% -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \def\mdframedIIpackagename{md-frame-2} \def\mdf@frameIIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{md-frame-2.mdf}% - [\mdf@frameIIdate@svn$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ % - \mdversion: \mdframedIIpackagename] + [\mdf@frameIIdate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ % + \mdversion: \mdframedIIpackagename] \def\mdf@ptlength@to@pscode#1{\pst@number{#1} \pst@number\psxunit div } -\def\mdf@ptlength@to@pscode@length#1{\pst@number{\csname mdf@#1@length\endcsname} \pst@number\psxunit div } +\def\mdf@ptlength@to@pscode@length#1{% + \pst@number{\csname mdf@#1@length\endcsname} + \pst@number\psxunit div\space} \let\ptTps\mdf@ptlength@to@pscode\relax \let\ptTpsL\mdf@ptlength@to@pscode@length\relax \def\mdfpstricks@settings{%expand by \addtopsstyle @@ -36,18 +38,21 @@ \ifdimgreater{\mdf@outerlinewidth@length}{\z@} {\newpsstyle{mdfouterlinestyle}{% linecolor=\mdf@outerlinecolor,% - linewidth=\dimexpr2\mdf@outerlinewidth@length+\mdf@middlelinewidth@length\relax, + linewidth=\dimexpr2\mdf@outerlinewidth@length + +\mdf@middlelinewidth@length\relax, dimen=middle, }}{}% \newpsstyle{mdfinnerlinestyle}{linestyle=none}% \ifdimgreater{\mdf@innerlinewidth@length}{\z@}% {\newpsstyle{mdfinnerlinestyle}{% linecolor=\mdf@innerlinecolor,% - linewidth=\dimexpr2\mdf@innerlinewidth@length+\mdf@middlelinewidth@length\relax, + linewidth=\dimexpr2\mdf@innerlinewidth@length + +\mdf@middlelinewidth@length\relax, dimen=middle, }}{}% \newpsstyle{mdfmiddlelinestyle}{linestyle=none}% - \newpsstyle{mdfshadow}{shadow=true,shadowcolor=\mdf@shadowcolor,shadowsize=\mdf@shadowsize@length}% + \newpsstyle{mdfshadow}{shadow=true,shadowcolor=\mdf@shadowcolor, + shadowsize=\mdf@shadowsize@length}% \ifdimgreater{\mdf@middlelinewidth@length}{\z@}% {\newpsstyle{mdfmiddlelinestyle}{% linewidth=\mdf@middlelinewidth@length,% @@ -134,17 +139,193 @@ \noindent\rlap{% \begingroup% \begin{pspicture}(0,0)(0,\mdf@frametitlerulewidth@length) - \psframe[style=mdfframetitlerule](!\ptTpsL{innerleftmargin} neg 0)% - (! \ptTpsL{innerrightmargin} - \ptTps{\mdfframetitleboxwidth} add \ptTpsL{frametitlerulewidth}) + \psframe[style=mdfframetitlerule]% + (!\ptTpsL{innerleftmargin} neg 0)% + (!\ptTpsL{innerrightmargin} + \ptTps{\mdfframetitleboxwidth} add + \ptTpsL{frametitlerulewidth}) \end{pspicture} - \endgroup} + \endgroup}% }% - }{} - \par\unskip\vskip\mdf@innertopmargin@length% + }{% + \vbox{\hsize0pt + \par\unskip\vskip\mdf@frametitlebelowskip@length + \noindent\rlap{} + }% + }% + \iftoggle{mdf@notfirstframetitle}% + {% + \par\unskip\vskip\mdf@splittopskip@length% + }% + {% + \par\unskip\vskip\mdf@innertopmargin@length% + }% }% +\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 + \ifvoid\mdf@splitbox@one\relax \else% \mdf@makebox@out{% \mdf@makeboxalign@left% @@ -159,7 +340,8 @@ \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}% + \setlength\mdfboundingboxheight% + {\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax% \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax% \ifbool{mdf@topline}{% @@ -180,7 +362,8 @@ \mdfpstricks@settings% \psset{linearc=\mdf@roundcorner@length,cornersize=absolut,}% \expandafter\psset\expandafter{\mdf@psset@local}% - \pnode(\mdf@innerleftmargin@length,\mdf@innerbottommargin@length){mdf@A} + \pnode(\mdf@innerleftmargin@length,\mdf@innerbottommargin@length) + {mdf@A} \pnode(0,0){mdf@O} \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} \ifbool{mdf@leftline}% @@ -214,19 +397,27 @@ %Four lines \mdf@test@ltrb{\mdf@pstricksbox@fl{mdf@O}{mdf@P}}{} %three lines - \mdf@test@ltb{\mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} - \mdf@test@trb{\mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} - \mdf@test@ltr{\mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% - \mdf@test@lrb{\mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% + \mdf@test@ltb{% + \mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@trb{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} + \mdf@test@ltr{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% + \mdf@test@lrb{% + \mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% %two lines combinded - \mdf@test@lb{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} - \mdf@test@rb{\mdf@pstricksbox@tcl{(mdf@P)(mdf@O|mdf@P)(mdf@O)}% - {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} - \mdf@test@tr{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} - \mdf@test@lt{\mdf@pstricksbox@tcl{(mdf@O)(mdf@P|mdf@O)(mdf@P)}% - {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@lb{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} + \mdf@test@rb{\mdf@pstricksbox@tcl% + {(mdf@P)(mdf@O|mdf@P)(mdf@O)}% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} + \mdf@test@tr{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} + \mdf@test@lt{\mdf@pstricksbox@tcl% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}% + {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} %two lines not combinded combinded \mdf@test@lr{\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)} }{} @@ -291,7 +482,8 @@ \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}% + \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}{% @@ -352,8 +544,10 @@ %%%%%%%%%% \ifbool{mdf@shadow} {\pscustom[style=mdfshadow,linestyle=none]{% - \psline[linejoin=2,linecap=1,](mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)% - \psline[linejoin=2,linecap=1,linearc=\z@](mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O) + \psline[linejoin=2,linecap=1,]% + (mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)% + \psline[linejoin=2,linecap=1,linearc=\z@]% + (mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O) \closedshadow } }{} @@ -362,19 +556,27 @@ %Four lines \mdf@test@ltrb{\mdf@pstricksbox@fl{mdf@O}{mdf@P}}{} %three lines - \mdf@test@ltb{\mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} - \mdf@test@trb{\mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} - \mdf@test@ltr{\mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% - \mdf@test@lrb{\mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% + \mdf@test@ltb{% + \mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@trb{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} + \mdf@test@ltr{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% + \mdf@test@lrb{% + \mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% %two lines combinded - \mdf@test@lb{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} - \mdf@test@rb{\mdf@pstricksbox@tcl{(mdf@P)(mdf@O|mdf@P)(mdf@O)}% - {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} - \mdf@test@tr{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} - \mdf@test@lt{\mdf@pstricksbox@tcl{(mdf@O)(mdf@P|mdf@O)(mdf@P)}% - {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@lb{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} + \mdf@test@rb{\mdf@pstricksbox@tcl% + {(mdf@P)(mdf@O|mdf@P)(mdf@O)}% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} + \mdf@test@tr{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} + \mdf@test@lt{\mdf@pstricksbox@tcl% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}% + {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} %two lines not combinded combinded \mdf@test@lr{\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)} }{} @@ -425,22 +627,33 @@ \fi }% \def\drawbrackgroundframetitle@first{% - \ifdefempty{\mdf@frametitle}{}{% - \ifdimgreater{\mdfboundingboxheight}{\mdfframetitleboxtotalheight}% + \ifdefempty{\mdf@frametitle}{}% {% - \drawbrackgroundframetitle@@first - \global\mdfframetitleboxtotalheight=-\p@% - }{\mdf@PackageWarning{You got a page break inside the frame title\MessageBreak - Currently this isn't well supported}% - \drawbrackgroundframetitle@@first - \global\mdfframetitleboxtotalheight=\dimexpr\mdfframetitleboxtotalheight - -\mdfboundingboxheight - -\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length% - +\mdf@frametitlebelowskip@length+\mdf@splitbottomskip@length - +\mdf@splittopskip@length - +\dp\strutbox\relax% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \drawbrackgroundframetitle@@@first + }% + {% + \ifdimgreater{\mdfboundingboxheight}{\mdfframetitleboxtotalheight}% + {% + \drawbrackgroundframetitle@@first + \global\mdfframetitleboxtotalheight=-\p@% + }{\mdf@PackageWarning{You got a page break inside the frame + title\MessageBreak + Currently this isn't well supported}% + \drawbrackgroundframetitle@@first + \global\mdfframetitleboxtotalheight=\dimexpr + \mdfframetitleboxtotalheight + -\mdfboundingboxheight + -\mdf@innerlinewidth@length + -0.5\mdf@middlelinewidth@length% + +\mdf@frametitlebelowskip@length + +\mdf@splitbottomskip@length + +\mdf@splittopskip@length + +\dp\strutbox\relax% + }% + }% }% - }% }% \def\drawbrackgroundframetitle@@first{% \begingroup% @@ -463,6 +676,25 @@ (mdf@P)(mdf@P|mdf@F)% \endgroup } +\def\drawbrackgroundframetitle@@@first{% + \begingroup% + \ifbool{mdf@leftline}{% + \nodexn{(mdf@O)+(\mdf@innerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O}% + }{}% + \ifbool{mdf@rightline}{% + \nodexn{(mdf@P)-(\mdf@innerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% + }{}% + \ifbool{mdf@topline}{% + \nodexn{(mdf@P)-(0,\mdf@innerlinewidth@length) + -0.5(0,\mdf@middlelinewidth@length)}{mdf@P}% + }{}% + \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% + \psline[style=mdfframetitlebackgroundstyle](mdf@O|mdf@F)(mdf@O|mdf@P) + (mdf@P)(mdf@P|mdf@F)% + \endgroup +} \def\mdf@putbox@middle{% \ifvoid\mdf@splitbox@two \else% @@ -479,7 +711,8 @@ \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}% + \setlength\mdfboundingboxheight% + {\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}% \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax% %%%%%%%%% \ifbool{mdf@everyline}{% @@ -545,17 +778,24 @@ %Four lines \mdf@test@ltrb{\mdf@pstricksbox@fl{mdf@O}{mdf@P}}{} %three lines - \mdf@test@ltb{\mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} - \mdf@test@trb{\mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} - \mdf@test@ltr{\mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% - \mdf@test@lrb{\mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% + \mdf@test@ltb{% + \mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@trb{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} + \mdf@test@ltr{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% + \mdf@test@lrb{% + \mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% %two lines combinded - \mdf@test@lb{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} - \mdf@test@rb{\mdf@pstricksbox@tcl{(mdf@P)(mdf@O|mdf@P)(mdf@O)}% - {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} - \mdf@test@tr{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} + \mdf@test@lb{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} + \mdf@test@rb{\mdf@pstricksbox@tcl% + {(mdf@P)(mdf@O|mdf@P)(mdf@O)}% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} + \mdf@test@tr{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} \mdf@test@lt{\mdf@pstricksbox@tcl{(mdf@O)(mdf@P|mdf@O)(mdf@P)}% {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} %two lines not combinded combinded @@ -584,6 +824,9 @@ \drawbrackgroundframetitle@middle %output% \rput[bl](mdf@A){\box\mdf@splitbox@two} + %\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 \end{pspicture}% }% @@ -592,12 +835,20 @@ \fi }% \def\drawbrackgroundframetitle@middle{% - \ifdefempty{\mdf@frametitle}{}{% - \ifdimless{\mdfframetitleboxtotalheight}{\z@} - {}{% - \drawbrackgroundframetitle@@middle - \global\mdfframetitleboxtotalheight=-\p@\relax% - }% + \ifdefempty{\mdf@frametitle}{}% + {% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \drawbrackgroundframetitle@@@middle + }% + {% + \ifdimless{\mdfframetitleboxtotalheight}{\z@} + {}% + {% + \drawbrackgroundframetitle@@middle + \global\mdfframetitleboxtotalheight=-\p@\relax% + }% + }% }% }% \def\drawbrackgroundframetitle@@middle{% @@ -611,7 +862,29 @@ -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% }{}% \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% - \psline[style=mdfframetitlebackgroundstyle,linearc=\z@](mdf@O|mdf@F)(mdf@O|mdf@P) + \psline[style=mdfframetitlebackgroundstyle,linearc=\z@]% + (mdf@O|mdf@F)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@F)% + \endgroup +} +\def\drawbrackgroundframetitle@@@middle{% + \begingroup% + \ifbool{mdf@leftline}{% + \nodexn{(mdf@O)+(\mdf@innerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O}% + }{}% + \ifbool{mdf@rightline}{% + \nodexn{(mdf@P)-(\mdf@innerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% + }{}% + \ifbool{mdf@everyline}% + {% + \ifbool{mdf@topline}{% + \nodexn{(mdf@P)-(0,\mdf@innerlinewidth@length) + -0.5(0,\mdf@middlelinewidth@length)}{mdf@P}% + }{}% + }{}% + \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% + \psline[style=mdfframetitlebackgroundstyle](mdf@O|mdf@F)(mdf@O|mdf@P) (mdf@P)(mdf@P|mdf@F)% \endgroup } @@ -631,7 +904,8 @@ \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}% + \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% @@ -652,7 +926,8 @@ \mdfpstricks@settings% \psset{linearc=\mdf@roundcorner@length,cornersize=absolut,}% \expandafter\psset\expandafter{\mdf@psset@local}% - \pnode(\mdf@innerleftmargin@length,\mdf@innerbottommargin@length){mdf@A} + \pnode(\mdf@innerleftmargin@length,\mdf@innerbottommargin@length) + {mdf@A} \pnode(0,0){mdf@O} \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} \ifbool{mdf@leftline}% @@ -688,7 +963,8 @@ %% \ifbool{mdf@shadow} {\pscustom[style=mdfshadow,linestyle=none]{% - \psline[linejoin=2,linecap=1,](mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)% + \psline[linejoin=2,linecap=1,](mdf@O|mdf@P)(mdf@O)% + (mdf@P|mdf@O)(mdf@P)% \psline[linejoin=2,linecap=1,linearc=\z@](mdf@O|mdf@P)(mdf@P) \closedshadow } @@ -698,19 +974,27 @@ %Four lines \mdf@test@ltrb{\mdf@pstricksbox@fl{mdf@O}{mdf@P}}{} %three lines - \mdf@test@ltb{\mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} - \mdf@test@trb{\mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} - \mdf@test@ltr{\mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% - \mdf@test@lrb{\mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% + \mdf@test@ltb{% + \mdf@pstricksbox@tl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@trb{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}}{} + \mdf@test@ltr{% + \mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{}% + \mdf@test@lrb{% + \mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% %two lines combinded - \mdf@test@lb{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} - \mdf@test@rb{\mdf@pstricksbox@tcl{(mdf@P)(mdf@O|mdf@P)(mdf@O)}% - {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} - \mdf@test@tr{\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} - \mdf@test@lt{\mdf@pstricksbox@tcl{(mdf@O)(mdf@P|mdf@O)(mdf@P)}% - {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \mdf@test@lb{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} + \mdf@test@rb{\mdf@pstricksbox@tcl% + {(mdf@P)(mdf@O|mdf@P)(mdf@O)}% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} + \mdf@test@tr{\mdf@pstricksbox@tcl% + {(mdf@P|mdf@O)(mdf@O)(mdf@O|mdf@P)}% + {(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}{} + \mdf@test@lt{\mdf@pstricksbox@tcl% + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}% + {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} %two lines not combinded combinded \mdf@test@lr{\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)} }{} @@ -730,10 +1014,10 @@ %Two combinded \ifboolexpr{test {\mdf@test@ltb} or test {\mdf@test@lb}}% {\mdf@pstricksbox@tcl{(mdf@P|mdf@O)(mdf@P)(mdf@O|mdf@P)}% - {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} + {(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)}}{} \ifboolexpr{test {\mdf@test@trb} or test {\mdf@test@rb}}% {\mdf@pstricksbox@tcl{(mdf@P)(mdf@O|mdf@P)(mdf@O)}% - {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} + {(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{} %Two not combinded \ifboolexpr{test {\mdf@test@ltr} or test {\mdf@test@lr}}% {\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)}}{}% @@ -760,11 +1044,18 @@ \fi }% \def\drawbrackgroundframetitle@second{% - \ifdefempty{\mdf@frametitle}{}{% - \ifdimless{\mdfframetitleboxtotalheight}{\z@} - {}{% - \drawbrackgroundframetitle@@second - }% + \ifdefempty{\mdf@frametitle}{}% + {% + \ifbool{mdf@repeatframetitle}% + {%repeating title = true + \drawbrackgroundframetitle@@@second + }% + {% + \ifdimless{\mdfframetitleboxtotalheight}{\z@} + {}{% + \drawbrackgroundframetitle@@second + }% + }% }% }% \def\drawbrackgroundframetitle@@second{% @@ -778,7 +1069,29 @@ -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% }{}% \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% - \psline[style=mdfframetitlebackgroundstyle,linearc=\z@](mdf@O|mdf@F)(mdf@O|mdf@P) + \psline[style=mdfframetitlebackgroundstyle,linearc=\z@]% + (mdf@O|mdf@F)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@F)% + \endgroup +} +\def\drawbrackgroundframetitle@@@second{% + \begingroup% + \ifbool{mdf@leftline}{% + \nodexn{(mdf@O)+(\mdf@innerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O}% + }{}% + \ifbool{mdf@rightline}{% + \nodexn{(mdf@P)-(\mdf@innerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% + }{}% + \ifbool{mdf@everyline}% + {% + \ifbool{mdf@topline}{% + \nodexn{(mdf@P)-(0,\mdf@innerlinewidth@length) + -0.5(0,\mdf@middlelinewidth@length)}{mdf@P}% + }{}% + }{}% + \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% + \psline[style=mdfframetitlebackgroundstyle](mdf@O|mdf@F)(mdf@O|mdf@P) (mdf@P)(mdf@P|mdf@F)% \endgroup } diff --git a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty index 00974904192..acc8315d123 100644 --- a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty +++ b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty @@ -48,13 +48,14 @@ %% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> %% ================================================== %% -\def\mdversion{v1.5} +\def\mdversion{v1.6b} \def\mdframedpackagename{mdframed} \def\mdf@maindate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mdframed}% - [\mdf@maindate@svn$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $% + [\mdf@maindate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $% \mdversion: \mdframedpackagename] +\newcommand*\mdf@PackageError[1]{\PackageError{\mdframedpackagename}{#1}} \newcommand*\mdf@PackageWarning[1]{\PackageWarning{\mdframedpackagename}{#1}} \newcommand*\mdf@PackageInfo[1]{\PackageInfo{\mdframedpackagename}{#1}} \newcommand*\mdf@LoadFile@IfExist[1]{% @@ -101,7 +102,7 @@ \mdf@iflength{\@tempa}% {\csxdef{mdfl@#1}{\the\mdf@templength}}% {\csxdef{mdfl@#1}{\the\mdf@templength}}% - \expandafter\setlength\csname mdf@#1@length\endcsname{\csname mdfl@#1\endcsname}% + \setlength{\csname mdf@#1@length\endcsname}{\csname mdfl@#1\endcsname}% }% } \def\mdf@do@lengthoption#1{% @@ -140,45 +141,42 @@ \defcounter{mdf@globalstyle@cnt}{0} \newcommand*\mdfglobal@style{0} \define@key{mdf}{style}{% - \mdf@PackageWarning{package option style is depreciated^^J - use framemethod instead\MessageBreak}% - \renewcommand*\mdfglobal@style{#1}% - \defcounter{mdf@globalstyle@cnt}{#1}% - \ifcase\value{mdf@globalstyle@cnt}\relax - %0 <- kein Grafikpaket - \or\mdf@LoadFile@IfExist{tikz}% - \or\mdf@LoadFile@IfExist{pstricks-add}% - \or\defcounter{mdf@globalstyle@cnt}{2}% - \mdf@LoadFile@IfExist{pst-node}% - \or\mdf@LoadFile@IfExist{pst-node}% - \else\mdf@PackageWarning{Unknown global style \value{mdf@globalstyle@cnt}}% - \fi% + \mdf@PackageWarning{package option style is depreciated^^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{}% \def\mdf@framemethod@iii{}% \define@key{mdf}{framemethod}[default]{% - \lowercase{\def\mdf@tempa{#1}} + \lowercase{\def\mdf@tempa{#1}}%lowercase not expandable \forcsvlist{\listadd\mdf@framemethod@i}{default,tex,latex,none,0} \forcsvlist{\listadd\mdf@framemethod@ii}{pgf,tikz,1} \forcsvlist{\listadd\mdf@framemethod@iii}{pstricks,ps,2,postscript} \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}}% - {\xifinlist{\mdf@tempa}{\mdf@framemethod@iii}% - {\def\mdf@@framemethod{pstricks}\defcounter{mdf@globalstyle@cnt}{2}}% - {% - \mdf@LoadFile@IfExist{#1}% - }% - }% - }% + {\def\mdf@@framemethod{default}\defcounter{mdf@globalstyle@cnt}{0}}% + {\xifinlist{\mdf@tempa}{\mdf@framemethod@ii}% + {\def\mdf@@framemethod{tikz}\defcounter{mdf@globalstyle@cnt}{1}}% + {\xifinlist{\mdf@tempa}{\mdf@framemethod@iii}% + {\def\mdf@@framemethod{pstricks}\defcounter{mdf@globalstyle@cnt}{2}}% + {\mdf@LoadFile@IfExist{#1}}% + }% + }% \ifcase\value{mdf@globalstyle@cnt}\relax% - %0 <- kein Grafikpaket - \or\mdf@LoadFile@IfExist{tikz}% - \or\mdf@LoadFile@IfExist{pst-node}% - \or\mdf@LoadFile@IfExist{pst-node}% + \or\mdf@LoadFile@IfExist{tikz}%=1 + \or\mdf@LoadFile@IfExist{pst-node}%=2 + \or\mdf@LoadFile@IfExist{pst-node}%=3 \fi% } \mdf@dolist{\mdf@do@lengthoption}{% @@ -207,6 +205,19 @@ {frametitleleftmargin==10pt},% {frametitlerightmargin==10pt},% {shadowsize==8pt},% + {extratopheight==\z@},% + {subtitleabovelinewidth==.8pt},% + {subtitlebelowlinewidth==.6pt},% + {subtitleaboveskip==\baselineskip},% + {subtitlebelowskip==1.2\baselineskip},% + {subtitleinneraboveskip==.5\baselineskip},% + {subtitleinnerbelowskip==.5\baselineskip},% + {subsubtitleabovelinewidth==.8pt},% + {subsubtitlebelowlinewidth==.6pt},% + {subsubtitleaboveskip==\baselineskip},% + {subsubtitlebelowskip==1.2\baselineskip},% + {subsubtitleinneraboveskip==.5\baselineskip},% + {subsubtitleinnerbelowskip==.5\baselineskip},% } \mdf@dolist{\mdf@do@stringoption}{% {frametitle=={}},% @@ -237,6 +248,14 @@ {firstextra=={}}, {middleextra=={}}, {secondextra=={}}, + {subtitlefont==\normalfont\bfseries},% + {subsubtitlefont==\normalfont},% + {subtitlebackgroundcolor==white},% + {subsubtitlebackgroundcolor==white},% + {subtitleabovelinecolor==black},% + {subtitlebelowlinecolor==black},% + {subsubtitleabovelinecolor==black},% + {subsubtitlebelowlinecolor==black},% } \mdf@dolist{\mdf@do@booloption}{% {ntheorem==false},% @@ -255,13 +274,19 @@ {repeatframetitle==false},%Noch nicht richtig implementiert {shadow==false},% {everyline==false},% + {ignorelastdescenders==false},% + {subtitleaboveline==false}, + {subtitlebelowline==false}, + {subsubtitleaboveline==false}, + {subsubtitlebelowline==false}, } %%special boolflag hidealllines: \newbool{mdf@hidealllines}% \define@key{mdf}{hidealllines}[false]{% \setbool{mdf@hidealllines}{#1}% \ifbool{mdf@hidealllines}{% - \setkeys{mdf}{leftline=false,topline=false,rightline=false,bottomline=false}% + \kvsetkeys{mdf}{leftline=false,topline=false,% + rightline=false,bottomline=false}% }{}% } \mdf@dolist{\mdf@do@alignoption}{% @@ -299,9 +324,8 @@ \define@key{mdf}{pstricksappsetting}{% \def\mdfpstricks@appendsettings{#1}% } - \def\mdf@xcolor{} -\define@key{mdf}{xcolor}[none]{% +\define@key{mdf}{xcolor}[]{% \def\@tempa{#1}% \@ifpackageloaded{xcolor}{% \let\mdf@xcolor\@empty %ignoriere die Eingabe der Optionen @@ -324,9 +348,9 @@ \endgroup% } \DeclareDefaultOption{% - \mdf@PackageWarning{Unknown Option '\CurrentOption' for mdframed}} + \mdf@PackageError{Unknown Option '\CurrentOption' for mdframed}} \ProcessKeyvalOptions*\relax -\newrobustcmd*{\mdfsetup}{\setkeys{mdf}} +\newrobustcmd*{\mdfsetup}{\kvsetkeys{mdf}} \define@key{mdf}{style}{% \ifcsundef{mdf@definestyle@#1}{% \mdf@PackageWarning{Unknown definedstyle #1^^J @@ -334,8 +358,8 @@ via \string\mdfdefinedstyle\MessageBreak }% }% - {\expandafter\expandafter\expandafter\mdfsetup% - \expandafter\expandafter\expandafter{\csname mdf@definestyle@#1\endcsname}}% + {\expandafter\expandafter\expandafter\mdfsetup\expandafter% + \expandafter\expandafter{\csname mdf@definestyle@#1\endcsname}}% }% \let\mdf@PackageNoInfo\@gobble \newrobustcmd*\mdf@ifstrequal@expand{% @@ -361,6 +385,7 @@ \newsavebox\mdf@footnotebox \newsavebox\mdf@splitbox@one \newsavebox\mdf@splitbox@two +\newsavebox\mdf@splitbox@save \newlength\mdfsplitboxwidth \newlength\mdfsplitboxtotalwidth \newlength\mdfsplitboxheight @@ -390,27 +415,38 @@ \newlength\mdf@horizontalwidthofbox@length \newlength\mdf@verticalmarginwhole@length -\newrobustcmd\mdfcreateextratikz{} +\newtoggle{mdf@notfirstframetitle}% +\togglefalse{mdf@notfirstframetitle}% +\newrobustcmd\mdfcreateextratikz{} \def\mdf@lrbox#1{% %%patch to work with amsthm \mdf@patchamsthm -%%end patch - \edef\mdf@restoreparams{% - \parindent=\the\parindent \parskip=\the\parskip} - \setbox#1\vbox\bgroup +%%%end patch + \edef\mdf@restoreparams{% + \parindent=\the\parindent\relax \parskip=\the\parskip\relax}% + \setbox#1\vbox\bgroup% \color@begingroup% - \mdf@horizontalmargin@equation% - \columnwidth=\hsize% - \textwidth=\hsize% - \@parboxrestore% - \mdf@restoreparams% - %SETZE - \@afterindentfalse% - \@afterheading% - %STREICHE - %\@doendpe + \mdf@horizontalmargin@equation% + \columnwidth=\hsize% + \textwidth=\hsize% + \let\if@nobreak\iffalse% + \let\if@noskipsec\iffalse% + \let\par\@@par% + \let\-\@dischyph% + \let\'\@acci\let\`\@accii\let\=\@acciii% + \parindent\z@ \parskip\z@skip% + \linewidth\hsize% + \@totalleftmargin\z@% + \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip% + \parfillskip\@flushglue \lineskip\normallineskip% + \baselineskip\normalbaselineskip% +%% \sloppy% + \let\\\@normalcr% + \mdf@restoreparams\relax% + \@afterindentfalse% + \@afterheading% } \def\endmdf@lrbox{\color@endgroup\egroup} @@ -420,18 +456,20 @@ \vbadness=\@M% \afterassignment\mdf@restorevbadness} \newrobustcmd*\mdf@restorevbadness{\vbadness=\mdf@currentvbadness\relax} -\@ifpackageloaded{amsthm}{% +\@ifpackageloaded{amsthm}% +{% \newrobustcmd\mdf@patchamsthm{% - \let\mdf@deferred@thm@head\deferred@thm@head - \patchcmd{\deferred@thm@head}{\indent}{}% - {\mdf@PackageInfo{mdframed detected package amsthm ^^J - changed the theoerem header of amsthm\MessageBreak}% - }{% - \mdf@PackageInfo{mdframed detected package amsthm ^^J - changed the theoerem header of amsthm failed\MessageBreak}% - }% + \let\mdf@deferred@thm@head\deferred@thm@head + \patchcmd{\deferred@thm@head}{\indent}{}% + {\mdf@PackageInfo{mdframed detected package amsthm ^^J + changed the theoerem header of amsthm\MessageBreak}% + }{% + \mdf@PackageError{mdframed detected package amsthm ^^J + changed the theoerem header of amsthm + failed\MessageBreak}% + }% }% - }{\let\mdf@patchamsthm\relax}% +}{\let\mdf@patchamsthm\relax}% \def\mdf@trivlist#1{% \setlength{\topsep}{#1}% \partopsep\z@% @@ -448,7 +486,13 @@ \item\relax% first Version } \let\endmdf@trivlist\endtrivlist -\patchcmd\endmdf@trivlist\@endparenv\mdf@endparenv{}{} +\patchcmd\endmdf@trivlist\@endparenv\mdf@endparenv{% + \immediate\typeout{^^J****** mdframed patching \string\endmdf@trivlist}% + \immediate\typeout{^^J****** -- success******^^J}% + }{% + \immediate\typeout{^^J****** mdframed patching \string\endmdf@trivlist}% + \immediate\typeout{^^J****** -- failed******^^J}% +} \def\mdf@endparenv{% \addpenalty\@endparpenalty\addvspace\mdf@skipbelow@length\@endpetrue} @@ -487,7 +531,6 @@ \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}}{% @@ -499,19 +542,23 @@ \AfterEndEnvironment{#2}{% \end{mdframed}}% } - +\newrobustcmd*\mdf@thm@caption[2]{} +\AtBeginDocument{% + \@ifpackageloaded{ntheorem}% + {\renewrobustcmd*\mdf@thm@caption{\thm@thmcaption}}{}% + } \DeclareDocumentCommand{\mdtheorem}{ O{} m o m o }% {\ifcsdef{#2}% {\mdf@PackageWarning{Environment #2 already exits\MessageBreak}}% {% \IfNoValueTF {#3}% {%#3 not given -- number relationship - \IfNoValueTF {#5} + \IfNoValueTF {#5}% {%#3+#5 not given \@definecounter{#2}% - \expandafter\xdef\csname the#2\endcsname{\@thmcounter{#2}} + \expandafter\xdef\csname the#2\endcsname{\@thmcounter{#2}}% \newenvironment{#2}[1][]{% - \refstepcounter{#2} + \refstepcounter{#2}% \ifstrempty{##1}% {\let\@temptitle\relax}% {% @@ -519,22 +566,24 @@ \mdf@theoremspace% \mdf@theoremtitlefont% ##1}% - } - \begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname\@temptitle}]}% + \mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}% + }% + \begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname% + \@temptitle}]}% {\end{mdframed}}% \newenvironment{#2*}[1][]{% - \ifstrempty{##1}{\let\@temptitle\relax}{\def\@temptitle{:\ ##1}} + \ifstrempty{##1}{\let\@temptitle\relax}{\def\@temptitle{:\ ##1}}% \begin{mdframed}[#1,frametitle={\strut#4\@temptitle}]}% {\end{mdframed}}% }% {%#5 given -- reset counter \@definecounter{#2}\@newctr{#2}[#5]% - \expandafter\xdef\csname the#2\endcsname{\@thmcounter{#2}} + \expandafter\xdef\csname the#2\endcsname{\@thmcounter{#2}}% \expandafter\xdef\csname the#2\endcsname{% - \expandafter\noexpand\csname the#5\endcsname \@thmcountersep + \expandafter\noexpand\csname the#5\endcsname \@thmcountersep% \@thmcounter{#2}}% \newenvironment{#2}[1][]{% - \refstepcounter{#2} + \refstepcounter{#2}% \ifstrempty{##1}% {\let\@temptitle\relax}% {% @@ -542,8 +591,10 @@ \mdf@theoremspace% \mdf@theoremtitlefont% ##1}% + \mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}% } - \begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname\@temptitle}]}% + \begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname% + \@temptitle}]}% {\end{mdframed}}% \newenvironment{#2*}[1][]{% \ifstrempty{##1}% @@ -553,7 +604,8 @@ \mdf@theoremspace% \mdf@theoremtitlefont% ##1}% - } + \mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}% + }% \begin{mdframed}[#1,frametitle={\strut#4\@temptitle}]}% {\end{mdframed}}% }% @@ -561,7 +613,7 @@ {%#3 given -- number relationship \global\@namedef{the#2}{\@nameuse{the#3}}% \newenvironment{#2}[1][]{% - \refstepcounter{#3} + \refstepcounter{#3}% \ifstrempty{##1}% {\let\@temptitle\relax}% {% @@ -569,11 +621,13 @@ \mdf@theoremspace% \mdf@theoremtitlefont% ##1}% + \mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}% } - \begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname\@temptitle}]}% + \begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname% + \@temptitle}]}% {\end{mdframed}}% \newenvironment{#2*}[1][]{% - \ifstrempty{##1}{\let\@temptitle\relax}{\def\@temptitle{:\ ##1}} + \ifstrempty{##1}{\let\@temptitle\relax}{\def\@temptitle{:\ ##1}}% \begin{mdframed}[#1,frametitle={\strut#4\@temptitle}]}% {\end{mdframed}}% }% @@ -581,20 +635,29 @@ } \newrobustcmd\mdfframedtitleenv[1]{% - \color@begingroup%% \mdf@lrbox{\mdf@frametitlebox}% - \mdf@frametitlealignment% - \color{\mdf@frametitlefontcolor}% - \normalfont\mdf@frametitlefont{#1}\par\unskip - \endmdf@lrbox% + \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% - \global\setbox\mdf@frametitlebox\vbox{\unvbox\mdf@frametitlebox}% - \global\mdfframetitleboxwidth=\wd\mdf@frametitlebox\relax% - \global\mdfframetitleboxheight=\ht\mdf@frametitlebox\relax% - \global\mdfframetitleboxdepth=\dp\mdf@frametitlebox\relax% - \global\mdfframetitleboxtotalheight=\dimexpr\ht\mdf@frametitlebox+\dp\mdf@frametitlebox - +\mdf@frametitleaboveskip@length+\mdf@frametitlebelowskip@length\relax% - \color@endgroup% + \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% } \newrobustcmd*\mdf@@frametitle{% @@ -602,23 +665,19 @@ } \newrobustcmd*\mdf@@frametitle@use{% - \begingroup - \parskip\z@ - \parindent\z@ - \offinterlineskip + \parskip\z@\relax% + \parindent\z@\relax% + \offinterlineskip\relax% \mdf@ignorevbadness% - \global\setbox\mdf@splitbox@one\vbox{% - \unvcopy\mdf@frametitlebox% - \mdf@@frametitlerule% - \unvbox\mdf@splitbox@one + \setbox\mdf@splitbox@one=\vbox{% + \unvcopy\mdf@frametitlebox\relax% + \mdf@@frametitlerule\relax% + \unvbox\mdf@splitbox@one\relax% }% \mdf@ignorevbadness% - \global\setbox\mdf@splitbox@one\vbox{% - \unvbox\mdf@splitbox@one}% - \endgroup + \setbox\mdf@splitbox@one=\vbox{\unvbox\mdf@splitbox@one}% \mdfsetup{innertopmargin=\mdf@frametitleaboveskip@length}% } - \newrobustcmd*\mdf@checkntheorem{% \ifbool{mdf@ntheorem}% {\ifundef{\theorempreskipamount}% @@ -632,12 +691,12 @@ \kern0\p@% \hrule \@width 1in \kern 2.6\p@} \newrobustcmd*\mdf@footnoteoutput{% - \ifvoid\@mpfootins\else + \ifvoid\@mpfootins\else% \nobreak% \vskip\mdf@footenotedistance@length% \normalcolor% - \mdf@footnoterule - \unvbox\@mpfootins + \mdf@footnoterule% + \unvbox\@mpfootins% \fi% } \newrobustcmd*\mdf@footnoteinput{% @@ -657,14 +716,14 @@ {\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}% + \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!!! +\newrobustcmd*\mdf@styledefinition{%AVOID!!!Needed for framemethod=default \ifnumequal{\value{mdf@globalstyle@cnt}}{0}% {\deflength{\mdf@innerlinewidth@length}{\z@}% \deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}% @@ -687,21 +746,6 @@ mdframed uses option nobreak \mdframedpackagename}% \def\mdf@reserved@a{\mdf@put@frame@standalone}% \fi -%% \ifnum\@floatpenalty<0\relax%Detecting float -%% \if@twocolumn% -%% \ifx\@captype\@undefined -%% \def\mdf@reserved@a{\mdf@put@frame}% -%% \else -%% \mdf@PackageInfo{mdframed inside float ^^J -%% mdframed uses option nobreak \mdframedpackagename}% -%% \def\mdf@reserved@a{\mdf@put@frame@standalone}% -%% \fi -%% \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}% @@ -715,18 +759,9 @@ \fi% \mdf@reserved@a% } -\newrobustcmd*\mdf@hidealllines@check{% - \ifbool{mdf@hidealllines}{% - \boolfalse{mdf@leftline}\boolfalse{mdf@rightline}% - \boolfalse{mdf@topline}\boolfalse{mdf@bottomline}% - \boolfalse{mdf@frametitleleftline}\boolfalse{mdf@frametitlerightline}% - \boolfalse{mdf@frametitletopline}\boolfalse{mdf@frametitlebottomline}% - }{}% -} \newenvironment{mdframed}[1][]{% \color@begingroup% \mdfsetup{userdefinedwidth=\linewidth,#1}% -%%% \mdf@hidealllines@check% \mdf@twoside@checklength% \let\width\z@% \let\height\z@% @@ -741,17 +776,24 @@ \mdf@settings% \mdf@lrbox{\mdf@splitbox@one}% }% - {\par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%% + {% + \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% \def\mdf@reserveda{% \mdf@footnoteoutput% \endmdf@lrbox% - \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle@use} + \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle@use}% \detected@mdf@put@frame}% \else% \def\mdf@reserveda{% \endmdf@lrbox% - \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle@use} + \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle@use}% \detected@mdf@put@frame% \mdf@footnoteoutput% }% @@ -786,22 +828,24 @@ \zref@label{mdf@pagelabel-\number\value{mdf@zref@counter}}% } \newrobustcmd*\if@mdf@pageodd{% - \zref@refused{mdf@pagelabel-\the\value{mdf@zref@counter}}% - \ifodd\zref@extract{mdf@pagelabel-\the\value{mdf@zref@counter}}{mdf@pagevalue}% - \setlength\mdf@rightmargin@length{\mdf@outermargin@length}% - \setlength\mdf@leftmargin@length{\mdf@innermargin@length}% - \else - \setlength\mdf@rightmargin@length{\mdf@innermargin@length}% - \setlength\mdf@leftmargin@length{\mdf@outermargin@length}% - \fi% + \zref@refused{mdf@pagelabel-\the\value{mdf@zref@counter}}% + \ifodd\zref@extract{mdf@pagelabel-\the\value{mdf@zref@counter}}% + {mdf@pagevalue}% + \setlength\mdf@rightmargin@length{\mdf@outermargin@length}% + \setlength\mdf@leftmargin@length{\mdf@innermargin@length}% + \else + \setlength\mdf@rightmargin@length{\mdf@innermargin@length}% + \setlength\mdf@leftmargin@length{\mdf@outermargin@length}% + \fi% } \newrobustcmd*\mdf@@setzref{% \iftoggle{md:checktwoside}{\mdf@zref@label\if@mdf@pageodd}{}% } \newrobustcmd*\mdf@freepagevspace{% - \penalty\@M \vskip 2\baselineskip - \penalty9999 \vskip -2\baselineskip - \penalty9999 + \bgroup\@nobreakfalse\addpenalty\z@\egroup%added 29.5.12 + \penalty\@M\relax\vskip 2\baselineskip\relax% + \penalty9999\relax\vskip -2\baselineskip\relax% + \penalty9999% \ifdimequal{\pagegoal}{\maxdimen}% {\mdf@freevspace@length\vsize}% {\mdf@freevspace@length=\pagegoal\relax% @@ -820,34 +864,45 @@ 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% - }{}% - \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% - }{}% + \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% + }{}% + \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@PackageWarning{You have only a width of 3cm}}{}% \hsize=\mdf@horizontalspaceofbox% } \newrobustcmd*\mdf@keeplines@single{% - \notbool{mdf@topline}{% - \advance\mdf@verticalmarginwhole@length by -\mdf@innerlinewidth@length% - \advance\mdf@verticalmarginwhole@length by -\mdf@middlelinewidth@length% - \advance\mdf@verticalmarginwhole@length by -\mdf@outerlinewidth@length% + \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% }{}% - \notbool{mdf@bottomline}{% - \advance\mdf@verticalmarginwhole@length by -\mdf@innerlinewidth@length% - \advance\mdf@verticalmarginwhole@length by -\mdf@middlelinewidth@length% - \advance\mdf@verticalmarginwhole@length by -\mdf@outerlinewidth@length% + \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% }{}% } \newrobustcmd*\mdf@advancelength@verticalmarginwhole[1]{% - \advance\mdf@verticalmarginwhole@length by \csname mdf@#1@length\endcsname\relax% + \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% @@ -866,8 +921,9 @@ \setlength{\mdf@verticalmarginwhole@length}% {\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% \mdf@dolist{\mdf@advancelength@verticalmarginwhole}{% - outerlinewidth,middlelinewidth,innerlinewidth,innertopmargin, - innerbottommargin,innerlinewidth,middlelinewidth,outerlinewidth}% + outerlinewidth,middlelinewidth,innerlinewidth,% + innertopmargin,innerbottommargin,innerlinewidth,% + middlelinewidth,outerlinewidth}% \mdf@keeplines@single% \def\mdf@reserved@a{\mdf@putbox@single}% \fi @@ -875,257 +931,293 @@ } \def\mdf@put@frame{\relax% \ifvoid\mdf@splitbox@one\relax -\mdf@PackageWarning{The environment is empty\MessageBreak}% -\let\mdf@reserved@a\relax% + \mdf@PackageWarning{The environment is empty\MessageBreak}% + \let\mdf@reserved@a\relax% \else \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@one}% \mdf@print@space% \mdf@freepagevspace%gives \mdf@freevspace@length - \mdf@PackageInfoSpace{\the\mdf@freevspace@length before the beginning of \MessageBreak - the environment ending on input line \MessageBreak}% - \ifdimless{\mdf@freevspace@length}{2\baselineskip} - {\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}{% - outerlinewidth,middlelinewidth,innerlinewidth,innertopmargin, - innerbottommargin,innerlinewidth,middlelinewidth,outerlinewidth}% - \mdf@keeplines@single% - \ifdimless{\mdf@verticalmarginwhole@length}{\mdf@freevspace@length}% - {%passt auf Seite% - \begingroup - \mdf@@setzref - \mdf@putbox@single% - \endgroup - \let\mdf@reserved@a\relax}% - {\def\mdf@reserved@a{\mdf@put@frame@i}}%passt nicht auf Seite - }% + \mdf@PackageInfoSpace{\the\mdf@freevspace@length before the + beginning of \MessageBreak + the environment ending on input line \MessageBreak}% + \ifdimless{\mdf@freevspace@length}{2\baselineskip} + {% + \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}% + {% + outerlinewidth,middlelinewidth,innerlinewidth,% + innertopmargin,innerbottommargin,% + innerlinewidth,middlelinewidth,outerlinewidth}% + \mdf@keeplines@single% + \ifdimless{\mdf@verticalmarginwhole@length}{\mdf@freevspace@length}% + {%passt auf Seite% + \begingroup\mdf@@setzref\mdf@putbox@single\endgroup%Output no break + \let\mdf@reserved@a\relax% + }% + {% + \def\mdf@reserved@a{\mdf@put@frame@i}%passt nicht auf Seite + } + }% \fi \mdf@reserved@a% } -\def\mdf@put@frame@i{%Box muss gesplittet werden -- Ausgabe der ersten Teilbox - %Berechnung der Splittgroesse -- Linien und Abstand oben - %\vbox to 0pt{}% - %\rlap{\smash{\the\mdf@freevspace@length}}%\hrule \@height\z@ \@width\hsize +\def\mdf@put@frame@i{%Box must be splitted \mdf@freepagevspace%gives \mdf@freevspace@length - %Berechnung ob nur oberen Linien nur auf die Seite passe - \dimen@=\the\mdf@freevspace@length% - \dimen@i=\mdf@innertopmargin@length% - \advance\dimen@i by \mdf@innerlinewidth@length% - \advance\dimen@i by \mdf@middlelinewidth@length% - \advance\dimen@i by \mdf@outerlinewidth@length% - \advance\dimen@i by 2\baselineskip% + \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% + \advance\dimen@i by 2\baselineskip\relax% \ifdimless{\dimen@}{\dimen@i}% {\hrule \@height\z@ \@width\hsize% \vfill\eject% \def\mdf@reserved@a{\mdf@put@frame}% - }{% - \mdf@freepagevspace% - \dimen@=\the\mdf@freevspace@length% + }% + {% \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% - }{}% - }{}% - \ifbool{mdf@topline}{}{% - \advance\dimen@ by \mdf@innerlinewidth@length% - \advance\dimen@ by \mdf@middlelinewidth@length% - \advance\dimen@ by \mdf@outerlinewidth@length% - }% + \ifbool{mdf@everyline}% + {% + \ifbool{mdf@bottomline}% + {% + \advance\dimen@ by -\mdf@innerlinewidth@length% + \advance\dimen@ by -\mdf@middlelinewidth@length% + \advance\dimen@ by -\mdf@outerlinewidth@length% + }{}% + }{}% + \notbool{mdf@topline}% + {% + \advance\dimen@ by \mdf@innerlinewidth@length% + \advance\dimen@ by \mdf@middlelinewidth@length% + \advance\dimen@ by \mdf@outerlinewidth@length% + }{}% \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}% - \advance\dimen@ by -1.8\baselineskip\relax% + by changing the text, the space\MessageBreak + or something else}% + \advance\dimen@ by -1.8\baselineskip\relax%needed???????????????????? }{}% - \splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length% - \mdf@ignorevbadness% - \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \dimen@ - \setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two}% - \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}% - \ifbool{mdf@repeatframetitle}{% - \setbox\mdf@splitbox@one\vbox{% - \vbox to \mdf@splittopskip@length{\hsize\z@} - %\par\unskip\nointerlineskip - \unvcopy\mdf@frametitlebox% - \mdf@@frametitlerule% - \vbox to\dimexpr - -\mdf@splittopskip@length+\ht\strutbox+\dp\strutbox - +\mdf@innertopmargin@length\relax{\hsize\z@}% - \unvbox\mdf@splitbox@one}% - }{}% - \ifdimgreater{\ht\mdf@splitbox@two+\dp\mdf@splitbox@two}{\dimen@}% - {%Falsch gesplittet - \mdf@PackageInfo{Box was splittet wrong\MessageBreak}% - \dimen@i=\dimen@ - \advance\dimen@ by -\ht\mdf@splitbox@two - \advance\dimen@ by -\dp\mdf@splitbox@two - \advance\dimen@i by 0.5\dimen@ - \splittopskip\z@% - \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@two% - %benoetigt um Tiefe zu haben - \hrule \@height\dp\strutbox \@width\z@ - \unvbox\mdf@splitbox@one} - \splittopskip\mdf@splittopskip@length% - \mdf@ignorevbadness% - \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \dimen@i - \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@}% - {% - \splittopskip\z@\mdf@ignorevbadness%% - \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@two% - %benoetigt um Tiefe zu haben - \hrule \@height\dp\strutbox \@width\z@ - \unvbox\mdf@splitbox@one}% - \mdf@ignorevbadness% - \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}% - }{}% - \ifbool{mdf@repeatframetitle}{% - \setbox\mdf@splitbox@one\vbox{% - \vbox to \mdf@splittopskip@length{\hsize\z@} - %\par\unskip\nointerlineskip - \unvcopy\mdf@frametitlebox% - \mdf@@frametitlerule% - \vbox to\dimexpr - -\mdf@splittopskip@length+\ht\strutbox+\dp\strutbox - +\mdf@innertopmargin@length\relax{\hsize\z@}% - \unvbox\mdf@splitbox@one}% - }{}% - }{}% - \ifvoid\mdf@splitbox@one - \mdf@PackageWarning{You got a bad break\MessageBreak - because the splittet box is empty\MessageBreak - You have to change the page settings\MessageBreak - like enlargethispage or something else}% - \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@two}% - \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}% - \enlargethispage{\baselineskip}% - \def\mdf@reserved@a{\mdf@put@frame}% - \fi - \ifvoid\mdf@splitbox@two%%pruefe, ob erste Box leer ist + \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 \dimen@ + \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@}% + {%splitted wrong + \mdf@PackageInfo{Box was splittet wrong^^M starting loop to iterate + the splitting point\MessageBreak}% + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% + \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 + \ifnum\@tempcnta>100 + \let\iterate\relax + \mdf@PackageWarning{correct box splittet fails^^M + It seems you are using a non splittable + contents\MessageBreak} + \fi + \mdf@ignorevbadness% + \setbox\mdf@splitbox@one=\vbox{\break\unvcopy\mdf@splitbox@save}% + \splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length% + \mdf@ignorevbadness% + \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \dimen@i\relax% + \setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two}% + \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}% + \repeat% + }{}% + \ifvoid\mdf@splitbox@one\relax% + \mdf@PackageWarning{You got a bad break because the splittet box + is empty^^M + You have to change the page settings^^M + like enlargethispage or something else^^M + the package increases do + \enlargethispage{\baselineskip}\MessageBreak}% + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save} + \enlargethispage{\baselineskip}% + \def\mdf@reserved@a{\mdf@put@frame}% + \fi% + \ifdim\wd\mdf@splitbox@two=\wd\mdf@splitbox@one\relax + \else% + \mdf@PackageInfo{You first box width is to small^^M + mdframed fixed it\MessageBreak}% + \setbox\mdf@splitbox@two=\vbox% + {% + \hrule \@height\z@ \@width\wd\mdf@splitbox@one\relax + \unvcopy\mdf@splitbox@two% + }% + \fi% + \ifvoid\mdf@splitbox@two\relax% {\hrule \@height\f@size pt \@width\z@% \hrule \@height\z@ \@width\hsize}% - % - \def\mdf@reserved@a{\mdf@put@frame}% - \else + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% + \def\mdf@reserved@a{\mdf@put@frame}% + \else% \ifdimequal{\ht\mdf@splitbox@two}{0pt}% {\hrule \@height\z@ \@width\hsize% \vfill\eject% - \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@two\unvbox\mdf@splitbox@one} + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% \def\mdf@reserved@a{\mdf@put@frame}% }% {% - \begingroup% - \mdf@@setzref - \mdf@putbox@first%%%Groesse des Splittens passt - \endgroup% + \begingroup\mdf@@setzref\mdf@putbox@first\endgroup% \hrule \@height\z@ \@width\hsize% \vfill\eject% \def\mdf@reserved@a{\mdf@put@frame@ii}% }% - \fi% - }% + \fi% + }% \mdf@reserved@a% } -\def\mdf@put@frame@ii{%Ausgabe der mittleren Box(en) wenn vorhanden +\def\mdf@put@frame@ii{% \setlength{\mdf@freevspace@length}{\vsize}% + \ifbool{mdf@repeatframetitle}% + {% + \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% + {% + \vbox to \mdf@frametitleaboveskip@length{} + \unvcopy\mdf@frametitlebox\relax% + \mdf@@frametitlerule\relax% + \unvbox\mdf@splitbox@one\relax% + }% + \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@ - outerlinewidth,middlelinewidth,innerlinewidth,% - innerbottommargin}%%%Addition der Linien unten - \ifbool{mdf@everyline}{% - \ifbool{mdf@topline}{% - \advance\dimen@ by \mdf@innerlinewidth@length% - \advance\dimen@ by \mdf@middlelinewidth@length% - \advance\dimen@ by \mdf@outerlinewidth@length% - }{}% - }{}% - \ifbool{mdf@bottomline}{}{% - \advance\dimen@ by -\mdf@innerlinewidth@length% - \advance\dimen@ by -\mdf@middlelinewidth@length% - \advance\dimen@ by -\mdf@outerlinewidth@length% - \relax}% - \ifdimgreater{\dimen@}{\mdf@freevspace@length}% + \mdf@dolist{\mdf@advancelength@freevspace@add}% + {%used \dimen@ + innerbottommargin,innerlinewidth,middlelinewidth,outerlinewidth,% + }% + \ifbool{mdf@everyline}% {% + \ifbool{mdf@topline}% + {% + \advance\dimen@ by \mdf@innerlinewidth@length\relax% + \advance\dimen@ by \mdf@middlelinewidth@length\relax% + \advance\dimen@ by \mdf@outerlinewidth@length\relax% + }{}% + }{}% + \notbool{mdf@bottomline}% + {% + \advance\dimen@ by -\mdf@innerlinewidth@length\relax% + \advance\dimen@ by -\mdf@middlelinewidth@length\relax% + \advance\dimen@ by -\mdf@outerlinewidth@length\relax% + \relax% + }{}% + \ifdimgreater{\dimen@}{\mdf@freevspace@length}% + {%have a middle box \advance\mdf@freevspace@length by -\mdf@splitbottomskip@length\relax% - \advance\mdf@freevspace@length by .5\ht\strutbox\relax% - \ifbool{mdf@everyline}{% - \ifbool{mdf@topline}{% - \advance\mdf@freevspace@length by -\mdf@innerlinewidth@length% - \advance\mdf@freevspace@length by -\mdf@middlelinewidth@length% - \advance\mdf@freevspace@length by -\mdf@outerlinewidth@length% - }{}% - \ifbool{mdf@bottomline}{% - \advance\mdf@freevspace@length by -\mdf@innerlinewidth@length% - \advance\mdf@freevspace@length by -\mdf@middlelinewidth@length% - \advance\mdf@freevspace@length by -\mdf@outerlinewidth@length% - \relax}{}% - }{}% - \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}%PRUEFEN!!! - \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}%PRUEFEN!!!! - \ifbool{mdf@repeatframetitle}{% - \setbox\mdf@splitbox@one\vbox{% - \vbox to \mdf@splittopskip@length{\hsize\z@} - %\par\unskip\nointerlineskip - \unvcopy\mdf@frametitlebox% - \mdf@@frametitlerule% - \vbox to\dimexpr - -\mdf@splittopskip@length+\ht\strutbox+\dp\strutbox - +\mdf@innertopmargin@length\relax{\hsize\z@}% - \unvbox\mdf@splitbox@one}% - }{}% - \ifvoid\mdf@splitbox@one\relax% - \mdf@PackageWarning{You got a bad break\MessageBreak - because the split box is empty\MessageBreak - You have to change the settings}% - \setbox\mdf@splitbox@one{\unvbox\mdf@splitbox@two}% - \def\mdf@reserved@a{\enlargethispage{\baselineskip}\mdf@put@frame@ii}% - \else - \begingroup - \mdf@@setzref - \mdf@putbox@middle% - \endgroup - \hrule \@height\z@ \@width\hsize - \vfill\eject + \ifbool{mdf@everyline}% + {% + \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% + }{}% + \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 + }{}% + }{}% + \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} + \ifdimgreater{\ht\mdf@splitbox@two+\dp\mdf@splitbox@two}{\dimen@}% + {%splitted wrong + \mdf@PackageInfo{Box was splittet wrong^^M starting loop to iterate + the splitting point\MessageBreak}% + \dimen@i=\mdf@freevspace@length%\relax + \@tempcnta=\z@\relax + \loop + \ifdim\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax>% + \mdf@freevspace@length\relax + \advance\dimen@i by -\p@\relax% + \advance\@tempcnta by \@ne\relax% + \ifnum\@tempcnta>100 + \let\iterate\relax% + \mdf@PackageWarning{correct box splittet fails^^M + It seems you are using a non splittable + contents\MessageBreak}% + \fi + \setbox\mdf@splitbox@one=\vbox{\break\unvcopy\mdf@splitbox@save}% + \splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length% + \mdf@ignorevbadness% + \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \dimen@i\relax% + \setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two}% + \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}% + \repeat% + }{}% + \ifvoid\mdf@splitbox@one\relax% + \mdf@PackageWarning{You got a bad break because the splittet box is + empty^^M + You have to change the page settings^^M + like enlargethispage or something else^^M + the package increases do + \enlargethispage{\baselineskip}\MessageBreak}% + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% + \enlargethispage{\baselineskip}% + \def\mdf@reserved@a{\mdf@put@frame@ii}% + \else + \begingroup\mdf@@setzref\mdf@putbox@middle\endgroup% + \hrule \@height\z@ \@width\hsize% + \vfill\eject% \def\mdf@reserved@a{\mdf@put@frame@ii}% \fi - }%Hier die Ausgabe der mittleren Box - {\ifvoid\mdf@splitbox@one + }%End middle box case + {%start last box case + \ifvoid\mdf@splitbox@one \mdf@PackageWarning{You got a bad break\MessageBreak because the last split box is empty\MessageBreak You have to change the settings}%% - \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one\hrule \@height\z@ \@width\mdfboundingboxwidth}% + \setbox\mdf@splitbox@one=\vbox% + {% + \unvbox\mdf@splitbox@one% + \hrule \@height\z@ \@width\mdfboundingboxwidth + }% \fi% - \ifdimless{\ht\mdf@splitbox@one}{1sp}{% - \mdf@PackageWarning{You got a bad break\MessageBreak - because the last split box is empty\MessageBreak - You have to change the settings}% - %\hb@xt@\z@{\box\mdf@splitbox@one}% - \let\mdf@reserved@a\relax% - \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one\hrule \@height\z@ \@width\mdfboundingboxwidth}% + \ifdimless{\ht\mdf@splitbox@one}{1sp}% + {% + \mdf@PackageWarning{You got a bad break\MessageBreak + because the last split box is empty\MessageBreak + You have to change the settings}% + + \let\mdf@reserved@a\relax% + \setbox\mdf@splitbox@one=\vbox% + {% + \unvbox\mdf@splitbox@one% + \hrule \@height\z@ \@width\mdfboundingboxwidth + }% }{}% - \begingroup% - \mdf@@setzref - \mdf@putbox@second% - \hrule \@height\z@ \@width\hsize% - \endgroup% - \let\mdf@reserved@a\relax% - }%Hier kommt die Ausgabe der letzten Box + \begingroup\mdf@@setzref\mdf@putbox@second\endgroup% + \hrule \@height\z@ \@width\hsize% + \let\mdf@reserved@a\relax% + }% \mdf@reserved@a% } @@ -1141,65 +1233,65 @@ %%Zusammenhaenge abfragen: \newrobustcmd*\mdf@test@ltrb{% \ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline}) - and (bool {mdf@leftline}) and (bool {mdf@rightline})}} + and (bool {mdf@leftline}) and (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@ltr{% \ifboolexpr{ (bool {mdf@topline}) and not (bool {mdf@bottomline}) - and (bool {mdf@leftline}) and (bool {mdf@rightline})}} + and (bool {mdf@leftline}) and (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@ltb{% \ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline}) - and (bool {mdf@leftline}) and not (bool {mdf@rightline})}} + and (bool {mdf@leftline}) and not (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@trb{% \ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline}) - and not (bool {mdf@leftline}) and (bool {mdf@rightline})}} + and not (bool {mdf@leftline}) and (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@lrb{% \ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline}) - and (bool {mdf@leftline}) and (bool {mdf@rightline})}} + and (bool {mdf@leftline}) and (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@lb{% \ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline}) - and (bool {mdf@leftline}) and not (bool {mdf@rightline})}} + and (bool {mdf@leftline}) and not (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@rb{% \ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline}) - and not (bool {mdf@leftline}) and (bool {mdf@rightline})}} + and not (bool {mdf@leftline}) and (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@tr{% \ifboolexpr{ (bool {mdf@topline}) and not (bool {mdf@bottomline}) - and not (bool {mdf@leftline}) and (bool {mdf@rightline})}} + and not (bool {mdf@leftline}) and (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@lt{% \ifboolexpr{ (bool {mdf@topline}) and not (bool {mdf@bottomline}) - and (bool {mdf@leftline}) and not (bool {mdf@rightline})}} + and (bool {mdf@leftline}) and not (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@lr{% - \ifboolexpr{not (bool {mdf@topline}) and not (bool {mdf@bottomline}) - and (bool {mdf@leftline}) and (bool {mdf@rightline})}} + \ifboolexpr{ not (bool {mdf@topline}) and not (bool {mdf@bottomline}) + and (bool {mdf@leftline}) and (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@tb{% \ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline}) - and not (bool {mdf@leftline}) and not (bool {mdf@rightline})}} + and not (bool {mdf@leftline}) and not (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@l{% \ifboolexpr{ not (bool {mdf@topline}) and not (bool {mdf@bottomline}) - and (bool {mdf@leftline}) and not (bool {mdf@rightline})}} + and (bool {mdf@leftline}) and not (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@r{% \ifboolexpr{ not (bool {mdf@topline}) and not (bool {mdf@bottomline}) - and not (bool {mdf@leftline}) and (bool {mdf@rightline})}} + and not (bool {mdf@leftline}) and (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@t{% \ifboolexpr{ (bool {mdf@topline}) and not (bool {mdf@bottomline}) - and not (bool {mdf@leftline}) and not (bool {mdf@rightline})}} + and not (bool {mdf@leftline}) and not (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@b{% \ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline}) - and not (bool {mdf@leftline}) and not (bool {mdf@rightline})}} + and not (bool {mdf@leftline}) and not (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@noline{% \ifboolexpr{ not (bool {mdf@topline}) and not (bool {mdf@bottomline}) - and not (bool {mdf@leftline}) and not (bool {mdf@rightline})}} + and not (bool {mdf@leftline}) and not (bool {mdf@rightline})}} \newrobustcmd*\mdf@test@single{% \ifboolexpr{ not (test {\mdf@test@ltrb} or test {\mdf@test@ltr} or - test {\mdf@test@ltb} or test {\mdf@test@trb} or - test {\mdf@test@lrb} or test {\mdf@test@lb} or - test {\mdf@test@rb} or test {\mdf@test@tr} or - test {\mdf@test@lt} ) }} + test {\mdf@test@ltb} or test {\mdf@test@trb} or + 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 %% %% ================================================================ -%% Copyright (C) 2011 by Marco Daniel +%% Copyright (C) 2012 by Marco Daniel %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License (LPPL), either |