diff options
author | Karl Berry <karl@freefriends.org> | 2012-07-23 23:37:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-07-23 23:37:53 +0000 |
commit | 5a5ae35291039c9f1bf0f25c40b5adb3ea956920 (patch) | |
tree | 066ad9500ae348132d9434b11b3b12d5021ed5fd /Master | |
parent | 55994f4bf1d4081cd3a038c425f6de7c173629bb (diff) |
mdframed (4jun12)
git-svn-id: svn://tug.org/texlive/trunk@27127 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
19 files changed, 6298 insertions, 2701 deletions
diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.pdf Binary files differindex e12c426ee8f..b1d2d276fef 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.pdf +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.pdf diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex index 1783e4a276a..7aba53867bf 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex @@ -1,7 +1,8 @@ -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\ltxmdfsetifoot $Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ + {documentation of mdframed} \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} @@ -12,10 +13,11 @@ \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $} +\date{\ExplFileDate} \version{\mdversion} -\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. -Some presented examples are more or less exorbitant.} +\introduction{In this document I collect various examples for + \Opt{framemethod=\Loadedframemethod}. + Some presented examples are more or less exorbitant.} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% @@ -39,10 +41,13 @@ Some presented examples are more or less exorbitant.} \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. +In the preamble only the package \Pack{mdframed} width the option +\Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be +done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} -\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with the +package \Pack{showexpl}.} \section{Examples} All examples have the following settings: @@ -99,7 +104,9 @@ function of the independent variables alone. \begin{LTXexample} \begin{mdframed}[userdefinedwidth=6cm,align=center, linecolor=blue,linewidth=4pt] -\includegraphics[width=\linewidth]{donald-duck} +\IfFileExists{donald-duck.jpg}% + {\includegraphics[width=\linewidth]{donald-duck}}% + {\rule{\linewidth}{4cm}}% \end{mdframed} \end{LTXexample} @@ -159,7 +166,10 @@ function of the independent variables alone. \clearpage \Examplesec{hide only a part of a line} -The example below is inspired by the following post on StackExchange \href{http://tex.stackexchange.com/questions/24101/theorem-decorations-that-stay-with-theorem-environment}{Theorem decorations that stay with theorem environment} +The example below is inspired by the following post on StackExchange +\href{http://tex.stackexchange.com/questions/24101/theorem-decorations^^A + -that-stay-with-theorem-environment}% + {Theorem decorations that stay with theorem environment} \begin{LTXexample} \makeatletter \newlength{\interruptlength} diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.pdf Binary files differindex e593ef959f8..a66b5a606e6 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.pdf +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.pdf diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex index 76a3e5e93c1..f06c52e1635 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex @@ -1,7 +1,8 @@ -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\ltxmdfsetifoot$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ + {documentation of mdframed} \lstDeleteShortInline{|} \newcommand\Loadedframemethod{PSTricks} @@ -13,10 +14,11 @@ \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $} +\date{\ExplFileDate} \version{\mdversion} -\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. -Some presented examples are more or less exorbitant.} +\introduction{In this document I collect various examples for + \Opt{framemethod=\Loadedframemethod}. + Some presented examples are more or less exorbitant.} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% @@ -40,10 +42,13 @@ Some presented examples are more or less exorbitant.} \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. +In the preamble only the package \Pack{mdframed} width the option +\Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be +done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} -\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with the +package \Pack{showexpl}.} X \section{Examples} All examples have the following settings: diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.pdf Binary files differindex 6fd2b71c07d..8ad20b90300 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.pdf +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.pdf diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.tex index 2d4146bf2a5..72eae7ec695 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.tex @@ -1,23 +1,25 @@ -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} -\documentclass[parskip=false,english,11pt,ltxlipsum]{ltxmdf} -\ltxmdfsetifoot $Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +\documentclass[parskip=false,english,11pt,lipsum=true]{ltxmdf} +\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ + {documentation of mdframed} \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} \usepackage{tikz} -\usetikzlibrary{calc,arrows} +\usetikzlibrary{calc,arrows,shadings,shadows} \newcommand\Loadedframemethod{tikz} \usepackage[framemethod=\Loadedframemethod]{mdframed} \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $} +\date{\ExplFileDate} \version{\mdversion} -\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. -Some presented examples are more or less exorbitant.} +\introduction{In this document I collect various examples for + \Opt{framemethod=\Loadedframemethod}. + Some presented examples are more or less exorbitant.} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% @@ -41,10 +43,13 @@ Some presented examples are more or less exorbitant.} \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. +In the preamble only the package \Pack{mdframed} width the option +\Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be +done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} -\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with the +package \Pack{showexpl}.} \section{Examples} All examples have the following settings: @@ -64,11 +69,16 @@ function of the independent variables alone. \end{tltxmdfexample} \clearpage \Examplesec{Package listings} -The example below is inspired by the following post on StackExchange \href{http://tex.stackexchange.com/questions/27673/background-overflows-when-using-rounded-corners-for-listings-package-listings}{Background overflows when using rounded corners for listings (package: `listings`)} +The example below is inspired by the following post on StackExchange +\href{http://tex.stackexchange.com/questions/27673/background-overflows-^^A + when-using-rounded-corners-for-listings-package-listings}% + {Background overflows when using rounded corners for listings + (package: `listings`)} Here the solution which can be decorate as usual. -\begin{tltxmdfexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment},morekeywords={lstlisting}] +\begin{tltxmdfexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment}, + morekeywords={lstlisting}] \BeforeBeginEnvironment{lstlisting}{% \begin{mdframed}[<modification>]% \vspace{-0.7em}} @@ -78,12 +88,14 @@ Here the solution which can be decorate as usual. \end{tltxmdfexample} With the new command \Cmd{surroundwithmdframed} you can use -\begin{tltxmdfexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment},morekeywords={lstlisting}] +\begin{tltxmdfexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment}, + morekeywords={lstlisting}] \surroundwithmdframed{listings} \end{tltxmdfexample} \Examplesec{Package multicol} -How I wrote in \enquote{Known Problems} you can't combine \Pack{multicol} with \Pack{mdframed}. In a simple way without any breaks you can use: +How I wrote in \enquote{Known Problems} you can't combine \Pack{multicol} with +\Pack{mdframed}. In a simple way without any breaks you can use: \begin{LTXexample} \begin{multicols}{2} \lipsum[1] @@ -132,7 +144,41 @@ Text Text Text Text Text Text Text Text Text Text Text Text Text Text \end{LTXexample} \clearpage -\Examplesec{digression-environement inspired by Tobias Schwan} +\Examplesec{Position a specific symbol at a line} +\begin{LTXexample} +\tikzset{ + warningsymbol/.style={ + rectangle,draw=red, + fill=white,scale=1, + overlay}} +\mdfdefinestyle{warning}{% + hidealllines=true,leftline=true, + skipabove=12,skipbelow=12pt, + innertopmargin=0.4em,% + innerbottommargin=0.4em,% + innerrightmargin=0.7em,% + rightmargin=0.7em,% + innerleftmargin=1.7em,% + leftmargin=0.7em,% + middlelinewidth=.2em,% + linecolor=red,% + fontcolor=red,% + firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$) + node[warningsymbol] {\$};},% + secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$) + node[warningsymbol] {\$};},% + middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$) + node[warningsymbol] {\$};},% + singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$) + node[warningsymbol] {\$};},% +} +\begin{mdframed}[style=warning] +\ExampleText +\end{mdframed} +\end{LTXexample} + +\clearpage +\Examplesec{digression-environement inspired by Tobias Weh} \begin{lstlisting} \usetikzlibrary{calc,arrows} \tikzset{ @@ -237,5 +283,25 @@ Text Text Text Text Text Text \begin{mdframed}[style=digressionarrows] \ExampleText \end{mdframed} + +\Examplesec{Theorem style shading background} +\begin{LTXexample} +\mdtheorem[% + apptotikzsetting={\tikzset{mdfbackground/.append style =% + {top color=yellow!40!white, + bottom color=yellow!80!black}, + mdfframetitlebackground/.append style =% + {top color=purple!40!white, + bottom color=purple!80!black} + } + }, + ,roundcorner=10pt,middlelinewidth=2pt, + shadow=true,frametitlerule=true,frametitlerulewidth=4pt, + innertopmargin=10pt,% + ]{alternativtheorem}{Theorem} +\begin{alternativtheorem}[Inhomogeneous linear] +\ExampleText +\end{alternativtheorem} +\end{LTXexample} \end{document} \endinput diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.pdf Binary files differindex 7b09f04abda..4198c38f488 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.pdf +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.pdf diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex index bbf84bdcc62..de0825c52f1 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex @@ -1,7 +1,8 @@ -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\ltxmdfsetifoot $Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ + {documentation of mdframed} \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} @@ -12,10 +13,11 @@ \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $} +\date{\ExplFileDate} \version{\mdversion} -\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. -Some presented examples are more or less exorbitant.} +\introduction{In this document I collect various examples for + \Opt{framemethod=\Loadedframemethod}. + Some presented examples are more or less exorbitant.} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% @@ -39,10 +41,13 @@ Some presented examples are more or less exorbitant.} \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. +In the preamble only the package \Pack{mdframed} width the option +\Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be +done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} -\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with the +package \Pack{showexpl}.} \section{Examples} All examples have the following settings: @@ -85,7 +90,9 @@ function of the independent variables alone. \begin{LTXexample} \begin{mdframed}[userdefinedwidth=6cm,align=center, linecolor=blue,middlelinewidth=4pt,roundcorner=5pt] -\includegraphics[width=\linewidth]{donald-duck} +\IfFileExists{donald-duck.jpg}% + {\includegraphics[width=\linewidth]{donald-duck}}% + {\rule{\linewidth}{4cm}}% \end{mdframed} \end{LTXexample} diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf Binary files differindex eb119d6f5fb..44f7ab50c98 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf diff --git a/Master/texmf-dist/source/latex/mdframed/Makefile b/Master/texmf-dist/source/latex/mdframed/Makefile index ae65e5ab14a..53c5c0d3b2f 100644 --- a/Master/texmf-dist/source/latex/mdframed/Makefile +++ b/Master/texmf-dist/source/latex/mdframed/Makefile @@ -1,6 +1,6 @@ ################################################################ ## Makefile for mdframed project folder -## $Id: Makefile 321 2012-01-09 18:57:42Z marco $ +## $Id: Makefile 422 2012-05-31 17:07:26Z marco $ ################################################################ ## Definitions ################################################################ @@ -15,8 +15,13 @@ EXAMPLED = mdframed-example-default EXAMPLET = mdframed-example-tikz EXAMPLEP = mdframed-example-pstricks EXAMPLESX = mdframed-example-texsx +STYLE_I = md-frame-0 +STYLE_II = md-frame-1 +STYLE_III = md-frame-2 +STYLE_IV = md-frame-3 EXAMPLLIST= $(EXAMPLED) $(EXAMPLET) $(EXAMPLEP) $(EXAMPLESX) FILELIST = $(PACKAGE) $(EXAMPLED) $(EXAMPLET) $(EXAMPLEP) $(EXAMPLESX) +STYLELIST = $(STYLE_I) $(STYLE_II) $(STYLE_III) $(STYLE_IV) AUXFILES = aux dtxe glo glolog gls hd ins idx idxlog ilg ind log out ps thm tmp toc ################################################################ ## Colordefinition @@ -36,6 +41,7 @@ help: @echo -e "\tmake examples\t\t--\tcompiles all example files" @echo -e "\tmake clean\t\t--\tremove all helpfiles created by mdframed" @echo -e "\tmake changeversion\t--\tmaintaner tool to change the version" + @echo -e "\tmake localinstall\t--\tinstall the package in TEXMFHOME" @echo -e "$(WARN_COLOR)End help$(NO_COLOR)" ################################################################ @@ -44,14 +50,14 @@ help: %.pdf: %.tex NAME=`basename $< .tex` ;\ echo -e "" ;\ - echo -e "\t$(ERROR_COLOR)Typesetting $$NAME$(NO_COLOR)" ;\ - pdflatex -draftmode -interaction=nonstopmode $< > /dev/null ;\ + echo -e "\t$(WARN_COLOR)Typesetting $$NAME$(NO_COLOR)" ;\ + pdflatex --draftmode --interaction=nonstopmode $< > /dev/null ;\ if [ $$? = 0 ] ; then \ - echo -e "\t$(OK_COLOR)compilation in draftmode without erros$(NO_COLOR)" ;\ + echo -e "\t$(OK_COLOR)compilation in draftmode without errors$(NO_COLOR)" ;\ echo -e "\t$(OK_COLOR)Run PDFLaTeX again on $$NAME.tex$(NO_COLOR)" ;\ - pdflatex -interaction=nonstopmode $< > /dev/null ;\ + pdflatex --interaction=nonstopmode $< > /dev/null ;\ else \ - echo -e "\t$(ERROR_COLOR)compilation in draftmode with erros$(NO_COLOR)" ;\ + echo -e "\t$(ERROR_COLOR)compilation in draftmode with errors$(NO_COLOR)" ;\ exit 0;\ fi ;\ echo -e "\t$(OK_COLOR)Typesetting $$NAME finished $(NO_COLOR)" ;\ @@ -59,46 +65,68 @@ help: %.ps: %.tex NAME=`basename $< .tex` ;\ echo -e "" ;\ - echo -e "\t$(ERROR_COLOR)Typesetting $$NAME$(NO_COLOR)" ;\ - latex -draftmode -interaction=nonstopmode $< > /dev/null ;\ + echo -e "\t$(WARN_COLOR)Typesetting $$NAME$(NO_COLOR)" ;\ + xelatex --no-pdf --interaction=nonstopmode $< > /dev/null ;\ if [ $$? = 0 ] ; then \ - echo -e "\t$(OK_COLOR)compilation in draftmode without erros$(NO_COLOR)" ;\ + echo -e "\t$(OK_COLOR)compilation in draftmode without errors$(NO_COLOR)" ;\ echo -e "\t$(OK_COLOR)Run LaTeX again on $$NAME.tex$(NO_COLOR)" ;\ - latex -interaction=nonstopmode $< > /dev/null ;\ - dvips -q $$NAME.dvi ;\ - ps2pdf $$NAME.ps ;\ + xelatex --interaction=nonstopmode $< > /dev/null ;\ else \ - echo -e "\t$(ERROR_COLOR)compilation in draftmode with erros$(NO_COLOR)" ;\ + echo -e "\t$(ERROR_COLOR)compilation in draftmode with errors$(NO_COLOR)" ;\ exit 0;\ fi ;\ echo -e "\t$(OK_COLOR)Typesetting $$NAME done$(NO_COLOR)" ;\ + +# latex -draftmode -interaction=nonstopmode $< > /dev/null ;\ +# if [ $$? = 0 ] ; then \ +# echo -e "\t$(OK_COLOR)compilation in draftmode without errors$(NO_COLOR)" ;\ +# echo -e "\t$(OK_COLOR)Run LaTeX again on $$NAME.tex$(NO_COLOR)" ;\ +# latex -interaction=nonstopmode $< > /dev/null ;\ +# latex -interaction=nonstopmode $< > /dev/null ;\ +# dvips -q $$NAME.dvi ;\ +# ps2pdf $$NAME.ps ;\ +# else \ +# echo -e "\t$(ERROR_COLOR)compilation in draftmode with errors$(NO_COLOR)" ;\ +# exit 0;\ +# fi ;\ +# echo -e "\t$(OK_COLOR)Typesetting $$NAME done$(NO_COLOR)" ;\ ################################################################ ## Compilation ################################################################ docsty: $(PACKAGE).dtx echo -e "" ;\ - echo -e "\t$(ERROR_COLOR)Typesetting $(PACKAGE).dtx$(NO_COLOR)" ;\ - pdflatex -draftmode -interaction=nonstopmode $(PACKAGE).dtx > /dev/null ;\ + echo -e "\t$(WARN_COLOR)Typesetting $(PACKAGE).dtx$(NO_COLOR)" ;\ + pdflatex --draftmode --interaction=nonstopmode $(PACKAGE).dtx > /dev/null ;\ if [ $$? = 0 ] ; then \ - echo -e "\t$(OK_COLOR)compilation in draftmode without erros$(NO_COLOR)" ;\ - makeindex -q -t $(PACKAGE).glolog -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo ;\ - if [ $$? = 0 ] ; then \ + echo -e "\t$(OK_COLOR)compilation in draftmode without errors$(NO_COLOR)" ;\ + if [ -f $(PACKAGE).glo ] ; then \ + echo -e "\t$(WARN_COLOR)Typesetting $(PACKAGE).glo$(NO_COLOR)" ;\ + makeindex -q -t $(PACKAGE).glolog -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo ;\ + if [ $$? = 0 ] ; then \ echo -e "\t$(OK_COLOR)compilation of Glossar without errors$(NO_COLOR)" ;\ + else \ + echo -e "\t$(ERROR_COLOR)compilation of Glossar with errors$(NO_COLOR)" ;\ + fi ;\ fi ;\ - makeindex -q -t $(PACKAGE).idxlog -s gind.ist $(PACKAGE).idx ;\ - if [ $$? = 0 ] ; then \ + if [ -f $(PACKAGE).idx ] ; then \ + echo -e "\t$(WARN_COLOR)Typesetting $(PACKAGE).idx$(NO_COLOR)" ;\ + makeindex -q -t $(PACKAGE).idxlog -s gind.ist $(PACKAGE).idx ;\ + if [ $$? = 0 ] ; then \ echo -e "\t$(OK_COLOR)compilation of Index without errors$(NO_COLOR)" ;\ + else \ + echo -e "\t$(ERROR_COLOR)compilation of Index with errors$(NO_COLOR)" ;\ + fi ;\ fi ;\ pdflatex $(PACKAGE).dtx > /dev/null ;\ if [ $$? = 0 ] ; then \ - echo -e "\t$(OK_COLOR)Second pdflatex compilation without erros$(NO_COLOR)" ;\ + echo -e "\t$(OK_COLOR)Second pdflatex compilation without errors$(NO_COLOR)" ;\ else \ - echo -e "\t$(ERROR_COLOR)Second pdflatex compilation with erros$(NO_COLOR)" ;\ + echo -e "\t$(ERROR_COLOR)Second pdflatex compilation with errors$(NO_COLOR)" ;\ exit 0;\ fi ;\ pdflatex $(PACKAGE).dtx > /dev/null ;\ else \ - echo -e "\t$(ERROR_COLOR)compilation in draftmode with erros$(NO_COLOR)" ;\ + echo -e "\t$(ERROR_COLOR)compilation in draftmode with errors$(NO_COLOR)" ;\ exit 0;\ fi ;\ @@ -111,7 +139,7 @@ examplesx:$(EXAMPLESX).pdf clean: echo "" ;\ - echo -e "\t$(ERROR_COLOR)Start removing help files$(NO_COLOR)" ;\ + echo -e "\t$(WARN_COLOR)Start removing help files$(NO_COLOR)" ;\ for I in $(FILELIST) ;\ do \ for J in $(AUXFILES) ;\ @@ -123,6 +151,29 @@ clean: all: docsty examples clean +################################################################ +## personal setting +################################################################ +localinstall: docsty examples makelocalinstall clean + +makelocalinstall: + echo "" ;\ + echo -e "\t$(ERROR_COLOR)Start local install$(NO_COLOR)" ;\ + PATHTEXHOME=`kpsewhich --var-value=TEXMFHOME` ;\ + echo -e "\t$(ERROR_COLOR)Creating folders if don't exist$(NO_COLOR)" ;\ + mkdir -p $$PATHTEXHOME/doc/latex/$(PACKAGE)/ ;\ + mkdir -p $$PATHTEXHOME/tex/latex/$(PACKAGE)/ ;\ + for I in $(FILELIST) ;\ + do \ + cp $$I.pdf $$PATHTEXHOME/doc/latex/$(PACKAGE)/ ;\ + done ;\ + for I in $(STYLELIST) ;\ + do \ + cp $$I.mdf $$PATHTEXHOME/tex/latex/$(PACKAGE)/ ;\ + done ;\ + cp $(PACKAGE).sty $$PATHTEXHOME/tex/latex/$(PACKAGE)/ ;\ + cp ltxmdf.cls $$PATHTEXHOME/tex/latex/$(PACKAGE)/ ;\ + echo -e "\t$(OK_COLOR)Installation done$(NO_COLOR)" ;\ ################################################################ ## maintaner tool @@ -159,7 +210,7 @@ usectanify: echo -e "\t$(OK_COLOR)ctanify without errors$(NO_COLOR)" ;\ echo -e "" ;\ else \ - echo -e "\t$(ERROR_COLOR)ctanify with erros$(NO_COLOR)" ;\ + echo -e "\t$(ERROR_COLOR)ctanify with errors$(NO_COLOR)" ;\ exit 0;\ fi ;\ diff --git a/Master/texmf-dist/source/latex/mdframed/mdframed.dtx b/Master/texmf-dist/source/latex/mdframed/mdframed.dtx index 28704913db2..0952179831e 100644 --- a/Master/texmf-dist/source/latex/mdframed/mdframed.dtx +++ b/Master/texmf-dist/source/latex/mdframed/mdframed.dtx @@ -135,7 +135,7 @@ License type: lppl \postamble ================================================================ -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 @@ -174,7 +174,8 @@ Have fun! \Msg{* \space\space makeindex -s gglo.ist -o mdframed.gls mdframed.glo} \Msg{* \space\space makeindex -s gind.ist mdframed.idx} \Msg{*} -\Msg{* through makeIndex to produce the glossary. Finally, run PdfLaTeX once again.} +\Msg{* through makeIndex to produce the glossary.} +\Msg{* Finally, run PdfLaTeX once again.} \Msg{*} \Msg{* To create the examples run (pdf)latex on the tex-files.} \Msg{*} @@ -186,18 +187,24 @@ Have fun! %<install>\endbatchfile %<*internal> \usedir{source/latex/mdframed} -\generate{\file{mdframed.ins}{\from{mdframed.dtx}{install}}} +\generate{\file{mdframed.ins} + {\from{mdframed.dtx}{install}}} \nopreamble\nopostamble\usedir{doc/latex/mdframed} -\generate{\file{README.txt}{\from{mdframed.dtx}{readme}}} +\generate{\file{README.txt} + {\from{mdframed.dtx}{readme}}} \nopreamble\nopostamble\usedir{source/latex/mdframed} -\generate{\file{mdframed-example-default.tex}{\from{mdframed.dtx}{mdframed-example-default}}} +\generate{\file{mdframed-example-default.tex} + {\from{mdframed.dtx}{mdframed-example-default}}} \nopreamble\nopostamble\usedir{source/latex/mdframed} -\generate{\file{mdframed-example-tikz.tex}{\from{mdframed.dtx}{mdframed-example-tikz}}} +\generate{\file{mdframed-example-tikz.tex} + {\from{mdframed.dtx}{mdframed-example-tikz}}} \nopreamble\nopostamble\usedir{source/latex/mdframed} -\generate{\file{mdframed-example-pstricks.tex}{\from{mdframed.dtx}{mdframed-example-pstricks}}} +\generate{\file{mdframed-example-pstricks.tex} + {\from{mdframed.dtx}{mdframed-example-pstricks}}} \nopreamble\nopostamble\usedir{source/latex/mdframed} -\generate{\file{mdframed-example-texsx.tex}{\from{mdframed.dtx}{mdframed-example-texsx}}} +\generate{\file{mdframed-example-texsx.tex} + {\from{mdframed.dtx}{mdframed-example-texsx}}} \ifx\fmtname\nameofplainTeX \expandafter\endbatchfile @@ -206,22 +213,23 @@ Have fun! \fi %</internal> %<*driver> -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,11pt,]{ltxmdf} \usepackage[framemethod=TikZ]{mdframed} -\ltxmdfsetifoot$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ + +\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ + {documentation of mdframed} \EnableCrossrefs \CodelineIndex -\RecordChanges +%%\RecordChanges \begin{document} \DocInput{mdframed.dtx} \end{document} %</driver> % \fi % -% \CheckSum{5874} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -241,16 +249,16 @@ Have fun! % % \GetFileInfo{mdframed.sty} % -% \changes{v1.0a}{2011/11/26}{Created dtx and fixes bugs} -% \changes{v1.1beta}{2012/01/02}{Renamed some commands so that every command have the same prefix \protect\Cmd{mdf@}} % % \title{The \Pack{mdframed} package -% \footnote{Extending the package \texttt{framed.sty}} +% \footnote{Extending the package \texttt{framed.sty}}} % \subtitle{auto-split frame environment} % \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}% -% \href{mailto:marco.daniel@mada-nada.de}{Elke Schubert}}} +% \href{mailto:marco.daniel@mada-nada.de}{Elke Schubert}} % \version{\mdversion} -% \date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $} +% \GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ +% {documentation of mdframed} +% \date{\ExplFileDate} % \introduction{The standard methods for framing text (\Cmd{fbox} % or \Cmd{fcolorbox}) require you to handle page breaks % by hand, meaning that you have to split the \Cmd{fbox} @@ -271,7 +279,8 @@ Have fun! % FYI:\quad\parbox[t]{.8\linewidth}{% % I create a repository for \Pack{mdframed} % on \href{https://github.com/marcodaniel/mdframed}{github} -% where you can \href{https://github.com/marcodaniel/mdframed}{download} +% where you can +% \href{https://github.com/marcodaniel/mdframed}{download} % the current development status.}% % } % @@ -280,19 +289,21 @@ Have fun! % \vspace*{2\baselineskip} % % \section{Motivation} -% Many users wish to (further) emphasize lemmata, definitions, proofs, -% etc. The package \Pack{mdframed} allows you to create environments with -% breakable frames. I think an example is the best way to demonstrate its properties. +% Many users wish to (further) emphasize lemmata, definitions, proofs, etc. The +% package \Pack{mdframed} allows you to create environments with breakable +% frames. I think an example is the best way to demonstrate its properties. % % % \newmdtheoremenv[outerlinewidth=2,leftmargin=40,rightmargin=40,% -% backgroundcolor=yellow,outerlinecolor=blue,innertopmargin=0pt,% -% splittopskip=\topskip,skipbelow=\baselineskip,% -% skipabove=\baselineskip,ntheorem,roundcorner=5pt]{theorem}{Theorem}[section] +% backgroundcolor=yellow,outerlinecolor=blue,innertopmargin=\topskip,% +% splittopskip=\topskip,skipbelow=\baselineskip, +% skipabove=\baselineskip, +% ntheorem,roundcorner=5pt]{theorem}{Theorem}[section] % % \begin{theorem}[Pythagorean theorem] -% In any right triangle, the area of the square whose side is the hypotenuse -% is equal to the sum of the areas of the squares whose sides are the two legs. +% In any right triangle, the area of the square whose side is the hypotenuse +% is equal to the sum of the areas of the squares whose sides are the two +% legs. % % \[ a^2+b^2=c^2 \] % \end{theorem} @@ -305,7 +316,7 @@ Have fun! \begin{tltxmdfexample} \newmdtheoremenv[outerlinewidth=2,leftmargin=40,% rightmargin=40,backgroundcolor=yellow,% - outerlinecolor=blue,innertopmargin=0pt,% + outerlinecolor=blue,innertopmargin=\topskip,% splittopskip=\topskip,skipbelow=\baselineskip,% skipabove=\baselineskip,ntheorem]{theorem}% {Theorem}[section] @@ -368,12 +379,14 @@ Have fun! % \minisec{Autodetecting floats} % \Pack{mdframed} detects whether the environment is used inside \Pack{float} % or \Pack{minipage} environments. If you use \Pack{mdframed} in such -% an environment \Pack{mdframed} will use the option \Opt{nobreak} automatically. +% an environment \Pack{mdframed} will use the option \Opt{nobreak} +% automatically. % % \minisec{Twoside-mode} % If you are using \Pack{mdframed} inside \Pack{twoside}-mode you can set -% the option \Opt{innermargin} and \Opt{outermargin} (see section \ref{optlength}). -% The length will be ignored if you use the option \Opt{usetwoside}. +% the option \Opt{innermargin} and \Opt{outermargin} (see section % +% \ref{optlength}). The length will be ignored if you use the option +% \Opt{usetwoside}. % % % %%%%%%%%%%%%%%%%%%%%%%% @@ -405,8 +418,8 @@ Have fun! % \Single[line width=7mm,draw=green!20] % \end{scope} % \Single[line width=2mm,draw=red!20,use as bounding box] -% \node[anchor=south,font=\bfseries,text width=4cm,align=center] at (24mm,35mm) -% {Frame of a single page}; +% \node[anchor=south,font=\bfseries,text width=4cm,align=center] % +% at (24mm,35mm) {Frame of a single page}; % \end{tikzpicture}% % \hfill% % \begin{tikzpicture}[baseline=(current bounding box.north)] @@ -421,8 +434,8 @@ Have fun! % \FirstSecond[line width=7mm,draw=green!20] % \end{scope} % \FirstSecond[line width=2mm,draw=red!20,use as bounding box] -% \node[anchor=south,font=\bfseries,text width=4cm,align=center] at (2.4,0.7) -% {First box -- first part of the output}; +% \node[anchor=south,font=\bfseries,text width=4cm,align=center] +% at (2.4,0.7) {First box -- first part of the output}; % \end{tikzpicture} % \hfill\null % @@ -441,8 +454,8 @@ Have fun! % \FirstSecond[line width=7mm,draw=green!20] % \end{scope} % \FirstSecond[line width=2mm,draw=red!20,use as bounding box] -% \node[anchor=south,font=\bfseries,text width=4cm,align=center] at (24mm,25mm) -% {Second box -- last part of the output}; +% \node[anchor=south,font=\bfseries,text width=4cm,align=center] % +% at (24mm,25mm) {Second box -- last part of the output}; % \end{tikzpicture}% % \hfill% % \begin{tikzpicture}[baseline=(current bounding box.north)] @@ -457,8 +470,8 @@ Have fun! % \MiddleLinien[line width=7mm,draw=green!20] % \end{scope} % \MiddleLinien[line width=2mm,draw=red!20,use as bounding box] -% \node[anchor=south,font=\bfseries,text width=4cm,align=center] at (24mm,25mm) -% {Middle box -- middle part of the output}; +% \node[anchor=south,font=\bfseries,text width=4cm,align=center] +% at (24mm,25mm) {Middle box -- middle part of the output}; % \end{tikzpicture} % \hfill\null % @@ -466,7 +479,8 @@ Have fun! %\end{center} % %%%%%%%%%%%%%%%%%%%%%%% % \section{Commands}\label{sec:cmds} -% The following commands should countenance your by the handling with \Pack{mdframed} +% The following commands should countenance your by the handling with +% \Pack{mdframed}. % % \ExplCmd{newmdenv} The command has the following syntax: % \iffalse @@ -493,13 +507,14 @@ Have fun! %</example> % \fi % \ExplCmd{renewmdenv} -% By using this command you can redefine environments which are created by \Cmd{newmdenv}. +% By using this command you can redefine environments which are created by +% \Cmd{newmdenv}. % % \ExplCmd{surroundwithmdframed} -% Sometimes you have predefined environments. This commands allows you to set -% an \Env{environment} surround this predefined environment. To set a \Env{mdframed} -% around the environment \Env{verbatim} you can simple say without changing the -% original name. +% Sometimes you have predefined environments. This commands allows you to +% set an \Env{environment} surround this predefined environment. To set a +% \Env{mdframed} around the environment \Env{verbatim} you can simple say +% without changing the original name. % \iffalse %<*example> % \fi @@ -512,8 +527,8 @@ Have fun! % % % \ExplCmd{mdflength} -% If you want to work with length defined by \Pack{mdframed} (for example -% \Opt{innerleftmargin}) you can now simple use the command \Cmd{mdflength}. +% If you want to work with length defined by \Pack{mdframed} (for example +% \Opt{innerleftmargin}) you can now simple use the command \Cmd{mdflength}. % \iffalse %<*example> % \fi @@ -531,12 +546,14 @@ Have fun! % \ExplCmd{mdfsetup}To set the options % you can use the optional argument of \Cmd{usepackage} or % you can use the command \Cmd{mdfsetup} which is not limited to the preamble. -% Inside a group the settings work only local.\par -% \textbf{\color{red!70!black}At this point I want to recommend the using of the command \Cmd{mdfsetup} -% instead of setting package option via the optional argument of \Cmd{usepackage}. -% So you are avoiding breaking of non robust commands.}^^A +% Inside a group the settings work only local.\par +% \textbf{\color{red!70!black}At this point I want to recommend the using of +% the command \Cmd{mdfsetup} instead of setting package option via the optional +% argument of \Cmd{usepackage}. So you are avoiding breaking of non robust +% commands.}^^A % \footnote{Thanks to Heiko Oberdiek and Philipp Stephani -% \href{https://groups.google.com/group/de.comp.text.tex/browse_thread/thread/15c5ad290490d426?hl=de}^^A +% \href{https://groups.google.com/group/de.comp.text.tex/^^A +% browse_thread/thread/15c5ad290490d426?hl=de}^^A % {kvoptions-Declaration von Optionen schl\"agt fehl}} % % \ExplCmd{mdfdefinestyle} @@ -570,20 +587,20 @@ Have fun! % % %%%%%%%%%%%%%%%%%%%%%%% % \section{Options} -% The package provides various options to manipulate frames. In the following section -% all options are listed. Some internal macros which can be manipulated are not shown -% in this documentation. -% The listed options are divided in global and local options. The global options can not -% be used inside \Cmd{mdfsetup}. +% The package provides various options to manipulate frames. In the following +% section all options are listed. Some internal macros which can be manipulated +% are not shown in this documentation. +% The listed options are divided in global and local options. The global +% options can not be used inside \Cmd{mdfsetup}. % % \subsection{Global Options}\label{globopt} % The following options are only global options. % % \ExplOpt[none]{xcolor} % By setting this key, the package \Pack{xcolor} will -% be loaded with the given value(s). Without any value \mbox{\Pack{mdframed}} loads -% the package \Pack{color} without any options. If the package \Pack{xcolor} -% is already loaded the given option will be ignored. +% be loaded with the given value(s). Without any value \mbox{\Pack{mdframed}} +% loads the package \Pack{color} without any options. If the package +% \Pack{xcolor} is already loaded the given option will be ignored. % I recommend to load \Pack{xcolor} before \Pack{mdframed}. % % \ExplOpt[default]{framemethod} @@ -594,18 +611,20 @@ Have fun! % \item \Pack{TikZ} {\small(the package \Pack{TikZ} will be loaded)} or % \item \Pack{PSTricks} {\small(the package \Pack{pstricks} will be loaded)}. % \end{enumerate} -% The option \Opt{framemethod} requires a string. Allowed combinations are listed in the -% following table. +% The option \Opt{framemethod} requires a string. Allowed combinations are +% listed in the following table. % \begin{table}[!ht] % \centering % \renewcommand*\arraystretch{1.3} % \caption{Allowed keys for \Opt{framemethod}} % \begin{tabular}{@{}>{\small\bfseries}l>{\small\ttfamily}l@{}} -% \toprule -% \multicolumn{1}{@{}l}{\textbf{Method}} & \multicolumn{1}{l}{Allowed keys} \\\midrule -% \LaTeX-commands & default, tex, latex, none, 0 \\ -% \Pack{TikZ} & tikz, pgf, 1 \\ -% \Pack{PSTricks} & pstricks, ps, postscript, 2 \\\bottomrule +% \toprule +% \multicolumn{1}{@{}l}{\textbf{Method}} & \multicolumn{1}{l}{Allowed keys}\\ +% \midrule +% \LaTeX-commands & default, tex, latex, none, 0 \\ +% \Pack{TikZ} & tikz, pgf, 1 \\ +% \Pack{PSTricks} & pstricks, ps, postscript, 2 \\ +% \bottomrule % \end{tabular} % \end{table} % @@ -626,11 +645,9 @@ Have fun! % % In figure \eqref{fig:laengen} you can see the adjustable lengths % (compare also figure \eqref{fig:basicframes}) which will be described below. -% All lengths accept two kinds of input. The first one is a length (e.g. 2pt) and -% the second one is a number (e.g. 2) which will be multiplied by \Opt{1 defaultunit}. -% The figure shows three different colored frames. -% -% I know that the predefined lengths are not well prepared. Maybe I will change it later. +% All lengths accept two kinds of input. The first one is a length (e.g. 2pt) +% and the second one is a number (e.g. 2) which will be multiplied by +% \Opt{1 defaultunit}. The figure shows three different colored frames. % % \ExplOpt[pt]{defaultunit} see the sentence above. % @@ -667,14 +684,16 @@ Have fun! % (CenterNode.north) -- ($(CenterNode)+(0,\y1)-(0,.5\linew)$) ; % \path let \p1=(innersep) in % (CenterNode.north) -% edge node[align=center,framed,fill=white,draw=white]{innertopmargin} +% edge +% node[align=center,framed,fill=white,draw=white]{innertopmargin} % ($(CenterNode)+(0,\y1)-(0,.5\linew)$) ; % %%innerbottommargin % \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) in % (CenterNode.south) -- ($(CenterNode)-(0,\y1)+(0,.5\linew)$) ; % \path let \p1=(innersep) in % (CenterNode.south) -% edge node[align=center,framed,fill=white,draw=white]{innerbottommargin} +% edge +% node[align=center,framed,fill=white,draw=white]{innerbottommargin} % ($(CenterNode)-(0,\y1)+(0,.5\linew)$) ; % % %%innerleftmargin @@ -682,45 +701,59 @@ Have fun! % (CenterNode.west) -- ($(CenterNode)-(\x1,0)+(.5\linew,0)$) ; % \path let \p1=(innersep) in % (CenterNode.west) edge -% node[align=center,rotate=90,framed,fill=white,draw=white]{innerleftmargin} +% node[align=center,rotate=90,framed,fill=white,draw=white] +% {innerleftmargin} % ($(CenterNode)-(\x1,0)+(.5\linew,0)$) ; % %%innerrightmargin % \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) in % (CenterNode.east) -- ($(CenterNode)+(\x1,0)-(.5\linew,0)$) ; % \path let \p1=(innersep) in % (CenterNode.east) edge -% node[align=center,rotate=90,framed,fill=white,draw=white]{innerrightmargin} +% node[align=center,rotate=90,framed,fill=white,draw=white] +% {innerrightmargin} % ($(CenterNode)+(\x1,0)-(.5\linew,0)$) ; % % % %%leftmargin -% \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) , \p2=(outersep) in -% ($(CenterNode)-(\x1,0)-(2.5\linew,0)$) -- ($(CenterNode)-(\x1,0)-(\x2,0)$) ; +% \draw[draw=black,triangle 45-triangle 45] +% let \p1=(innersep) , \p2=(outersep) in +% ($(CenterNode)-(\x1,0)-(2.5\linew,0)$) -- +% ($(CenterNode)-(\x1,0)-(\x2,0)$) ; % \path let \p1=(innersep) , \p2=(outersep) in % ($(CenterNode)-(\x1,0)-(2.5\linew,0)$) edge -% node[align=center,rotate=0,framed,fill=white,draw=white]{leftmargin} +% node[align=center,rotate=0,framed,fill=white,draw=white] +% {leftmargin} % ($(CenterNode)-(\x1,0)-(\x2,0)$) ; % %%rightmargin -% \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) , \p2=(outersep) in -% ($(CenterNode)+(\x1,0)+(2.5\linew,0)$) -- ($(CenterNode)+(\x1,0)+(\x2,0)$) ; +% \draw[draw=black,triangle 45-triangle 45] +% let \p1=(innersep) , \p2=(outersep) in +% ($(CenterNode)+(\x1,0)+(2.5\linew,0)$) -- +% ($(CenterNode)+(\x1,0)+(\x2,0)$) ; % \path let \p1=(innersep) , \p2=(outersep) in % ($(CenterNode)+(\x1,0)+(2.5\linew,0)$) edge -% node[align=center,rotate=0,framed,fill=white,draw=white]{rightmargin} +% node[align=center,rotate=0,framed,fill=white,draw=white] +% {rightmargin} % ($(CenterNode)+(\x1,0)+(\x2,0)$) ; % % %%skipabove -% \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) , \p2=(outersep) in -% ($(CenterNode)+(0,\y1)+(0,2.5\linew)$) -- ($(CenterNode)+(0,\y1)+(0,\y2)$) ; +% \draw[draw=black,triangle 45-triangle 45] +% let \p1=(innersep) , \p2=(outersep) in +% ($(CenterNode)+(0,\y1)+(0,2.5\linew)$) -- +% ($(CenterNode)+(0,\y1)+(0,\y2)$) ; % \path let \p1=(innersep) , \p2=(outersep) in % ($(CenterNode)+(0,\y1)+(0,2.5\linew)$) edge -% node[align=center,rotate=0,framed,fill=white,draw=white]{skipabove} +% node[align=center,rotate=0,framed,fill=white,draw=white] +% {skipabove} % ($(CenterNode)+(0,\y1)+(0,\y2)$) ; % %%skipbelow -% \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) , \p2=(outersep) in -% ($(CenterNode)-(0,\y1)-(0,2.5\linew)$) -- ($(CenterNode)-(0,\y1)-(0,\y2)$) ; +% \draw[draw=black,triangle 45-triangle 45] +% let \p1=(innersep) , \p2=(outersep) in +% ($(CenterNode)-(0,\y1)-(0,2.5\linew)$) -- +% ($(CenterNode)-(0,\y1)-(0,\y2)$) ; % \path let \p1=(innersep) , \p2=(outersep) in % ($(CenterNode)-(0,\y1)-(0,2.5\linew)$) edge -% node[align=center,rotate=0,framed,fill=white,draw=white]{skipbelow} +% node[align=center,rotate=0,framed,fill=white,draw=white] +% {skipbelow} % ($(CenterNode)-(0,\y1)-(0,\y2)$) ; % \end{tikzpicture} % @@ -728,63 +761,65 @@ Have fun! % \label{fig:laengen} % \end{center} % -% \ExplOpt[0pt]{skipabove} +% \ExplOpt[0\,pt]{skipabove} % Sets an additional skip above the frame. -% \ExplOpt[0pt]{skipbelow} +% \ExplOpt[0\,pt]{skipbelow} % Sets an additional skip below the frame. % \ExplOpt[]{margin} % This option is not longer supported. Use \Opt{leftmargin} % and \Opt{rightmargin} instead. % \ExplOpt[0pt]{leftmargin} -% Sets the length of the left margin of the environment. This option has an -% effect only in singleside-mode or, in twoside-mode, if the option +% Sets the length of the left margin of the environment. This option has +% an effect only in singleside-mode or, in twoside-mode, if the option % \Opt{usetwoside=false} has been given. % See also options \Opt{outermargin} and \Opt{innermargin}. -% \ExplOpt[0pt]{rightmargin} -% Sets the length of the right margin of the environment. This option has an -% effect only in singleside-mode or, in twoside-mode, if the option +% \ExplOpt[0\,pt]{rightmargin} +% Sets the length of the right margin of the environment. This option has +% an effect only in singleside-mode or, in twoside-mode, if the option % \Opt{usetwoside=false} has been given. % See also options \Opt{outermargin} and \Opt{innermargin}. -% \ExplOpt[10pt]{innerleftmargin} +% \ExplOpt[10\,pt]{innerleftmargin} % Sets the length of the inner left margin of the environment. -% \ExplOpt[10pt]{innerrightmargin} +% \ExplOpt[10\,pt]{innerrightmargin} % Sets the length of the inner right margin of the environment. % \ExplOpt[.4\textbackslash baselineskip]{innertopmargin} % Sets the length of the inner top margin of the environment. % \ExplOpt[.4\textbackslash baselineskip]{innerbottommargin} % Sets the length of the inner bottom margin of the environment. % -% \paragraph*{The following lengths are not shown in figure \eqref{fig:laengen}.} +% \paragraph*{The following lengths are not shown in figure +% \eqref{fig:laengen}.} % % \mbox{} -% \ExplOpt[0pt]{userdefinedwidth} +% \ExplOpt[0\,pt]{userdefinedwidth} % Sets the width of the whole \Pack{mdframed} environment. % The width represent the width including the line width and % the inner margins. The outer margins will be ignored. -% \ExplOpt{outermargin} +% \ExplOpt[0\,pt]{outermargin} % Sets the length of the outer margin. This option is only available % in \texttt{twoside}-mode. -% \ExplOpt{innermargin} +% \ExplOpt[0\,pt]{innermargin} % Sets the length of the inner margin. This option is only available % in \texttt{twoside}-mode. -% \ExplOpt[0pt]{splittopskip} +% \ExplOpt[0\,pt]{splittopskip} % Sets the length of the skip above the split part of the environment. -% \ExplOpt[0pt]{splitbottomskip} +% \ExplOpt[0\,pt]{splitbottomskip} % Sets the length of the skip below the split part of the environment. -% \ExplOpt[0.4pt]{linewidth} +% \ExplOpt[0.4\,pt]{linewidth} % Sets the width of the line around the environment. -% \ExplOpt[0pt]{roundcorner} +% \limitation[\Opt{default}] +% \ExplOpt[0\,pt]{roundcorner} % Sets the size of the radius of the corners of the frames. % \limitation[TikZ or PSTricks] -% \ExplOpt[0pt]{innerlinewidth} +% \ExplOpt[0\,pt]{innerlinewidth} % Sets the width of the inner line around the environment. % \limitation[TikZ or PSTricks] -% \ExplOpt[0pt]{outerlinewidth} +% \ExplOpt[0\,pt]{outerlinewidth} % Sets the width of the outer line around the environment. % \limitation[TikZ or PSTricks] -% \ExplOpt[linewidth]{middlelinewidth} +% \ExplOpt[0.4\,pt]{middlelinewidth} % Sets the width of the middle line around the environment. -% \limitation +% \limitation[TikZ or PSTricks] % % \subsubsection{Colored Options} % \ExplOpt[black]{linecolor} @@ -824,7 +859,7 @@ Have fun! % If you set the twoside option you can work with \Opt{outermargin}. % This option disable this and you work with % \Opt{leftmargin} and \Opt{rightmargin}. -% \ExplOpt[0pt]{needspace} +% \ExplOpt[0\,pt]{needspace} % Sometimes it is useful to set a minimum height before a % frame should be splitted. For such cases you can use \Opt{needspace}. % The option requires a length which sets the minimum height before @@ -834,12 +869,12 @@ Have fun! % the key \Opt{style} to load the style. \Pack{mdframed} has % no predefined styles yet. % \ExplOpt[none]{settings} -% This option allows the user to commit some macros. An example is shown in the -% example files. +% This option allows the user to commit some macros. An example is shown +% in the example files. % \ExplOpt[left]{align} % Sometimes it is useful to align the environment itself. -% For this you have the option \Opt{align} which can be set to the following -% strings: +% For this you have the option \Opt{align} which can be set to the +% following strings: % \begin{itemize} % \item \Opt{left}, % \item \Opt{right} and @@ -849,9 +884,17 @@ Have fun! % \Opt{leftmargin} and \Opt{rightmargin}. Later I will present an example % to demonstrate my bad English explanation. % +% \ExplOpt[false]{ignorelastdescenders} +% Try to ignore the last descenders of the environment \Env{mdframed}. The +% complete idea was inspired by Tobias Weh and the solution was provided +% by Stefan Lemke. See +% \href{http://tex.stackexchange.com/questions/47584/how-to-make-^^A +% mdframed-ignore-descenders-in-last-line}^^A +% {How to make mdframed ignore descenders in last line} +% % \ExplOpt[false]{shadow} -% Draw a shadow. The shadow doesn't influence the bounding box so the shadow -% can be drawn in the margin without any overfull box. +% Draw a shadow. The shadow doesn't influence the bounding box so the +% shadow can be drawn in the margin without any overfull box. % Note if you are using the TikZ you must load the library. % \Pack{mdframed} doesn't do the job to avoid double loading of a library. % @@ -861,13 +904,13 @@ Have fun! % Specify the color of the shadow. % % -% \ExplOpt[none]{pstrickssetting} +% \ExplOpt[\{\}]{pstrickssetting} % With this key you can pass several options to \Cmd{psset}. % For example if you want all lines dashed you will have to set % \Opt{pstrickssetting=\{linestyle=dashed\}}. It is very important % to put the options of \Opt{pstrickssetting} in brackets. % \limitation[PSTricks] -% \ExplOpt[none]{pstricksappsetting} +% \ExplOpt[\{\}]{pstricksappsetting} % \Pack{mdframed} works with defined style for the different elements. By % using \Cmd{addtopsstyle} in combination with this option % you can expand the definition. The predefined styles are @@ -881,12 +924,12 @@ Have fun! % \textbf{Before you change one please have a look at the file % \texttt{md-frame-2.mdf} to see the settings.} % \limitation[PSTricks] -% \ExplOpt[none]{tikzsetting} +% \ExplOpt[\{\}]{tikzsetting} % With this key you can pass several options to \Cmd{tikzset}. % Some examples are listed in the next section. It is very important % to put the options of \Opt{tikzsetting} in brackets. % \limitation -% \ExplOpt[none]{apptotikzsetting} +% \ExplOpt[\{\}]{apptotikzsetting} % With this key you can add several options to \Opt{tikzsetting}. % This key based on the idea of manipulation of predefined keys % of \Pack{mdframed}. The package \Pack{mdframed} defines via @@ -906,17 +949,21 @@ Have fun! % file \texttt{md-frame-1.mdf} to see the settings.} % \limitation % \ExplOpt[\{\}]{singleextra} -% With this key you can put extra material to the drawing environment of \Pack{mdframed} -% only for a non splitted frame. \limitation[TikZ and PSTricks] +% With this key you can put extra material to the drawing environment of +% \Pack{mdframed} only for a non splitted frame. +% \limitation[TikZ and PSTricks] % \ExplOpt[\{\}]{firstextra} -% With this key you can put extra material to the drawing environment of \Pack{mdframed} -% only for the first part of the splitted frame. \limitation[TikZ and PSTricks] +% With this key you can put extra material to the drawing environment of +% \Pack{mdframed} only for the first part of the splitted frame. +% \limitation[TikZ and PSTricks] % \ExplOpt[\{\}]{middleextra} -% With this key you can put extra material to the drawing environment of \Pack{mdframed} -% only for the middle part of the splitted frame. \limitation[TikZ and PSTricks] +% With this key you can put extra material to the drawing environment of +% \Pack{mdframed} only for the middle part of the splitted frame. +% \limitation[TikZ and PSTricks] % \ExplOpt[\{\}]{secondextra} -% With this key you can put extra material to the drawing environment of \Pack{mdframed} -% only for the second part of the splitted frame. \limitation[TikZ and PSTricks] +% With this key you can put extra material to the drawing environment of +% \Pack{mdframed} only for the second part of the splitted frame. +% \limitation[TikZ and PSTricks] % % % \subsection{Hidden Lines} @@ -925,7 +972,8 @@ Have fun! % \ExplOpt[true]{leftline} Draws a line on the left. % \ExplOpt[true]{rightline} Draws a line on the right. % \ExplOpt[false]{hidealllines} -% With this option you can decide whether all lines should be drawn or not. +% With this option you can decide whether all lines should be drawn or +% not. % % \subsection{Frametitle} % In this section all relevant options of the frame title will be presented. @@ -933,7 +981,8 @@ Have fun! % % \ExplOpt[none]{frametitle} % The environment gets a title. To set a title use -% \Opt{frametitle=\{The Title of the frame\}} as an option of the environment. +% \Opt{frametitle=\{The Title of the frame\}} as an option of the +% environment. % \ExplOpt[\Cmd{normalfont}\Cmd{bfseries}]{frametitlefont} % Sets the format of the \Opt{frametitle}. % \ExplOpt[\Cmd{raggedleft}]{frametitlealignment} @@ -941,26 +990,156 @@ Have fun! % \ExplOpt[false]{frametitlerule} % Set this key to \Opt{true} to get a line between the frame title % and the text. -% \ExplOpt[.2pt]{frametitlerulewidth} -% Sets the width of the line between the text and the title of \Env{mdframed}. -% \ExplOpt[5pt]{frametitleaboveskip} +% \ExplOpt[.2\,pt]{frametitlerulewidth} +% Sets the width of the line between the text and the title of +% \Env{mdframed}. +% \ExplOpt[5\,pt]{frametitleaboveskip} % Sets the skip of the frame title to the margin above of \Env{mdframed}. -% \ExplOpt[5pt]{frametitlebelowskip} +% \ExplOpt[5\,pt]{frametitlebelowskip} % Sets the skip of the frame title to the rule of the frame title. % \ExplOpt[white]{frametitlebackgroundcolor} % Sets the color of the background of the frametitle +% \ExplOpt[false]{repeatframetitle} +% Repeat the frame title on every frame. % % \minisec{FYI and Note} -% \Pack{mdframed} can't handle page breaks inside the frametitle well. -% If you get a page break please have a closer look to the output. -% -% If a frame title is given the optional length \Opt{innertopmargin} is -% set between the rule under the frame title and the contents of \Env{mdframed}. +% The splitting of the frame title is really a fiddly issue. If you want to use +% the option \Opt{repeatframetitle} a splitting is more than wrong. On the +% other hand if you use the option \Opt{repeatframetitle} the user must prepare +% the contents well. % -% \ExplOpt[false]{repeatframetitle} -% Repeat the frame title on every frame. The feature is currently not -% well implemented!!! +% The following picture demonstrates the behaviour of the lengths if the option +% \Opt{frametitle} is used. % +% \begin{center} +% \begin{tikzpicture}[scale=0.9] +% %Declaration +% \tikzstyle{every node}=[font=\bfseries\large\sffamily] +% \coordinate (innersep) at (3.2,2.25); +% \coordinate (outersep) at (3.2,2); +% %Center box +% \node[fill=green!10,draw=red!70!black,very thick,fill opacity=.2, +% text opacity=1,minimum width=9cm,minimum height=3cm,]% +% (CenterNode) {Contents of the box}; +% %frametitle box +% \node[fill=yellow!70,draw=red!70!black,very thick,fill opacity=.2, +% text opacity=1,minimum width=9cm,minimum height=3cm,anchor=south]% +% at (CenterNode.north) (frametitle) {frame title}; +% % frametitlerule +% \draw[line width=3pt,blue!60!black] (frametitle.south west) +% -- (frametitle.south east) +% node[pos=1,anchor=west,text width=4cm] +% {\Opt{frametitlerulewidth}\\\Opt{frametitlerule=true}}; +% % frametitlebelowskip +% \draw[very thick,blue!60!black,latex-latex,shorten >=0.2cm] +% (frametitle.south) -- (frametitle.center) +% node[pos=0.5,anchor=west] +% {\Opt{ frametitlebelowskip}}; +% % frametitleaboveskip +% \draw[very thick,blue!60!black,latex-latex,shorten >=0.2cm] +% (frametitle.north) -- (frametitle.center) +% node[pos=0.5,anchor=west] {\Opt{ frametitleaboveskip}}; +% % innertopmargin +% \draw[very thick,blue!60!black,latex-latex,shorten >=0.2cm] +% (CenterNode.north) -- (CenterNode.center) +% node[pos=0.5,anchor=west] {\Opt{ innertopmargin}}; +% % splittopskip +% \draw[very thick,blue!60!black,latex-latex,shorten >=0.2cm] +% (CenterNode.north) -- (CenterNode.center) +% node[pos=0.5,anchor=east] {\Opt{splittopskip}}; +% % global frame +% \draw[thick] (-5.5,-2.1) rectangle (9.4,5.5); +% \end{tikzpicture} +% \captionof{figure}{Behavior of the lengths if \Opt{frametitle} is used} +% \label{fig:frametitlelaengen} +% \end{center} +% +% +% \subsection{Title commands inside the environment} +% +% To provide titles inside the environment \Pack{mdframed} you can one of the +% two following commands. The relavant options are listed below. +% +% \ExplCmd{mdfsubtitle} +% Set a title inside \Pack{mdframed} of the internal level 1. +% +% \ExplCmd{mdfsubsubtitle} +% Set a title inside \Pack{mdframed} of the internal level 2. +% +% Both commands have the same syntax. They accept one optional and one +% mandatory argument. The optional argument sets the option of \Pack{mdframed} +% whereby everything will be local. The second argument of subtitle also allows +% paragraph breaking. +% +% \iffalse +%<*example> +% \fi +\begin{tltxmdfexample} + \mdfsubtitle[<options>]{the subtitle} +\end{tltxmdfexample} +% \iffalse +%</example> +% \fi +% +% +% \subsubsection{Options related to the title of level 1} +% \ExplOpt[false]{subtitleaboveline} +% Decide to draw a line above the subtile. +% \ExplOpt[false]{subtitlebelowline} +% Decide to draw a line below the subtitle. +% \ExplOpt[\string\normalfont\string\bfseries]{subtitlefont} +% Sets the font for subtitles. +% \ExplOpt[white]{subtitlebackgroundcolor} +% Sets the background color of the subtitle between the above and below +% line. +% \ExplOpt[black]{subtitleabovelinecolor} +% Sets the line color of the line above. +% \ExplOpt[black]{subtitlebelowlinecolor} +% Sets the line color of the line below. +% \ExplOpt[0.8\,pt]{subtitleabovelinewidth} +% Sets the line width of the line above. +% \ExplOpt[0.6\,pt]{subtitlebelowlinewidth} +% Sets the line width of the line below. +% \ExplOpt[\string\baselineskip]{subtitleaboveskip} +% Sets the skip before the subtitle line above will be drawn. +% \ExplOpt[1.2\string\baselineskip]{subtitlebelowskip} +% Sets the skip after the subtitle line below is drawn. +% \ExplOpt[0.5\string\baselineskip]{subtitleinneraboveskip} +% Sets the skip after the line above and the subtitle itself. +% \ExplOpt[0.5\string\baselineskip]{subtitleinnerbelowskip} +% Sets the skip after the subtitle and the line below. +% +% +% +% \subsubsection{Options related to the title of level 2} +% +% \ExplOpt[false]{subsubtitleaboveline} +% Decide to draw a line above the subsubtile. +% \ExplOpt[false]{subtitlebelowline} +% Decide to draw a line below the subsubtitle. +% \ExplOpt[\string\normalfont]{subsubtitlefont} +% Sets the font for subsubtitles. +% \ExplOpt[white]{subsubtitlebackgroundcolor} +% Sets the background color of the subsubtitle between the above and below +% line. +% \ExplOpt[black]{subsubtitleabovelinecolor} +% Sets the line color of the line above. +% \ExplOpt[black]{subsubtitlebelowlinecolor} +% Sets the line color of the line below. +% \ExplOpt[0.8\,pt]{subsubtitleabovelinewidth} +% Sets the line width of the line above. +% \ExplOpt[0.6\,pt]{subsubtitlebelowlinewidth} +% Sets the line width of the line below. +% \ExplOpt[\string\baselineskip]{subsubtitleaboveskip} +% Sets the skip before the subsubtitle line above will be drawn. +% \ExplOpt[1.2\string\baselineskip]{subsubtitlebelowskip} +% Sets the skip after the subsubtitle line below is drawn. +% \ExplOpt[0.5\string\baselineskip]{subsubtitleinneraboveskip} +% Sets the skip after the line above and the subsubtitle itself. +% \ExplOpt[0.5\string\baselineskip]{subsubtitleinnerbelowskip} +% Sets the skip after the subsubtitle and the line below. +% +% % % \subsection{Theorems} % In this section is described which commands can help you to define @@ -968,10 +1147,8 @@ Have fun! % % \ExplCmd{newmdtheoremenv} % Since the package is often used to highlight theorem environments, -% I have created a command\footnote{Thanks to Martin Scharrer and Enrico Gregorio:\newline -% \href{http://tex.stackexchange.com/questions/26298/own-command-to-create-new-environment}% -% {Own command to create new environment}} -% to simplify this process. The command has the following syntax: +% the package providesa command to simplify this process. The command has the +% following syntax: % % \iffalse %<*example> @@ -984,7 +1161,8 @@ Have fun! %</example> % \fi % The last four arguments are equivalent to the command \Cmd{newtheorem}. -% Only the first optional argument is able to pass \Pack{mdframed}-options. A simple example is: +% Only the first optional argument is able to pass \Pack{mdframed}-options. A +% simple example is: % \iffalse %<*example> % \fi @@ -1004,7 +1182,8 @@ Have fun! % % % \ExplCmd{mdtheorem} -% This is a special kind of \Cmd{newtheorem}. The command has the following syntax. +% This is a special kind of \Cmd{newtheorem}. The command has the following +% syntax. % \iffalse %<*example> % \fi @@ -1079,7 +1258,8 @@ Have fun! % % \section{Examples} % -% I outsource the examples in four files to limit the documentation. The files are +% I outsource the examples in four files to limit the documentation. The files +% are % \begin{description}[style=nextline] % \item[\texttt{mdframed-example-default}] % Demonstration of examples created with \Opt{framemethod=default}. @@ -1091,12 +1271,14 @@ Have fun! % Demonstration of examples like interaction with \Pack{listings} % \end{description} % -% The examples are often not equivalent but normally they can be adapted to another method. +% The examples are often not equivalent but normally they can be adapted to +% another method. % So I really recommend to have a look to all example files. % -% The Korean \TeX Group created a very nice presentation. I want to show the link -% because it's really a great work: -% \href{http://prezi.com/zc355i9tcsgz/talk-kts-2012-mdframed/}{kts 2012 mdframed}. +% The Korean \TeX Group created a very nice presentation. I want to show the +% link because it's really a great work: +% \href{http://prezi.com/zc355i9tcsgz/talk-kts-2012-mdframed/}^^A +% {kts 2012 mdframed}. % % \section{Errors, Warnings and Messages} % @@ -1130,7 +1312,10 @@ Have fun! % \iffalse %</example> % \fi -% With version 0.9d \Pack{mdframed} changed the meaning of the option \Opt{style}. The option is used to load a defined style by \Cmd{mdfdefinestyle}. Instead use \Opt{framemethod} (see section \ref{globopt}). +% With version 0.9d \Pack{mdframed} changed the meaning of the option +% \Opt{style}. The option is used to load a defined style by +% \Cmd{mdfdefinestyle}. Instead use \Opt{framemethod} (see section +% \ref{globopt}). % % \iffalse %<*example> @@ -1141,7 +1326,8 @@ Have fun! % \iffalse %</example> % \fi -% The input string for the option \Opt{framemethod} is unkown. See section \ref{globopt}. +% The input string for the option \Opt{framemethod} is unkown. See section +% \ref{globopt}. % % \iffalse %<*example> @@ -1240,7 +1426,8 @@ Have fun! % Please let me know! % % \begin{enumerate} -% \item So far the environment isn't compatible with the package \Pack{gmverb}. +% \item So far the environment isn't compatible with the package +% \Pack{gmverb}. % \item If you load the package \Pack{picins} the frame will no be splitted. % That based on a problem of the package `picins` which defines % \Cmd{@captype} global. @@ -1263,6 +1450,8 @@ Have fun! % \iffalse %</example> % \fi +% \item \Pack{mdframed} can't handle the option \Opt{allowframebreaks} of the +% class \Pack{beamer}. % \end{enumerate} % % @@ -1278,32 +1467,36 @@ Have fun! % \item Improve footnotes. % \item Improve documentation and examples. % \item Create styles for \Opt{frametitle}. -% \item Create an inline version of \Env{mdframed} that's works like \Cmd{fbox} +% \item Create an inline version of \Env{mdframed} that's works like +% \Cmd{fbox} % \item Add \Cmd{ht}\Cmd{strutbox} to file \Pack{md-frame-1.mdf} % \end{enumerate} % % \section{Acknowledgements} -% \textsf{Dick Nickalls;\quad Dietrich Grau;\quad Piazza Luca;\quad Jobst Hoffmann; -% \quad Martin Scharrer;\quad Enrico Gregorio;\quad Heiko Oberdiek; -% \quad Philipp Stephani}. +% \textsf{Dick Nickalls;\quad Dietrich Grau;\quad Piazza Luca;\quad% +% Jobst Hoffmann;\quad Martin Scharrer;\quad Enrico Gregorio;\quad +% Heiko Oberdiek;\quad Philipp Stephani}. % \medskip % % \noindent Thanks for proofreading % -% \textsf{Alan Munn} and \textsf{Nahid Shajari} +% \textsf{Alan Munn} and \textsf{Nahid Shajari} % % I hope I forgot nobody. % \clearpage % \appendix +% % \section{More information} % %\addtocontents{toc}{\protect\setcounter{tocdepth}{-4}} % In the following section I want to present how to create % your own frame. % \subsection{How does \Pack{mdframed} work?} % With the environment \Cmd{begin\{mdframed\}} \ldots \Cmd{end\{mdframed\}} -% the whole contents will be saved in a \Cmd{savebox} called \Cmd{mdf@splitbox@one}. -% After the calculation of the width and the height of the \Cmd{mdf@splitbox@one} (done by \Pack{mdframed.sty}) the box -% will be set sequently (done by \Pack{md-frame-X.mdf}). The following figure demonstrates this. +% the whole contents will be saved in a \Cmd{savebox} called +% \Cmd{mdf@splitbox@one}. After the calculation of the width and the height of +% the \Cmd{mdf@splitbox@one} (done by \Pack{mdframed.sty}) the box will be set +% sequently (done by \Pack{md-frame-X.mdf}). The following figure demonstrates +% this. % % \begin{center} % \begin{tikzpicture} @@ -1317,27 +1510,37 @@ Have fun! % }} % \matrix(m)[mymatrixnodes] % {% -% \mybox{read in and save contents in \Cmd{mdf@splitbox@one}} & -% \mybox{\Cmd{mdf@putbox@single}} \\ -% \mybox{split \textbackslash mdf@splitbox@one in \Cmd{mdf@splitbox@two} to the free space of the page} & -% \mybox{\Cmd{mdf@putbox@first}} \\ -% \mybox{contents of \Cmd{mdf@splitbox@one} have enough space on the new page} & -% \mybox{\Cmd{mdf@putbox@second}} \\ -% \mybox{split \Cmd{mdf@splitbox@one} in \Cmd{mdf@splitbox@two} to the free space of the page} & -% \mybox{\Cmd{mdf@putbox@middle}} \\ +% \mybox{read in and save contents in \Cmd{mdf@splitbox@one}} & +% \mybox{\Cmd{mdf@putbox@single}} \\ +% \mybox{split \textbackslash mdf@splitbox@one in \Cmd{mdf@splitbox@two} to +% the free space of the page} & +% \mybox{\Cmd{mdf@putbox@first}} \\ +% \mybox{contents of \Cmd{mdf@splitbox@one} have enough space on the new +% page} & +% \mybox{\Cmd{mdf@putbox@second}} \\ +% \mybox{split \Cmd{mdf@splitbox@one} in \Cmd{mdf@splitbox@two} to the free +% space of the page} & +% \mybox{\Cmd{mdf@putbox@middle}} \\ % }; % % \tikzstyle{every path}=[black,-triangle 45,thick,shorten >=4pt,shorten <=4pt] -% \draw (m-1-1) edge node[align=center,anchor=south]{enough space on page} (m-1-2); -% \draw (m-2-1) edge node[align=center,anchor=south]{type out \Cmd{mdf@splitbox@two}} (m-2-2); -% \draw (m-3-1) edge node[align=center,anchor=south]{yes} (m-3-2); -% \draw (m-4-1) edge node[align=center,anchor=south]{type out \Cmd{mdf@splitbox@two}} (m-4-2); +% \draw (m-1-1) edge +% node[align=center,anchor=south]{enough space on page} (m-1-2); +% \draw (m-2-1) edge +% node[align=center,anchor=south]{type out \Cmd{mdf@splitbox@two}} +% (m-2-2); +% \draw (m-3-1) edge +% node[align=center,anchor=south]{yes} (m-3-2); +% \draw (m-4-1) edge +% node[align=center,anchor=south]{type out \Cmd{mdf@splitbox@two}} +% (m-4-2); % % \draw (m-2-2) edge node[align=center,fill=white]% % {calculate the height of the new \Cmd{mdf@splitbox@one}} (m-3-1); % % -% \draw (m-1-1) edge node[align=center,anchor=west]{not enough space on page} (m-2-1); +% \draw (m-1-1) edge +% node[align=center,anchor=west]{not enough space on page} (m-2-1); % \draw (m-3-1) edge node[align=center,anchor=west]{no} (m-4-1); % % \draw let \p1=($(m-4-2.south)-(0,1)$), \p2=($(m-3-1.west)-(0.8,0)$) in @@ -1387,7 +1590,8 @@ Have fun! % \iffalse %</example> % \fi -% I am using the command \Cmd{leftline} to start the \enquote{Framecommands} at the left. +% I am using the command \Cmd{leftline} to start the \enquote{Framecommands} at +% the left. % \iffalse %<*example> % \fi @@ -1454,8 +1658,37 @@ Have fun! % % \subsection{Revision history}\label{rev} % \raggedright +% \minisec{Version 1.6b submitted 02 Jun 2012} +% \begin{itemize*} +% \item added commands \Cmd{mdfsubtitle} and \Cmd{mdfsubsubtitle} +% \item added options \Opt{subtitleaboveline}, \Opt{subtitlebelowline}, +% \Opt{subsubtitleaboveline}, \Opt{subsubtitlebelowline}, +% \Opt{subtitlefont}, \Opt{subsubtitlefont}, +% \Opt{subtitlebackgroundcolor}, +% \Opt{subsubtitlebackgroundcolor}, \Opt{subtitleabovelinecolor}, +% \Opt{subtitlebelowlinecolor}, \Opt{subsubtitleabovelinecolor}, +% \Opt{subsubtitlebelowlinecolor}, \Opt{subtitleabovelinewidth}, +% \Opt{subtitlebelowlinewidth}, \Opt{subtitleaboveskip}, +% \Opt{subtitlebelowskip}, \Opt{subtitleinneraboveskip}, +% \Opt{subtitleinnerbelowskip}, \Opt{subsubtitleabovelinewidth}, +% \Opt{subsubtitlebelowlinewidth}, \Opt{subsubtitleaboveskip}, +% \Opt{subsubtitlebelowskip}, \Opt{subsubtitleinneraboveskip}, +% \Opt{subsubtitleinnerbelowskip} +% \item improved formating of the file \Pack{mdframed.dtx} +% \item fixed bug in combination with \Cmd{parskip} -- Thanks David Carlisle. +% \item added extra loop to compute the splitting point. +% \item improved splitting algorithm +% \item added new option \Opt{ignorelastdescenders} -- Thanks Stephan Lehmke. +% \item Improved option \Opt{repeatframetitle} +% \item fixed bug: \Opt{framemethod=tikz} used wrong computed length by +% setting \Opt{everyline=true} +% \item Tobias Weh inspired the excurs-environment not Tobias Schwan. Sorry, +% I fixed it. +% \item Improved \Cmd{mdtheorem} to handle \Cmd{listtheorems} provided by +% \Pack{ntheorem}. +% \end{itemize*} % -% \minisec{Version 1.5 submitted DD MM 2012} +% \minisec{Version 1.5 submitted 10 Mar 2012} % \begin{itemize*} % \item fixed bug (Thanks Nicolas Roy) % \item expanded documentation (Thanks Martin Wilhelm Leidig) @@ -1470,7 +1703,7 @@ Have fun! % \item added approach to documentation to work with \Pack{picins} % \item new implementation of option \Opt{hidealllines}, now you can set % \Cmd{mdfsetup}\Opt{\{hidealllines=true,leftline=true\}} printing -% only the left line (inspired by Tobias Schwan) +% only the left line (inspired by Tobias Weh) % \item added option \Opt{everyline} to draw a top and bottom line at % splitted frames % \end{itemize*} @@ -1478,11 +1711,13 @@ Have fun! % \footnotesize % \minisec{Version 1.4 submitted 4 Mar 2012} % \begin{itemize*} -% \item fixed bug in combination with \Cmd{marginpar} (Thanks Juan Carlos Trujillo Ortega) +% \item fixed bug in combination with \Cmd{marginpar} (Thanks Juan Carlos +% Trujillo Ortega) % \item fixed bug with option \Opt{font} % \item fixed bug inside \texttt{frametitle} (Thanks Yi, Hoze) % \item removed unnessary groups (Thanks Yi, Hoze) -% \item changed the definition of \Pack{listings} to allow copy paste of the examples +% \item changed the definition of \Pack{listings} to allow copy paste of the +% examples % \end{itemize*} % % \minisec{Version 1.3a submitted 5 Feb 2012} @@ -1494,7 +1729,8 @@ Have fun! % \begin{itemize*} % \item fixed documentation (Thanks to Dietrich Grau) % \item added option \Opt{shadow} -% \item improved handling \Cmd{parindent} and \Cmd{parskip} (Thanks to Enrico Gregorio and Joseph Wright) +% \item improved handling \Cmd{parindent} and \Cmd{parskip} (Thanks to Enrico +% Gregorio and Joseph Wright) % \end{itemize*} % % \minisec{Version 1.2 submitted 8 Jan 2012} @@ -1504,10 +1740,13 @@ Have fun! % \item fixed bug in \Cmd{newmdtheoremenv} % \item defined new styles via \Cmd{newpsstyle}\limitation[PSTricks] % \item added new commands for interaction with \Pack{TikZ} and \Pack{PSTricks} -% \item expand frame title option by option \Opt{frametitlerule}, \Opt{frametitlerulewidth} -% \Opt{frametitlefont}, \Opt{frametitleaboveskip}, \Opt{frametitlebelowskip}, \Opt{frametitlealignment} +% \item expand frame title option by option \Opt{frametitlerule}, +% \Opt{frametitlerulewidth}, \Opt{frametitlefont}, +% \Opt{frametitleaboveskip}, \Opt{frametitlebelowskip}, +% \Opt{frametitlealignment} % \item removed limitation of three lines for PSTricks -% \item defined new commands \Cmd{surroundwithmdframed}, \Cmd{mdflength}, \Cmd{mdtheorem} +% \item defined new commands \Cmd{surroundwithmdframed}, \Cmd{mdflength}, +% \Cmd{mdtheorem} % \item load \Pack{xparse} by default % \item changed internal names % \item expanded examples @@ -1518,7 +1757,8 @@ Have fun! % \item fixes documentation (Thanks to Dietrich Grau) % \item fixes bug in \Cmd{newmdtheoremenv} % \item fixes bug with overfull boxes (Thanks to Dietrich Grau) -% \item defined \Cmd{newpsstyle}\Opt{mdfbackgroundstyle} and \Opt{mdflinestyle} \limitation[PSTricks] +% \item defined \Cmd{newpsstyle}\Opt{mdfbackgroundstyle} and \Opt{mdflinestyle} +% \limitation[PSTricks] % \item created dtx-file (Thanks to Kevin Godby) % \item added \Cmd{@parboxrestore} to \Cmd{mdf@lrbox} % \end{itemize*} @@ -1537,7 +1777,8 @@ Have fun! % \item create file \Pack{mdframed-example-default} % \item create file \Pack{mdframed-example-tikz} % \item create file \Pack{mdframed-example-pstricks} -% \item create file \Pack{mdframed-example-texsx} (texsx stands for tex stackexchange) +% \item create file \Pack{mdframed-example-texsx} +% (texsx stands for tex stackexchange) % \end{itemize*} % % @@ -1600,7 +1841,8 @@ Have fun! % % \minisec{Version 0.8 submitted 22 Aug 2011} % \begin{itemize*} -% \item added commands: \Cmd{newmdenv}, \Cmd{renewmdenv}, \Cmd{newmdtheoremenv} +% \item added commands: \Cmd{newmdenv}, \Cmd{renewmdenv}, +% \Cmd{newmdtheoremenv} % \item fixes bugs % \item fixes documentation % \end{itemize*} @@ -1623,15 +1865,15 @@ Have fun! % \item expanded documentation % \end{itemize*} % -% \ltxmdfappendix +% \clearpage % % \section{Implementation}\label{implementation} % % And finally, here's how it all works\ldots % %\StopEventually{^^A -% \clearpage -% \PrintChanges^^A +% %%\clearpage +% %%\PrintChanges^^A % \clearpage % \PrintIndex^^A %} @@ -1643,14 +1885,14 @@ Have fun! % % \subsection{The Explanation of mdframed.sty} % -% %$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ -% %$Rev: 375 $ +% %$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ +% %$Rev: 426 $ % %$Author: marco $ -% %$Date: 2012-04-08 12:52:22 +0200 (So, 08. Apr 2012) $ +% %$Date: 2012-06-02 14:18:56 +0200 (Sa, 02 Jun 2012) $ % \begin{macro}{mdversion,mdframedpackagename,mdf@maindate@svn} % Set package information % \begin{macrocode} -\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 } % \end{macrocode} @@ -1659,14 +1901,15 @@ Have fun! % \begin{macrocode} \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] % \end{macrocode} % % \begin{macro}{mdf@PackageWarning,mdf@PackageInfo,mdf@LoadFile@IfExist} -% Set short form of |\PackageWarning|, |\PackageInfo| and |IfFileExists| in combination -% with |\RequirePackage|. +% Set short form of |\PackageError|, |\PackageWarning|, |\PackageInfo| and +% |IfFileExists| in combination with |\RequirePackage|. % \begin{macrocode} +\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]{% @@ -1691,14 +1934,15 @@ Have fun! \RequirePackage{color} % \end{macrocode} % -% Set the family and the prefix of all options. (see documentation of |kvoptions| +% Set the family and the prefix of all options. % \begin{macrocode} \SetupKeyvalOptions{family=mdf,prefix=mdf@} % \end{macrocode} % \begin{macro}{mdf@iflength,mdf@iflength@check,mdf@iflength@check} -% Command which checks the input of length options. If the length option is only -% a number the |defaultunit| will be used. Syntax: |\mdf@iflength{<Input>}{<length>}{<no length>}| +% Command which checks the input of length options. If the length option is +% only a number the |defaultunit| will be used. Syntax: +% |\mdf@iflength{<Input>}{<length>}{<no length>}| % \begin{macrocode} \newlength{\mdf@templength} \def\mdf@iflength#1{% @@ -1729,14 +1973,15 @@ Have fun! % % \begin{macro}{mdf@option@length,mdf@define@key@length} % Command to define a new length width a default value. -%| \mdf@option@length{<Laengenbezeichnung>}{<Defaultwert>}| +%| \mdf@option@length{<name of length>}{<Defaultwert>}| % \begin{macrocode} \newrobustcmd*{\mdf@option@length}[2]{% \expandafter\newlength\csname mdf@#1@length\endcsname% \expandafter\setlength\csname mdf@#1@length\endcsname{#2}% } % \end{macrocode} -% Command to create a new length option.|\mdf@define@key@length{<Bezeichnungder Option der Laenge>}| +% Command to create a new length option. +% |\mdf@define@key@length{<name of length option>}| % \begin{macrocode} \newrobustcmd*{\mdf@define@key@length}[1]{% \define@key{mdf}{#1}{% @@ -1744,7 +1989,7 @@ Have fun! \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}% }% } % \end{macrocode} @@ -1752,8 +1997,9 @@ Have fun! % % % \begin{macro}{mdf@do@lengthoption,mdf@lengthoption@doubledo} -% The loop of |\mdf@dolist| expected one argument. So I have to define to commands -% to allow a loop with two arguments. The separation for the input is |==|. +% The loop of |\mdf@dolist| expected one argument. So I have to define a +% command to allow a loop with two arguments. The separation for the input is +% |==|. % \begin{macrocode} \def\mdf@do@lengthoption#1{% \mdf@lengthoption@doubledo#1\@nil% @@ -1818,26 +2064,27 @@ Have fun! \defcounter{mdf@globalstyle@cnt}{0} \newcommand*\mdfglobal@style{0} % \end{macrocode} -% Only provide to be backward compatible +% Only provide to be backward compatible % \begin{macrocode} \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% } % \end{macrocode} % % \begin{macro}{mdf@framemethod} +% Definining the global option \Opt{framemethod}. % \begin{macrocode} \providecommand*\mdf@framemethod{} \def\mdf@framemethod@i{}% @@ -1848,33 +2095,29 @@ Have fun! % % \begin{macrocode} \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% } % \end{macrocode} % -% \changes{v1.1beta}{2011/12/17}{Added option \protect\Opt{titleaboveskip}, \protect\Opt{titlebelowskip}, \protect\Opt{frametitlerulewidth}} % \begin{macro}{mdf@do@lengthoption} -% Here the declaration of the length option. The input method is explained above. +% Here the declaration of all length options. % \begin{macrocode} \mdf@dolist{\mdf@do@lengthoption}{% {skipabove==\z@},% @@ -1902,12 +2145,29 @@ Have fun! {frametitleleftmargin==10pt},% {frametitlerightmargin==10pt},% {shadowsize==8pt},% + {extratopheight==\z@},% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % +% %%subtitle / subsubtitle added 29.05.12%% % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % + {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},% } % \end{macrocode} % \end{macro} -% \changes{v1.1beta}{2011/12/17}{Added option \protect\Opt{frametitlerulecolor}, \protect\Opt{frametitlebackgroundcolor}, \protect\Opt{font} } +% % \begin{macro}{mdf@do@lengthoption} -% Here the declaration of the string option. The input method is explained above. +% Here the declaration of the string options. % \begin{macrocode} \mdf@dolist{\mdf@do@stringoption}{% {frametitle=={}},% @@ -1938,13 +2198,23 @@ Have fun! {firstextra=={}}, {middleextra=={}}, {secondextra=={}}, +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % +% %%subtitle / subsubtitle added 29.05.12%% % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % + {subtitlefont==\normalfont\bfseries},% + {subsubtitlefont==\normalfont},% + {subtitlebackgroundcolor==white},% + {subsubtitlebackgroundcolor==white},% + {subtitleabovelinecolor==black},% + {subtitlebelowlinecolor==black},% + {subsubtitleabovelinecolor==black},% + {subsubtitlebelowlinecolor==black},% } % \end{macrocode} % \end{macro} -% \changes{v1.1beta}{2011/12/17}{Added option \protect\Opt{usetwoside}} -% \changes{v1.3}{2012/02/04}{Added option \protect\Opt{shadow}} +% % \begin{macro}{mdf@do@booloption} -% Here the declaration of the string option. The input method is explained above. +% Here the declaration of all bool options. % \begin{macrocode} \mdf@dolist{\mdf@do@booloption}{% {ntheorem==false},% @@ -1956,7 +2226,6 @@ Have fun! {frametitleleftline==true},% {frametitlebottomline==true},% {frametitlerightline==true},% -% {hidealllines==false},% {frametitlerule==false},% {nobreak==false},% {footnoteinside==true},% @@ -1964,20 +2233,29 @@ Have fun! {repeatframetitle==false},%Noch nicht richtig implementiert {shadow==false},% {everyline==false},% + {ignorelastdescenders==false},% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % +% %%subtitle / subsubtitle added 29.05.12%% % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % + {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}% }{}% } % \end{macrocode} % \end{macro} % % \begin{macro}{mdf@do@alignoption} -% Here the declaration of the align option. The input method is explained above. +% Here the declaration of all align options. % \begin{macrocode} \mdf@dolist{\mdf@do@alignoption}{% {left==\mdf@leftmargin@length==\z@},% @@ -1989,7 +2267,8 @@ Have fun! % \end{macrocode} % \end{macro} % -% \begin{macro}{mdf@align,mdf@makeboxalign@left,mdf@makeboxalign@right,mdf@makeboxalign@right} +% \begin{macro}{mdf@align,mdf@makeboxalign@left, +% mdf@makeboxalign@right,mdf@makeboxalign@right} % Set the alignment. % \begin{macrocode} \newcommand*\mdf@align{}% @@ -2026,7 +2305,6 @@ Have fun! \define@key{mdf}{pstricksappsetting}{% \def\mdfpstricks@appendsettings{#1}% } - % \end{macrocode} % \end{macro} % @@ -2034,7 +2312,7 @@ Have fun! % \textcolor{red}{\bfseries Problem width xcolor. This part must be reworked!} % \begin{macrocode} \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 @@ -2067,19 +2345,20 @@ Have fun! % % \begin{macrocode} \DeclareDefaultOption{% - \mdf@PackageWarning{Unknown Option '\CurrentOption' for mdframed}} + \mdf@PackageError{Unknown Option '\CurrentOption' for mdframed}} \ProcessKeyvalOptions*\relax % \end{macrocode} % % \begin{macro}{mdfsetup} % Short form of |\setkeys{mdf}| % \begin{macrocode} -\newrobustcmd*{\mdfsetup}{\setkeys{mdf}} +\newrobustcmd*{\mdfsetup}{\kvsetkeys{mdf}} % \end{macrocode} % \end{macro} % % \begin{macro}{mdf@style} -% Redefinition of the option |style| to use the key in combination with |mdfdefinedstyle|. +% Redefinition of the option |style| to use the key in combination with +% |mdfdefinedstyle|. % \begin{macrocode} \define@key{mdf}{style}{% \ifcsundef{mdf@definestyle@#1}{% @@ -2088,8 +2367,8 @@ Have fun! 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}}% }% % \end{macrocode} % \end{macro} @@ -2120,15 +2399,15 @@ Have fun! } % \end{macrocode} % \end{macro} -% \changes{v1.1beta}{2011/12/15}{Joining all new definitions} -% \changes{v1.1beta}{2011/12/15}{Create new \protect\Cmd{savebox} and renamed \protect\Cmd{@tempboxa}} -% \begin{macro}{new\ldots} +% +% \begin{macro}{new...} % Initialize all commands and length which will we used later % \begin{macrocode} \newsavebox\mdf@frametitlebox \newsavebox\mdf@footnotebox \newsavebox\mdf@splitbox@one \newsavebox\mdf@splitbox@two +\newsavebox\mdf@splitbox@save \newlength\mdfsplitboxwidth \newlength\mdfsplitboxtotalwidth \newlength\mdfsplitboxheight @@ -2158,37 +2437,48 @@ Have fun! \newlength\mdf@horizontalwidthofbox@length \newlength\mdf@verticalmarginwhole@length +\newtoggle{mdf@notfirstframetitle}% +\togglefalse{mdf@notfirstframetitle}% + + % Command to expand the tikz code. (see md-frame-1.mdf) \newrobustcmd\mdfcreateextratikz{} % \end{macrocode} % \end{macro} % -% \changes{v1.0b}{2011/11/26}{added command \protect\Cmd{@parboxrestore} to \protect\Cmd{mdf@lrbox}} -% \changes{v1.1release}{2012/01/03}{changed definition of \protect\Cmd{mdf@lrbox} (Thanks Lars Madsen)} -% \changes{v1.3a}{2012/02/05}{fixes bug with \protect\Cmd{@doendpe} (Thanks Dietrich Grau)} +% \changes{v1.6}{2012/05/11}{Changes the complete definition of +% \protect\Cmd{mdf@lrbox} to fix problem with \protect\Env{itemize}} % \begin{macro}{mdf@lrbox,endmdf@lrbox} % Modification of the default |\lrbox| and |\endlrbox| % \begin{macrocode} - \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} @@ -2196,11 +2486,11 @@ Have fun! % \end{macrocode} % \end{macro} % -% \changes{v1.1beta}{2011/12/16}{added command to avoid overfull box warning by vsplit} % \begin{macro}{mdf@ignorevbadness,mdf@restorevbadness} % Avoiding warnings during the splitting process by \Cmd{vsplit}. -% see \href{http://tex.stackexchange.com/questions/38496/how-to-avoid-underfull-vbox-in-combination-with-vsplit/38499#38499} -% {How to avoid underfull vbox in combination with \Cmd{vsplit?}} +% see \href{http://tex.stackexchange.com/questions/38496/how-to-avoid-^^A +% underfull-vbox-in-combination-with-vsplit/38499#38499}^^A +% {How to avoid underfull vbox in combination with \Cmd{vsplit}?} % \begin{macrocode} \newrobustcmd*\mdf@ignorevbadness{% \edef\mdf@currentvbadness{\the\vbadness}% @@ -2210,30 +2500,28 @@ Have fun! % \end{macrocode} % \end{macro} % -% % \begin{macro}{mdf@patchamsth} -% The package \Pack{amsthm} provides a not compatible starting of -% theorem. So I have to change the header of amsthm. +% The package \Pack{amsthm} provides a not compatible starting of theorem. So I +% have to change the header of amsthm. % \begin{macrocode} -\@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}% % \end{macrocode} % \end{macro} % % -% \changes{v1.1release}{2012/01/07}{Added \protect\Cmd{mbox} to the definition. -% \protect\Cmd{item}\protect\Cmd{mbox}\protect\Cmd{relax} -- Need for amsthm} -% \changes{v1.3}{2012/02/04}{Use now \protect\Cmd{item}\protect\Cmd{mbox}\protect\Cmd{relax}} % \begin{macro}{mdf@trivlist,endmdf@trivlist} % Modification of the default |\trivlist| and |\endtrivlist|. % \begin{macrocode} @@ -2253,7 +2541,13 @@ Have fun! \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} @@ -2274,7 +2568,7 @@ Have fun! % \end{macro} % % \begin{macro}{mdfdefinestyle,mdfapptodefinestyle} -% See explanation of this commands above. +% See explanation of this commands in the main documenation. % \begin{macrocode} \newrobustcmd*\mdfdefinestyle[2]{% \csdef{mdf@definestyle@#1}{#2}% @@ -2302,8 +2596,6 @@ Have fun! % % % -% \changes{v1.1beta}{2011/12/15}{Redefinition of \protect\Cmd{newmdtheoremenv}. -% -- Now check of theorem definition.} % \begin{macro}{newmdenv,renewmdenv,newmdtheoremenv,mdtheorem} % Defining of the new environment defintions. % \begin{macrocode} @@ -2320,8 +2612,9 @@ Have fun! \expandafter\let\csname end#2\endcsname\relax% \newmdenv[#1]{#2}% }% - - +% \end{macrocode} +% Definitions of the standard Theoerems surrounded by \Pack{mdframed}. +% \begin{macrocode} \DeclareDocumentCommand\newmdtheoremenv{O{} m o m o }{% \ifboolexpr{ test {\IfNoValueTF {#3}} and test {\IfNoValueTF {#5}} }% {\newtheorem{#2}{#4}}{% @@ -2333,19 +2626,29 @@ Have fun! \AfterEndEnvironment{#2}{% \end{mdframed}}% } - +% \end{macrocode} +% Compatible with \Pack{ntheorem}'s \Cmd{listoftheorems}. +% \begin{macrocode} +\newrobustcmd*\mdf@thm@caption[2]{} +\AtBeginDocument{% + \@ifpackageloaded{ntheorem}% + {\renewrobustcmd*\mdf@thm@caption{\thm@thmcaption}}{}% + } +% \end{macrocode} +% Defining a complete new theorem set by \Pack{mdframed} +% \begin{macrocode} \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}% {% @@ -2353,22 +2656,24 @@ Have fun! \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}% {% @@ -2376,8 +2681,10 @@ Have fun! \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}% @@ -2387,7 +2694,8 @@ Have fun! \mdf@theoremspace% \mdf@theoremtitlefont% ##1}% - } + \mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}% + }% \begin{mdframed}[#1,frametitle={\strut#4\@temptitle}]}% {\end{mdframed}}% }% @@ -2395,7 +2703,7 @@ Have fun! {%#3 given -- number relationship \global\@namedef{the#2}{\@nameuse{the#3}}% \newenvironment{#2}[1][]{% - \refstepcounter{#3} + \refstepcounter{#3}% \ifstrempty{##1}% {\let\@temptitle\relax}% {% @@ -2403,11 +2711,13 @@ Have fun! \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}}% }% @@ -2417,71 +2727,41 @@ Have fun! % \end{macrocode} % \end{macro} % -% \changes{v1.1beta}{2011/12/17}{Added method frame title via \protect\Cmd{savebox}} -% \changes{v1.1release}{2012/01/05}{Edit algorithm to combine the saveboxes \protect\Cmd{mdf@frametitlebox} -% and \protect\Cmd{mdf@splitboxone} by the predefined settings: -% \protect\Cmd{parskip}\protect\Cmd{z@}, \protect\Cmd{parindent}\protect\Cmd{z@} and -% \protect\Cmd{offinterlineskip}} -% \begin{macro}{mdfframedtitleenv,mdf@@frametitle,mdf@setopt@body,mdf@setopt@title} +% \begin{macro}{mdfframedtitleenv,mdf@@frametitle, +% mdf@setopt@body,mdf@setopt@title} % Default definition of the frame tile used by |mdframed|. +% \textcolor{red}{\bfseries Need a better documenation and must be improved!!!} % \begin{macrocode} -%TESTVERSION -% \newrobustcmd*\mdf@setopt@title{% -% \ifbool{mdf@frametitlerule}{\booltrue{mdf@bottomline}}{\boolfalse{mdf@bottomline}}% -% \let\ifmdf@leftline\ifmdf@frametitleleftline% -% \let\ifmdf@topline\ifmdf@frametitletopline% -% \let\ifmdf@rightline\ifmdf@frametitlerightline% -% \let\ifmdf@bottomline\ifmdf@frametitlebottomline% -% \mdfsetup{innerbottommargin=\mdf@titlebelowskip@length,% -% innertopmargin=\mdf@titleaboveskip@length,% -% middlelinecolor=\mdf@frametitlerulecolor,% -% backgroundcolor=\mdf@frametitlebackgroundcolor,% -% middlelinewidth=\mdf@frametitlerulewidth@length,% -% innerleftmargin=\mdf@frametitleleftmargin@length,% -% innerrightmargin=\mdf@frametitlerightmargin@length,% -% alignment=\mdf@frametitlealignment, -% skipbelow=\z@}% -% \def\mdf@linecolor@bottom{\color{\mdf@frametitlebottomrulecolor}}% -% \mdf@frametitlesettings% -% } -% -% \newrobustcmd*\mdf@setopt@body{% -% \mdfsetup{topline=false,skipabove=\z@}% -% \unskip\nointerlineskip% -% } -% -% \newrobustcmd\mdfframedtitleenv[1]{% -% \begingroup -% \mdf@setopt@title -% \color@setgroup -% \mdf@frametitlefont -% \mdf@lrbox{\mdf@splitbox@one}% -% \mdf@frametitlealignment -% #1\par\unskip -% \endmdf@lrbox -% \mdf@ignorevbadness -% \global\setbox\mdf@frametitlebox\vbox{\unvbox\mdf@splitbox@one}% -% \mdf@ignorevbadness -% \global\setbox\mdf@splitbox@one\vbox{\unvcopy\mdf@frametitlebox}% -% \detected@mdf@put@frame% -% \color@endgroup% -% \endgroup -% } \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} +% \end{macrocode} +% Trying to ignore last descenders of the environment. +% \begin{macrocode} + \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%% +% \end{macrocode} +% +% \begin{macrocode} + \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{% @@ -2489,20 +2769,17 @@ Have fun! } \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}% } % \end{macrocode} @@ -2512,7 +2789,6 @@ Have fun! % Command which checks only |ntheorem|. Later I will support also % |thmtools|. % \begin{macrocode} - \newrobustcmd*\mdf@checkntheorem{% \ifbool{mdf@ntheorem}% {\ifundef{\theorempreskipamount}% @@ -2526,18 +2802,18 @@ Have fun! % \end{macro} % % \begin{macro}{mdf@footnoterule,mdf@footnoteoutput,mdf@footnoteinput} -% Support for footnotes. +% Support for footnotes. See source2e. % \begin{macrocode} \newrobustcmd*\mdf@footnoterule{% \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{% @@ -2549,7 +2825,7 @@ Have fun! % \end{macrocode} % \end{macro} % -% \begin{macro}{mdf@load@style,mdf@styledefinition} +% \begin{macro}{mdf@load@style} % Load the method to draw the frame and set style definition. % \begin{macrocode} \newrobustcmd*\mdf@load@style{% @@ -2563,14 +2839,20 @@ Have fun! {\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!!! +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{mdf@styledefinition} +% The default frame method needs special handling. +% \begin{macrocode} +\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}% @@ -2579,24 +2861,10 @@ Have fun! \let\mdf@middlelinecolor\mdf@linecolor% \let\mdf@outerlinecolor\mdf@linecolor% }{}% -% \ifnumequal{\value{mdf@globalstyle@cnt}}{2}% -% {\deflength{\mdf@innerlinewidth@length}{\z@}% -% \deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}% -% \deflength{\mdf@outerlinewidth@length}{\z@}% -% \let\mdf@innerlinecolor\mdf@linecolor% -% }{}% -% \ifnumequal{\value{mdf@globalstyle@cnt}}{3}% -% {\deflength{\mdf@innerlinewidth@length}{\z@}% -% \deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}% -% \deflength{\mdf@outerlinewidth@length}{\z@}% -% \let\mdf@innerlinecolor\mdf@linecolor% -% }{}% } % \end{macrocode} % \end{macro} -% \changes{v1.1beta}{2011/12/17}{Added frametitle detection to \protect\Cmd{detected@mdf@put@frame}} -% \changes{v1.4}{2012/03/04}{Changed the detecting of float environments. Now mdframed uses -% only \protect\Cmd{@captype} instead of \protect\Cmd{@floatpenalty}} +% % \begin{macro}{detected@mdf@put@frame} % Detect whether inside a non breakable environment. % \begin{macrocode} @@ -2613,21 +2881,6 @@ Have fun! 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}% @@ -2644,32 +2897,18 @@ Have fun! % \end{macrocode} % \end{macro} % -% \begin{macro}{mdf@hidealllines@check} +% \begin{macro}{mdframed} +% The user environement. % \begin{macrocode} -\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][]{% % \end{macrocode} -% \end{macro} -% -% \changes{v1.1beta}{2011/12/16}{Defining \protect\Env{mdframed} with \protect\Cmd{newenvironment}} -% \changes{v1.1beta}{2012/01/01}{Changed the definition of \protect\Cmd{mdf@trivlist}} -% \changes{v1.1release}{2012/01/03}{Changed the enddefinition of \protect\Env{mdframed}. -% Uses now \protect\Cmd{@doendpe} instead of \protect\Cmd{\@endparenv}} -% \changes{v1.4}{2012/03/004}{Changed the enddefinition of \protect\Env{mdframed}. -% Uses now a line to provide the defined width} -% \begin{macro}{mdframed,mdframed@ii,mdframed@i} -% That the user environement. +% Make everything local % \begin{macrocode} -\newenvironment{mdframed}[1][]{% \color@begingroup% +% \end{macrocode} +% Set all options +% \begin{macrocode} \mdfsetup{userdefinedwidth=\linewidth,#1}% -%%% \mdf@hidealllines@check% \mdf@twoside@checklength% \let\width\z@% \let\height\z@% @@ -2681,35 +2920,59 @@ Have fun! \ifvmode\nointerlineskip\fi% \mdf@trivlist{\mdf@skipabove@length}%% \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle}% +% \end{macrocode} +% Special command to allow extra user definitions by the option \Opt{settings}. +% \begin{macrocode} \mdf@settings% +% \end{macrocode} +% Start save box and save the whole contens in the box \Cmd{mdf@splitbox@one} +% \begin{macrocode} \mdf@lrbox{\mdf@splitbox@one}% }% - {\par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%% + {% +% \end{macrocode} +% Trying to ignore last descenders of the environment. +% \begin{macrocode} + \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%% +% \end{macrocode} +% End save box in relation to footnotes +% \begin{macrocode} \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% }% \fi% \mdf@reserveda% \endmdf@trivlist% +% \end{macrocode} +% End group and set the command \Cmd{@doendpe} to behave like +% \Cmd{end\{center\}} +% \begin{macrocode} \color@endgroup\@doendpe% } - % \end{macrocode} % \end{macro} % -% \begin{macro}{mdf@twoside@checklength,mdf@zref@label,if@mdf@pageodd,mdf@pageisodd,mdf@pageiseven,mdf@@setzref} -% The whole bunch is used to work width twoside mode and uses the correct margins. +% \begin{macro}{mdf@twoside@checklength,mdf@zref@label,if@mdf@pageodd, +% mdf@pageisodd,mdf@pageiseven,mdf@@setzref} +% The whole bunch is used to work width twoside mode and uses the correct +% margins. % \begin{macrocode} \newtoggle{md:checktwoside} \settoggle{md:checktwoside}{false} @@ -2736,14 +2999,15 @@ Have fun! \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}{}% @@ -2751,13 +3015,19 @@ Have fun! % \end{macrocode} % \end{macro} % -% \changes{v1.2a}{2012/01/09}{take account of \protect\Cmd{parskip} for the vertical calculation} % \begin{macro}{mdf@freepagevspace} % \begin{macrocode} \newrobustcmd*\mdf@freepagevspace{% - \penalty\@M \vskip 2\baselineskip - \penalty9999 \vskip -2\baselineskip - \penalty9999 +% \end{macrocode} +% The following lines are added by an inspiration of the great package +% \Pack{multicol}. +% \begin{macrocode} + \bgroup\@nobreakfalse\addpenalty\z@\egroup%added 29.5.12 +% \end{macrocode} +% \begin{macrocode} + \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% @@ -2768,13 +3038,16 @@ Have fun! % \end{macrocode} % \end{macro} % -% \changes{v1.1beta}{2011/12/16}{Removing \protect\Cmd{@arrayparboxrestore}} -% \begin{macro}{mdf@advancelength@horizontalmargin@add,mdf@horizontalspaceofbox,mdf@horizontalmargin@equation} -% Width of the box +% \begin{macro}{mdf@advancelength@horizontalmargin@add, +% mdf@horizontalspaceofbox,mdf@horizontalmargin@equation} +% Command used for loop % \begin{macrocode} \newrobustcmd*\mdf@advancelength@horizontalmargin@sub[1]{% \advance\mdf@horizontalspaceofbox by -\csname mdf@#1@length\endcsname\relax% } +% \end{macrocode} +% Compute the width of the box +% \begin{macrocode} \newlength\mdf@horizontalspaceofbox \newrobustcmd*\mdf@horizontalmargin@equation{% \setlength{\mdf@horizontalspaceofbox}{\mdf@userdefinedwidth@length}% @@ -2783,47 +3056,60 @@ Have fun! 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% } % \end{macrocode} % \end{macro} % % \begin{macro}{mdf@keeplines@single} -% horizontal space in relation of the lines. +% Space in relation of horizontal lines. % \begin{macrocode} \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% }{}% } % \end{macrocode} % \end{macro} % % -% \begin{macro}{mdf@advancelength@verticalmarginwhole,mdf@advancelength@freevspace@sub,mdf@advancelength@freevspace@add} +% \begin{macro}{mdf@advancelength@verticalmarginwhole, +% mdf@advancelength@freevspace@sub, +% mdf@advancelength@freevspace@add} % Loop macros to calculate the height. Used by |\mdf@dolist|. % \begin{macrocode} \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% @@ -2855,8 +3141,9 @@ Have fun! \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 @@ -2867,184 +3154,229 @@ Have fun! % % \begin{macro}{mdf@put@frame} % Output of |mdframed| inside a breakable environement. -% The comparison are onyl check whether the contents must be split or not. +% The comparison are only check whether the contents must be split or not. % \begin{macrocode} \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% } % \end{macrocode} % \end{macro} % -% \changes{v1.0b}{2011/12/09}{removed \protect\Cmd{setbox\textbackslash mdf@splitbox@two \textbackslash vbox{\textbackslash unvbox \textbackslash mdf@splitbox@two}}} -% \changes{v1.4a}{2012/03/06}{added extra test for a wrong splitted box} % \begin{macro}{mdf@put@frame@i} % Output of the first splitted box. % \begin{macrocode} -\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 +% \end{macrocode} +% Compute the vertical free space of the current page +% \begin{macrocode} \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% +% \end{macrocode} +% Compute whether the width of the lines plus 2 \Cmd{baselineskips} can +% only be set on the current page. +% \begin{macrocode} + \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}% +% \end{macrocode} +% force a page / column break and restart printing of the environment +% \begin{macrocode} {\hrule \@height\z@ \@width\hsize% \vfill\eject% \def\mdf@reserved@a{\mdf@put@frame}% - }{% - \mdf@freepagevspace% - \dimen@=\the\mdf@freevspace@length% + }% +% \end{macrocode} +% The page has enough space. +% \begin{macrocode} + {% +% \end{macrocode} +% compute the needed vertical space of the first frame. Subtract the dimension +% of the bottom frame +% \begin{macrocode} \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% - }% +% \end{macrocode} +% Reduce vertical space if option \Opt{everyline} is set to \Opt{true} +% \begin{macrocode} + \ifbool{mdf@everyline}% + {% + \ifbool{mdf@bottomline}% + {% + \advance\dimen@ by -\mdf@innerlinewidth@length% + \advance\dimen@ by -\mdf@middlelinewidth@length% + \advance\dimen@ by -\mdf@outerlinewidth@length% + }{}% + }{}% +% \end{macrocode} +% Add vertical space if option \Opt{topline} is set to \Opt{false} +% \begin{macrocode} + \notbool{mdf@topline}% + {% + \advance\dimen@ by \mdf@innerlinewidth@length% + \advance\dimen@ by \mdf@middlelinewidth@length% + \advance\dimen@ by \mdf@outerlinewidth@length% + }{}% +% \end{macrocode} +% Add a length of 0.8\Cmd{pageshrink}. I don't know whether it's needed! +% \begin{macrocode} \advance\dimen@.8\pageshrink +% \end{macrocode} +% Test whether the contents has enough space and the last frame will be empty +% \begin{macrocode} \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???????????????????? }{}% -% \advance\dimen@ by -1pt\relax%Box darf nicht zu Groß werden. - \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 +% \end{macrocode} +% \begin{itemize} +% \item save the orginal contents in a new save box, +% \item set the dimension for splitting +% \item ignore bad boxes and split +% \end{itemize} +% \begin{macrocode} + \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}% +% \end{macrocode} +% Test whether the splitted box fits the required dimension +% \begin{macrocode} + \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}% +% \end{macrocode} +% restore save box \Cmd{mdf@splitbox@one} by the save one +% \Cmd{mdf@splitbox@save} +% \begin{macrocode} + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% +% \end{macrocode} +% Start loop until splitting fits -- break after 100 attempts +% \begin{macrocode} + \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 +% \immediate\typeout{***mdframed \string\@tempcnta=\the\@tempcnta***} +% \immediate \typeout{***mdframed \string\dimen@i=\the\dimen@i***} + \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% + }{}% +% \end{macrocode} +% Test if the last frame is empty +% \begin{macrocode} + \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% +% \end{macrocode} +% Test if first splitted frame doesn't have the original with. +% \begin{macrocode} + \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% +% \end{macrocode} +% Test if the first frame is empty +% \begin{macrocode} + \ifvoid\mdf@splitbox@two\relax% {\hrule \@height\f@size pt \@width\z@% \hrule \@height\z@ \@width\hsize}% -% \vfill\eject% -% \vskip\baselineskip -% {\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% +% \end{macrocode} +% Output of the first frame +% \begin{macrocode} + \begingroup\mdf@@setzref\mdf@putbox@first\endgroup% \hrule \@height\z@ \@width\hsize% \vfill\eject% \def\mdf@reserved@a{\mdf@put@frame@ii}% +% \end{macrocode} +% +% \begin{macrocode} }% - \fi% - }% + \fi% + }% \mdf@reserved@a% } % \end{macrocode} @@ -3054,101 +3386,219 @@ Have fun! % \begin{macro}{mdf@put@frame@ii} % Output of the middle and last box. % \begin{macrocode} -\def\mdf@put@frame@ii{%Ausgabe der mittleren Box(en) wenn vorhanden +\def\mdf@put@frame@ii{% +% \end{macrocode} +% After splitting the vertical free space is \Cmd{vsize} so you can set it +% directly. +% \begin{macrocode} \setlength{\mdf@freevspace@length}{\vsize}% +% \end{macrocode} +% \textcolor{red}{\bfseries repeating frame title must be improved} +% \begin{macrocode} + \ifbool{mdf@repeatframetitle}% + {% +% \end{macrocode} +% Remember that the first title was printed +% \begin{macrocode} + \toggletrue{mdf@notfirstframetitle}% +% \end{macrocode} +% remove the vertical skip added by option \Opt{splittopskip} to connect the +% boxes +% \begin{macrocode} + \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} +% \end{macrocode} +% combine frame title with the contents of mdframed +% \begin{macrocode} + \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}% + }{}% +% \end{macrocode} +% \Cmd{dimen@} is equal to the natural height of the rest +% \begin{macrocode} \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}% +% \end{macrocode} +% Assume no middle box -- add bottom length to the natural height of the +% contents +% \begin{macrocode} + \mdf@dolist{\mdf@advancelength@freevspace@add}% + {%used \dimen@ + innerbottommargin,innerlinewidth,middlelinewidth,outerlinewidth,% + }% +% \end{macrocode} +% add top length of lines if \Opt{everyline} is set to \Opt{true} +% \begin{macrocode} + \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% + }{}% + }{}% +% \end{macrocode} +% remove length of bottom if \Opt{bottomline} is set to \Opt{false} +% \begin{macrocode} + \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% + }{}% +% \end{macrocode} +% Test whether the complete height of the frame fits on the current page +% \begin{macrocode} + \ifdimgreater{\dimen@}{\mdf@freevspace@length}% + {%have a middle box +% \end{macrocode} +% Use \Cmd{mdf@freevspace@length} to compute the splitting dimension. The +% conditionals \Opt{everyline}, \Opt{topline} and \Opt{bottomline} work +% like the test above. +% \begin{macrocode} \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 + }{}% + }{}% +% \end{macrocode} +% \begin{itemize} +% \item save the orginal contents in a new save box, +% \item set the dimension for splitting +% \item ignore bad boxes and split +% \end{itemize} +% \begin{macrocode} + \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} +% \end{macrocode} +% Test whether the splitted box fits the required dimension +% \begin{macrocode} + \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}% +% \end{macrocode} +% Start loop until splitting fits -- break after 100 attempts +% \begin{macrocode} + \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% +% \immediate\typeout{***mdframed \string\@tempcnta=\the\@tempcnta***} +% \immediate \typeout{***mdframed \string\dimen@i=\the\dimen@i***} + \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% + }{}% +% \end{macrocode} +% Test whether last frame is empty +% \begin{macrocode} + \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}% +% \end{macrocode} +% Output of the middle frame +% \begin{macrocode} + \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 +% \end{macrocode} +% Starting output of last frame +% \begin{macrocode} + {%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}% +% \end{macrocode} +% \Cmd{ifvoid} isn't enough -- need to test the height +% \begin{macrocode} + \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 +% \end{macrocode} +% Output of the last frame +% \begin{macrocode} + \begingroup\mdf@@setzref\mdf@putbox@second\endgroup% + \hrule \@height\z@ \@width\hsize% + \let\mdf@reserved@a\relax% + }% \mdf@reserved@a% } % \end{macrocode} % \end{macro} % -% \begin{macro}{mdf@test@ltrb,mdf@test@ltr,mdf@test@ltb,mdf@test@trb,mdf@test@lrb,mdf@test@lb,mdf@test@rb,^^A -% mdf@test@tr,mdf@test@lt,mdf@test@lr,mdf@test@tb,mdf@test@l,mdf@test@r,mdf@test@t,mdf@test@b,mdf@test@noline} +% \begin{macro}{mdf@test@ltrb,mdf@test@ltr,mdf@test@ltb,mdf@test@trb,^^A +% mdf@test@lrb,mdf@test@lb,mdf@test@rb,^^A +% mdf@test@tr,mdf@test@lt,mdf@test@lr,mdf@test@tb,mdf@test@l,^^A +% mdf@test@r,mdf@test@t,mdf@test@b,mdf@test@noline} % Short forms of checking the option which lines should be drawn. % \begin{macrocode} %%%% _____t_____ @@ -3163,62 +3613,62 @@ Have fun! %%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})}} %3-set \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})}} %2-set \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})}} %Einzellinien \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})}} %keine Linien \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} ) }} % % \end{macrocode} % \end{macro} @@ -3252,7 +3702,7 @@ Have fun! %% 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 $ % % \end{macrocode} % @@ -3262,13 +3712,14 @@ Have fun! \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] % \end{macrocode} % \end{macro} % % -% \begin{macro}{mdf@background@default,mdf@linecolor@default,mdf@linecolor@bottom} +% \begin{macro}{mdf@background@default,mdf@linecolor@default,^^A +% mdf@linecolor@bottom} % short command % \begin{macrocode} \def\mdf@background@default{\color{\mdf@backgroundcolor}} @@ -3281,7 +3732,7 @@ Have fun! \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% @@ -3289,478 +3740,1054 @@ Have fun! +\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% + }% }% % \end{macrocode} % \end{macro} % -% \begin{macro}{mdf@putbox@single,mdf@frame@background@single,mdf@frame@topandbottomline@single,mdf@frame@leftline@single,mdf@frame@rightline@single,mdf@frame@rightline@single} +% +% +% \begin{macro}{mdfsubtitle} +% Definition of the command \Cmd{mdfsubtitle}. +% \begin{macrocode} +\newrobustcmd\mdfsubtitle[2][]% +{% +% \end{macrocode} +% Make everything local. +% \begin{macrocode} + \begingroup + \penalty-9995%set a breakpoint before the subtitle +% \end{macrocode} +% Inside the title we don't need any \Cmd{parindent}. Next set the options of +% the optional argument of \Cmd{mdfsubtitle}. +% \begin{macrocode} + \parindent\z@\relax% + \mdfsetup{#1}%only for subtitle options +% \end{macrocode} +% Save the complete subtitle inside the save box \Cmd{z@}. +% \begin{marcocode} + \setbox\z@=\vbox{\mdf@subtitlefont{#2}\relax}% +% \end{macrocode} +% Compute the width of the current line including the inner left margin and +% inner right margin (using \Cmd{dimen@}. In the nest step the height and the +% depth of the save box will be saved in \Cmd{dimen@i}. +% \begin{marcocode} + \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% +% \end{macrocode} +% Test if rules should be drawn. otherwise set the line width to 0\,pt. +% \begin{macrocode} + \ifbool{mdf@subtitleaboveline}{}% + {\mdfsetup{subtitleabovelinewidth=\z@}}% + \ifbool{mdf@subtitlebelowline}{}% + {\mdfsetup{subtitlebelowlinewidth=\z@}}% +% \end{macrocode} +% Start a new line with the given skip \Opt{subtitleaboveskip}. +% \begin{macrocode} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitleaboveskip@length +% \end{macrocode} +% Drawing the above line of the subtitle. +% \begin{macrocode} + \rlap% + {% + \hspace*{-\mdf@innerleftmargin@length}% + \begingroup% + \color{\mdf@subtitleabovelinecolor}% + \rule{\dimen@}{\mdf@subtitleabovelinewidth@length}% + \endgroup% + }% +% \end{macrocode} +% space between rule above and subtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitleinneraboveskip@length +% \end{macrocode} +% output of subtitle with a backround. Must think about the \Cmd{hspace} +% combination. +% \begin{macrocde} + \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% +% \end{macrocode} +% Skip after subtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitleinnerbelowskip@length +% \end{macrocode} +% Draw rule below of the subtitle. +% \begin{macrocde} + \rlap% + {% + \hspace*{-\mdf@innerleftmargin@length}% + \begingroup% + \color{\mdf@subtitlebelowlinecolor}% + \rule{\dimen@}{\mdf@subtitlebelowlinewidth@length}% + \color@endgroup + }% +% \end{macrocode} +% Last skip and set a non breaking point. +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitlebelowskip@length + \penalty 9995 + \endgroup +} + +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{mdfsubsubtitle} +% Definition of the command \Cmd{mdfsubsubtitle}. +% \begin{macrocode} +\newrobustcmd\mdfsubsubtitle[2][]% +{% +% \end{macrocode} +% Make everything local. +% \begin{macrocode} + \begingroup + \penalty-9995%set a breakpoint before the subsubtitle +% \end{macrocode} +% Inside the title we don't need any \Cmd{parindent}. Next set the options of +% the optional argument of \Cmd{mdfsubsubtitle}. +% \begin{macrocode} + \parindent\z@\relax% + \mdfsetup{#1}%only for subsubtitle options +% \end{macrocode} +% Save the complete subsubtitle inside the save box \Cmd{z@}. +% \begin{marcocode} + \setbox\z@=\vbox{\mdf@subsubtitlefont{#2}\relax}% +% \end{macrocode} +% Compute the width of the current line including the inner left margin and +% inner right margin (using \Cmd{dimen@}. In the nest step the height and the +% depth of the save box will be saved in \Cmd{dimen@i}. +% \begin{marcocode} + \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% +% \end{macrocode} +% Test if rules should be drawn. otherwise set the line width to 0\,pt. +% \begin{macrocode} + \ifbool{mdf@subsubtitleaboveline}{}% + {\mdfsetup{subsubtitleabovelinewidth=\z@}}% + \ifbool{mdf@subsubtitlebelowline}{}% + {\mdfsetup{subsubtitlebelowlinewidth=\z@}}% +% \end{macrocode} +% Start a new line with the given skip \Opt{subsubtitleaboveskip}. +% \begin{macrocode} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitleaboveskip@length +% \end{macrocode} +% Drawing the above line of the subsubtitle. +% \begin{macrocode} + \rlap% + {% + \hspace*{-\mdf@innerleftmargin@length}% + \begingroup% + \color{\mdf@subsubtitleabovelinecolor}% + \rule{\dimen@}{\mdf@subsubtitleabovelinewidth@length}% + \endgroup% + }% +% \end{macrocode} +% space between rule above and subsubtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitleinneraboveskip@length +% \end{macrocode} +% output of subsubtitle with a backround. Must think about the \Cmd{hspace} +% combination. +% \begin{macrocde} + \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% +% \end{macrocode} +% Skip after subsubtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitleinnerbelowskip@length +% \end{macrocode} +% Draw rule below of the subsubtitle. +% \begin{macrocde} + \rlap% + {% + \hspace*{-\mdf@innerleftmargin@length}% + \begingroup% + \color{\mdf@subsubtitlebelowlinecolor}% + \rule{\dimen@}{\mdf@subsubtitlebelowlinewidth@length}% + \endgroup% + }% +% \end{macrocode} +% Last skip and set a non breaking point. +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitlebelowskip@length + \penalty 9995 + \endgroup +} + +% \end{macrocode} +% \end{macro} +% +% +% +% \begin{macro}{mdf@putbox@single,mdf@frame@background@single,^^A +% mdf@frame@topandbottomline@single,mdf@frame@leftline@single,^^A +% mdf@frame@rightline@single,mdf@frame@rightline@single} % The frame of of a non splitted contents of mdframed % \begin{macrocode} \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% } % \end{macrocode} % \end{macro} % % -% \begin{macro}{mdf@putbox@first,mdf@frame@background@first,mdf@frame@leftline@first,mdf@frame@topline@first,mdf@frame@rightline@first} +% \begin{macro}{mdf@putbox@first,mdf@frame@background@first,^^A +% mdf@frame@leftline@first,mdf@frame@topline@first,^^A +% mdf@frame@rightline@first} % The first frame of of a splitted contents of mdframed % \begin{macrocode} \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 -% +\dp\strutbox - \relax% + }% + \global\mdfframetitleboxtotalheight=% + \dimexpr% + \mdfframetitleboxtotalheight + -\mdfboundingboxheight + +\mdf@frametitlebelowskip@length + +.5\baselineskip-1pt +% +\dp\strutbox + \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% } % \end{macrocode} % \end{macro} % % -% \begin{macro}{mdf@putbox@second,mdf@frame@background@second,mdf@frame@leftline@second,mdf@frame@bottomline@second,mdf@frame@rightline@second} +% \begin{macro}{mdf@putbox@second,mdf@frame@background@second,^^A +% mdf@frame@leftline@second,mdf@frame@bottomline@second,^^A +% mdf@frame@rightline@second} % The last frame of of a splitted contents of mdframed % \begin{macrocode} \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% }% % \end{macrocode} % \end{macro} % % -% \begin{macro}{mdf@putbox@middle,mdf@frame@background@middle,mdf@frame@leftline@middle,mdf@frame@rightline@middle} +% \begin{macro}{mdf@putbox@middle,mdf@frame@background@middle,^^A +% mdf@frame@leftline@middle,mdf@frame@rightline@middle} % The last frame of of a splitted contents of mdframed % \begin{macrocode} \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% } % \end{macrocode} @@ -3789,7 +4816,7 @@ Have fun! %% 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 $ % % \end{macrocode} % \changes{v1.1beta}{2011/12/16}{added lost semicolons} @@ -3799,8 +4826,8 @@ Have fun! \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] % % \end{macrocode} % \end{macro} @@ -3814,15 +4841,24 @@ Have fun! \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={}}% % nur wenn outerlinewidth>0 wird aussere Linie gezeichnet @@ -3900,18 +4936,281 @@ Have fun! \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% + }% }% % \end{macrocode} % \end{macro} % +% +% \begin{macro}{mdfsubtitle} +% Definition of the command \Cmd{mdfsubtitle}. Starting with the definition of +% the tikz style for the rule above the subtitle. +% \begin{macrocode}% +\tikzset{mdfsubtitleaboverule/.style={% + draw=none, + fill=\mdf@subtitleabovelinecolor, + }% +} +% \end{macrocode} +% Definition of the default style of rule below the subtitle. +% \begin{macrocode} +\tikzset{mdfsubtitlebelowrule/.style={% + draw=none, + fill=\mdf@subtitlebelowlinecolor, + }% +} +% \end{macrocode} +% Definition of the default style of the background of the subtitle. +% \begin{macrocode} +\tikzset{mdfsubtitlebackground/.style={% + draw=\mdf@subtitlebackgroundcolor, + fill=\mdf@subtitlebackgroundcolor, + }% +} +% \end{macrocode} +% Definition of the command \Cmd{mdfsubtitle}. +% \begin{macrocode} +\newrobustcmd\mdfsubtitle[2][]% +{% +% \end{macrocode} +% Make everything local. +% \begin{macrocode} + \begingroup + \penalty-9995%set a breakpoint before the subtitle +% \end{macrocode} +% Inside the title we don't need any \Cmd{parindent}. Next set the options of +% the optional argument of \Cmd{mdfsubtitle}. +% \begin{macrocode} + \parindent\z@\relax% + \mdfsetup{#1}%only for subtitle options +% \end{macrocode} +% Save the complete subtitle inside the save box \Cmd{z@}. +% \begin{marcocode} + \setbox\z@=\vbox{\mdf@subtitlefont{#2}\relax}% +% \end{macrocode} +% Compute the width of the current line including the inner left margin and +% inner right margin (using \Cmd{dimen@}. In the nest step the height and the +% depth of the save box will be saved in \Cmd{dimen@i}. +% \begin{marcocode} + \pgfmathsetlength{\dimen@}% + {% + \linewidth% + +\mdf@innerleftmargin@length% + +\mdf@innerrightmargin@length% + }% +% \end{macrocode} +% Test if rules should be drawn. otherwise set the line width to 0\,pt. +% \begin{macrocode} + \ifbool{mdf@subtitleaboveline}{}% + {\mdfsetup{subtitleabovelinewidth=\z@}}% + \ifbool{mdf@subtitlebelowline}{}% + {\mdfsetup{subtitlebelowlinewidth=\z@}}% +% \end{macrocode} +% Start a new line with the given skip \Opt{subtitleaboveskip}. +% \begin{macrocode} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitleaboveskip@length +% \end{macrocode} +% Drawing the above line of the subtitle. +% \begin{macrocode} + \rlap% + {% + \hspace*{-\mdf@innerleftmargin@length}% + \begingroup% + \tikz\draw[mdfsubtitleaboverule] (0,0)% + rectangle (\dimen@,\mdf@subtitleabovelinewidth@length); + \endgroup% + }% +% \end{macrocode} +% space between rule above and subtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitleinneraboveskip@length +% \end{macrocode} +% output of subtitle with a backround. Must think about the \Cmd{hspace} +% combination. +% \begin{macrocde} + \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% +% \end{macrocode} +% Skip after subtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitleinnerbelowskip@length +% \end{macrocode} +% Draw rule below of the subtitle. +% \begin{macrocde} + \rlap% + {% + \hspace*{-\mdf@innerleftmargin@length}% + \begingroup% + \tikz\draw[mdfsubtitlebelowrule] (0,0)% + rectangle (\dimen@,\mdf@subtitlebelowlinewidth@length); + \endgroup% + }% +% \end{macrocode} +% Last skip and set a non breaking point. +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitlebelowskip@length + \penalty 9995 + \endgroup +} + +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{mdfsubsubtitle} +% Definition of the command \Cmd{mdfsubsubtitle}. Starting with the definition of +% the tikz style for the rule above the subsubtitle. +% \begin{macrocode}% +\tikzset{mdfsubsubtitleaboverule/.style={% + draw=none, + fill=\mdf@subsubtitleabovelinecolor, + }% +} +% \end{macrocode} +% Definition of the default style of rule below the subsubtitle. +% \begin{macrocode} +\tikzset{mdfsubsubtitlebelowrule/.style={% + draw=none, + fill=\mdf@subsubtitlebelowlinecolor, + }% +} +% \end{macrocode} +% Definition of the default style of the background of the subsubtitle. +% \begin{macrocode} +\tikzset{mdfsubsubtitlebackground/.style={% + draw=\mdf@subsubtitlebackgroundcolor, + fill=\mdf@subsubtitlebackgroundcolor, + }% +} +% \end{macrocode} +% Definition of the command \Cmd{mdfsubsubtitle}. +% \begin{macrocode} +\newrobustcmd\mdfsubsubtitle[2][]% +{% +% \end{macrocode} +% Make everything local. +% \begin{macrocode} + \begingroup + \penalty-9995%set a breakpoint before the subsubtitle +% \end{macrocode} +% Inside the title we don't need any \Cmd{parindent}. Next set the options of +% the optional argument of \Cmd{mdfsubsubtitle}. +% \begin{macrocode} + \parindent\z@\relax% + \mdfsetup{#1}%only for subsubtitle options +% \end{macrocode} +% Save the complete subsubtitle inside the save box \Cmd{z@}. +% \begin{marcocode} + \setbox\z@=\vbox{\mdf@subsubtitlefont{#2}\relax}% +% \end{macrocode} +% Compute the width of the current line including the inner left margin and +% inner right margin (using \Cmd{dimen@}. In the nest step the height and the +% depth of the save box will be saved in \Cmd{dimen@i}. +% \begin{marcocode} + \pgfmathsetlength{\dimen@}% + {% + \linewidth% + +\mdf@innerleftmargin@length% + +\mdf@innerrightmargin@length% + }% +% \end{macrocode} +% Test if rules should be drawn. otherwise set the line width to 0\,pt. +% \begin{macrocode} + \ifbool{mdf@subsubtitleaboveline}{}% + {\mdfsetup{subsubtitleabovelinewidth=\z@}}% + \ifbool{mdf@subsubtitlebelowline}{}% + {\mdfsetup{subsubtitlebelowlinewidth=\z@}}% +% \end{macrocode} +% Start a new line with the given skip \Opt{subsubtitleaboveskip}. +% \begin{macrocode} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitleaboveskip@length +% \end{macrocode} +% Drawing the above line of the subsubtitle. +% \begin{macrocode} + \rlap% + {% + \hspace*{-\mdf@innerleftmargin@length}% + \begingroup% + \tikz\draw[mdfsubsubtitleaboverule] (0,0)% + rectangle (\dimen@,\mdf@subsubtitleabovelinewidth@length); + \endgroup% + }% +% \end{macrocode} +% space between rule above and subsubtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitleinneraboveskip@length +% \end{macrocode} +% output of subsubtitle with a backround. Must think about the \Cmd{hspace} +% combination. +% \begin{macrocde} + \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% +% \end{macrocode} +% Skip after subsubtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitleinnerbelowskip@length +% \end{macrocode} +% Draw rule below of the subsubtitle. +% \begin{macrocde} + \rlap% + {% + \hspace*{-\mdf@innerleftmargin@length}% + \begingroup% + \tikz\draw[mdfsubsubtitlebelowrule] (0,0)% + rectangle (\dimen@,\mdf@subsubtitlebelowlinewidth@length); + \endgroup% + }% +% \end{macrocode} +% Last skip and set a non breaking point. +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitlebelowskip@length + \penalty 9995 + \endgroup +} + +% \end{macrocode} +% \end{macro} +% +% +% % \begin{macro}{mdf@putbox@single} % Output of the non breakable contents. % \begin{macrocode} @@ -3939,7 +5238,8 @@ Have fun! \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}{% @@ -3962,28 +5262,28 @@ Have fun! \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);% @@ -4037,7 +5337,7 @@ Have fun! %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 @@ -4057,18 +5357,18 @@ Have fun! \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); @@ -4081,21 +5381,54 @@ Have fun! % Output of the first breakable contents. % \begin{macrocode} \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% + }% + }% + }% + }% }% }% % @@ -4103,15 +5436,15 @@ Have fun! \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)} @@ -4138,7 +5471,8 @@ Have fun! \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}{% @@ -4167,40 +5501,35 @@ Have fun! \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}{% @@ -4245,10 +5574,15 @@ Have fun! {\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)}}% @@ -4263,11 +5597,13 @@ Have fun! {\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 @@ -4285,24 +5621,54 @@ Have fun! % Output of the middle breakable contents. % \begin{macrocode} \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} @@ -4316,11 +5682,11 @@ Have fun! \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} @@ -4346,7 +5712,8 @@ Have fun! \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}{% @@ -4372,30 +5739,30 @@ Have fun! \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}% }{}% }{}% %% @@ -4454,7 +5821,7 @@ Have fun! } %%%%%%%% \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 @@ -4472,23 +5839,54 @@ Have fun! % Output of the last breakable contents. % \begin{macrocode} \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} @@ -4514,7 +5912,8 @@ Have fun! \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% @@ -4540,37 +5939,40 @@ Have fun! \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}{% @@ -4615,10 +6017,16 @@ Have fun! {\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)}}% @@ -4633,10 +6041,12 @@ Have fun! {\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 @@ -4672,7 +6082,7 @@ Have fun! %% 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 $ % % \end{macrocode} % @@ -4682,8 +6092,8 @@ Have fun! \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] % \end{macrocode} % \end{macro} % @@ -4691,13 +6101,16 @@ Have fun! % Command to calculate a latex length to postscript % \begin{macrocode} \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 % \end{macrocode} % \end{macro} % -% \begin{macro}{mdfbackgroundstyle,mdflinestyle,mdfframetitlerule,mdfframetitlebackground} +% \begin{macro}{mdfbackgroundstyle,mdflinestyle,^^A +% mdfframetitlerule,mdfframetitlebackground} % background and line settings for pstricks % \begin{macrocode} \def\mdfpstricks@settings{%expand by \addtopsstyle @@ -4723,7 +6136,8 @@ Have fun! \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, }}{}% % @@ -4731,12 +6145,14 @@ Have fun! \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,% @@ -4833,16 +6249,318 @@ Have fun! \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% + }% }% % +% +% +% +% +% \begin{macro}{mdfsubtitle} +% Definition of the command \Cmd{mdfsubtitle}. Starting with the definition of +% the tikz style for the rule above the subtitle. +% \begin{macrocode}% +\newpsstyle{mdfsubtitleaboverule}{% + linecolor=\mdf@subtitleabovelinecolor, + fillcolor=\mdf@subtitleabovelinecolor, + fillstyle=solid,dimen=outer,% +} +% \end{macrocode} +% Definition of the default style of rule below the subtitle. +% \begin{macrocode} +\newpsstyle{mdfsubtitlebelowrule}{% + linecolor=\mdf@subtitlebelowlinecolor, + fillcolor=\mdf@subtitlebelowlinecolor, + fillstyle=solid,dimen=outer,% +} +% \end{macrocode} +% Definition of the default style of the background of the subtitle. +% \begin{macrocode} +\newpsstyle{mdfsubtitlebackground}{% + linecolor=\mdf@subtitlebackgroundcolor, + fillcolor=\mdf@subtitlebackgroundcolor, + fillstyle=solid,linestyle=none, +} +% \end{macrocode} +% Definition of the command \Cmd{mdfsubtitle}. +% \begin{macrocode} +\newrobustcmd\mdfsubtitle[2][]% +{% +% \end{macrocode} +% Make everything local. +% \begin{macrocode} + \begingroup + \penalty-9995%set a breakpoint before the subtitle +% \end{macrocode} +% Inside the title we don't need any \Cmd{parindent}. Next set the options of +% the optional argument of \Cmd{mdfsubtitle}. +% \begin{macrocode} + \parindent\z@\relax% + \mdfsetup{#1}%only for subtitle options +% \end{macrocode} +% Save the complete subtitle inside the save box \Cmd{z@}. +% \begin{marcocode} + \setbox\z@=\vbox{\mdf@subtitlefont{#2}\relax}% +% \end{macrocode} +% Compute the width of the current line including the inner left margin and +% inner right margin (using \Cmd{dimen@}. In the nest step the height and the +% depth of the save box will be saved in \Cmd{dimen@i}. +% \begin{marcocode} + \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% +% \end{macrocode} +% Test if rules should be drawn. otherwise set the line width to 0\,pt. +% \begin{macrocode} + \ifbool{mdf@subtitleaboveline}{}% + {\mdfsetup{subtitleabovelinewidth=\z@}}% + \ifbool{mdf@subtitlebelowline}{}% + {\mdfsetup{subtitlebelowlinewidth=\z@}}% +% \end{macrocode} +% Start a new line with the given skip \Opt{subtitleaboveskip}. +% \begin{macrocode} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitleaboveskip@length +% \end{macrocode} +% Drawing the above line of the subtitle. +% \begin{macrocode} + \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% + }% +% \end{macrocode} +% space between rule above and subtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitleinneraboveskip@length +% \end{macrocode} +% output of subtitle with a backround. Must think about the \Cmd{hspace} +% combination. +% \begin{macrocde} + \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% +% \end{macrocode} +% Skip after subtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitleinnerbelowskip@length +% \end{macrocode} +% Draw rule below of the subtitle. +% \begin{macrocde} + \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% + }% +% \end{macrocode} +% Last skip and set a non breaking point. +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subtitlebelowskip@length + \penalty 9995 + \endgroup +} + +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{mdfsubsubtitle} +% Definition of the command \Cmd{mdfsubsubtitle}. Starting with the definition of +% the tikz style for the rule above the subsubtitle. +% \begin{macrocode}% +\newpsstyle{mdfsubsubtitleaboverule}{% + linecolor=\mdf@subtitleabovelinecolor, + fillcolor=\mdf@subtitleabovelinecolor, + fillstyle=solid,dimen=outer,% +} +% \end{macrocode} +% Definition of the default style of rule below the subtitle. +% \begin{macrocode} +\newpsstyle{mdfsubsubtitlebelowrule}{% + linecolor=\mdf@subtitlebelowlinecolor, + fillcolor=\mdf@subtitlebelowlinecolor, + fillstyle=solid,dimen=outer,% +} +% \end{macrocode} +% Definition of the default style of the background of the subtitle. +% \begin{macrocode} +\newpsstyle{mdfsubsubtitlebackground}{% + linecolor=\mdf@subtitlebackgroundcolor, + fillcolor=\mdf@subtitlebackgroundcolor, + fillstyle=solid,linestyle=none, +} +% \end{macrocode} +% Definition of the command \Cmd{mdfsubsubtitle}. +% \begin{macrocode} +\newrobustcmd\mdfsubsubtitle[2][]% +{% +% \end{macrocode} +% Make everything local. +% \begin{macrocode} + \begingroup + \penalty-9995%set a breakpoint before the subsubtitle +% \end{macrocode} +% Inside the title we don't need any \Cmd{parindent}. Next set the options of +% the optional argument of \Cmd{mdfsubsubtitle}. +% \begin{macrocode} + \parindent\z@\relax% + \mdfsetup{#1}%only for subsubtitle options +% \end{macrocode} +% Save the complete subsubtitle inside the save box \Cmd{z@}. +% \begin{marcocode} + \setbox\z@=\vbox{\mdf@subsubtitlefont{#2}\relax}% +% \end{macrocode} +% Compute the width of the current line including the inner left margin and +% inner right margin (using \Cmd{dimen@}. In the nest step the height and the +% depth of the save box will be saved in \Cmd{dimen@i}. +% \begin{marcocode} + \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% +% \end{macrocode} +% Test if rules should be drawn. otherwise set the line width to 0\,pt. +% \begin{macrocode} + \ifbool{mdf@subsubtitleaboveline}{}% + {\mdfsetup{subsubtitleabovelinewidth=\z@}}% + \ifbool{mdf@subsubtitlebelowline}{}% + {\mdfsetup{subsubtitlebelowlinewidth=\z@}}% +% \end{macrocode} +% Start a new line with the given skip \Opt{subsubtitleaboveskip}. +% \begin{macrocode} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitleaboveskip@length +% \end{macrocode} +% Drawing the above line of the subsubtitle. +% \begin{macrocode} + \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% + }% +% \end{macrocode} +% space between rule above and subsubtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitleinneraboveskip@length +% \end{macrocode} +% output of subsubtitle with a backround. Must think about the \Cmd{hspace} +% combination. +% \begin{macrocde} + \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% +% \end{macrocode} +% Skip after subsubtitle +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitleinnerbelowskip@length +% \end{macrocode} +% Draw rule below of the subsubtitle. +% \begin{macrocde} + \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% + }% +% \end{macrocode} +% Last skip and set a non breaking point. +% \begin{macrocde} + \par\unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi% + \vskip\mdf@subsubtitlebelowskip@length + \penalty 9995 + \endgroup +} + +% \end{macrocode} +% \end{macro} +% +% +% +% +% +% +% +% +% +% % \begin{macro}{mdf@putbox@single} % Single output % \begin{macrocode} @@ -4851,7 +6569,7 @@ Have fun! % P ist die obere rechte Ecke der Mitte der middleline % A ist der Punkt fuer den anchor (d.h. die untere linke Ecke) der Ausgabebox \def\mdf@putbox@single{% - \ifvoid\mdf@splitbox@one + \ifvoid\mdf@splitbox@one\relax \else% \mdf@makebox@out{% \mdf@makeboxalign@left% @@ -4867,7 +6585,8 @@ Have fun! \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}{% @@ -4889,7 +6608,8 @@ Have fun! \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}% @@ -4924,19 +6644,27 @@ Have fun! %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)} }{} @@ -5013,7 +6741,8 @@ Have fun! \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}{% @@ -5074,8 +6803,10 @@ Have fun! %%%%%%%%%% \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 } }{} @@ -5085,19 +6816,27 @@ Have fun! %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)} }{} @@ -5153,22 +6892,33 @@ Have fun! \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% @@ -5191,6 +6941,25 @@ Have fun! (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 +} % \end{macrocode} % \end{macro} % @@ -5214,7 +6983,8 @@ Have fun! \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}{% @@ -5280,17 +7050,24 @@ Have fun! %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 @@ -5319,9 +7096,9 @@ Have fun! \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} + %\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}% }% @@ -5330,12 +7107,20 @@ Have fun! \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{% @@ -5349,7 +7134,29 @@ Have fun! -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 } @@ -5376,7 +7183,8 @@ Have fun! \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% @@ -5397,7 +7205,8 @@ Have fun! \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}% @@ -5433,7 +7242,8 @@ Have fun! %% \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 } @@ -5443,19 +7253,27 @@ Have fun! %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)} }{} @@ -5475,10 +7293,10 @@ Have fun! %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)}}{}% @@ -5508,11 +7326,18 @@ Have fun! \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{% @@ -5526,7 +7351,29 @@ Have fun! -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 } @@ -5553,10 +7400,11 @@ Have fun! % % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\ltxmdfsetifoot $Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ + {documentation of mdframed} \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} @@ -5567,10 +7415,11 @@ Have fun! \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $} +\date{\ExplFileDate} \version{\mdversion} -\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. -Some presented examples are more or less exorbitant.} +\introduction{In this document I collect various examples for + \Opt{framemethod=\Loadedframemethod}. + Some presented examples are more or less exorbitant.} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% @@ -5594,10 +7443,13 @@ Some presented examples are more or less exorbitant.} \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. +In the preamble only the package \Pack{mdframed} width the option +\Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be +done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} -\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with the +package \Pack{showexpl}.} \section{Examples} All examples have the following settings: @@ -5654,7 +7506,9 @@ function of the independent variables alone. \begin{LTXexample} \begin{mdframed}[userdefinedwidth=6cm,align=center, linecolor=blue,linewidth=4pt] -\includegraphics[width=\linewidth]{donald-duck} +\IfFileExists{donald-duck.jpg}% + {\includegraphics[width=\linewidth]{donald-duck}}% + {\rule{\linewidth}{4cm}}% \end{mdframed} \end{LTXexample} @@ -5715,7 +7569,10 @@ function of the independent variables alone. \clearpage \Examplesec{hide only a part of a line} -The example below is inspired by the following post on StackExchange \href{http://tex.stackexchange.com/questions/24101/theorem-decorations-that-stay-with-theorem-environment}{Theorem decorations that stay with theorem environment} +The example below is inspired by the following post on StackExchange +\href{http://tex.stackexchange.com/questions/24101/theorem-decorations^^A + -that-stay-with-theorem-environment}% + {Theorem decorations that stay with theorem environment} \begin{LTXexample} \makeatletter \newlength{\interruptlength} @@ -5770,10 +7627,11 @@ The example below is inspired by the following post on StackExchange \href{http: % % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\ltxmdfsetifoot $Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ + {documentation of mdframed} \usepackage{showexpl} @@ -5785,10 +7643,11 @@ The example below is inspired by the following post on StackExchange \href{http: \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $} +\date{\ExplFileDate} \version{\mdversion} -\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. -Some presented examples are more or less exorbitant.} +\introduction{In this document I collect various examples for + \Opt{framemethod=\Loadedframemethod}. + Some presented examples are more or less exorbitant.} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% @@ -5812,10 +7671,13 @@ Some presented examples are more or less exorbitant.} \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. +In the preamble only the package \Pack{mdframed} width the option +\Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be +done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} -\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with the +package \Pack{showexpl}.} \section{Examples} All examples have the following settings: @@ -5858,7 +7720,9 @@ function of the independent variables alone. \begin{LTXexample} \begin{mdframed}[userdefinedwidth=6cm,align=center, linecolor=blue,middlelinewidth=4pt,roundcorner=5pt] -\includegraphics[width=\linewidth]{donald-duck} +\IfFileExists{donald-duck.jpg}% + {\includegraphics[width=\linewidth]{donald-duck}}% + {\rule{\linewidth}{4cm}}% \end{mdframed} \end{LTXexample} @@ -5975,10 +7839,11 @@ function of the independent variables alone. % % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\ltxmdfsetifoot$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ + {documentation of mdframed} \lstDeleteShortInline{|} \newcommand\Loadedframemethod{PSTricks} @@ -5990,10 +7855,11 @@ function of the independent variables alone. \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $} +\date{\ExplFileDate} \version{\mdversion} -\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. -Some presented examples are more or less exorbitant.} +\introduction{In this document I collect various examples for + \Opt{framemethod=\Loadedframemethod}. + Some presented examples are more or less exorbitant.} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% @@ -6017,10 +7883,13 @@ Some presented examples are more or less exorbitant.} \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. +In the preamble only the package \Pack{mdframed} width the option +\Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be +done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} -\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with the +package \Pack{showexpl}.} X \section{Examples} All examples have the following settings: @@ -6117,26 +7986,28 @@ function of the independent variables alone. % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} -\documentclass[parskip=false,english,11pt,ltxlipsum]{ltxmdf} -\ltxmdfsetifoot $Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ +\documentclass[parskip=false,english,11pt,lipsum=true]{ltxmdf} +\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ + {documentation of mdframed} \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} \usepackage{tikz} -\usetikzlibrary{calc,arrows} +\usetikzlibrary{calc,arrows,shadings,shadows} \newcommand\Loadedframemethod{tikz} \usepackage[framemethod=\Loadedframemethod]{mdframed} \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $} +\date{\ExplFileDate} \version{\mdversion} -\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. -Some presented examples are more or less exorbitant.} +\introduction{In this document I collect various examples for + \Opt{framemethod=\Loadedframemethod}. + Some presented examples are more or less exorbitant.} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% @@ -6160,10 +8031,13 @@ Some presented examples are more or less exorbitant.} \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. +In the preamble only the package \Pack{mdframed} width the option +\Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be +done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} -\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with the +package \Pack{showexpl}.} \section{Examples} All examples have the following settings: @@ -6183,11 +8057,16 @@ function of the independent variables alone. \end{tltxmdfexample} \clearpage \Examplesec{Package listings} -The example below is inspired by the following post on StackExchange \href{http://tex.stackexchange.com/questions/27673/background-overflows-when-using-rounded-corners-for-listings-package-listings}{Background overflows when using rounded corners for listings (package: `listings`)} +The example below is inspired by the following post on StackExchange +\href{http://tex.stackexchange.com/questions/27673/background-overflows-^^A + when-using-rounded-corners-for-listings-package-listings}% + {Background overflows when using rounded corners for listings + (package: `listings`)} Here the solution which can be decorate as usual. -\begin{tltxmdfexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment},morekeywords={lstlisting}] +\begin{tltxmdfexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment}, + morekeywords={lstlisting}] \BeforeBeginEnvironment{lstlisting}{% \begin{mdframed}[<modification>]% \vspace{-0.7em}} @@ -6197,12 +8076,14 @@ Here the solution which can be decorate as usual. \end{tltxmdfexample} With the new command \Cmd{surroundwithmdframed} you can use -\begin{tltxmdfexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment},morekeywords={lstlisting}] +\begin{tltxmdfexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment}, + morekeywords={lstlisting}] \surroundwithmdframed{listings} \end{tltxmdfexample} \Examplesec{Package multicol} -How I wrote in \enquote{Known Problems} you can't combine \Pack{multicol} with \Pack{mdframed}. In a simple way without any breaks you can use: +How I wrote in \enquote{Known Problems} you can't combine \Pack{multicol} with +\Pack{mdframed}. In a simple way without any breaks you can use: \begin{LTXexample} \begin{multicols}{2} \lipsum[1] @@ -6251,7 +8132,41 @@ Text Text Text Text Text Text Text Text Text Text Text Text Text Text \end{LTXexample} \clearpage -\Examplesec{digression-environement inspired by Tobias Schwan} +\Examplesec{Position a specific symbol at a line} +\begin{LTXexample} +\tikzset{ + warningsymbol/.style={ + rectangle,draw=red, + fill=white,scale=1, + overlay}} +\mdfdefinestyle{warning}{% + hidealllines=true,leftline=true, + skipabove=12,skipbelow=12pt, + innertopmargin=0.4em,% + innerbottommargin=0.4em,% + innerrightmargin=0.7em,% + rightmargin=0.7em,% + innerleftmargin=1.7em,% + leftmargin=0.7em,% + middlelinewidth=.2em,% + linecolor=red,% + fontcolor=red,% + firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$) + node[warningsymbol] {\$};},% + secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$) + node[warningsymbol] {\$};},% + middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$) + node[warningsymbol] {\$};},% + singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$) + node[warningsymbol] {\$};},% +} +\begin{mdframed}[style=warning] +\ExampleText +\end{mdframed} +\end{LTXexample} + +\clearpage +\Examplesec{digression-environement inspired by Tobias Weh} \begin{lstlisting} \usetikzlibrary{calc,arrows} \tikzset{ @@ -6356,6 +8271,27 @@ Text Text Text Text Text Text \begin{mdframed}[style=digressionarrows] \ExampleText \end{mdframed} + +\Examplesec{Theorem style shading background} +\begin{LTXexample} +%\usetikzlibrary{shadings,shadows}% loaded in the header +\mdtheorem[% + apptotikzsetting={\tikzset{mdfbackground/.append style =% + {top color=yellow!40!white, + bottom color=yellow!80!black}, + mdfframetitlebackground/.append style =% + {top color=purple!40!white, + bottom color=purple!80!black} + } + }, + ,roundcorner=10pt,middlelinewidth=2pt, + shadow=true,frametitlerule=true,frametitlerulewidth=4pt, + innertopmargin=10pt,% + ]{alternativtheorem}{Theorem} +\begin{alternativtheorem}[Inhomogeneous linear] +\ExampleText +\end{alternativtheorem} +\end{LTXexample} \end{document} \endinput % \end{macrocode} @@ -6372,3 +8308,4 @@ Text Text Text Text Text Text % \endinput + diff --git a/Master/texmf-dist/source/latex/mdframed/mdframed.ins b/Master/texmf-dist/source/latex/mdframed/mdframed.ins index a33cfa88416..9070551d611 100644 --- a/Master/texmf-dist/source/latex/mdframed/mdframed.ins +++ b/Master/texmf-dist/source/latex/mdframed/mdframed.ins @@ -48,7 +48,7 @@ License type: lppl \postamble ================================================================ -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 @@ -87,7 +87,8 @@ Have fun! \Msg{* \space\space makeindex -s gglo.ist -o mdframed.gls mdframed.glo} \Msg{* \space\space makeindex -s gind.ist mdframed.idx} \Msg{*} -\Msg{* through makeIndex to produce the glossary. Finally, run PdfLaTeX once again.} +\Msg{* through makeIndex to produce the glossary.} +\Msg{* Finally, run PdfLaTeX once again.} \Msg{*} \Msg{* To create the examples run (pdf)latex on the tex-files.} \Msg{*} diff --git a/Master/texmf-dist/source/latex/mdframed/mdframedmake.bat b/Master/texmf-dist/source/latex/mdframed/mdframedmake.bat index 879b622ced2..269739a64a1 100755 --- a/Master/texmf-dist/source/latex/mdframed/mdframedmake.bat +++ b/Master/texmf-dist/source/latex/mdframed/mdframedmake.bat @@ -1,6 +1,7 @@ ::################################################################ ::## Makefile for mdframed project folder (WINDOWS) -::## $Id: mdframedmake.bat 315 2012-01-08 12:53:05Z marco $ +::## +::## $Id: mdframedmake.bat 391 2012-05-19 11:10:49Z marco $ ::################################################################ title Entpacken mdframed.dtx unter windows @echo off 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 |