diff options
author | Karl Berry <karl@freefriends.org> | 2012-01-12 23:19:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-01-12 23:19:23 +0000 |
commit | c5c6b35b4250a3d62b639f7ca13f6111193abf0c (patch) | |
tree | c1eeba19134298ad8bb768af62843208687c2638 | |
parent | 8bffef2b7d7683ba0cb697af5a891b9507ad8cb2 (diff) |
mdframed (10jan12)
git-svn-id: svn://tug.org/texlive/trunk@25091 c570f23f-e606-0410-a88d-b1316a301751
18 files changed, 4133 insertions, 37 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 46d2d6057f9..289a608ae20 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 new file mode 100644 index 00000000000..3af557c0741 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex @@ -0,0 +1,197 @@ +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ +\setcounter{errorcontextlines}{999} +\documentclass[parskip=false,english,11pt]{ltxmdf} +\ltxmdfsetifoot $Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ + +\usepackage{showexpl} +\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} + +\newcommand\Loadedframemethod{default} +\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}} +\version{\mdversion} +\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{% + An \textit{inhomogeneous linear} differential equation has the form + \begin{align} + L[v ] = f, + \end{align} + where $L$ is a linear differential operator, $v$ is + the dependent variable, and $f$ is a given non-zero + function of the independent variables alone. +} + +\newcounter{examplecount} +\setcounter{examplecount}{0} +\renewcommand\thesubsection{} +\newcommand\Examplesec[1]{% +\stepcounter{examplecount}% +\subsection{Example~\arabic{examplecount}~--~#1\relax}% +} + +\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}. + +{\large\color{red!50!black} +\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} + +\section{Examples} +All examples have the following settings: + +\begin{tltxmdfexample} +\mdfsetup{skipabove=\topskip,skipbelow=\topskip} +\newrobustcmd\ExampleText{% +An \textit{inhomogeneous linear} differential equation +has the form +\begin{align} +L[v ] = f, +\end{align} +where $L$ is a linear differential operator, $v$ is +the dependent variable, and $f$ is a given non-zero +function of the independent variables alone. +} +\end{tltxmdfexample} +\clearpage +\Examplesec{very simple} +\begin{LTXexample} +\global\mdfdefinestyle{exampledefault}{% + linecolor=red,linewidth=3pt,% + leftmargin=1cm,rightmargin=1cm +} +\begin{mdframed}[style=exampledefault] +\ExampleText +\end{mdframed} +\end{LTXexample} + +\Examplesec{hidden line + frame title} +\begin{LTXexample} +\global\mdfapptodefinestyle{exampledefault}{% + topline=false,rightline=true,bottomline=false} +\begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] +\ExampleText +\end{mdframed} +\end{LTXexample} +\clearpage + +\Examplesec{colored frame title} +\begin{LTXexample} + +\global\mdfapptodefinestyle{exampledefault}{% + rightline=true,innerleftmargin=10,innerrightmargin=10, + frametitlerule=true,frametitlerulecolor=green, + frametitlebackgroundcolor=yellow, + frametitlerulewidth=2pt} +\begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] +\ExampleText +\end{mdframed} +\end{LTXexample} + +\Examplesec{framed picture which is centered} +\begin{LTXexample} +\begin{mdframed}[userdefinedwidth=6cm,align=center, + linecolor=blue,linewidth=4pt] +\includegraphics[width=\linewidth]{donald-duck} +\end{mdframed} +\end{LTXexample} + +\clearpage +\Examplesec{Theorem environments} +\begin{LTXexample} +\mdfdefinestyle{theoremstyle}{% + linecolor=red,linewidth=2pt,% + frametitlerule=true,% + frametitlebackgroundcolor=gray!20, + innertopmargin=\topskip, + } +\mdtheorem[style=theoremstyle]{definition}{Definition} +\begin{definition} +\ExampleText +\end{definition} +\begin{definition}[Inhomogeneous linear] +\ExampleText +\end{definition} +\begin{definition*}[Inhomogeneous linear] +\ExampleText +\end{definition*} +\end{LTXexample} + +\clearpage +\Examplesec{theorem with separate header and the help of TikZ (complex)} +\begin{LTXexample} +\newcounter{theo}[section] +\newenvironment{theo}[1][]{% + \stepcounter{theo}% + \ifstrempty{#1}% + {\mdfsetup{% + frametitle={% + \tikz[baseline=(current bounding box.east),outer sep=0pt] + \node[anchor=east,rectangle,fill=blue!20] + {\strut Theorem~\thetheo};}} + }% + {\mdfsetup{% + frametitle={% + \tikz[baseline=(current bounding box.east),outer sep=0pt] + \node[anchor=east,rectangle,fill=blue!20] + {\strut Theorem~\thetheo:~#1};}}% + }% + \mdfsetup{innertopmargin=10pt,linecolor=blue!20,% + linewidth=2pt,topline=true, + frametitleaboveskip=\dimexpr-\ht\strutbox\relax,} + \begin{mdframed}[]\relax% + }{\end{mdframed}} +\begin{theo}[Inhomogeneous Linear] +\ExampleText +\end{theo} + +\begin{theo} +\ExampleText +\end{theo} +\end{LTXexample} + +\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} +\begin{LTXexample} +\makeatletter +\newlength{\interruptlength} +\setlength{\interruptlength}{2.5ex} +\newrobustcmd\overlaplines{% + \appto\mdf@frame@leftline@single{% + \llap{\color{white}% + \rule[\dimexpr-\mdfboundingboxdepth+\interruptlength\relax]% + {\mdf@middlelinewidth@length}% + {\dimexpr\mdfboundingboxtotalheight% + \ifbool{mdf@topline}{+\mdf@middlelinewidth@length}{} + -2\interruptlength\relax}% + }% + }% + \appto\mdf@frame@rightline@single{% + \rlap{\color{white}% + \hspace*{\mdfboundingboxwidth}% + \hspace*{\mdf@innerrightmargin@length}% + \rule[\dimexpr-\mdfboundingboxdepth% + +\interruptlength\relax]% + {\mdf@middlelinewidth@length}% + {\dimexpr\mdfboundingboxtotalheight% + +\ifbool{mdf@topline}{\mdf@middlelinewidth@length}{0pt} + -2\interruptlength\relax}% + }% + }% +} +\makeatother +\overlaplines + +\begin{mdframed}[linecolor=blue,linewidth=8pt] +\ExampleText +\end{mdframed} +\end{LTXexample} +\end{document} + \endinput 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 a8e92ad1764..cc18063063c 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 new file mode 100644 index 00000000000..9a4dc301553 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex @@ -0,0 +1,110 @@ +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ +\setcounter{errorcontextlines}{999} +\documentclass[parskip=false,english,11pt]{ltxmdf} +\ltxmdfsetifoot$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ + +\lstDeleteShortInline{|} +\newcommand\Loadedframemethod{PSTricks} +\usepackage[framemethod=\Loadedframemethod]{mdframed} + +\usepackage{showexpl} +\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} + +\title{The \Pack{mdframed} package} +\subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} +\author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} +\version{\mdversion} +\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{% + An \textit{inhomogeneous linear} differential equation has the form + \begin{align} + L[v ] = f, + \end{align} + where $L$ is a linear differential operator, $v$ is + the dependent variable, and $f$ is a given non-zero + function of the independent variables alone. +} + +\newcounter{examplecount} +\setcounter{examplecount}{0} +\renewcommand\thesubsection{} +\newcommand\Examplesec[1]{% +\stepcounter{examplecount}% +\subsection{Example~\arabic{examplecount}~--~#1\relax}% +} + +\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}. + +{\large\color{red!50!black} +\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: + +\begin{tltxmdfexample} +\mdfsetup{skipabove=\topskip,skipbelow=\topskip} +\newrobustcmd\ExampleText{% +An \textit{inhomogeneous linear} differential equation +has the form +\begin{align} +L[v ] = f, +\end{align} +where $L$ is a linear differential operator, $v$ is +the dependent variable, and $f$ is a given non-zero +function of the independent variables alone. +} +\end{tltxmdfexample} +\clearpage + +\Examplesec{very simple} +\begin{LTXexample} +\global\mdfdefinestyle{exampledefault}{% + linecolor=red,middlelinewidth=3pt,% + leftmargin=1cm,rightmargin=1cm +} +\begin{mdframed}[style=exampledefault,roundcorner=5] +\ExampleText +\end{mdframed} +\end{LTXexample} + +\Examplesec{hidden line + frame title} +\begin{LTXexample} +\global\mdfapptodefinestyle{exampledefault}{% + topline=false,rightline=false,bottomline=false, + frametitlerule=true,innertopmargin=6pt, + outerlinewidth=6pt,outerlinecolor=blue, + pstricksappsetting={\addtopsstyle{mdfouterlinestyle}{linestyle=dashed}}, + innerlinecolor=yellow,innerlinewidth=5pt}% +\begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] +\ExampleText +\end{mdframed} +\end{LTXexample} + +\clearpage + +\Examplesec{Dash Lines} +\begin{LTXexample} +\global\mdfdefinestyle{exampledefault}{% + pstrickssetting={linestyle=dashed,},linecolor=red,linewidth=5pt} +\begin{mdframed}[style=exampledefault,] +\ExampleText +\end{mdframed} +\end{LTXexample} + +\Examplesec{Double Lines} +\begin{LTXexample} +\global\mdfdefinestyle{exampledefault}{% + pstrickssetting={doubleline=true,doublesep=6pt}, + linecolor=red,linewidth=5pt,middlelinewidth=4pt} +\begin{mdframed}[style=exampledefault,] +\ExampleText +\end{mdframed} +\end{LTXexample} +\end{document} + \endinput 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 6b79e499fcd..b39de201f88 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 new file mode 100644 index 00000000000..e5cad38f6e5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.tex @@ -0,0 +1,133 @@ + +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ +\setcounter{errorcontextlines}{999} +\documentclass[parskip=false,english,11pt,ltxlipsum]{ltxmdf} +\ltxmdfsetifoot $Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ + +\usepackage{showexpl} +\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} + +\newcommand\Loadedframemethod{default} +\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}} +\version{\mdversion} +\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{% + An \textit{inhomogeneous linear} differential equation has the form + \begin{align} + L[v ] = f, + \end{align} + where $L$ is a linear differential operator, $v$ is + the dependent variable, and $f$ is a given non-zero + function of the independent variables alone. +} + +\newcounter{examplecount} +\setcounter{examplecount}{0} +\renewcommand\thesubsection{} +\newcommand\Examplesec[1]{% +\stepcounter{examplecount}% +\subsection{Example~\arabic{examplecount}~--~#1\relax}% +} + +\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}. + +{\large\color{red!50!black} +\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} + +\section{Examples} +All examples have the following settings: + +\begin{tltxmdfexample} +\mdfsetup{skipabove=\topskip,skipbelow=\topskip} +\newrobustcmd\ExampleText{% +An \textit{inhomogeneous linear} differential equation +has the form +\begin{align} +L[v ] = f, +\end{align} +where $L$ is a linear differential operator, $v$ is +the dependent variable, and $f$ is a given non-zero +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`)} + +Here the solution which can be decorate as usual. + +\begin{tltxmdfexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment},morekeywords={lstlisting}] +\BeforeBeginEnvironment{lstlisting}{% + \begin{mdframed}[<modification>]% + \vspace{-0.7em}} +\AfterEndEnvironment{lstlisting}{% + \vspace{-0.5em}% + \end{mdframed}} +\end{tltxmdfexample} + +With the new command \Cmd{surroundwithmdframed} you can use +\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: +\begin{LTXexample} +\begin{multicols}{2} +\lipsum[1] +\begin{mdframed} +\ExampleText +\end{mdframed} +\lipsum[2] +\end{multicols} +\end{LTXexample} +\clearpage +\twocolumn[\Examplesec{Working in twocolumn mode}] +\begin{tltxmdfexample} +\twocolumn[% + \Examplesec{Working in + twocolumn mode}] +\lipsum[1]\lipsum[2] +\begin{mdframed}[% + leftmargin=10pt,% + rightmargin=10pt,% + linecolor=red, + backgroundcolor=yellow] +\ExampleText +\end{mdframed} +\lipsum[2] +\end{tltxmdfexample} +\lipsum[1]\lipsum[2] +\begin{mdframed}[leftmargin=10pt,% + rightmargin=10pt,% + linecolor=red, + backgroundcolor=yellow] +\ExampleText +\end{mdframed} +\lipsum[2] +\clearpage +\onecolumn +\Examplesec{Working inside enumerate} +\begin{LTXexample} +Text Text Text Text Text Text Text Text +\begin{enumerate} +\item in the following \ldots + \begin{mdframed}[linecolor=blue,linewidth=2] + \ExampleText + \end{mdframed} +\item \lipsum[2] +\end{enumerate} +Text Text Text Text Text Text +\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 20ac09baf5c..40fb2fb4710 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 new file mode 100644 index 00000000000..8e2cb658670 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex @@ -0,0 +1,234 @@ +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ +\setcounter{errorcontextlines}{999} +\documentclass[parskip=false,english,11pt]{ltxmdf} +\ltxmdfsetifoot $Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ + +\usepackage{showexpl} +\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} + +\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}} +\version{\mdversion} +\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{% + An \textit{inhomogeneous linear} differential equation has the form + \begin{align} + L[v ] = f, + \end{align} + where $L$ is a linear differential operator, $v$ is + the dependent variable, and $f$ is a given non-zero + function of the independent variables alone. +} + +\newcounter{examplecount} +\setcounter{examplecount}{0} +\renewcommand\thesubsection{} +\newcommand\Examplesec[1]{% +\stepcounter{examplecount}% +\subsection{Example~\arabic{examplecount}~--~#1\relax}% +} + +\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}. + +{\large\color{red!50!black} +\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} + +\section{Examples} +All examples have the following settings: + +\begin{tltxmdfexample} +\mdfsetup{skipabove=\topskip,skipbelow=\topskip} +\newrobustcmd\ExampleText{% +An \textit{inhomogeneous linear} differential equation +has the form +\begin{align} +L[v ] = f, +\end{align} +where $L$ is a linear differential operator, $v$ is +the dependent variable, and $f$ is a given non-zero +function of the independent variables alone. +} +\end{tltxmdfexample} +\clearpage +\ExampleText{round corner} +\begin{LTXexample} +\global\mdfdefinestyle{exampledefault}{% + outerlinewidth=5pt,innerlinewidth=0pt, + outerlinecolor=red,roundcorner=5pt +} +\begin{mdframed}[style=exampledefault] +\ExampleText +\end{mdframed} +\end{LTXexample} + +\Examplesec{hidden line + frame title} +\begin{LTXexample} +\global\mdfapptodefinestyle{exampledefault}{% + topline=false,leftline=false,} +\begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] +\ExampleText +\end{mdframed} +\end{LTXexample} +\clearpage +\Examplesec{framed picture which is centered} +\begin{LTXexample} +\begin{mdframed}[userdefinedwidth=6cm,align=center, + linecolor=blue,middlelinewidth=4pt,roundcorner=5pt] +\includegraphics[width=\linewidth]{donald-duck} +\end{mdframed} +\end{LTXexample} + +\Examplesec{Gimmick} +\begin{LTXexample} +\mdfsetup{splitbottomskip=0.8cm,splittopskip=0cm, + innerrightmargin=2cm,innertopmargin=1cm,% + innerlinewidth=2pt,outerlinewidth=2pt, + middlelinewidth=10pt,backgroundcolor=red, + linecolor=blue,middlelinecolor=gray, + tikzsetting={draw=yellow,line width=3pt,% + dashed,% + dash pattern= on 10pt off 3pt}, + rightline=false,bottomline=false} +\begin{mdframed} +\ExampleText +\end{mdframed} +\end{LTXexample} + +\Examplesec{complex example with TikZ} + +\begin{tltxmdfexample} +\tikzstyle{titregris} = + [draw=gray, thick, fill=white, shading = exersicetitle, % + text=gray, rectangle, rounded corners, + right,minimum height=.7cm] + +\pgfdeclarehorizontalshading{exersicebackground}{100bp} +{color(0bp)=(green!40); +color(100bp)=(black!5)} + +\pgfdeclarehorizontalshading{exersicetitle}{100bp} +{color(0bp)=(red!40); +color(100bp)=(black!5)} + +\newcounter{exercise} +\renewcommand\theexercise{Exercise~n\arabic{exercise}} +\makeatletter +\def\mdf@@exercisepoints{} +\define@key{mdf}{exercisepoints}{% + \def\mdf@@exercisepoints{#1} +} +\renewrobustcmd\mdfcreateextratikz{% + \node[titregris,xshift=1cm] at (P-|O) % + {~\mdf@frametitlefont{\theexercise}~}; + \ifdefempty{\mdf@@exercisepoints}% + {}% + {\node[titregris,left,xshift=-1cm] at (P)% + {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}% +} +\makeatother + +\mdfdefinestyle{exercisestyle}{% + outerlinewidth=1pt, + innerlinewidth=0pt, + roundcorner=2pt, + linecolor=gray, + tikzsetting={shading = exersicebackground}, + innertopmargin=1.2\baselineskip, + skipabove={\dimexpr0.5\baselineskip+\topskip\relax}, + needspace=3\baselineskip, + frametitlefont=\sffamily\bfseries, + settings={\global\stepcounter{exercise}}, + } + +\begin{mdframed}[style=exercisestyle,] +\ExampleText +\end{mdframed} + +\begin{mdframed}[style=exercisestyle,exercisepoints=10] +\ExampleText +\end{mdframed} +\end{tltxmdfexample} + +\tikzstyle{titregris} = + [draw=gray, thick, fill=white, shading = exersicetitle, % + text=gray, rectangle, rounded corners, + right,minimum height=.7cm] + +\pgfdeclarehorizontalshading{exersicebackground}{100bp} +{color(0bp)=(green!40); +color(100bp)=(black!5)} + +\pgfdeclarehorizontalshading{exersicetitle}{100bp} +{color(0bp)=(red!40); +color(100bp)=(black!5)} + +\newcounter{exercise} +\renewcommand\theexercise{Exercise~n\arabic{exercise}} +\makeatletter +\def\mdf@@exercisepoints{} +\define@key{mdf}{exercisepoints}{% + \def\mdf@@exercisepoints{#1} +} +\newrobustcmd\mdfcreateextratikzlocal{% + \node[titregris,xshift=1cm] at (P-|O) {~\textbf{\theexercise}~}; + \ifdefempty{\mdf@@exercisepoints}% + {}% + {\node[titregris,left,xshift=-1cm] at (P)% + {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}% +} +\makeatother + +\mdfdefinestyle{exercisestyle}{% + outerlinewidth=1pt, + innerlinewidth=0pt, + roundcorner=2pt, + linecolor=gray, + tikzsetting={shading = exersicebackground}, + innertopmargin=1.2\baselineskip, + skipabove={\dimexpr0.5\baselineskip+\topskip\relax}, + needspace=3\baselineskip, + frametitlefont=\sffamily\bfseries, + settings={\global\stepcounter{exercise}\let\mdfcreateextratikz\mdfcreateextratikzlocal}, + } + +\begin{mdframed}[style=exercisestyle,] +\ExampleText +\end{mdframed} + +\begin{mdframed}[style=exercisestyle,exercisepoints=10] +\ExampleText +\end{mdframed} + +\clearpage +\Examplesec{Theorem environments} +\begin{LTXexample} +\mdfdefinestyle{theoremstyle}{% + linecolor=red,linewidth=2pt,% + frametitlerule=true,% + apptotikzsetting={\tikzset{mdfframetitlebackground/.append style={% + shade,left color=white, right color=blue!20}}}, + frametitlerulecolor=green!60, + frametitlerulewidth=1pt, + innertopmargin=\topskip, + } +\mdtheorem[style=theoremstyle]{definition}{Definition} +\begin{definition}[Inhomogeneous linear] +\ExampleText +\end{definition} +\begin{definition*}[Inhomogeneous linear] +\ExampleText +\end{definition*} +\end{LTXexample} + +\end{document} + \endinput diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf Binary files differindex 54512e22fed..d64869f3ac2 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/doc/latex/mdframed/Makefile b/Master/texmf-dist/source/latex/mdframed/Makefile index 661e153e91a..f67d0bf16a6 100644 --- a/Master/texmf-dist/doc/latex/mdframed/Makefile +++ b/Master/texmf-dist/source/latex/mdframed/Makefile @@ -1,12 +1,12 @@ ################################################################ ## Makefile for mdframed project folder -## $Id: Makefile 313 2012-01-08 12:51:10Z marco $ +## $Id: Makefile 319 2012-01-09 18:38:06Z marco $ ################################################################ ## Definitions ################################################################ .SILENT: SHELL := /bin/bash -.PHONY: all clean +.PHONY: all clean ctan allwithoutclean ################################################################ ## Name list ################################################################ @@ -124,6 +124,9 @@ clean: all: docsty examples clean +################################################################ +## maintaner tool +################################################################ changeversion: @echo @echo -e "$(OK_COLOR)Aktuell wird die folgende Version verwendet" @@ -132,3 +135,32 @@ changeversion: @read -p "Bitte neue Version eingeben: " REPLY && sed -rie "s/(\\\\def\\\\mdversion\{).*(})/\1$$REPLY\2/" $(PACKAGE).dtx&&\ echo -e "$(OK_COLOR)Version geƤndert zu $$REPLY$(NO_COLOR)" @echo + +usectanify: + echo "" ;\ + echo -e "\t$(ERROR_COLOR)Start ctanify$(NO_COLOR)" ;\ + ctanify $(PACKAGE).ins $(PACKAGE).pdf README.txt ltxmdf.cls \ + donald-duck.jpg=doc/latex/mdframed/ \ + $(EXAMPLED).tex=doc/latex/mdframed/ \ + $(EXAMPLED).pdf=doc/latex/mdframed/ \ + $(EXAMPLET).tex=doc/latex/mdframed/ \ + $(EXAMPLET).pdf=doc/latex/mdframed/ \ + $(EXAMPLEP).tex=doc/latex/mdframed/ \ + $(EXAMPLEP).pdf=doc/latex/mdframed/ \ + $(EXAMPLESX).tex=doc/latex/mdframed/ \ + $(EXAMPLESX).pdf=doc/latex/mdframed/ \ + Makefile=source/latex/mdframed/ \ + mdframedmake.bat=source/latex/mdframed/ \ + md-frame-0.mdf=tex/latex/mdframed/ \ + md-frame-1.mdf=tex/latex/mdframed/ \ + md-frame-2.mdf=tex/latex/mdframed/ \ + md-frame-3.mdf=tex/latex/mdframed/ ;\ + if [ $$? = 0 ] ; then \ + echo -e "\t$(OK_COLOR)ctanify without errors$(NO_COLOR)" ;\ + echo -e "" ;\ + else \ + echo -e "\t$(ERROR_COLOR)ctanify with erros$(NO_COLOR)" ;\ + exit 0;\ + fi ;\ + +ctan: docsty examples usectanify clean diff --git a/Master/texmf-dist/source/latex/mdframed/mdframed.dtx b/Master/texmf-dist/source/latex/mdframed/mdframed.dtx index 53b1a72ab32..915c3c116ab 100644 --- a/Master/texmf-dist/source/latex/mdframed/mdframed.dtx +++ b/Master/texmf-dist/source/latex/mdframed/mdframed.dtx @@ -153,13 +153,13 @@ Have fun! \endpostamble \usedir{tex/latex/mdframed} \generate{\file{mdframed.sty}{\from{mdframed.dtx}{package}}} -\nopreamble\nopostamble +\nopreamble\nopostamble\usedir{tex/latex/mdframed} \generate{\file{md-frame-0.mdf}{\from{mdframed.dtx}{mdframedefault}}} -\nopreamble\nopostamble +\nopreamble\nopostamble\usedir{tex/latex/mdframed} \generate{\file{md-frame-1.mdf}{\from{mdframed.dtx}{mdframetikz}}} -\nopreamble\nopostamble +\nopreamble\nopostamble\usedir{tex/latex/mdframed} \generate{\file{md-frame-2.mdf}{\from{mdframed.dtx}{mdframepstricks}}} -\nopreamble\nopostamble +\nopreamble\nopostamble\usedir{tex/latex/mdframed} \generate{\file{md-frame-3.mdf}{\from{mdframed.dtx}{mdframepstricks}}} \Msg{*********************************************************} \Msg{*} @@ -168,13 +168,16 @@ Have fun! \Msg{*} \Msg{* \space\space documentation.sty} \Msg{*} -\Msg{* To produce the documentation run the file documentation.dtx} +\Msg{* To produce the documentation run the file mdframed.dtx} \Msg{* once through LaTeX. Then, run} \Msg{*} \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 LaTeX once again.} +\Msg{* through makeIndex to produce the glossary. Finally, run PdfLaTeX once again.} +\Msg{*} +\Msg{* To create the examples run (pdf)latex on the tex-files.} +\Msg{*} \Msg{* That's all!} \Msg{*} \Msg{* Happy TeXing!} @@ -184,16 +187,16 @@ Have fun! %<*internal> \usedir{source/latex/mdframed} \generate{\file{mdframed.ins}{\from{mdframed.dtx}{install}}} -\nopreamble\nopostamble -\usedir{doc/latex/mdframed} + +\nopreamble\nopostamble\usedir{doc/latex/mdframed} \generate{\file{README.txt}{\from{mdframed.dtx}{readme}}} -\nopreamble\nopostamble +\nopreamble\nopostamble\usedir{source/latex/mdframed} \generate{\file{mdframed-example-default.tex}{\from{mdframed.dtx}{mdframed-example-default}}} -\nopreamble\nopostamble +\nopreamble\nopostamble\usedir{source/latex/mdframed} \generate{\file{mdframed-example-tikz.tex}{\from{mdframed.dtx}{mdframed-example-tikz}}} -\nopreamble\nopostamble +\nopreamble\nopostamble\usedir{source/latex/mdframed} \generate{\file{mdframed-example-pstricks.tex}{\from{mdframed.dtx}{mdframed-example-pstricks}}} -\nopreamble\nopostamble +\nopreamble\nopostamble\usedir{source/latex/mdframed} \generate{\file{mdframed-example-texsx.tex}{\from{mdframed.dtx}{mdframed-example-texsx}}} \ifx\fmtname\nameofplainTeX @@ -203,11 +206,11 @@ Have fun! \fi %</internal> %<*driver> -%%$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,11pt,]{ltxmdf} \usepackage[framemethod=TikZ]{mdframed} -\ltxmdfsetifoot$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +\ltxmdfsetifoot$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ \EnableCrossrefs \CodelineIndex @@ -218,7 +221,7 @@ Have fun! %</driver> % \fi % -% CheckSum{3517} +% \CheckSum{5128} % % \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 @@ -1535,14 +1538,14 @@ Have fun! % % \subsection{The Explanation of mdframed.sty} % -% %$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ -% %$Rev: 312 $ +% %$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ +% %$Rev: 320 $ % %$Author: marco $ -% %$Date: 2012-01-08 13:43:36 +0100 (So, 08. Jan 2012) $ +% %$Date: 2012-01-09 19:44:33 +0100 (Mo, 09. Jan 2012) $ % \begin{macro}{mdversion,mdframedpackagename,mdf@maindate@svn} % Set package information % \begin{macrocode} -\def\mdversion{v1.2} +\def\mdversion{v1.2a} \def\mdframedpackagename{mdframed} \def\mdf@maindate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } % \end{macrocode} @@ -1551,7 +1554,7 @@ Have fun! % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mdframed}% - [\mdf@maindate@svn$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $% + [\mdf@maindate@svn$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $% \mdversion: \mdframedpackagename] % \end{macrocode} % @@ -2616,7 +2619,7 @@ 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{% @@ -2627,6 +2630,7 @@ Have fun! {\mdf@freevspace@length\vsize}% {\mdf@freevspace@length=\pagegoal\relax% \advance\mdf@freevspace@length by -\pagetotal\relax% + \addtolength\mdf@freevspace@length{\dimexpr-\parskip\relax}\relax% }% } % \end{macrocode} @@ -3081,7 +3085,7 @@ Have fun! %% Public License, as described in lppl.txt in the base LaTeX distribution. %% Either version 1.0 or, at your option, any later version. -%%$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ % % \end{macrocode} % @@ -3091,7 +3095,7 @@ 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 312 2012-01-08 12:43:36Z marco $% + [\mdf@frameOdate@svn$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $% \mdversion: \mdframedOpackagename] % \end{macrocode} % \end{macro} @@ -3513,7 +3517,7 @@ Have fun! %% Public License, as described in lppl.txt in the base LaTeX distribution. %% Either version 1.0 or, at your option, any later version. -%%$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ % % \end{macrocode} % \changes{v1.1beta}{2011/12/16}{added lost semicolons} @@ -3523,7 +3527,7 @@ 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 312 2012-01-08 12:43:36Z marco $ % + [\mdf@frameIdate@svn$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ % \mdversion: \mdframedIpackagename] % % \end{macrocode} @@ -4187,7 +4191,7 @@ Have fun! %% Public License, as described in lppl.txt in the base LaTeX distribution. %% Either version 1.0 or, at your option, any later version. -%%$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ % % \end{macrocode} % @@ -4197,7 +4201,7 @@ 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 312 2012-01-08 12:43:36Z marco $ % + [\mdf@frameIIdate@svn$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ % \mdversion: \mdframedIIpackagename] % \end{macrocode} % \end{macro} @@ -4881,10 +4885,10 @@ Have fun! % % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\ltxmdfsetifoot $Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +\ltxmdfsetifoot $Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} @@ -5097,10 +5101,10 @@ The example below is inspired by the following post on StackExchange \href{http: % % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\ltxmdfsetifoot $Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +\ltxmdfsetifoot $Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} @@ -5349,10 +5353,10 @@ color(100bp)=(black!5)} % % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\ltxmdfsetifoot$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +\ltxmdfsetifoot$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ \lstDeleteShortInline{|} \newcommand\Loadedframemethod{PSTricks} @@ -5477,10 +5481,10 @@ function of the independent variables alone. % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt,ltxlipsum]{ltxmdf} -\ltxmdfsetifoot $Id: mdframed.dtx 312 2012-01-08 12:43:36Z marco $ +\ltxmdfsetifoot $Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $ \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} diff --git a/Master/texmf-dist/source/latex/mdframed/mdframed.ins b/Master/texmf-dist/source/latex/mdframed/mdframed.ins new file mode 100644 index 00000000000..a33cfa88416 --- /dev/null +++ b/Master/texmf-dist/source/latex/mdframed/mdframed.ins @@ -0,0 +1,98 @@ +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble +---------------------------------------------------------------- +Working with the command fbox or fcolorbox, one has to +handle page breaks by hand. The present package defines the +environment mdframed which automatically deals with page breaks. + +Author's name: Marco Daniel and Elke Schubert (!new) +License type: lppl + +================================================== +========Is based on the idea of framed.sty======== +================================================== +===== Currently the package has a beta-Status ==== +================================================== + WITH THANKS TO (alphabetically): + ROLF NIEPRASCHK + HEIKO OBERDIEK + HERBERT VOSS + + Copyright (c) 2010 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. + +================================================= + Erstellung eines Rahmens, der am Seitenende keine + horizontale Linie einfuegt +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + _______________ + | page 1 | + | Text | + | __Text__ | + | | Text | | + P A G E B R E A K + | | Text | | + | |_Text_| | + | Text | + |____page 2___| + +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +================================================== + +\endpreamble +\postamble + +================================================================ +Copyright (C) 2011 by Marco Daniel + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License (LPPL), either +version 1.3c of this license or (at your option) any later +version. The latest version of this license is in the file: + +http://www.latex-project.org/lppl.txt + +This work is "maintained" (as per LPPL maintenance status) by +Marco Daniel. + +Have fun! + +================================================================ +\endpostamble +\usedir{tex/latex/mdframed} +\generate{\file{mdframed.sty}{\from{mdframed.dtx}{package}}} +\nopreamble\nopostamble\usedir{tex/latex/mdframed} +\generate{\file{md-frame-0.mdf}{\from{mdframed.dtx}{mdframedefault}}} +\nopreamble\nopostamble\usedir{tex/latex/mdframed} +\generate{\file{md-frame-1.mdf}{\from{mdframed.dtx}{mdframetikz}}} +\nopreamble\nopostamble\usedir{tex/latex/mdframed} +\generate{\file{md-frame-2.mdf}{\from{mdframed.dtx}{mdframepstricks}}} +\nopreamble\nopostamble\usedir{tex/latex/mdframed} +\generate{\file{md-frame-3.mdf}{\from{mdframed.dtx}{mdframepstricks}}} +\Msg{*********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the} +\Msg{* following file into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space documentation.sty} +\Msg{*} +\Msg{* To produce the documentation run the file mdframed.dtx} +\Msg{* once through LaTeX. Then, run} +\Msg{*} +\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{*} +\Msg{* To create the examples run (pdf)latex on the tex-files.} +\Msg{*} +\Msg{* That's all!} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*********************************************************} +\endbatchfile diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframedmake.bat b/Master/texmf-dist/source/latex/mdframed/mdframedmake.bat index 879b622ced2..879b622ced2 100755 --- a/Master/texmf-dist/doc/latex/mdframed/mdframedmake.bat +++ b/Master/texmf-dist/source/latex/mdframed/mdframedmake.bat diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf new file mode 100644 index 00000000000..cfe522b50a3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf @@ -0,0 +1,373 @@ +%% Style file for mdframed for package option `framemethod=default` +%% +%% 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: mdframed.dtx 320 2012-01-09 18:44:33Z 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 320 2012-01-09 18:44:33Z marco $% + \mdversion: \mdframedOpackagename] +\def\mdf@background@default{\color{\mdf@backgroundcolor}} +\def\mdf@frametitlebackground@default{\color{\mdf@frametitlebackgroundcolor}} +\def\mdf@innerlinecolor@default{\color{\mdf@innerlinecolor}} +\def\mdf@middlelinecolor@default{\color{\mdf@middlelinecolor}} +\def\mdf@outerlinecolor@default{\color{\mdf@outerlinecolor}} +\def\mdf@frametitlerulecolor@default{\color{\mdf@frametitlerulecolor}} +\let\mdf@linecolor@default\mdf@middlelinecolor@default +\def\mdf@@frametitlerule{% + \ifbool{mdf@frametitlerule}{% + \vbox to \mdf@frametitlerulewidth@length {\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 + }{\mdf@frametitlerulewidth@length}% + }}% + }{} + \par\unskip\vskip\mdf@innertopmargin@length% +}% + +\def\mdf@frame@background@single{% + \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}% + }% +}% + +\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}}% + {}% + }% +}% +\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}}% + {}% + }% +}% +\def\mdf@frame@leftline@single{% + \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}% + }% +}% +\def\mdf@putbox@single{%%%%% Ausgabe der ungesplitteten Gesamtbox + \ifvoid\mdf@splitbox@one + \else% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \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}% + \setlength{\mdfboundingboxdepth}% + {\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}% + \noindent% + \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*{\mdftotallinewidth}% + \mdf@frame@leftline@single% + }{}% + \mdf@frame@topline@single% + \mdf@frame@bottomline@single% + \mdf@frame@background@single% + \ifdefempty{\mdf@frametitle}{}{\mdf@frame@frametitlebackground@single}% + \hspace*{\mdf@innerleftmargin@length}% + \ifbool{mdf@rightline}{% + \mdf@frame@rightline@single% + }{}% + {\box\mdf@splitbox@one}% + }% + \mdf@makeboxalign@right% + }% + \fi% +} +\def\mdf@frame@background@first{% + \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]% + {\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% + \rule[-\mdfboundingboxdepth]% + {\mdfboundingboxtotalwidth}% + {\mdfboundingboxtotalheight}% + }% + \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}% + }% +}% +\def\mdf@frame@topline@first{% + \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}% + }% +}% +\def\mdf@putbox@first{%%%% Ausgabe der Teilbox 1 + \ifvoid\mdf@splitbox@two + \else% + \mdf@makebox@out[\linewidth]{% + \mdf@makeboxalign@left% + \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}% + \setlength{\mdfboundingboxdepth}% + {\dimexpr\dp\mdf@splitbox@two+\mdf@splitbottomskip@length\relax}% + \setlength{\mdfboundingboxtotalheight}% + {\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@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{% + \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]% + {\mdfboundingboxtotalwidth}% + {\mdfframetitleboxtotalheight}% + }% + }% +}% +\def\mdf@frame@leftline@second{% + \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}% + }% +}% +\def\mdf@frame@rightline@second{% + \rlap{\mdf@linecolor@default\hspace*{\mdfboundingboxwidth}% + \hspace*{\mdf@innerrightmargin@length}% + \rule[-\mdfboundingboxdepth]% + {\mdf@middlelinewidth@length}% + {\mdfboundingboxtotalheight}% + }% +}% +\def\mdf@putbox@second{% + \ifvoid\mdf@splitbox@one% + \else + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \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}% + \setlength{\mdfboundingboxdepth}% + {\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}{% + \hspace*{\mdf@middlelinewidth@length}% + \mdf@frame@leftline@second}{}% + \ifbool{mdf@bottomline}{% + \mdf@frame@bottomline@second}{}% + \mdf@frame@background@second% + \ifdefempty{\mdf@frametitle}{}{\mdf@frame@frametitlebackground@second}% + \hspace*{\mdf@innerleftmargin@length}% + \ifbool{mdf@rightline}{% + \mdf@frame@rightline@second}{}% + {\box\mdf@splitbox@one}% + }% + \mdf@makeboxalign@right% + }% + \fi% +}% +\def\mdf@frame@leftline@middle{% + \llap{\mdf@linecolor@default% + \rule[-\mdfboundingboxdepth]% + {\mdf@middlelinewidth@length}% + {\mdfboundingboxtotalheight}% + }% +}% +\def\mdf@frame@background@middle{% + \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]% + {\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}% + }% +}% +\def\mdf@putbox@middle{% + \ifvoid\mdf@splitbox@two% + \else + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \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}% + \setlength{\mdfboundingboxdepth}% + {\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% + \ifdefempty{\mdf@frametitle}{}{\mdf@frame@frametitlebackground@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 new file mode 100644 index 00000000000..186a60394f8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf @@ -0,0 +1,553 @@ +%% Style file for mdframed for package option `framemethod=default` +%% +%% 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: mdframed.dtx 320 2012-01-09 18:44:33Z 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 320 2012-01-09 18:44:33Z 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 + \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)}}}% + \tikzset{mdfouterline/.style={}}% + \ifdimgreater{\mdf@outerlinewidth@length}{\z@} + {\tikzset{mdfouterline/.append style={% + draw=\mdf@outerlinecolor,% + line width=2\mdf@outerlinewidth@length+\mdf@middlelinewidth@length}}}{}% + \tikzset{mdfinnerline/.style={}}% + \ifdimgreater{\mdf@innerlinewidth@length}{\z@} + {\tikzset{mdfinnerline/.append style={% + draw=\mdf@innerlinecolor,% + line width=2\mdf@innerlinewidth@length+\mdf@middlelinewidth@length}}}{}% + \mdf@tikzset@local + \tikzset{mdfmiddleline/.style={}}% + \ifdimgreater{\mdf@middlelinewidth@length}{\z@} + {\tikzset{mdfmiddleline/.append style={% + preaction={draw=\mdf@middlelinecolor,% + line width=\mdf@middlelinewidth@length},% + line width=\mdf@middlelinewidth@length,% + tikzsetting}}% + }{}% +}% +\newrobustcmd*\mdf@tikzbox@tfl[1]{%three or four borders + \clip(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% + \begin{scope}[mdfcorners]% + \clip[preaction=mdfouterline]% + [postaction=mdfbackground]% + [postaction=mdfinnerline]#1;% + \end{scope}% + \path[mdfmiddleline,mdfcorners]#1; + }% + +\newrobustcmd*\mdf@tikzbox@otl[2]{%one or two borders + \clip(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% + \begin{scope} + \path[mdfouterline,mdfcorners]#1;% + \clip[postaction=mdfbackground]#2;% + \path[mdfinnerline,mdfcorners]#1;% + \end{scope}% + \path[mdfmiddleline,mdfcorners]#1;}% +\tikzset{mdfframetitlerule/.style={% + draw=none, + fill=\mdf@frametitlerulecolor, + }% +} +\def\mdf@@frametitlerule{% + \ifbool{mdf@frametitlerule}{% + \vbox{\hsize0pt + \par\unskip\vskip\mdf@frametitlebelowskip@length + \noindent\rlap{\hspace*{-\mdf@innerleftmargin@length}% + \begingroup% + \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% +}% + +\def\mdf@putbox@single{% + \ifvoid\mdf@splitbox@one + \else% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \mdf@tikz@settings% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@one}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% + \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax% + \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax% + \ifbool{mdf@topline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@bottomline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \begin{tikzpicture}[remember picture]% + \begin{scope} + \pgfmathsetlengthmacro\mdf@Ax{+\mdf@innerleftmargin@length}% + \pgfmathsetlengthmacro\mdf@Ay{+\mdf@innerbottommargin@length}% + \pgfmathsetlengthmacro\mdf@Ox{+0pt}% + \pgfmathsetlengthmacro\mdf@Oy{+0pt}% + \pgfmathsetlengthmacro\mdf@Px{+\mdfboundingboxwidth}% + \pgfmathsetlengthmacro\mdf@Py{+\mdfboundingboxheight}% + \ifbool{mdf@leftline}% + {% + \pgfmathsetlengthmacro\mdf@Ax% + {\mdf@Ax+\mdf@outerlinewidth@length+% + \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% + \pgfmathsetlengthmacro\mdf@Ox% + {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}% + }{}% + \ifbool{mdf@rightline}% + {% + \pgfmathsetlengthmacro\mdf@Px% + {\mdf@Px-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}% + }{}% + \ifbool{mdf@bottomline}% + {% + \pgfmathsetlengthmacro\mdf@Ay% + {\mdf@Ay+\mdf@outerlinewidth@length+\mdf@middlelinewidth@length% + +\mdf@innerlinewidth@length}% + \pgfmathsetlengthmacro\mdf@Oy% + {\mdf@Oy+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}% + }{}% + \ifbool{mdf@topline}% + {% + \pgfmathsetlengthmacro\mdf@Py% + {\mdf@Py-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}% + }{}% + \coordinate(O)at(\mdf@Ox,\mdf@Oy);% + \coordinate(P)at(\mdf@Px,\mdf@Py);% + \mdf@test@ltrb{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)--cycle}}{}% + \mdf@test@ltb{\mdf@tikzbox@tfl{(P|-O)--(O)--(O|-P)--(P)}}{}% + \mdf@test@trb{\mdf@tikzbox@tfl{(O|-P)--(P)--(P|-O)--(O)}}{}% + \mdf@test@ltr{\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)}}{}% + \mdf@test@lrb{\mdf@tikzbox@tfl{(P-|O)--(O)--(O-|P)--(P)}}{}% + \mdf@test@lb{\mdf@tikzbox@otl{(P|-O)--(O)--(O|-P)}% + {(P)--(P|-O)[mdfcorners]--(O)--(O|-P)}% + }{}% + \mdf@test@rb{\mdf@tikzbox@otl{(P)--(P|-O)--(O)}% + {(O|-P)--(P)[mdfcorners]--(P|-O)--(O)}% + }{}% + \mdf@test@tr{\mdf@tikzbox@otl{(O-|P)--(P)--(P-|O)}% + {(O)--(O|-P)[mdfcorners]--(P)--(P|-O)}% + }{}% + \mdf@test@lt{\mdf@tikzbox@otl{(O)--(O|-P)--(P)}% + {(P|-O)--(O)[mdfcorners]--(O|-P)--(P)}% + }{}% + \mdf@test@lr{\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}% + {(O)rectangle(P)}% + }{}% + \mdf@test@tb{\mdf@tikzbox@otl{(O)--(O-|P)(O|-P)--(P)}% + {(O)rectangle(P)}% + }{}% + \mdf@test@l{\mdf@tikzbox@otl{(O)--(O|-P)}% + {(O)rectangle(P)}% + }{}% + \mdf@test@r{\mdf@tikzbox@otl{(O-|P)--(P)}% + {(O)rectangle(P)}% + }{}% + \mdf@test@t{\mdf@tikzbox@otl{(O|-P)--(P)}% + {(O)rectangle(P)}% + }{}% + \mdf@test@b{\mdf@tikzbox@otl{(O)--(O-|P)}% + {(O)rectangle(P)}% + }{}% + \mdf@test@noline{\path[mdfbackground,mdfcorners](O)rectangle(P);}{}% + %Frametitlebackground + \drawbrackgroundframetitle@single + \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};% Ausgabebox einfuegen + \end{scope} + %HIER KOMMT EIN WEITERES MAKRO + \mdfcreateextratikz + \end{tikzpicture}% + }% + \mdf@makeboxalign@right% + }% + \fi +}% +\def\drawbrackgroundframetitle@single{% + \ifdefempty{\mdf@frametitle}{}{% + \drawbrackgroundframetitle@@single% + }% +}% +\def\drawbrackgroundframetitle@@single{% + \begin{scope}%background frame title + \ifbool{mdf@leftline}{ + \pgfmathsetlengthmacro\mdf@Ox% + {\mdf@Ox+\mdf@innerlinewidth@length+0.5\mdf@middlelinewidth@length} + }{}% + \ifbool{mdf@rightline}{% + \pgfmathsetlengthmacro\mdf@Px% + {\mdf@Px-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length} + }{}% + \ifbool{mdf@topline}{% + \pgfmathsetlengthmacro\mdf@Py% + {\mdf@Py-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length} + }{}% + \pgfmathsetlengthmacro\mdf@Fy + {\mdf@Py-\mdfframetitleboxtotalheight} + \path[mdfframetitlebackground] + (\mdf@Ox,\mdf@Fy) -- (\mdf@Ox,\mdf@Py)% + --(\mdf@Px,\mdf@Py) --(\mdf@Px,\mdf@Fy); + \end{scope} +} +\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% + }% + }% + }% +}% +\def\drawbrackgroundframetitle@@first{% + \begin{scope}%background frame title + \ifbool{mdf@leftline}{% + \pgfmathsetlengthmacro\mdf@Ox% + {\mdf@Ox+\mdf@innerlinewidth@length+0.5\mdf@middlelinewidth@length} + }{}% + \ifbool{mdf@rightline}{% + \pgfmathsetlengthmacro\mdf@Px% + {\mdf@Px-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length} + }{}% + \ifbool{mdf@topline}{% + \pgfmathsetlengthmacro\mdf@Py% + {\mdf@Py-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length} + }{}% + \pgfmathsetlengthmacro\mdf@Fy + {max(0,\mdf@Py-\mdfframetitleboxtotalheight)} + \path[mdfframetitlebackground] + (\mdf@Ox,\mdf@Fy) -- (\mdf@Ox,\mdf@Py)% + --(\mdf@Px,\mdf@Py) --(\mdf@Px,\mdf@Fy); + \end{scope}% +}% +\def\mdf@putbox@first{% + \ifvoid\mdf@splitbox@two + \else% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \mdf@tikz@settings% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@two}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}% + \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax% + \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax% + \ifbool{mdf@topline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + %\ifdimequal{\pagegoal}{\maxdimen}{\enlargethispage{\baselineskip}}{}% ??? + \ifdimgreater{\pagegoal-\maxdimen}{0pt}{}{\enlargethispage{\baselineskip}}% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \begin{tikzpicture}[remember picture] + \begin{scope} + \pgfmathsetlengthmacro\mdf@Ax{+\mdf@innerleftmargin@length}% + \pgfmathsetlengthmacro\mdf@Ay{+\mdf@splitbottomskip@length}% + \pgfmathsetlengthmacro\mdf@Ox{+0pt}% + \pgfmathsetlengthmacro\mdf@Oy{+0pt}% + \pgfmathsetlengthmacro\mdf@Px{+\mdfboundingboxwidth}% + \pgfmathsetlengthmacro\mdf@Py{+\mdfboundingboxheight}% + \ifbool{mdf@leftline} + {% + \pgfmathsetlengthmacro\mdf@Ax% + {\mdf@Ax+\mdf@outerlinewidth@length+% + \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% + \pgfmathsetlengthmacro\mdf@Ox% + {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}% + }{}% + \ifbool{mdf@rightline}{% + \pgfmathsetlengthmacro\mdf@Px% + {\mdf@Px-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}% + }{}% + \ifbool{mdf@topline}{% + \pgfmathsetlengthmacro\mdf@Py% + {\mdf@Py-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}% + }{}% + \coordinate(O)at(\mdf@Ox,\mdf@Oy);% + \coordinate(P)at(\mdf@Px,\mdf@Py);% + \ifboolexpr{test {\mdf@test@ltrb} or test {\mdf@test@ltr}}% + {\mdf@tikzbox@tfl{(O)--(O|-P)--(P)--(P|-O)}}% + {}% + \ifboolexpr{test {\mdf@test@ltb} or test {\mdf@test@lt}}% + {\mdf@tikzbox@otl{(O)--(O|-P)--(P)}{(P|-O)--(O)[mdfcorners]--(O|-P)--(P)}}% + {}% + \ifboolexpr{test {\mdf@test@trb} or test {\mdf@test@tr}}% + {\mdf@tikzbox@otl{(O-|P)--(P)--(P-|O)}{(O)--(O|-P)[mdfcorners]--(P)--(P|-O)}}% + {}% + \ifboolexpr{test {\mdf@test@lrb} or test {\mdf@test@lr}}% + {\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}{(O)rectangle(P)}}% + {}% + \ifboolexpr{test {\mdf@test@tb} or test {\mdf@test@t}}% + {\mdf@tikzbox@otl{(O|-P)--(P)}{(O)rectangle(P)}}% + {}% + \ifboolexpr{test {\mdf@test@lb} or test {\mdf@test@l}}% + {\mdf@tikzbox@otl{(O)--(O|-P)}{(O)rectangle(P)}}% + {}% + \ifboolexpr{test {\mdf@test@rb} or test {\mdf@test@r}}% + {\mdf@tikzbox@otl{(O-|P)--(P)}{(O)rectangle(P)}}% + {}% + \mdf@test@b{\path[mdfbackground](O)rectangle(P);}{}% + \mdf@test@noline{\path[mdfbackground,mdfcorners](O)--(O|-P)--(P)--(P|-O);}{}% + \drawbrackgroundframetitle@first + \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};% Ausgabebox einfuegen + \end{scope} + %HIER KOMMT EIN WEITERES MAKRO + \mdfcreateextratikz% + \end{tikzpicture}% + }% + \mdf@makeboxalign@right% + }% + \fi +}% +\def\drawbrackgroundframetitle@middle{% + \ifdefempty{\mdf@frametitle}{}{% + \ifdimless{\mdfframetitleboxtotalheight}{\z@} + {}{% + \drawbrackgroundframetitle@@middle% + \pgfmathsetlength{\global\mdfframetitleboxtotalheight}{-\p@}% + }% + }% +}% +\def\drawbrackgroundframetitle@@middle{% + \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} + }{}% + \pgfmathsetlengthmacro\mdf@Fy + {\mdf@Py-\mdfframetitleboxtotalheight} + \path[mdfframetitlebackground,rounded corners=\z@] + (\mdf@Ox,\mdf@Fy) -- (\mdf@Ox,\mdf@Py)% + --(\mdf@Px,\mdf@Py) --(\mdf@Px,\mdf@Fy); + \end{scope} +}% +\def\mdf@putbox@middle{% + \ifvoid\mdf@splitbox@two + \else% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \mdf@tikz@settings% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@two}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}% + \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \begin{tikzpicture}[remember picture] + \begin{scope} + \pgfmathsetlengthmacro\mdf@Ax{+\mdf@innerleftmargin@length}% + \pgfmathsetlengthmacro\mdf@Ay{+\mdf@splitbottomskip@length}% + \pgfmathsetlengthmacro\mdf@Ox{+0pt}% + \pgfmathsetlengthmacro\mdf@Oy{+0pt}% + \pgfmathsetlengthmacro\mdf@Px{+\mdfboundingboxwidth}% + \pgfmathsetlengthmacro\mdf@Py{+\mdfboundingboxheight}% + \ifbool{mdf@leftline}% + {% + \pgfmathsetlengthmacro\mdf@Ax% + {\mdf@Ax+\mdf@outerlinewidth@length+% + \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% + \pgfmathsetlengthmacro\mdf@Ox% + {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}% + }{}% + \ifbool{mdf@rightline}% + {% + \pgfmathsetlengthmacro\mdf@Px% + {\mdf@Px-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}% + }{}% + \coordinate(O)at(\mdf@Ox,\mdf@Oy);% + \coordinate(P)at(\mdf@Px,\mdf@Py);% + \ifboolexpr{bool {mdf@leftline} and bool {mdf@rightline}}% + {\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}{(O)rectangle(P)}}{}% + \ifboolexpr{bool {mdf@leftline} and not (bool {mdf@rightline})}% + {\mdf@tikzbox@otl{(O)--(O|-P)}{(O)rectangle(P)}}{}% + \ifboolexpr{not (bool {mdf@leftline}) and bool {mdf@rightline}}% + {\mdf@tikzbox@otl{(P)--(P|-O)}{(O)rectangle(P)}}{}% + \ifboolexpr{not (bool {mdf@leftline}) and not (bool {mdf@rightline})}% + {\path[mdfbackground](O)rectangle(P);}{}% + \drawbrackgroundframetitle@middle + \node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};% Ausgabebox einfuegen + \end{scope} + %HIER KOMMT EIN WEITERES MAKRO + \end{tikzpicture}% + }% + \mdf@makeboxalign@right% + }% + \fi +}% +\def\drawbrackgroundframetitle@second{% + \ifdefempty{\mdf@frametitle}{}{% + \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} + }{}% + \ifbool{mdf@rightline}{% + \pgfmathsetlengthmacro\mdf@Px% + {\mdf@Px-\mdf@innerlinewidth@length-0.5\mdf@middlelinewidth@length} + }{}% + \pgfmathsetlengthmacro\mdf@Fy + {\mdf@Py-\mdfframetitleboxtotalheight} + \path[mdfframetitlebackground,rounded corners=\z@] + (\mdf@Ox,\mdf@Fy) -- (\mdf@Ox,\mdf@Py)% + --(\mdf@Px,\mdf@Py) --(\mdf@Px,\mdf@Fy); + \end{scope} +}% +\def\mdf@putbox@second{% + \ifvoid\mdf@splitbox@one + \else% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \mdf@tikz@settings% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@one}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% + \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax% + \ifbool{mdf@bottomline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \begin{tikzpicture}[remember picture] + \begin{scope} + \pgfmathsetlengthmacro\mdf@Ax{+\mdf@innerleftmargin@length}% + \pgfmathsetlengthmacro\mdf@Ay{+\mdf@innerbottommargin@length}% + \pgfmathsetlengthmacro\mdf@Ox{+0pt}% + \pgfmathsetlengthmacro\mdf@Oy{+0pt}% + \pgfmathsetlengthmacro\mdf@Px{+\mdfboundingboxwidth}% + \pgfmathsetlengthmacro\mdf@Py{+\mdfboundingboxheight}% + \ifbool{mdf@leftline}% + {% + \pgfmathsetlengthmacro\mdf@Ax% + {\mdf@Ax+\mdf@outerlinewidth@length+% + \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% + \pgfmathsetlengthmacro\mdf@Ox% + {\mdf@Ox+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}% + }{}% + \ifbool{mdf@rightline}% + {% + \pgfmathsetlengthmacro\mdf@Px% + {\mdf@Px-\mdf@outerlinewidth@length-0.5\mdf@middlelinewidth@length}% + }{}% + \ifbool{mdf@bottomline}% + {% + \pgfmathsetlengthmacro\mdf@Ay% + {\mdf@Ay+\mdf@outerlinewidth@length+% + \mdf@middlelinewidth@length+\mdf@innerlinewidth@length}% + \pgfmathsetlengthmacro\mdf@Oy% + {\mdf@Oy+\mdf@outerlinewidth@length+0.5\mdf@middlelinewidth@length}% + }{}% + \coordinate(O)at(\mdf@Ox,\mdf@Oy);% + \coordinate(P)at(\mdf@Px,\mdf@Py);% + \ifboolexpr{test {\mdf@test@ltrb} or test {\mdf@test@lrb}}% + {\mdf@tikzbox@tfl{(P-|O)--(O)--(O-|P)--(P)}}% + {}% + \ifboolexpr{test {\mdf@test@ltb} or test {\mdf@test@lb}}% + {\mdf@tikzbox@otl{(P-|O)--(O)--(O-|P)}{(P)--(P|-O)[mdfcorners]--(O)--(O|-P)}}% + {}% + \ifboolexpr{test {\mdf@test@trb} or test {\mdf@test@rb}}% + {\mdf@tikzbox@otl{(P)--(P|-O)--(O)}{(O|-P)--(P)[mdfcorners]--(P|-O)--(O)}}% + {}% + \ifboolexpr{test {\mdf@test@ltr} or test {\mdf@test@lr}}% + {\mdf@tikzbox@otl{(O)--(O|-P)(P)--(P|-O)}{(O)rectangle(P)}}% + {}% + \ifboolexpr{test {\mdf@test@tb} or test {\mdf@test@b}}% + {\mdf@tikzbox@otl{(O)--(O-|P)}{(O)rectangle(P)}}% + {}% + \ifboolexpr{test {\mdf@test@lt} or test {\mdf@test@l}}% + {\mdf@tikzbox@otl{(O)--(O|-P)}{(O)rectangle(P)}}% + {}% + \ifboolexpr{test {\mdf@test@tr} or test {\mdf@test@r}}% + {\mdf@tikzbox@otl{(O-|P)--(P)}{(O)rectangle(P)}}% + {}% + \mdf@test@t{\path[mdfbackground,mdfcorners](O|-P)--(O)--(O-|P)--(P);}{}% + \mdf@test@noline{\path[mdfbackground,mdfcorners](O|-P)--(O)--(O-|P)--(P);}{}% + \drawbrackgroundframetitle@second + \node[mdfbox] at (\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};% Ausgabebox einfuegen + \end{scope} + %HIER KOMMT EIN WEITERES MAKRO + \end{tikzpicture}% + }% + \mdf@makeboxalign@right% + }% + \fi +}% + \endinput diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf new file mode 100644 index 00000000000..3c58e3dd762 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf @@ -0,0 +1,597 @@ +%% Style file for mdframed for package option `framemethod=default` +%% +%% 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: mdframed.dtx 320 2012-01-09 18:44:33Z 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 320 2012-01-09 18:44:33Z 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 } +\let\ptTps\mdf@ptlength@to@pscode\relax +\let\ptTpsL\mdf@ptlength@to@pscode@length\relax +\def\mdfpstricks@settings{%expand by \addtopsstyle + \newpsstyle{mdfbackgroundstyle}% + {linecolor=\mdf@backgroundcolor,fillstyle=solid,% + fillcolor=\mdf@backgroundcolor,linestyle=none,% + ,dimen=middle,% + }% + \newpsstyle{mdfframetitlebackgroundstyle}{% + linecolor=\mdf@frametitlebackgroundcolor, + fillcolor=\mdf@frametitlebackgroundcolor, + fillstyle=solid,linestyle=none, + linearc=\ifdimgreater{\mdf@roundcorner@length% + -\mdf@innerlinewidth@length% + -.5\mdf@middlelinewidth@length} + {\z@}{\dimexpr\mdf@roundcorner@length% + -\mdf@innerlinewidth@length% + -.5\mdf@middlelinewidth@length}{\z@}, + } + \newpsstyle{mdfouterlinestyle}{linestyle=none}% + \ifdimgreater{\mdf@outerlinewidth@length}{\z@} + {\newpsstyle{mdfouterlinestyle}{% + linecolor=\mdf@outerlinecolor,% + 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, + dimen=middle, + }}{}% + \newpsstyle{mdfmiddlelinestyle}{linestyle=none}% + \ifdimgreater{\mdf@middlelinewidth@length}{\z@}% + {\newpsstyle{mdfmiddlelinestyle}{% + linewidth=\mdf@middlelinewidth@length,% + linecolor=\mdf@middlelinecolor,dimen=middle + }}{}% +\mdfpstricks@appendsettings +}% +\newrobustcmd*\mdf@pstricksbox@fl[2]{%four lines + \psframe[style=mdfouterlinestyle](#1)(#2)%aussen=3mm + \psframe[style=mdfbackgroundstyle](#1)(#2)%Hintergrund + \psclip{\psframe[style=mdfmiddlelinestyle](#1)(#2)} + \psframe[style=mdfinnerlinestyle](#1)(#2)%innere=3mm + \endpsclip + \psframe[style=mdfmiddlelinestyle](#1)(#2)%mittlere=2mm + }% +\newrobustcmd*\mdf@pstricksbox@tl[1]{%three lines + \psline[style=mdfouterlinestyle]#1%aussen=3mm + \psline[style=mdfbackgroundstyle]#1%Hintergrund + \psclip{\psline[style=mdfmiddlelinestyle]#1} + \psline[style=mdfinnerlinestyle]#1%innere=3mm + \endpsclip + \psline[style=mdfmiddlelinestyle]#1%mittlere=2mm + }% +\newrobustcmd*\mdf@pstricksbox@tcl[2]{%two combined lines +%%#1 background comple +%%#2 line path + \psline[style=mdfouterlinestyle]#2%aussen=3mm + \psline[style=mdfbackgroundstyle]#2%Hintergrund + \psclip{\pscustom[linestyle=none]{ + \psline[style=mdfmiddlelinestyle]#2 + \psline[linestyle=none,linearc=0pt]#1} + } + \psframe[style=mdfbackgroundstyle,linearc=0pt](mdf@O)(mdf@P)%Hintergrund + \psline[style=mdfinnerlinestyle]#2%innere=3mm + \endpsclip + \psline[style=mdfmiddlelinestyle]#2%mittlere=2mm +}% +\newrobustcmd*\mdf@pstricksbox@tncl[2]{%two not combined lines + \begingroup + \psset{linearc=0pt} + \psline[style=mdfouterlinestyle](mdf@O)#1%aussen=3mm + \psline[style=mdfouterlinestyle](mdf@P)#2%aussen=3mm + \psclip{ + \pscustom[linestyle=none]{% + \psline[style=mdfmiddlelinestyle](mdf@O)#1%mittlere=2mm + \psline[linestyle=none](mdf@O)#2 + \psline[style=mdfmiddlelinestyle](mdf@P)#2%mittlere=2mm + \psline[linestyle=none](mdf@P)#1 + }% + }% + \psframe[style=mdfbackgroundstyle,linearc=0pt](mdf@O)(mdf@P)%Hintergrund + \psline[style=mdfinnerlinestyle](mdf@O)#1%innere=3mm + \psline[style=mdfinnerlinestyle](mdf@P)#2%innere=3mm + \endpsclip + \psline[style=mdfmiddlelinestyle](mdf@O)#1%mittlere=2mm + \psline[style=mdfmiddlelinestyle](mdf@P)#2%mittlere=2mm + \endgroup +}% +\newrobustcmd*\mdf@pstricksbox@ol[1]{%one line + \begingroup + \psset{linearc=0pt} + \psline[style=mdfouterlinestyle]#1%aussen=3mm + \psline[style=mdfbackgroundstyle]#1%Hintergrund + \psclip{\pscustom[linestyle=none]{ + \psline[style=mdfmiddlelinestyle]#1 + \psframe[linestyle=none,fillstyle=none,dimen=inner](mdf@O)(mdf@P) + }} + \psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P) + \psline[style=mdfinnerlinestyle]#1%innere=3mm + \endpsclip + \psline[style=mdfmiddlelinestyle]#1%mittlere=2mm + \endgroup% +}% + +\newpsstyle{mdfframetitlerule}{% + linecolor=\mdf@frametitlerulecolor,% + fillcolor=\mdf@frametitlerulecolor,% + fillstyle=solid,dimen=outer,% +} +\def\mdf@@frametitlerule{% + \ifbool{mdf@frametitlerule}{% + \vbox{\hsize0pt + \par\unskip\vskip\mdf@frametitlebelowskip@length + \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}) + \end{pspicture} + \endgroup} + }% + }{} + \par\unskip\vskip\mdf@innertopmargin@length% +}% +\def\mdf@putbox@single{% + \ifvoid\mdf@splitbox@one + \else% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@one}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% + \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax% + \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax% + \ifbool{mdf@topline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@bottomline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdftotallinewidth{\dimexpr\mdf@innerlinewidth@length% + +\mdf@middlelinewidth@length + +\mdf@outerlinewidth@length\relax}% + \psset{unit=1truecm}% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight) + \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(0,0){mdf@O} + \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} + \ifbool{mdf@leftline}% + {% + \nodexn{(mdf@A)+(\mdf@outerlinewidth@length,0) + +(\mdf@middlelinewidth@length,0) + +(\mdf@innerlinewidth@length,0)}{mdf@A}% + \nodexn{(mdf@O)+(\mdf@outerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O}% + }{}% + \ifbool{mdf@rightline}% + {% + \nodexn{(mdf@P)-(\mdf@outerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% + }{}% + \ifbool{mdf@bottomline}% + {% + \nodexn{(mdf@A)+(0,\mdf@outerlinewidth@length) + +(0,\mdf@middlelinewidth@length) + +(0,\mdf@innerlinewidth@length)}{mdf@A}% + \nodexn{(mdf@O)+(0,\mdf@outerlinewidth@length) + +0.5(0,\mdf@middlelinewidth@length)}{mdf@O}% + }{}% + \ifbool{mdf@topline}% + {% + \nodexn{(mdf@P)-(0,\mdf@outerlinewidth@length) + -0.5(0,\mdf@middlelinewidth@length)}{mdf@P} + }{}% + %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)}}{}% + %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)}}{} + %two lines not combinded combinded + \mdf@test@lr{\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)} + }{} + \mdf@test@tb{\mdf@pstricksbox@tncl{(mdf@P|mdf@O)}{(mdf@O|mdf@P)} + }{} + %single line + \mdf@test@l{\mdf@pstricksbox@ol{(mdf@O)(mdf@O|mdf@P)}}{} + \mdf@test@r{\mdf@pstricksbox@ol{(mdf@P)(mdf@P|mdf@O)}}{} + \mdf@test@t{\mdf@pstricksbox@ol{(mdf@P)(mdf@O|mdf@P)}}{} + \mdf@test@b{\mdf@pstricksbox@ol{(mdf@O)(mdf@P|mdf@O)}}{} + %no line + \mdf@test@noline{\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{} + %Frametitlebackground + \drawbrackgroundframetitle@single + %output% + \rput[bl](mdf@A){\box\mdf@splitbox@one} + \end{pspicture}% + }% + \mdf@makeboxalign@right% + }% + \fi +}% +\def\drawbrackgroundframetitle@single{% + \ifdefempty{\mdf@frametitle}{}{% + \drawbrackgroundframetitle@@single% + }% +}% +\def\drawbrackgroundframetitle@@single{% + \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@first{% + \ifvoid\mdf@splitbox@two + \else% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + %\ifbool{mdf@leftline}{\hspace*{\mdf@middlelinewidth@length}}{}% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@two}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}% + \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax% + \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax% + \ifbool{mdf@topline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + \psset{linearc=\mdf@roundcorner@length,cornersize=absolute}% + \expandafter\psset\expandafter{\mdf@psset@local}% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \psset{unit=1truecm}% + \ifdimgreater{\mdfboundingboxheight}{\vsize} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\vsize)} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight)} + \mdfpstricks@settings% + \psset{linearc=\mdf@roundcorner@length,cornersize=absolut,}% + \expandafter\psset\expandafter{\mdf@psset@local}% + \pnode(\mdf@innerleftmargin@length,\mdf@splitbottomskip@length){mdf@A} + \pnode(0,0){mdf@O} + \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} + \ifbool{mdf@leftline}% + {% + \nodexn{(mdf@A)+(\mdf@outerlinewidth@length,0) + +(\mdf@middlelinewidth@length,0) + +(\mdf@innerlinewidth@length,0)}{mdf@A} + \nodexn{(mdf@O)+(\mdf@outerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O} + }{}% + \ifbool{mdf@rightline}% + {% + \nodexn{(mdf@P)-(\mdf@outerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P} + }{}% + \ifbool{mdf@topline}% + {% + \nodexn{(mdf@P)-(0,\mdf@outerlinewidth@length) + -0.5(0,\mdf@middlelinewidth@length)}{mdf@P} + }{}% + %Four or Three lines + \ifboolexpr{test {\mdf@test@ltrb} or test {\mdf@test@ltr}}% + {\mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}% + {}% + %two combinded lines + \ifboolexpr{test {\mdf@test@ltb} or test {\mdf@test@lt}} + {\mdf@pstricksbox@tcl{(mdf@O)(mdf@P|mdf@O)(mdf@P)}% + {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \ifboolexpr{test {\mdf@test@trb} or test {\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)}}{} + %two not combinded lines + \ifboolexpr{test {\mdf@test@lrb} or test {\mdf@test@lr}}% + {\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)}}{} + %single line + \ifboolexpr{test {\mdf@test@tb} or test {\mdf@test@t}}% + {\mdf@pstricksbox@ol{(mdf@P)(mdf@O|mdf@P)}}{} + \ifboolexpr{test {\mdf@test@lb} or test {\mdf@test@l}}% + {\mdf@pstricksbox@ol{(mdf@O)(mdf@O|mdf@P)}}{} + \ifboolexpr{test {\mdf@test@rb} or test {\mdf@test@r}}% + {\mdf@pstricksbox@ol{(mdf@P)(mdf@P|mdf@O)}}{} + %no line + \mdf@test@b{\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{}% + \mdf@test@noline{\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{}% + %Frametitlebackground + \drawbrackgroundframetitle@first + %output% + \rput[bl](mdf@A){\box\mdf@splitbox@two} + \end{pspicture} + }% + \mdf@makeboxalign@right% + }% + \fi +}% +\def\drawbrackgroundframetitle@first{% + \ifdefempty{\mdf@frametitle}{}{% + \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% + \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}% + }{}% + \ifdimgreater{\mdfboundingboxheight}{\mdfframetitleboxtotalheight} + {\nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}}% + {\nodexn{(mdf@O)}{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% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@two}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}% + \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax% + \psset{unit=1truecm}% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \ifdimgreater{\mdfboundingboxheight}{\vsize} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\vsize)} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight)} + \mdfpstricks@settings% + \psset{linearc=0pt,cornersize=absolut,}% + \expandafter\psset\expandafter{\mdf@psset@local}% + %%%% + \pnode(\mdf@innerleftmargin@length,\mdf@splitbottomskip@length){mdf@A} + \pnode(0,0){mdf@O} + \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} + \ifbool{mdf@leftline}% + {% + \nodexn{(mdf@A)+(\mdf@outerlinewidth@length,0) + +(\mdf@middlelinewidth@length,0) + +(\mdf@innerlinewidth@length,0)}{mdf@A} + \nodexn{(mdf@O)+(\mdf@outerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O} + }{}% + \ifbool{mdf@rightline}% + {% + \nodexn{(mdf@P)-(\mdf@outerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P} + }{}% + %% + \ifboolexpr{bool {mdf@leftline} and bool {mdf@rightline}}% + {\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)}}{}% + \ifboolexpr{bool {mdf@leftline} and not (bool {mdf@rightline})}% + {\mdf@pstricksbox@ol{(mdf@O)(mdf@O|mdf@P)}}{}% + \ifboolexpr{not (bool {mdf@leftline}) and bool {mdf@rightline}}% + {\mdf@pstricksbox@ol{(mdf@P)(mdf@P|mdf@O)}}{}% + \ifboolexpr{not (bool {mdf@leftline}) and not (bool {mdf@rightline})}% + {\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{}% + %Frametitlebackground + \drawbrackgroundframetitle@middle + %output% + \rput[bl](mdf@A){\box\mdf@splitbox@two} + \end{pspicture}% + }% + \mdf@makeboxalign@right% + }% + \fi +}% +\def\drawbrackgroundframetitle@middle{% + \ifdefempty{\mdf@frametitle}{}{% + \ifdimless{\mdfframetitleboxtotalheight}{\z@} + {}{% + \drawbrackgroundframetitle@@middle + \global\mdfframetitleboxtotalheight=-\p@\relax% + }% + }% +}% +\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}% + }{}% + \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% + \psline[style=mdfframetitlebackgroundstyle,linearc=\z@](mdf@O|mdf@F)(mdf@O|mdf@P) + (mdf@P)(mdf@P|mdf@F)% + \endgroup +} +\def\mdf@putbox@second{ + \ifvoid\mdf@splitbox@one + \else% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@one}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% + \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax% + \ifbool{mdf@bottomline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + \psset{unit=1truecm}% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight) + \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(0,0){mdf@O} + \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} + \ifbool{mdf@leftline}% + {% + \nodexn{(mdf@A)+(\mdf@outerlinewidth@length,0) + +(\mdf@middlelinewidth@length,0) + +(\mdf@innerlinewidth@length,0)}{mdf@A} + \nodexn{(mdf@O)+(\mdf@outerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O} + }{}% + \ifbool{mdf@rightline}% + {% + \nodexn{(mdf@P)-(\mdf@outerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P} + }{}% + \ifbool{mdf@bottomline}% + {% + \nodexn{(mdf@A)+(0,\mdf@outerlinewidth@length) + +(0,\mdf@middlelinewidth@length) + +(0,\mdf@innerlinewidth@length)}{mdf@A} + \nodexn{(mdf@O)+(0,\mdf@outerlinewidth@length) + +0.5(0,\mdf@middlelinewidth@length)}{mdf@O} + }{}% + %Four + Three + \ifboolexpr{test {\mdf@test@ltrb} or test {\mdf@test@lrb}}% + {\mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% + %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)}}{} + \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)}}{} + %Two not combinded + \ifboolexpr{test {\mdf@test@ltr} or test {\mdf@test@lr}}% + {\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)}}{}% + %one line + \ifboolexpr{test {\mdf@test@tb} or test {\mdf@test@b}}% + {\mdf@pstricksbox@ol{(mdf@O)(mdf@P|mdf@O)}}{} + \ifboolexpr{test {\mdf@test@lt} or test {\mdf@test@l}}% + {\mdf@pstricksbox@ol{(mdf@O)(mdf@O|mdf@P)}}{} + \ifboolexpr{test {\mdf@test@tr} or test {\mdf@test@r}}% + {\mdf@pstricksbox@ol{(mdf@P)(mdf@P|mdf@O)}}{} + %no line + \mdf@test@t{\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{}% + \mdf@test@noline{\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{}% + %Frametitlebackground + \drawbrackgroundframetitle@second + %output% + \rput[bl](mdf@A){\box\mdf@splitbox@one} + \end{pspicture}% + }% + \mdf@makeboxalign@right% + }% + \fi +}% +\def\drawbrackgroundframetitle@second{% + \ifdefempty{\mdf@frametitle}{}{% + \ifdimless{\mdfframetitleboxtotalheight}{\z@} + {}{% + \drawbrackgroundframetitle@@second + }% + }% +}% +\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}% + }{}% + \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% + \psline[style=mdfframetitlebackgroundstyle,linearc=\z@](mdf@O|mdf@F)(mdf@O|mdf@P) + (mdf@P)(mdf@P|mdf@F)% + \endgroup +} + \endinput diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf new file mode 100644 index 00000000000..3c58e3dd762 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf @@ -0,0 +1,597 @@ +%% Style file for mdframed for package option `framemethod=default` +%% +%% 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: mdframed.dtx 320 2012-01-09 18:44:33Z 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 320 2012-01-09 18:44:33Z 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 } +\let\ptTps\mdf@ptlength@to@pscode\relax +\let\ptTpsL\mdf@ptlength@to@pscode@length\relax +\def\mdfpstricks@settings{%expand by \addtopsstyle + \newpsstyle{mdfbackgroundstyle}% + {linecolor=\mdf@backgroundcolor,fillstyle=solid,% + fillcolor=\mdf@backgroundcolor,linestyle=none,% + ,dimen=middle,% + }% + \newpsstyle{mdfframetitlebackgroundstyle}{% + linecolor=\mdf@frametitlebackgroundcolor, + fillcolor=\mdf@frametitlebackgroundcolor, + fillstyle=solid,linestyle=none, + linearc=\ifdimgreater{\mdf@roundcorner@length% + -\mdf@innerlinewidth@length% + -.5\mdf@middlelinewidth@length} + {\z@}{\dimexpr\mdf@roundcorner@length% + -\mdf@innerlinewidth@length% + -.5\mdf@middlelinewidth@length}{\z@}, + } + \newpsstyle{mdfouterlinestyle}{linestyle=none}% + \ifdimgreater{\mdf@outerlinewidth@length}{\z@} + {\newpsstyle{mdfouterlinestyle}{% + linecolor=\mdf@outerlinecolor,% + 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, + dimen=middle, + }}{}% + \newpsstyle{mdfmiddlelinestyle}{linestyle=none}% + \ifdimgreater{\mdf@middlelinewidth@length}{\z@}% + {\newpsstyle{mdfmiddlelinestyle}{% + linewidth=\mdf@middlelinewidth@length,% + linecolor=\mdf@middlelinecolor,dimen=middle + }}{}% +\mdfpstricks@appendsettings +}% +\newrobustcmd*\mdf@pstricksbox@fl[2]{%four lines + \psframe[style=mdfouterlinestyle](#1)(#2)%aussen=3mm + \psframe[style=mdfbackgroundstyle](#1)(#2)%Hintergrund + \psclip{\psframe[style=mdfmiddlelinestyle](#1)(#2)} + \psframe[style=mdfinnerlinestyle](#1)(#2)%innere=3mm + \endpsclip + \psframe[style=mdfmiddlelinestyle](#1)(#2)%mittlere=2mm + }% +\newrobustcmd*\mdf@pstricksbox@tl[1]{%three lines + \psline[style=mdfouterlinestyle]#1%aussen=3mm + \psline[style=mdfbackgroundstyle]#1%Hintergrund + \psclip{\psline[style=mdfmiddlelinestyle]#1} + \psline[style=mdfinnerlinestyle]#1%innere=3mm + \endpsclip + \psline[style=mdfmiddlelinestyle]#1%mittlere=2mm + }% +\newrobustcmd*\mdf@pstricksbox@tcl[2]{%two combined lines +%%#1 background comple +%%#2 line path + \psline[style=mdfouterlinestyle]#2%aussen=3mm + \psline[style=mdfbackgroundstyle]#2%Hintergrund + \psclip{\pscustom[linestyle=none]{ + \psline[style=mdfmiddlelinestyle]#2 + \psline[linestyle=none,linearc=0pt]#1} + } + \psframe[style=mdfbackgroundstyle,linearc=0pt](mdf@O)(mdf@P)%Hintergrund + \psline[style=mdfinnerlinestyle]#2%innere=3mm + \endpsclip + \psline[style=mdfmiddlelinestyle]#2%mittlere=2mm +}% +\newrobustcmd*\mdf@pstricksbox@tncl[2]{%two not combined lines + \begingroup + \psset{linearc=0pt} + \psline[style=mdfouterlinestyle](mdf@O)#1%aussen=3mm + \psline[style=mdfouterlinestyle](mdf@P)#2%aussen=3mm + \psclip{ + \pscustom[linestyle=none]{% + \psline[style=mdfmiddlelinestyle](mdf@O)#1%mittlere=2mm + \psline[linestyle=none](mdf@O)#2 + \psline[style=mdfmiddlelinestyle](mdf@P)#2%mittlere=2mm + \psline[linestyle=none](mdf@P)#1 + }% + }% + \psframe[style=mdfbackgroundstyle,linearc=0pt](mdf@O)(mdf@P)%Hintergrund + \psline[style=mdfinnerlinestyle](mdf@O)#1%innere=3mm + \psline[style=mdfinnerlinestyle](mdf@P)#2%innere=3mm + \endpsclip + \psline[style=mdfmiddlelinestyle](mdf@O)#1%mittlere=2mm + \psline[style=mdfmiddlelinestyle](mdf@P)#2%mittlere=2mm + \endgroup +}% +\newrobustcmd*\mdf@pstricksbox@ol[1]{%one line + \begingroup + \psset{linearc=0pt} + \psline[style=mdfouterlinestyle]#1%aussen=3mm + \psline[style=mdfbackgroundstyle]#1%Hintergrund + \psclip{\pscustom[linestyle=none]{ + \psline[style=mdfmiddlelinestyle]#1 + \psframe[linestyle=none,fillstyle=none,dimen=inner](mdf@O)(mdf@P) + }} + \psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P) + \psline[style=mdfinnerlinestyle]#1%innere=3mm + \endpsclip + \psline[style=mdfmiddlelinestyle]#1%mittlere=2mm + \endgroup% +}% + +\newpsstyle{mdfframetitlerule}{% + linecolor=\mdf@frametitlerulecolor,% + fillcolor=\mdf@frametitlerulecolor,% + fillstyle=solid,dimen=outer,% +} +\def\mdf@@frametitlerule{% + \ifbool{mdf@frametitlerule}{% + \vbox{\hsize0pt + \par\unskip\vskip\mdf@frametitlebelowskip@length + \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}) + \end{pspicture} + \endgroup} + }% + }{} + \par\unskip\vskip\mdf@innertopmargin@length% +}% +\def\mdf@putbox@single{% + \ifvoid\mdf@splitbox@one + \else% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@one}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% + \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax% + \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax% + \ifbool{mdf@topline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@bottomline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdftotallinewidth{\dimexpr\mdf@innerlinewidth@length% + +\mdf@middlelinewidth@length + +\mdf@outerlinewidth@length\relax}% + \psset{unit=1truecm}% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight) + \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(0,0){mdf@O} + \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} + \ifbool{mdf@leftline}% + {% + \nodexn{(mdf@A)+(\mdf@outerlinewidth@length,0) + +(\mdf@middlelinewidth@length,0) + +(\mdf@innerlinewidth@length,0)}{mdf@A}% + \nodexn{(mdf@O)+(\mdf@outerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O}% + }{}% + \ifbool{mdf@rightline}% + {% + \nodexn{(mdf@P)-(\mdf@outerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P}% + }{}% + \ifbool{mdf@bottomline}% + {% + \nodexn{(mdf@A)+(0,\mdf@outerlinewidth@length) + +(0,\mdf@middlelinewidth@length) + +(0,\mdf@innerlinewidth@length)}{mdf@A}% + \nodexn{(mdf@O)+(0,\mdf@outerlinewidth@length) + +0.5(0,\mdf@middlelinewidth@length)}{mdf@O}% + }{}% + \ifbool{mdf@topline}% + {% + \nodexn{(mdf@P)-(0,\mdf@outerlinewidth@length) + -0.5(0,\mdf@middlelinewidth@length)}{mdf@P} + }{}% + %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)}}{}% + %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)}}{} + %two lines not combinded combinded + \mdf@test@lr{\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)} + }{} + \mdf@test@tb{\mdf@pstricksbox@tncl{(mdf@P|mdf@O)}{(mdf@O|mdf@P)} + }{} + %single line + \mdf@test@l{\mdf@pstricksbox@ol{(mdf@O)(mdf@O|mdf@P)}}{} + \mdf@test@r{\mdf@pstricksbox@ol{(mdf@P)(mdf@P|mdf@O)}}{} + \mdf@test@t{\mdf@pstricksbox@ol{(mdf@P)(mdf@O|mdf@P)}}{} + \mdf@test@b{\mdf@pstricksbox@ol{(mdf@O)(mdf@P|mdf@O)}}{} + %no line + \mdf@test@noline{\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{} + %Frametitlebackground + \drawbrackgroundframetitle@single + %output% + \rput[bl](mdf@A){\box\mdf@splitbox@one} + \end{pspicture}% + }% + \mdf@makeboxalign@right% + }% + \fi +}% +\def\drawbrackgroundframetitle@single{% + \ifdefempty{\mdf@frametitle}{}{% + \drawbrackgroundframetitle@@single% + }% +}% +\def\drawbrackgroundframetitle@@single{% + \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@first{% + \ifvoid\mdf@splitbox@two + \else% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + %\ifbool{mdf@leftline}{\hspace*{\mdf@middlelinewidth@length}}{}% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@two}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}% + \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax% + \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax% + \ifbool{mdf@topline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + \psset{linearc=\mdf@roundcorner@length,cornersize=absolute}% + \expandafter\psset\expandafter{\mdf@psset@local}% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \psset{unit=1truecm}% + \ifdimgreater{\mdfboundingboxheight}{\vsize} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\vsize)} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight)} + \mdfpstricks@settings% + \psset{linearc=\mdf@roundcorner@length,cornersize=absolut,}% + \expandafter\psset\expandafter{\mdf@psset@local}% + \pnode(\mdf@innerleftmargin@length,\mdf@splitbottomskip@length){mdf@A} + \pnode(0,0){mdf@O} + \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} + \ifbool{mdf@leftline}% + {% + \nodexn{(mdf@A)+(\mdf@outerlinewidth@length,0) + +(\mdf@middlelinewidth@length,0) + +(\mdf@innerlinewidth@length,0)}{mdf@A} + \nodexn{(mdf@O)+(\mdf@outerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O} + }{}% + \ifbool{mdf@rightline}% + {% + \nodexn{(mdf@P)-(\mdf@outerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P} + }{}% + \ifbool{mdf@topline}% + {% + \nodexn{(mdf@P)-(0,\mdf@outerlinewidth@length) + -0.5(0,\mdf@middlelinewidth@length)}{mdf@P} + }{}% + %Four or Three lines + \ifboolexpr{test {\mdf@test@ltrb} or test {\mdf@test@ltr}}% + {\mdf@pstricksbox@tl{(mdf@O)(mdf@O|mdf@P)(mdf@P)(mdf@P|mdf@O)}}% + {}% + %two combinded lines + \ifboolexpr{test {\mdf@test@ltb} or test {\mdf@test@lt}} + {\mdf@pstricksbox@tcl{(mdf@O)(mdf@P|mdf@O)(mdf@P)}% + {(mdf@O)(mdf@O|mdf@P)(mdf@P)}}{} + \ifboolexpr{test {\mdf@test@trb} or test {\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)}}{} + %two not combinded lines + \ifboolexpr{test {\mdf@test@lrb} or test {\mdf@test@lr}}% + {\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)}}{} + %single line + \ifboolexpr{test {\mdf@test@tb} or test {\mdf@test@t}}% + {\mdf@pstricksbox@ol{(mdf@P)(mdf@O|mdf@P)}}{} + \ifboolexpr{test {\mdf@test@lb} or test {\mdf@test@l}}% + {\mdf@pstricksbox@ol{(mdf@O)(mdf@O|mdf@P)}}{} + \ifboolexpr{test {\mdf@test@rb} or test {\mdf@test@r}}% + {\mdf@pstricksbox@ol{(mdf@P)(mdf@P|mdf@O)}}{} + %no line + \mdf@test@b{\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{}% + \mdf@test@noline{\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{}% + %Frametitlebackground + \drawbrackgroundframetitle@first + %output% + \rput[bl](mdf@A){\box\mdf@splitbox@two} + \end{pspicture} + }% + \mdf@makeboxalign@right% + }% + \fi +}% +\def\drawbrackgroundframetitle@first{% + \ifdefempty{\mdf@frametitle}{}{% + \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% + \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}% + }{}% + \ifdimgreater{\mdfboundingboxheight}{\mdfframetitleboxtotalheight} + {\nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}}% + {\nodexn{(mdf@O)}{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% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@two}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax}% + \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax% + \psset{unit=1truecm}% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \ifdimgreater{\mdfboundingboxheight}{\vsize} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\vsize)} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight)} + \mdfpstricks@settings% + \psset{linearc=0pt,cornersize=absolut,}% + \expandafter\psset\expandafter{\mdf@psset@local}% + %%%% + \pnode(\mdf@innerleftmargin@length,\mdf@splitbottomskip@length){mdf@A} + \pnode(0,0){mdf@O} + \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} + \ifbool{mdf@leftline}% + {% + \nodexn{(mdf@A)+(\mdf@outerlinewidth@length,0) + +(\mdf@middlelinewidth@length,0) + +(\mdf@innerlinewidth@length,0)}{mdf@A} + \nodexn{(mdf@O)+(\mdf@outerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O} + }{}% + \ifbool{mdf@rightline}% + {% + \nodexn{(mdf@P)-(\mdf@outerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P} + }{}% + %% + \ifboolexpr{bool {mdf@leftline} and bool {mdf@rightline}}% + {\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)}}{}% + \ifboolexpr{bool {mdf@leftline} and not (bool {mdf@rightline})}% + {\mdf@pstricksbox@ol{(mdf@O)(mdf@O|mdf@P)}}{}% + \ifboolexpr{not (bool {mdf@leftline}) and bool {mdf@rightline}}% + {\mdf@pstricksbox@ol{(mdf@P)(mdf@P|mdf@O)}}{}% + \ifboolexpr{not (bool {mdf@leftline}) and not (bool {mdf@rightline})}% + {\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{}% + %Frametitlebackground + \drawbrackgroundframetitle@middle + %output% + \rput[bl](mdf@A){\box\mdf@splitbox@two} + \end{pspicture}% + }% + \mdf@makeboxalign@right% + }% + \fi +}% +\def\drawbrackgroundframetitle@middle{% + \ifdefempty{\mdf@frametitle}{}{% + \ifdimless{\mdfframetitleboxtotalheight}{\z@} + {}{% + \drawbrackgroundframetitle@@middle + \global\mdfframetitleboxtotalheight=-\p@\relax% + }% + }% +}% +\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}% + }{}% + \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% + \psline[style=mdfframetitlebackgroundstyle,linearc=\z@](mdf@O|mdf@F)(mdf@O|mdf@P) + (mdf@P)(mdf@P|mdf@F)% + \endgroup +} +\def\mdf@putbox@second{ + \ifvoid\mdf@splitbox@one + \else% + \mdf@makebox@out{% + \mdf@makeboxalign@left% + \setlength\mdfboundingboxwidth{\wd\mdf@splitbox@one}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \ifbool{mdf@leftline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \ifbool{mdf@rightline}{% + \advance\mdfboundingboxwidth by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxwidth by \mdf@outerlinewidth@length\relax}{}% + \setlength\mdfboundingboxheight{\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% + \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax% + \ifbool{mdf@bottomline}{% + \advance\mdfboundingboxheight by \mdf@innerlinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax% + \advance\mdfboundingboxheight by \mdf@outerlinewidth@length\relax}{}% + \psset{unit=1truecm}% + \mdf@makebox@in[\mdfboundingboxwidth]{% + \null% + \begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight) + \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(0,0){mdf@O} + \pnode(\mdfboundingboxwidth,\mdfboundingboxheight){mdf@P} + \ifbool{mdf@leftline}% + {% + \nodexn{(mdf@A)+(\mdf@outerlinewidth@length,0) + +(\mdf@middlelinewidth@length,0) + +(\mdf@innerlinewidth@length,0)}{mdf@A} + \nodexn{(mdf@O)+(\mdf@outerlinewidth@length,0) + +0.5(\mdf@middlelinewidth@length,0)}{mdf@O} + }{}% + \ifbool{mdf@rightline}% + {% + \nodexn{(mdf@P)-(\mdf@outerlinewidth@length,0) + -0.5(\mdf@middlelinewidth@length,0)}{mdf@P} + }{}% + \ifbool{mdf@bottomline}% + {% + \nodexn{(mdf@A)+(0,\mdf@outerlinewidth@length) + +(0,\mdf@middlelinewidth@length) + +(0,\mdf@innerlinewidth@length)}{mdf@A} + \nodexn{(mdf@O)+(0,\mdf@outerlinewidth@length) + +0.5(0,\mdf@middlelinewidth@length)}{mdf@O} + }{}% + %Four + Three + \ifboolexpr{test {\mdf@test@ltrb} or test {\mdf@test@lrb}}% + {\mdf@pstricksbox@tl{(mdf@O|mdf@P)(mdf@O)(mdf@P|mdf@O)(mdf@P)}}{}% + %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)}}{} + \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)}}{} + %Two not combinded + \ifboolexpr{test {\mdf@test@ltr} or test {\mdf@test@lr}}% + {\mdf@pstricksbox@tncl{(mdf@O|mdf@P)}{(mdf@P|mdf@O)}}{}% + %one line + \ifboolexpr{test {\mdf@test@tb} or test {\mdf@test@b}}% + {\mdf@pstricksbox@ol{(mdf@O)(mdf@P|mdf@O)}}{} + \ifboolexpr{test {\mdf@test@lt} or test {\mdf@test@l}}% + {\mdf@pstricksbox@ol{(mdf@O)(mdf@O|mdf@P)}}{} + \ifboolexpr{test {\mdf@test@tr} or test {\mdf@test@r}}% + {\mdf@pstricksbox@ol{(mdf@P)(mdf@P|mdf@O)}}{} + %no line + \mdf@test@t{\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{}% + \mdf@test@noline{\psframe[style=mdfbackgroundstyle](mdf@O)(mdf@P)}{}% + %Frametitlebackground + \drawbrackgroundframetitle@second + %output% + \rput[bl](mdf@A){\box\mdf@splitbox@one} + \end{pspicture}% + }% + \mdf@makeboxalign@right% + }% + \fi +}% +\def\drawbrackgroundframetitle@second{% + \ifdefempty{\mdf@frametitle}{}{% + \ifdimless{\mdfframetitleboxtotalheight}{\z@} + {}{% + \drawbrackgroundframetitle@@second + }% + }% +}% +\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}% + }{}% + \nodexn{(mdf@P)-(0,\mdfframetitleboxtotalheight)}{mdf@F}% + \psline[style=mdfframetitlebackgroundstyle,linearc=\z@](mdf@O|mdf@F)(mdf@O|mdf@P) + (mdf@P)(mdf@P|mdf@F)% + \endgroup +} + \endinput diff --git a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty new file mode 100644 index 00000000000..0b54ecc3ea3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty @@ -0,0 +1,1168 @@ +%% +%% This is file `mdframed.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mdframed.dtx (with options: `package') +%% ---------------------------------------------------------------- +%% Working with the command fbox or fcolorbox, one has to +%% handle page breaks by hand. The present package defines the +%% environment mdframed which automatically deals with page breaks. +%% +%% Author's name: Marco Daniel and Elke Schubert (!new) +%% License type: lppl +%% +%% ================================================== +%% ========Is based on the idea of framed.sty======== +%% ================================================== +%% ===== Currently the package has a beta-Status ==== +%% ================================================== +%% WITH THANKS TO (alphabetically): +%% ROLF NIEPRASCHK +%% HEIKO OBERDIEK +%% HERBERT VOSS +%% +%% Copyright (c) 2010 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. +%% +%% +%% ================================================= +%% Erstellung eines Rahmens, der am Seitenende keine +%% horizontale Linie einfuegt +%% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +%% _______________ +%% | page 1 | +%% | Text | +%% | __Text__ | +%% | | Text | | +%% P A G E B R E A K +%% | | Text | | +%% | |_Text_| | +%% | Text | +%% |____page 2___| +%% +%% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +%% ================================================== +%% +\def\mdversion{v1.2a} +\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 320 2012-01-09 18:44:33Z marco $% + \mdversion: \mdframedpackagename] +\newcommand*\mdf@PackageWarning[1]{\PackageWarning{\mdframedpackagename}{#1}} +\newcommand*\mdf@PackageInfo[1]{\PackageInfo{\mdframedpackagename}{#1}} +\newcommand*\mdf@LoadFile@IfExist[1]{% + \IfFileExists{#1.sty}{% + \RequirePackage{#1}% + }{% + \mdf@PackageWarning{The file #1 does not exist\MessageBreak + but needed by \mdframedpackagename\MessageBreak + see documentation fo further information + }% + } +} +\RequirePackage{kvoptions} +\RequirePackage{xparse} +\RequirePackage{etoolbox}[2011/01/03] +\RequirePackage{zref-abspage} +\RequirePackage{color} +\SetupKeyvalOptions{family=mdf,prefix=mdf@} + +\newlength{\mdf@templength} +\def\mdf@iflength#1{% + \afterassignment\mdf@iflength@check% + \mdf@templength=#1\mdf@defaultunit\relax\relax + \expandafter\endgroup\next +} +\def\mdf@iflength@check#1{% + \begingroup + \ifx\relax#1\@empty + \def\next{\@secondoftwo} + \else + \def\next{\@firstoftwo} + \expandafter\mdf@iflength@cleanup + \fi +} +\def\mdf@iflength@cleanup#1\relax{} +\DeclareListParser*{\mdf@dolist}{,} +\newrobustcmd*{\mdf@option@length}[2]{% + \expandafter\newlength\csname mdf@#1@length\endcsname% + \expandafter\setlength\csname mdf@#1@length\endcsname{#2}% + } +\newrobustcmd*{\mdf@define@key@length}[1]{% + \define@key{mdf}{#1}{% + \def\@tempa{##1} + \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}% + }% +} +\def\mdf@do@lengthoption#1{% + \mdf@lengthoption@doubledo#1\@nil% +} +\def\mdf@lengthoption@doubledo#1==#2\@nil{% + \mdf@option@length{#1}{#2}% + \mdf@define@key@length{#1}% +} +\def\mdf@do@stringoption#1{% + \mdf@stringoption@doubledo#1\@nil% +} +\def\mdf@stringoption@doubledo#1==#2\@nil{% + \expandafter\gdef\csname mdf@#1\endcsname{#2}% + \define@key{mdf}{#1}{% + \csdef{mdf@#1}{##1}% + }% +} +\def\mdf@do@booloption#1{% + \mdf@booloption@doubledo#1\@nil% +} +\def\mdf@booloption@doubledo#1==#2\@nil{% + \newbool{mdf@#1}\setbool{mdf@#1}{#2}% + \define@key{mdf}{#1}[#2]{% + \setbool{mdf@#1}{##1}% + }% +} +\def\mdf@do@alignoption#1{% + \mdf@alignoption@tripledo#1\@nil% +} +\def\mdf@alignoption@tripledo#1==#2==#3\@nil{% + \csdef{mdf@align@#1@left}{\null\hspace*{#2}}% + \csdef{mdf@align@#1@right}{\hspace*{#3}\null}% +} +\newcounter{mdf@globalstyle@cnt} +\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% +} +\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}} + \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}% + }% + }% + }% + \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}% + \fi% +} +\mdf@dolist{\mdf@do@lengthoption}{% + {skipabove==\z@},% + {skipbelow==\z@},% + {leftmargin==\z@},% + {rightmargin==\z@},% + {innerleftmargin==10pt},% + {innerrightmargin==10pt},% + {innertopmargin==0.4\baselineskip},% + {innerbottommargin==0.4\baselineskip},% + {splittopskip==\z@},% + {splitbottomskip==\z@},% + {outermargin==\z@},% + {innermargin==\z@},% + {linewidth==0.4pt},% + {innerlinewidth==\z@},% + {middlelinewidth==\expandafter\mdf@linewidth@length},% + {outerlinewidth==\z@},% + {roundcorner==\z@},% + {footenotedistance==\medskipamount}, + {userdefinedwidth==\linewidth}, + {frametitleaboveskip==5pt}, + {frametitlebelowskip==5pt}, + {frametitlerulewidth==.2pt}, + {frametitleleftmargin==10pt},% + {frametitlerightmargin==10pt},% +} +\mdf@dolist{\mdf@do@stringoption}{% + {frametitle=={}},% + {defaultunit==pt},% + {linecolor==black},% + {backgroundcolor==white},% + {fontcolor==black},% + {frametitlefontcolor==black},% + {innerlinecolor==\mdf@linecolor},% + {outerlinecolor==\mdf@linecolor},% + {middlelinecolor==\mdf@linecolor},% + {psroundlinecolor==\mdf@backgroundcolor},% + {frametitlerulecolor==\mdf@linecolor}, + {frametitlebackgroundcolor==\mdf@backgroundcolor},% + {settings=={}},% + {frametitlesettings=={}},% + {font=={}},% + {frametitlefont==\normalfont\bfseries},% + {printheight==none},% + {alignment=={}},% + {frametitlealignment=={}},% + {theoremseparator=={:}},% + {theoremcountersep=={.}},% + {theoremtitlefont=={}},% + {theoremspace=={\space}},% +} +\mdf@dolist{\mdf@do@booloption}{% + {ntheorem==false},% + {topline==true},% + {leftline==true},% + {bottomline==true},% + {rightline==true},% + {frametitletopline==true},% + {frametitleleftline==true},% + {frametitlebottomline==true},% + {frametitlerightline==true},% + {hidealllines==false},% + {frametitlerule==false},% + {nobreak==false},% + {footnoteinside==true},% + {usetwoside==true},% + {repeatframetitle==false},%Noch nicht richtig implementiert +} +\mdf@dolist{\mdf@do@alignoption}{% + {left==\mdf@leftmargin@length==\z@},% + {center==\fill==\fill},% + {right==\fill==\mdf@rightmargin@length},% + {outer==\fill==\mdf@rightmargin@length},%not supported yet + {outer==\mdf@leftmargin@length==\fill},%not supported yet +} +\newcommand*\mdf@align{}% +\newcommand*\mdf@makeboxalign@left{\null\hspace*{\mdf@leftmargin@length}}% +\newcommand*\mdf@makeboxalign@right{}% +\define@key{mdf}{align}[left]{% + \ifcsundef{mdf@align@#1@left}{% + \mdf@PackageWarning{Unknown alignment #1\MessageBreak}% + \letcs\mdf@makeboxalign@left{mdf@align@left@left}% + \letcs\mdf@makeboxalign@right{mdf@align@left@right}% + }{% + \def\mdf@makeboxalign@left{\csuse{mdf@align@#1@left}}% + \def\mdf@makeboxalign@right{\csuse{mdf@align@#1@right}}% + }% +} +\def\mdf@tikzset@local{\tikzset{tikzsetting/.style={}}} +\define@key{mdf}{tikzsetting}{% + \def\mdf@tikzset@local{\tikzset{tikzsetting/.style={#1}}}% +} +\define@key{mdf}{apptotikzsetting}{% + \appto\mdf@tikzset@local{#1}% +} +\def\mdf@psset@local{} +\define@key{mdf}{pstrickssetting}{% + \def\mdf@psset@local{#1} +} +\def\mdfpstricks@appendsettings{} +\define@key{mdf}{pstricksappsetting}{% + \def\mdfpstricks@appendsettings{#1}% +} + +\def\mdf@xcolor{} +\define@key{mdf}{xcolor}[none]{% + \def\@tempa{#1}% + \@ifpackageloaded{xcolor}{% + \let\mdf@xcolor\@empty %ignoriere die Eingabe der Optionen + \def\@tempa{}% + }{}% + \ifx\relax\@tempa\relax\else + \PassOptionsToPackage{\mdf@xcolor}{xcolor}% + \RequirePackage{xcolor}% + \fi% +}% +\define@key{mdf}{needspace}[\z@]{% + \begingroup% + \setlength{\dimen@}{#1}% + \vskip\z@\@plus\dimen@% + \penalty -100\vskip\z@\@plus -\dimen@% + \vskip\dimen@% + \penalty 9999% + \vskip -\dimen@% + \vskip\z@skip % hide the previous |\vskip| from |\addvspace| + \endgroup% +} +\DeclareDefaultOption{% + \mdf@PackageWarning{Unknown Option '\CurrentOption' for mdframed}} +\ProcessKeyvalOptions*\relax +\newrobustcmd*{\mdfsetup}{\setkeys{mdf}} +\define@key{mdf}{style}{% + \ifcsundef{mdf@definestyle@#1}{% + \mdf@PackageWarning{Unknown definedstyle #1^^J + You have to define a style ^^J + via \string\mdfdefinedstyle\MessageBreak + }% + }% + {\expandafter\expandafter\expandafter\mdfsetup% + \expandafter\expandafter\expandafter{\csname mdf@definestyle@#1\endcsname}}% +}% +\let\mdf@PackageNoInfo\@gobble +\newrobustcmd*\mdf@ifstrequal@expand{% +\expandafter\ifstrequal\expandafter{\mdf@printheight}% +} +\newrobustcmd*\mdf@print@space{% + %case "none" + \mdf@ifstrequal@expand{none}{\def\mdf@tempa{NoInfo}}{% + %case "info" + \mdf@ifstrequal@expand{info}{\def\mdf@tempa{Info}}{% + %case "warning" + \mdf@ifstrequal@expand{warning}{\def\mdf@tempa{Warning}}{% + %case "unknown" + \mdf@PackageWarning{Unknown key for printheight=\mdf@printheight^^J + use none, info or warning}% + \def\mdf@tempa{none}% + }% + }% + }% +\def\mdf@PackageInfoSpace{\csname mdf@Package\mdf@tempa\endcsname}% +} +\newsavebox\mdf@frametitlebox +\newsavebox\mdf@footnotebox +\newsavebox\mdf@splitbox@one +\newsavebox\mdf@splitbox@two +\newlength\mdfsplitboxwidth +\newlength\mdfsplitboxtotalwidth +\newlength\mdfsplitboxheight +\newlength\mdfsplitboxdepth +\newlength\mdfsplitboxtotalheight +\newlength\mdfframetitleboxwidth +\newlength\mdfframetitleboxtotalwidth +\newlength\mdfframetitleboxheight +\newlength\mdfframetitleboxdepth +\newlength\mdfframetitleboxtotalheight +\newlength\mdffootnoteboxwidth +\newlength\mdffootnoteboxtotalwidth +\newlength\mdffootnoteboxheight +\newlength\mdffootnoteboxdepth +\newlength\mdffootnoteboxtotalheight + +\newlength\mdftotallinewidth + +\newlength\mdfboundingboxwidth +\newlength\mdfboundingboxtotalwidth + +\newlength\mdfboundingboxheight +\newlength\mdfboundingboxdepth +\newlength\mdfboundingboxtotalheight + +\newlength\mdf@freevspace@length +\newlength\mdf@horizontalwidthofbox@length +\newlength\mdf@verticalmarginwhole@length + +\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 + \begingroup + \mdf@horizontalmargin@equation% + \color@setgroup% + \hsize=\mdf@horizontalspaceofbox% + \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 + \parfillskip\@flushglue \lineskip\normallineskip% + \baselineskip\normalbaselineskip% + \everypar{\mdf@restoreparams}\ignorespaces% +} + +\def\endmdf@lrbox{\endgroup\unskip\color@endgroup\egroup} + +\newrobustcmd*\mdf@ignorevbadness{% + \edef\mdf@currentvbadness{\the\vbadness}% + \vbadness=\@M% + \afterassignment\mdf@restorevbadness} +\newrobustcmd*\mdf@restorevbadness{\vbadness=\mdf@currentvbadness\relax} +\@ifpackageloaded{amsthm}{% + \newrobustcmd\mdf@patchamsthm{% + \let\mdf@deferred@thm@head\deferred@thm@head + \patchcmd{\deferred@thm@head}{\indent}{}{}{} + }% + }{\let\mdf@patchamsthm\relax}% +\def\mdf@trivlist#1{% + \setlength{\topsep}{#1}% + \partopsep\z@% + \parsep\z@% + \@nmbrlistfalse% + \@trivlist% + \labelwidth\z@% + \leftmargin\z@% + \itemindent\z@% + \let\@itemlabel\@empty% + \def\makelabel##1{##1}% + \item\leavevmode\hrule \@height\z@ \@width\linewidth\relax% +%% \item\mbox{}\relax% second version +%% \item\relax% first Version +} +\let\endmdf@trivlist\endtrivlist +\patchcmd\endmdf@trivlist\@endparenv\mdf@endparenv{}{} +\def\mdf@endparenv{% + \addpenalty\@endparpenalty\addvspace\mdf@skipbelow@length\@endpetrue} + +\newrobustcmd*\mdf@makebox@out[2][\linewidth]{% + \noindent\hb@xt@\z@{% + \noindent\makebox[\dimexpr #1\relax][l]{#2}% + \hss}% +}% +\newrobustcmd*\mdf@makebox@in[2][\mdf@userdefinedwidth@length]{% + \noindent\makebox[\dimexpr #1\relax][l]{#2}% +} +\newrobustcmd*\mdfdefinestyle[2]{% + \csdef{mdf@definestyle@#1}{#2}% +} +\newrobustcmd*\mdfapptodefinestyle[2]{% + \ifcsundef{mdf@definestyle@#1}% + {\mdf@PackageWarning{Unknown style #1}}% + {\csappto{mdf@definestyle@#1}{,#2}}% +} +\newrobustcmd*{\mdflength}[1]{\csuse{mdf@#1@length}} + +\newrobustcmd*{\surroundwithmdframed}[2][]{% + \BeforeBeginEnvironment{#2}{\begin{mdframed}[#1]}% + \AfterEndEnvironment{#2}{\end{mdframed}}% +} +\newrobustcmd*\newmdenv[2][]{% + \newenvironment{#2}{% + \mdfsetup{#1}% + \begin{mdframed}% + }{% + \end{mdframed}% + }% +} +\newrobustcmd*\renewmdenv[2][]{% + \expandafter\let\csname #2\endcsname\relax% + \expandafter\let\csname end#2\endcsname\relax% + \newmdenv[#1]{#2}% + }% + +\DeclareDocumentCommand\newmdtheoremenv{O{} m o m o }{% + \ifboolexpr{ test {\IfNoValueTF {#3}} and test {\IfNoValueTF {#5}} }% + {\newtheorem{#2}{#4}}{% + \IfValueTF{#3}{\newtheorem{#2}[#3]{#4}}{}% + \IfValueTF{#5}{\newtheorem{#2}{#4}[#5]}{}% + }% + \BeforeBeginEnvironment{#2}{% + \begin{mdframed}[#1]}% + \AfterEndEnvironment{#2}{% + \end{mdframed}}% +} + +\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} + {%#3+#5 not given + \@definecounter{#2}% + \expandafter\xdef\csname the#2\endcsname{\@thmcounter{#2}} + \newenvironment{#2}[1][]{% + \refstepcounter{#2} + \ifstrempty{##1}% + {\let\@temptitle\relax}% + {% + \def\@temptitle{\mdf@theoremseparator% + \mdf@theoremspace% + \mdf@theoremtitlefont% + ##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}} + \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{% + \expandafter\noexpand\csname the#5\endcsname \@thmcountersep + \@thmcounter{#2}}% + \newenvironment{#2}[1][]{% + \refstepcounter{#2} + \ifstrempty{##1}% + {\let\@temptitle\relax}% + {% + \def\@temptitle{\mdf@theoremseparator% + \mdf@theoremspace% + \mdf@theoremtitlefont% + ##1}% + } + \begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname\@temptitle}]}% + {\end{mdframed}}% + \newenvironment{#2*}[1][]{% + \ifstrempty{##1}% + {\let\@temptitle\relax}% + {% + \def\@temptitle{\mdf@theoremseparator% + \mdf@theoremspace% + \mdf@theoremtitlefont% + ##1}% + } + \begin{mdframed}[#1,frametitle={\strut#4\@temptitle}]}% + {\end{mdframed}}% + }% + }% + {%#3 given -- number relationship + \global\@namedef{the#2}{\@nameuse{the#3}}% + \newenvironment{#2}[1][]{% + \refstepcounter{#3} + \ifstrempty{##1}% + {\let\@temptitle\relax}% + {% + \def\@temptitle{\mdf@theoremseparator% + \mdf@theoremspace% + \mdf@theoremtitlefont% + ##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}} + \begin{mdframed}[#1,frametitle={\strut#4\@temptitle}]}% + {\end{mdframed}}% + }% + }% + } + +\newrobustcmd\mdfframedtitleenv[1]{% + \begingroup% + \color@setgroup% + \mdf@frametitlefont\color{\mdf@frametitlefontcolor}% + \mdf@lrbox{\mdf@frametitlebox}% + \mdf@frametitlealignment% + #1\par\unskip + \endmdf@lrbox% + \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% + \endgroup% +} + +\newrobustcmd*\mdf@@frametitle{% + \mdfframedtitleenv{\mdf@frametitle}% +} + +\newrobustcmd*\mdf@@frametitle@use{% + \begingroup + \parskip\z@ + \parindent\z@ + \offinterlineskip + \mdf@ignorevbadness% + \global\setbox\mdf@splitbox@one\vbox{% + \unvcopy\mdf@frametitlebox% + \mdf@@frametitlerule% + \unvbox\mdf@splitbox@one + }% + \mdf@ignorevbadness% + \global\setbox\mdf@splitbox@one\vbox{% + \unvbox\mdf@splitbox@one}% + \endgroup + \mdfsetup{innertopmargin=\mdf@frametitleaboveskip@length}% +} + +\newrobustcmd*\mdf@checkntheorem{% + \ifbool{mdf@ntheorem}% + {\ifundef{\theorempreskipamount}% + {\mdf@PackageWarning{You have not loaded ntheorem yet}}% + {\setlength{\theorempreskipamount}{\z@}% + \setlength{\theorempostskipamount}{\z@}% + }% + }{}% +} +\newrobustcmd*\mdf@footnoterule{% + \kern0\p@% + \hrule \@width 1in \kern 2.6\p@} +\newrobustcmd*\mdf@footnoteoutput{% + \ifvoid\@mpfootins\else + \nobreak% + \vskip\mdf@footenotedistance@length% + \normalcolor% + \mdf@footnoterule + \unvbox\@mpfootins + \fi% +} +\newrobustcmd*\mdf@footnoteinput{% + \def\@mpfn{mpfootnote}% + \def\thempfn{\thempfootnote}% + \c@mpfootnote\z@% + \let\@footnotetext\@mpfootnotetext% +} +\newrobustcmd*\mdf@load@style{% +\ifcase\value{mdf@globalstyle@cnt}\relax% + \input{md-frame-0.mdf}% + \or\input{md-frame-1.mdf}% + \or\input{md-frame-2.mdf}% + \or\input{md-frame-3.mdf}% + \else% + \IfFileExists{md-frame-\value{mdf@globalstyle@cnt}.mdf}% + {\input{md-frame-\value{mdf@globalstyle@cnt}.mdf}}% + {% + \input{md-frame-0.mdf}% + \mdf@PackageWarning{The style number \value{mdf@globalstyle@cnt} does not exist^^J + mdframed ues instead style=0 \mdframedpackagename}% + }% +\fi% +}% +\mdf@load@style + +\newrobustcmd*\mdf@styledefinition{%AVOID!!! + \ifnumequal{\value{mdf@globalstyle@cnt}}{0}% + {\deflength{\mdf@innerlinewidth@length}{\z@}% + \deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}% + \deflength{\mdf@outerlinewidth@length}{\z@}% + \let\mdf@innerlinecolor\mdf@linecolor% + \let\mdf@middlelinecolor\mdf@linecolor% + \let\mdf@outerlinecolor\mdf@linecolor% + }{}% +} +\let\mdf@reserved@a\@empty +\newrobustcmd*\detected@mdf@put@frame{% + \ifmdf@nobreak%Option nobreak=true? + \def\mdf@reserved@a{\mdf@put@frame@standalone}% + \else + \def\mdf@reserved@a{\mdf@put@frame}% + \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}% + \def\mdf@reserved@a{\mdf@put@frame@standalone}% + \fi% + \ifinner% + \mdf@PackageInfo{mdframed inside a box ^^J + mdframed uses option nobreak \mdframedpackagename}% + \def\mdf@reserved@a{\mdf@put@frame@standalone}% + \fi% + \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][]{% +\begingroup% +\color@setgroup% + \mdfsetup{userdefinedwidth=\linewidth,#1}% + \mdf@hidealllines@check% + \mdf@twoside@checklength% + \let\width\z@% + \let\height\z@% + \mdf@checkntheorem% + \mdf@styledefinition% + \mdf@footnoteinput% + \color{\mdf@fontcolor}% + \ifvmode\nointerlineskip\fi% + \mdf@trivlist{\mdf@skipabove@length}%% + \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle}% + \mdf@settings% + \mdf@lrbox{\mdf@splitbox@one}% + }% + {\par\unskip% + \ifmdf@footnoteinside% + \def\mdf@reserveda{% + \mdf@footnoteoutput% + \endmdf@lrbox% + \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle@use} + \detected@mdf@put@frame}% + \else% + \def\mdf@reserveda{% + \endmdf@lrbox% + \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle@use} + \detected@mdf@put@frame% + \mdf@footnoteoutput% + }% + \fi% + \mdf@reserveda% + \endmdf@trivlist% +\color@endgroup\endgroup\@doendpe%\@endparenv% +} + +\newtoggle{md:checktwoside} +\settoggle{md:checktwoside}{false} +\newrobustcmd*\mdf@twoside@checklength{% + \if@twoside + \ifbool{mdf@usetwoside}% + {\mdf@PackageInfo{mdframed works in twoside mode}% + \settoggle{md:checktwoside}{true}% + \setlength\mdf@rightmargin@length{\mdf@outermargin@length}% + \setlength\mdf@leftmargin@length{\mdf@innermargin@length}% + }% + {\mdf@PackageInfo{mdframed inside twoside mode but\MessageBreak + works with oneside mode}% + \settoggle{md:checktwoside}{false}% + }% + \fi% +} + +\newcounter{mdf@zref@counter}%keine doppelten laebes +\zref@newprop*{mdf@pagevalue}[0]{\number\value{page}} +\zref@addprop{\ZREF@mainlist}{mdf@pagevalue} +\newrobustcmd*\mdf@zref@label{% + \stepcounter{mdf@zref@counter} + \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% +} +\newrobustcmd*\mdf@@setzref{% + \iftoggle{md:checktwoside}{\mdf@zref@label\if@mdf@pageodd}{}% +} +\newrobustcmd*\mdf@freepagevspace{% + \penalty\@M \vskip 2\baselineskip \vskip\height + \penalty9999 \vskip -2\baselineskip \vskip-\height + \penalty9999 + \ifdimequal{\pagegoal}{\maxdimen}% + {\mdf@freevspace@length\vsize}% + {\mdf@freevspace@length=\pagegoal\relax% + \advance\mdf@freevspace@length by -\pagetotal\relax% + \addtolength\mdf@freevspace@length{\dimexpr-\parskip\relax}\relax% + }% +} +\newrobustcmd*\mdf@advancelength@horizontalmargin@sub[1]{% + \advance\mdf@horizontalspaceofbox by -\csname mdf@#1@length\endcsname\relax% +} +\newlength\mdf@horizontalspaceofbox +\newrobustcmd*\mdf@horizontalmargin@equation{% + \setlength{\mdf@horizontalspaceofbox}{\mdf@userdefinedwidth@length}% + \mdf@dolist{\mdf@advancelength@horizontalmargin@sub}{% + leftmargin,outerlinewidth,middlelinewidth,% + innerlinewidth,innerleftmargin,innerrightmargin,% + innerlinewidth,middlelinewidth,outerlinewidth,% + rightmargin}% + \notbool{mdf@leftline}{% + \advance\mdf@horizontalspaceofbox by \mdf@innerlinewidth@length\relax% + \advance\mdf@horizontalspaceofbox by \mdf@middlelinewidth@length\relax% + \advance\mdf@horizontalspaceofbox by \mdf@outerlinewidth@length\relax% + }{}% + \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}}{} + \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@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% + }{}% +} +\newrobustcmd*\mdf@advancelength@verticalmarginwhole[1]{% + \advance\mdf@verticalmarginwhole@length by \csname mdf@#1@length\endcsname\relax% +} +\newrobustcmd*\mdf@advancelength@freevspace@sub[1]{% + \advance\dimen@ by -\csname mdf@#1@length\endcsname\relax% +} +\newrobustcmd*\mdf@advancelength@freevspace@add[1]{% + \advance\dimen@ by \csname mdf@#1@length\endcsname\relax% +} +\protected@edef\mdf@reset{\boxmaxdepth\the\boxmaxdepth + \splittopskip\the\splittopskip}% +\newrobustcmd*\mdf@put@frame@standalone{\relax% + \ifvoid\mdf@splitbox@one\relax + \mdf@PackageWarning{The environment is empty\MessageBreak}% + \let\mdf@reserved@a\relax% + \else + %Hier berechnung Box-Inhalt+Rahmen oben und unten + \setlength{\mdf@verticalmarginwhole@length}% + {\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}% + \mdf@dolist{\mdf@advancelength@verticalmarginwhole}{% + outerlinewidth,middlelinewidth,innerlinewidth,innertopmargin, + innerbottommargin,innerlinewidth,middlelinewidth,outerlinewidth}% + \mdf@keeplines@single% + \def\mdf@reserved@a{\mdf@putbox@single}% + \fi + \mdf@reserved@a% +} +\def\mdf@put@frame{\relax% +\ifvoid\mdf@splitbox@one\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 + }% +\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 + \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% + \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@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 + you have to change it manually\MessageBreak + by changing the text, the space\MessageBreak + or something else}% + \advance\dimen@ by -1.8\baselineskip\relax% + }{}% + \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}% + \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% + %benoetigt um Tiefe zu haben + \hrule \@height\dp\strutbox \@width\z@ + \unvbox\mdf@splitbox@one}% + \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 + \hrule \@height\z@ \@width\hsize + \vfill\eject% + \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} + \def\mdf@reserved@a{\mdf@put@frame}% + }% + {% + \begingroup% + \mdf@@setzref + \mdf@putbox@first%%%Groesse des Splittens passt + \endgroup% + \hrule \@height\z@ \@width\hsize% + \vfill\eject% + \def\mdf@reserved@a{\mdf@put@frame@ii}% + }% + \fi% + }% +\mdf@reserved@a% +} +\def\mdf@put@frame@ii{%Ausgabe der mittleren Box(en) wenn vorhanden + \setlength{\mdf@freevspace@length}{\vsize}% + \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@bottomline}{}{% + \advance\dimen@i by \mdf@innerlinewidth@length% + \advance\dimen@i by \mdf@middlelinewidth@length% + \advance\dimen@i by \mdf@outerlinewidth@length% + \relax}% + \ifdimgreater{\dimen@}{\mdf@freevspace@length}% + {% + \advance\mdf@freevspace@length by -\mdf@splitbottomskip@length\relax% + \ifbool{mdf@bottomline}{}{% + \advance\dimen@i by -\mdf@innerlinewidth@length% + \advance\dimen@i by -\mdf@middlelinewidth@length% + \advance\dimen@i 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 + \def\mdf@reserved@a{\mdf@put@frame@ii}% + \fi + }%Hier die Ausgabe der mittleren Box + {\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}% + \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}% + }{}% + \begingroup% + \mdf@@setzref + \mdf@putbox@second% + \hrule \@height\z@ \@width\hsize% + \endgroup% + \let\mdf@reserved@a\relax% + }%Hier kommt die Ausgabe der letzten Box + \mdf@reserved@a% +} + +%%%% _____t_____ +%%%% | | +%%%% | | +%%%% | | +%%%% l| |r +%%%% | | +%%%% | | +%%%% |___________| +%%%% b +%%Zusammenhaenge abfragen: +\newrobustcmd*\mdf@test@ltrb{% + \ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline}) + 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})}} +\newrobustcmd*\mdf@test@ltb{% + \ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline}) + 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})}} +\newrobustcmd*\mdf@test@lrb{% + \ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline}) + 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})}} +\newrobustcmd*\mdf@test@rb{% + \ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline}) + 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})}} +\newrobustcmd*\mdf@test@lt{% + \ifboolexpr{ (bool {mdf@topline}) and not (bool {mdf@bottomline}) + 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})}} +\newrobustcmd*\mdf@test@tb{% + \ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline}) + 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})}} +\newrobustcmd*\mdf@test@r{% + \ifboolexpr{ not (bool {mdf@topline}) and not (bool {mdf@bottomline}) + 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})}} +\newrobustcmd*\mdf@test@b{% + \ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline}) + 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})}} +\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} ) }} +\DisableKeyvalOption[action=warning,package=mdframed]{mdf}{framemethod}% +\DisableKeyvalOption[action=warning,package=mdframed]{mdf}{xcolor}% + + \endinput +%% +%% ================================================================ +%% Copyright (C) 2011 by Marco Daniel +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License (LPPL), either +%% version 1.3c of this license or (at your option) any later +%% version. The latest version of this license is in the file: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% This work is "maintained" (as per LPPL maintenance status) by +%% Marco Daniel. +%% +%% Have fun! +%% +%% ================================================================ +%% +%% End of file `mdframed.sty'. |