summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-15 00:31:03 +0000
committerKarl Berry <karl@freefriends.org>2010-05-15 00:31:03 +0000
commitba6f6aafcb4858fa31ba8d9b61295f3be050d2bb (patch)
tree7f6bc84f64246ebf6e4fed34eb4967509563d8c9 /Master
parentdf96c8184d3c5802e048d2d8538717a98230c929 (diff)
mdframed 0.4 (14may10)
git-svn-id: svn://tug.org/texlive/trunk@18268 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/README12
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/md-tikz-0.mdf203
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/md-tikz-1.mdf143
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdfbin619095 -> 621489 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/mdframed-doc.tex139
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/mdframed.sty437
6 files changed, 664 insertions, 270 deletions
diff --git a/Master/texmf-dist/doc/latex/mdframed/README b/Master/texmf-dist/doc/latex/mdframed/README
index 0132110165a..ddf0979dab2 100644
--- a/Master/texmf-dist/doc/latex/mdframed/README
+++ b/Master/texmf-dist/doc/latex/mdframed/README
@@ -2,14 +2,22 @@ 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
+Author's name: Marco Daniel and Elke Schubert (!new)
License type: lppl
+changes in version 0.4:
+- second author Elke Schubert
+- fixes some bugs
+ - calculation of the page dimen
+- using tikz for the frame with different styles
+
+
+------------------------------------------------
changes in version 0.3b:
- fixes some bugs -- thanks to Dr. Dietrich Grau
- added new options: ntheorem
-
+------------------------------------------------
changes in version 0.3a:
- added new options: leftmargin and rightmargin
- fixes some bugs
diff --git a/Master/texmf-dist/doc/latex/mdframed/md-tikz-0.mdf b/Master/texmf-dist/doc/latex/mdframed/md-tikz-0.mdf
new file mode 100644
index 00000000000..7fe8a26fd0d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mdframed/md-tikz-0.mdf
@@ -0,0 +1,203 @@
+%%==================================================%%
+%%= Ausgabe der Box nach Vorgabe der Ausgaberoutine=%%
+%%==================================================%%
+%% Styledatei fuer das Paket mdframed erstellt durch
+%% Marco Daniel und Elke Schubert
+%%
+%% 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.
+
+\let\md@textwidth\textwidth
+
+
+%%=single=%%
+\def\md@frame@background@single{%
+ \rlap{\color{\mdf@backgroundcolor}%
+ \setlength{\fp@putboxa@length@md}{\ht\@tempboxa}%
+ \addtolength{\fp@putboxa@length@md}{0.8\baselineskip}%
+ %\addtolength{\fp@putboxa@length@md}{\mdf@linewidth}%
+ \rule[-0.4\baselineskip]%
+ {\md@textwidth-\mdf@leftmargin-\mdf@rightmargin-\mdf@linewidth-\mdf@linewidth}%
+ {\fp@putboxa@length@md}%
+ }%
+}%
+
+\def\md@frame@leftandbottomline@single{%
+ \setlength{\fp@putboxa@length@md}{\ht\@tempboxa}%
+ \addtolength{\fp@putboxa@length@md}{0.4\baselineskip}%
+ %\addtolength{\fp@putboxa@length@md}{\mdf@linewidth}%
+ \rlap{\color{\mdf@linecolor}\vrule width \mdf@linewidth%
+ height \fp@putboxa@length@md%
+ depth 0.4\baselineskip}%
+ \rlap{\color{\mdf@linecolor}\rule[-0.4\baselineskip-\mdf@linewidth]%
+ {\md@textwidth-\mdf@leftmargin-\mdf@rightmargin}{\mdf@linewidth}%
+ }%
+}%
+
+\def\md@frame@topandrightline@single{%
+ \llap{\color{\mdf@linecolor}\vrule width \mdf@linewidth%
+ height \fp@putboxa@length@md%
+ depth 0.4\baselineskip}%
+ \llap{\color{\mdf@linecolor}\rule[\fp@putboxa@length@md]%
+ {\md@textwidth-\mdf@leftmargin-\mdf@rightmargin}{\mdf@linewidth}}%
+}%
+
+
+\def\md@putbox@single{%%%%% Ausgabe der ungesplitteten Gesamtbox
+ \ifvoid\@tempboxa
+ \else
+ \leftline{%
+ \null\hspace*{\mdf@leftmargin}%
+ \md@frame@leftandbottomline@single%
+ \hspace*{\mdf@linewidth}%
+ \md@frame@background@single%
+ \hspace*{\mdf@margin}%
+ {\box\@tempboxa}%
+ \hspace*{\mdf@margin}%
+ \hspace*{\mdf@linewidth}%
+ \md@frame@topandrightline@single%
+ }%
+ \fi
+}
+
+
+%%=first=%%
+
+\def\md@frame@background@first{%
+ \rlap{\color{\mdf@backgroundcolor}%
+ \setlength{\fp@putboxa@length@md}{\ht\tw@}%
+ \addtolength{\fp@putboxa@length@md}{.8\baselineskip}%
+ % \addtolength{\fp@putboxa@length@md}{\mdf@linewidth}%
+ \rule[-0.4\baselineskip]{\md@textwidth-\mdf@leftmargin-\mdf@rightmargin-\mdf@linewidth-\mdf@linewidth}%
+ {\fp@putboxa@length@md}%
+ }%
+}%
+
+\def\md@frame@topandleftline@first{%
+ \setlength{\fp@putboxa@length@md}{\ht\tw@}%
+ \addtolength{\fp@putboxa@length@md}{0.4\baselineskip}%
+ \addtolength{\fp@putboxa@length@md}{\mdf@linewidth}%
+ % \addtolength{\fp@putboxa@length@md}{\mdf@linewidth}%
+ \rlap{\color{\mdf@linecolor} \vrule width \mdf@linewidth%
+ height \fp@putboxa@length@md%
+ depth 0.4\baselineskip%
+ }%
+ \rlap{\color{\mdf@linecolor}\rule[\fp@putboxa@length@md-\mdf@linewidth]{\md@textwidth-\mdf@leftmargin-\mdf@rightmargin}%
+ {\mdf@linewidth}%
+ }%
+}%
+
+\def\md@frame@rightline@first{%
+ \llap{\color{\mdf@linecolor}\vrule width \mdf@linewidth%
+ height \fp@putboxa@length@md%
+ depth 0.4\baselineskip%
+ }%
+}%
+
+
+
+\def\md@putbox@first{%%%% Ausgabe der Teilbox 1
+ \leftline{%
+ \null\hspace*{\mdf@leftmargin}%
+ \md@frame@topandleftline@first%
+ \hspace*{\mdf@linewidth}%
+ \md@frame@background@first%
+ \hspace*{\mdf@margin}%
+ {\box\tw@}%
+ \hspace*{\mdf@margin}%
+ \hspace*{\mdf@linewidth}%
+ \md@frame@rightline@first%
+ }%
+}
+
+%%=second=%%
+
+\def\md@frame@background@second{%
+ \rlap{\color{\mdf@backgroundcolor}%
+ \setlength{\fp@putboxa@length@md}{\ht\@tempboxa}%
+ \addtolength{\fp@putboxa@length@md}{\baselineskip}%
+ \rule[-0.5\baselineskip]{\md@textwidth-\mdf@leftmargin-\mdf@rightmargin-\mdf@linewidth-\mdf@linewidth}%
+ {\fp@putboxa@length@md}%
+ }%
+}%
+
+\def\md@frame@leftandbottomline@second{%
+ \setlength{\fp@putboxa@length@md}{\ht\@tempboxa}%
+ \addtolength{\fp@putboxa@length@md}{0.5\baselineskip}% %Linienueberschuss auf zweiter Seite -- derzeit 0pt
+ \rlap{\color{\mdf@linecolor}\vrule width \mdf@linewidth%
+ height \fp@putboxa@length@md%
+ depth 0.5\baselineskip%
+ }%
+ \rlap{\color{\mdf@linecolor}\rule[-0.5\baselineskip-\mdf@linewidth]%
+ {\md@textwidth-\mdf@leftmargin-\mdf@rightmargin}%
+ {\mdf@linewidth}}%
+}%
+
+\def\md@frame@rightline@second{%
+ \llap{\color{\mdf@linecolor}\vrule width \mdf@linewidth%
+ height \fp@putboxa@length@md%
+ depth 0.5\baselineskip}%
+}%
+
+\def\md@putbox@second{%%%%% Ausgabe der mittleren Teilbox
+ \ifvoid\@tempboxa%
+ \else
+ \leftline{%
+ \null\hspace*{\mdf@leftmargin}%
+ \md@frame@leftandbottomline@second%
+ \hspace*{\mdf@linewidth}%
+ \md@frame@background@second%
+ \hspace*{\mdf@margin}%
+ {\box\@tempboxa}%
+ \hspace*{\mdf@margin}%
+ \hspace*{\mdf@linewidth}%
+ \md@frame@rightline@second%
+ }%
+ \fi%
+}%
+
+
+%%=middle=%%
+
+\def\md@frame@background@middle{%
+ \rlap{\color{\mdf@backgroundcolor}%
+ \setlength{\fp@putboxa@length@md}{\ht\tw@}%
+ \addtolength{\fp@putboxa@length@md}{0.9\baselineskip}%
+ %\addtolength{\fp@putboxa@length@md}{\mdf@linewidth}%
+ \rule[-0.4\baselineskip]{\md@textwidth-\mdf@leftmargin-\mdf@rightmargin-\mdf@linewidth-\mdf@linewidth}%
+ {\fp@putboxa@length@md}%
+ }%
+}%
+
+\def\md@frame@leftline@middle{%
+ \setlength{\fp@putboxa@length@md}{\ht\tw@}%
+ \addtolength{\fp@putboxa@length@md}{0.5\baselineskip}%
+ \rlap{\color{\mdf@linecolor} \vrule width \mdf@linewidth%
+ height \fp@putboxa@length@md%
+ depth 0.4\baselineskip%
+ }%
+}%
+
+\def\md@frame@rightline@middle{%
+ \llap{\color{\mdf@linecolor}\vrule width \mdf@linewidth%
+ height \fp@putboxa@length@md%
+ depth 0.4\baselineskip%
+ }%
+}%
+
+
+
+\def\md@putbox@middle{%%%% Ausgabe der Teilbox 1
+ \leftline{%
+ \null\hspace*{\mdf@leftmargin}%
+ \md@frame@leftline@middle%
+ \hspace*{\mdf@linewidth}%
+ \md@frame@background@middle%
+ \hspace*{\mdf@margin}%
+ {\box\tw@}%
+ \hspace*{\mdf@margin}%
+ \hspace*{\mdf@linewidth}%
+ \md@frame@rightline@middle%
+ }%
+}
diff --git a/Master/texmf-dist/doc/latex/mdframed/md-tikz-1.mdf b/Master/texmf-dist/doc/latex/mdframed/md-tikz-1.mdf
new file mode 100644
index 00000000000..4247334edaa
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mdframed/md-tikz-1.mdf
@@ -0,0 +1,143 @@
+%%==================================================%%
+%%= Ausgabe der Box nach Vorgabe der Ausgaberoutine=%%
+%%==================================================%%
+%% Styledatei fuer das Paket mdframed erstellt durch
+%% Marco Daniel und Elke Schubert
+%%
+%% 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.
+
+
+%%Allgemeine Einstellungen fuer tikz
+\def\md@tikz@settings{%
+ \setlength{\mdf@innerlinewidth@tikz}{\mdf@innerlinewidth}%
+ \setlength{\mdf@outerlinewidth@tikz}{\mdf@outerlinewidth}%
+ \setlength{\mdf@middlelinewidth@tikz}{\mdf@middlelinewidth}%
+%wenn das Innere der Doppellinie 0pt breit ist, muss Grenze zwischen innerer und äußerer Linie einer Farbe zugeordnet werden
+ \ifdimequal{\mdf@middlelinewidth@tikz}{\z@}%
+ {\ifdimequal{\mdf@innerlinewidth@tikz}{\z@}%
+ {\ifdimequal{\mdf@outerlinewidth@tikz}{\z@}%
+ {\let\mdf@middlelinecolor\mdf@backgroundcolor}%
+ {\let\mdf@middlelinecolor\mdf@outerlinecolor}%
+ }%
+ {\let\mdf@middlelinecolor\mdf@innerlinecolor}%
+ }{}%
+ \ifdimequal{\mdf@innerlinewidth@tikz}{\z@}%
+ {\ifdimequal{\mdf@outerlinewidth@tikz}{\z@}%
+ {\ifdimequal{\mdf@middlelinewidth@tikz}{\z@}%
+ {}%
+ {\let\mdf@middlelinecolor\mdf@linecolor}%
+ }%
+ {}%
+ }{}%
+ \setlength\mdf@xmargin@tikz{\mdf@margin}% % links und rechts
+ \setlength\mdf@ymargin@tikz{0.4\baselineskip}% % oben und unten
+ \tikzset{mdftext/.style={inner sep=0pt,outer sep=0pt}}%
+ \tikzset{mdfcorners/.style={rounded corners=\mdf@roundcorner}}%
+ \tikzset{mdfbackground/.style={fill=\mdf@backgroundcolor}}%
+ \ifdimgreater{\mdf@outerlinewidth@tikz}{\z@}%
+ {\tikzset{mdfborderA/.style={draw=\mdf@outerlinecolor,line width=2\mdf@outerlinewidth@tikz+\mdf@middlelinewidth@tikz}}}%
+ {\tikzset{mdfborderA/.style={}}}%
+ \ifdimgreater{\mdf@innerlinewidth@tikz}{\z@}%
+ {\tikzset{mdfborderI/.style={draw=\mdf@innerlinecolor,line width=2\mdf@innerlinewidth@tikz+\mdf@middlelinewidth@tikz}}}%
+ {\tikzset{mdfborderI/.style={}}}%
+ \tikzset{mdfmiddle/.style={draw=\mdf@middlelinecolor,line width=\mdf@middlelinewidth@tikz}}%
+ % bei abgerundeten Ecken Kontrolle, dass der Rahmen nicht zu dicht an der Textbox ist
+ \setlength{\mdf@rounded@tikz}{\mdf@roundcorner}%
+ \pgfmathsetlengthmacro\r{\mdf@rounded@tikz/3}%
+ \ifdimless{\mdf@ymargin@tikz}{\r}{\setlength\mdf@ymargin@tikz{\r}}{}%
+ %\ifdimless{\mdf@xmargin@tikz}{\r}{\setlength\mdf@xmargin@tikz{\r}}{}%
+}
+%
+\def\md@putbox@single{%
+ \leftline{\null\hspace*{\mdf@leftmargin}%%
+ \md@tikz@settings%
+ \setlength\mdfboxwidth{\wd\@tempboxa}%
+ \setlength\mdfboxheight{\ht\@tempboxa}%
+ \begin{tikzpicture}
+ \coordinate(O)at(0,0);
+ \pgfmathsetlengthmacro\x{\mdfboxwidth+2*\mdf@xmargin@tikz+2*\mdf@innerlinewidth@tikz+\mdf@middlelinewidth@tikz}
+ \pgfmathsetlengthmacro\y{\mdfboxheight+2*\mdf@ymargin@tikz+2*\mdf@innerlinewidth@tikz+\mdf@middlelinewidth@tikz}
+ \coordinate(P)at(\x,\y);
+ \begin{scope}
+ \clip[preaction=mdfborderA][postaction={mdfbackground,mdfborderI}][mdfcorners](O)--(O|-P)--(P)--(P|-O)--cycle;
+ \end{scope}
+ \path[mdfmiddle,mdfcorners](O)--(O|-P)--(P)--(P|-O)--cycle;
+ \node[mdftext]at(0.5*\x,0.5*\y){\box\@tempboxa};
+ \end{tikzpicture}%
+ }
+}
+
+\def\md@putbox@first{%
+ \leftline{\null\hspace*{\mdf@leftmargin}%%
+ \md@tikz@settings%
+ \setlength\mdfboxwidth{\wd\tw@}%
+ \setlength\mdfboxheight{\ht\tw@}%
+ \begin{tikzpicture}
+% \draw[use as bounding box,white] (0,0) rectangle (%
+% \mdfboxwidth+2*\mdf@xmargin@tikz+2*\mdf@innerlinewidth@tikz+\mdf@middlelinewidth@tikz+\mdf@outerlinewidth@tikz,%
+% \mdfboxheight+2\mdf@ymargin@tikz+\mdf@innerlinewidth@tikz+0.5\mdf@middlelinewidth@tikz);
+ \coordinate(O) at (0,0);
+ \pgfmathsetlengthmacro\x{\mdfboxwidth+2*\mdf@xmargin@tikz+2*\mdf@innerlinewidth@tikz+\mdf@middlelinewidth@tikz}
+ \pgfmathsetlengthmacro\y{\mdfboxheight+2\mdf@ymargin@tikz+\mdf@innerlinewidth@tikz+0.5*\mdf@middlelinewidth@tikz}
+ \coordinate(P)at(\x,\y-0.8\mdf@ymargin@tikz);
+ \clip(-\mdf@outerlinewidth@tikz-0.5*\mdf@middlelinewidth@tikz,0)%
+ rectangle(\x+\mdf@outerlinewidth@tikz+0.5*\mdf@middlelinewidth@tikz,%
+ \y+\mdf@outerlinewidth@tikz+0.5*\mdf@middlelinewidth@tikz);
+ \begin{scope}
+ \clip[preaction=mdfborderA][postaction={mdfbackground,mdfborderI}][mdfcorners](O)--(O|-P)--(P)--(P|-O);
+ \end{scope}
+ \path[mdfmiddle,mdfcorners](O)--(O|-P)--(P)--(P|-O);
+ \node[mdftext]at(0.5*\x,0.5*\y-0.5*\mdf@innerlinewidth@tikz-0.25*\mdf@middlelinewidth@tikz-0.8\mdf@ymargin@tikz){\box\tw@};
+ \end{tikzpicture}%
+ }
+}
+
+
+\def\md@putbox@middle{%
+ \leftline{\null\hspace*{\mdf@leftmargin}%%
+ \md@tikz@settings%
+ \setlength\mdfboxwidth{\wd\tw@}%
+ \setlength\mdfboxheight{\ht\tw@}%
+ \setlength{\mdf@ymargin@tikz}{0.4\baselineskip}
+ \begin{tikzpicture}
+ \coordinate(O)at(0,0);
+ \pgfmathsetlengthmacro\x{\mdfboxwidth+2*\mdf@xmargin@tikz+2*\mdf@innerlinewidth@tikz+\mdf@middlelinewidth@tikz}
+ \pgfmathsetlengthmacro\y{\mdfboxheight%
+ +2*\mdf@ymargin@tikz%
+ +4*\mdf@innerlinewidth@tikz%
+ +2*\mdf@middlelinewidth@tikz%
+ +0*\mdf@outerlinewidth@tikz}
+ \coordinate(P)at(\x,\y);
+ \clip(-\mdf@outerlinewidth@tikz-0.5*\mdf@middlelinewidth@tikz,2*\mdf@outerlinewidth@tikz+\mdf@middlelinewidth@tikz)%
+ rectangle(\x+\mdf@outerlinewidth@tikz+0.5*\mdf@middlelinewidth@tikz,\y-2*\mdf@outerlinewidth@tikz-\mdf@middlelinewidth@tikz);
+ \begin{scope}
+ \clip[preaction=mdfborderA][postaction={mdfbackground,mdfborderI}](O)--(O|-P)--(P)--(P|-O);
+ \end{scope}
+ \path[mdfmiddle](O)--(O|-P)--(P)--(P|-O);
+ \node[mdftext,]at(0.5*\x,0.5*\y){\box\tw@};
+ \end{tikzpicture}%
+ }
+}
+
+\def\md@putbox@second{%
+ \leftline{\null\hspace*{\mdf@leftmargin}%%
+ \md@tikz@settings
+ \setlength\mdfboxwidth{\wd\@tempboxa}%
+ \setlength\mdfboxheight{\ht\@tempboxa}%
+ \begin{tikzpicture}
+ \coordinate(O)at(0,0);
+ \pgfmathsetlengthmacro\x{\mdfboxwidth+2*\mdf@xmargin@tikz+2*\mdf@innerlinewidth@tikz+\mdf@middlelinewidth@tikz}
+ \pgfmathsetlengthmacro\y{\mdfboxheight+1*\mdf@ymargin@tikz+\mdf@innerlinewidth@tikz+0.5*\mdf@middlelinewidth@tikz}
+ \coordinate(P)at(\x,\y+\mdf@ymargin@tikz);
+ \clip(-\mdf@outerlinewidth@tikz-0.5*\mdf@middlelinewidth@tikz,-\mdf@outerlinewidth@tikz-0.5*\mdf@middlelinewidth@tikz)%
+ rectangle(\x+\mdf@outerlinewidth@tikz+0.5*\mdf@middlelinewidth@tikz,\y);
+ \begin{scope}
+ \clip[preaction=mdfborderA][postaction={mdfbackground,mdfborderI}][mdfcorners](P-|O)--(O)--(O-|P)--(P);
+ \end{scope}
+ \path[mdfmiddle,mdfcorners](P-|O)--(O)--(O-|P)--(P);
+ \node[mdftext] at (0.5*\x,0.5*\y+0.5*\mdf@innerlinewidth@tikz+0.25*\mdf@middlelinewidth@tikz+0.25*\mdf@ymargin@tikz){\box\@tempboxa};
+ \end{tikzpicture}%
+ }
+}
diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdf
index dfdf6ec2816..e4f31961fdc 100644
--- a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdf
+++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.tex
index 2540d6fac31..e369d549728 100644
--- a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.tex
+++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.tex
@@ -1,5 +1,5 @@
%% Documentation of the package mdframed.sty
-\def\mdversion{version 0.3b}
+\def\mdversion{version 0.4}
\documentclass[american,11pt]{article}
\usepackage{geometry}
\geometry{left=3cm,right=3cm,top=2cm,bottom=2cm}
@@ -25,14 +25,17 @@
\usepackage{xcolor}
\usepackage[babel]{microtype}
\usepackage{array,tabularx}
+\usepackage{multirow}
%%Load the the package itselfs
-\usepackage[leftmargin=20pt,rightmargin=40pt]{mdframed}
+\usepackage[style=1,leftmargin=20pt,rightmargin=20pt]{mdframed}
+\usepackage{lipsum}
+
\usepackage{amsmath}
\usepackage[amsmath,amsthm,hyperref]{ntheorem}
\newtheorem{mdtheorem}{Theorem}[section]
\newenvironment{theorem}{%
- \begin{mdframed}[leftmargin=20pt,rightmargin=40pt,linewidth=2,margin=40,backgroundcolor=yellow,linecolor=blue]%
+ \begin{mdframed}[leftmargin=20pt,rightmargin=20pt,linewidth=2,margin=40,backgroundcolor=yellow,linecolor=blue]%
\begin{mdtheorem}%
}{%
\end{mdtheorem}%
@@ -108,7 +111,7 @@ plainpages=false
\normalfont\large\normalcolor auto-split frame environment
\vspace*{.5\baselineskip}
- \href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}\footnote{With thanks to Heiko Oberdiek, Rolf Niepraschk, Martin Scharrer and Herbert Voss.} \qquad \mdversion\ \qquad \today
+ \href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}\footnote{With thanks to Heiko Oberdiek, Rolf Niepraschk, Martin Scharrer and Herbert Voss.}, \href{}{Elke Schubert}\qquad \mdversion\ \qquad \today
\end{center}
\begin{abstract}
Working with the command \mdcommand{fbox} or \mdcommand{fcolorbox}, one has to handle page breaks by hand,
@@ -128,8 +131,7 @@ The following example gives an idea of how to use mdframed. (For the theorem env
\begin{mdexample}
\usepackage{mdframed,amsthm}
\newtheorem{mdtheorem}{Theorem}[section]
-\newenvironment{theorem}{%
- \begin{mdframed}%
+\newenvironment{theorem}{\begin{mdframed}%
[linewidth=2,margin=40,backgroundcolor=yellow,linecolor=blue]%
\begin{mdtheorem}}{\end{mdtheorem}\end{mdframed}}
...
@@ -180,6 +182,12 @@ The following options are only global options.
be loaded with the given value(s). Without any value \mbox{\mdname} loads
the package \mdpack{color} without any options.
& default=\mdsetting{none} \\
+ \mdoption{style}=<VALUE> & With this key you can change the way frames are drawn. By using
+ \mdoption{style=0} the frames are drawn by the commands \mdcommand{vrule}
+ and \mdcommand{rule}. By setting the key to \mdoption{style=1} the package
+ \mdpack{tikz} will draw the frames. So you can manipulate the frames more
+ comfortably with options like \mdoption{roundcorner} (see below).
+ & default=\mdsetting{0} \\
\end{tabularx}
\end{center}
@@ -223,6 +231,8 @@ The options listed below can be set globally or locally.
\end{tabularx}
\end{center}
+
+
\subsubsection{The Option \mdoption{ntheorem}}
\begin{theorem}
@@ -232,47 +242,80 @@ The options listed below can be set globally or locally.
\begin{ntheorem}
This environment is created with \mdoption{ntheorem=true}.
\end{ntheorem}
-\clearpage
-\section{Example}
+\subsection{Added options by the style 1}
+
+The following options only work with \mdoption{style=1}. First you have to know that by default the frame
+is drawn with a double line. So you can manipulate every line. It ist possible to get a single line
+-- the section \glqq Examples\grqq shows how this can be done.
+
+
+\begin{center}
+\renewcommand{\arraystretch}{1.5}
+\begin{tabularx}{\linewidth}{@{}lXl@{}}
+ \mdoption{roundcorner}=<LENGTH>& Sets the size of the radius of the corners of the frames.
+ The basic unit of the length is pt. So it is possible to set
+ length to 6 which is equal to 6pt.
+ & default=\mdsetting{0pt} \\
+ \mdoption{innerlinewidth}=<LENGTH>& Sets the width of the inner line around the environment.
+ The basic unit of the length is pt. So it is possible to set
+ length to 6 which is equal to 6pt.
+ & default=\mdsetting{0pt} \\
+ \mdoption{outerlinewidth}=<LENGTH>& Sets the width of the outer line around the environment.
+ The basic unit of the length is pt. So it is possible to set
+ length to 6 which is equal to 6pt.
+ & default=\mdsetting{0pt} \\
+ \mdoption{middlelinewidth}=<LENGTH>& Sets the width of the middle line around the environment.
+ The basic unit of the length is pt. So it is possible to set
+ length to 6 which is equal to 6pt.
+ & default=\mdoption{linewidth} \\
+ \mdoption{innerlinecolor}=<COLOR>& Sets the color of the inner line around the environment.
+ & default=\mdoption{linecolor} \\
+ \mdoption{outerlinecolor}=<COLOR>& Sets the color of the outer line around the environment.
+ & default=\mdoption{linecolor} \\
+ \mdoption{middlelinecolor}=<COLOR>& Sets the color of the middle line around the environment.
+ & default=\mdoption{backgroundcolor} \\
+\end{tabularx}
+\end{center}
+
+
+\section{Examples}
+
+The header for the following examples is
\begin{mdexample}
\documentclass[10pt]{article}
- \usepackage[linewidth=10,%
- margin=40,%
- backgroundcolor=yellow,
- linecolor=blue,
- skipbelow=0,
- skipabove=0]{mdframed}
- \usepackage{amsmath,amsthm}
- \newtheorem{mdlemma}{Lemma}[section]
- \newenvironment{lemma}{%
- \begin{mdframed}[linewidth=2,margin=40,%
- backgroundcolor=red,linecolor=black]%
- \begin{mdlemma}%
- }{%
- \end{mdlemma}%
- \end{mdframed}%
- }
- \usepackage{lipsum}
- \usepackage{hyperref}
- \begin{document}
- \section{foo}
- \lipsum[1]
- \begin{mdframed}
- \lipsum[5]
- \end{mdframed}
-
- \lipsum[1]
-
- \begin{lemma}\label{lem:testA}\mbox{ }
- \begin{itemize}
- \item Some Text
- \item $x^2+y^2=1$
- \item \lipsum[1]
- \end{itemize}
- \end{lemma}
- \end{document}\end{mdexample}
-\clearpage
+ \usepackage[style=1,leftmargin=20pt,rightmargin=20pt]{mdframed}
+ \usepackage{lipsum}
+\end{mdexample}
+
+\paragraph{Example 1}~\par
+
+\begin{mdexample}
+ \begin{mdframed}
+ \lipsum[1]
+ \end{mdframed}
+\end{mdexample}
+
+\begin{mdframed}
+ \lipsum[1]
+\end{mdframed}
+
+\paragraph{Example 2}~\par
+
+\begin{mdexample}
+ \begin{mdframed}[outerlinewidth=4pt,middlelinewith=2pt,innerlinewidth=1pt,%
+ outerlinecolor=blue,middlelinecolor=yellow,innerlinecolor=red,%
+ backgroundcolor=orange]
+ \lipsum[1]
+ \end{mdframed}
+\end{mdexample}
+
+ \begin{mdframed}[outerlinewidth=4pt,middlelinewidth=2pt,innerlinewidth=1pt,%
+ outerlinecolor=blue,middlelinecolor=yellow,innerlinecolor=red,%
+ backgroundcolor=orange,roundcorner=10pt]
+ \lipsum[1]
+ \end{mdframed}
+
\section{Known Problems}
In this section I will collect known problems. In case you encouter any further problems, please
drop me an email, \href{mailto:marco.daniel@mada-nada.de}{marco.daniel@mada-nada.de}.
@@ -280,19 +323,19 @@ The options listed below can be set globally or locally.
Do you have any ideas / wishes on further extensions to this package? Please let me know!
\begin{enumerate}
- \item So far it is not possible to extend a frame to more than two pages
- \item So far there is no implementation for choosing different styles of the frame but I am working on that.
+ \item So far the environment isn't compatible with the package \mdpack{gmverb}.
+ \item So far it isn't possible to use the multicolumn environment.
\end{enumerate}
\section{Acknowledgement}
Thanks for the bug reports and suggestions
-\textsf{Dick Nickalls;\quad Dr. Dietrich Grau;\quad Piazza Luca;\quad}
+\textsf{Dick Nickalls;\quad Dr. Dietrich Grau;\quad Piazza Luca}.
\medskip
\noindent Thanks for proofreading
-\textsf{Nahid Shajari}
+\textsf{Nahid Shajari}.
\end{document}
diff --git a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
index d9d0bae8f0d..9a6ac151080 100644
--- a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
+++ b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
@@ -1,7 +1,7 @@
%%==================================================%%
-%%========It based on the idea of framed.sty========%%
+%%========Is based on the idea of framed.sty========%%
%%==================================================%%
-%%===== Currently the packge has a beta-Status =====%%
+%%===== Currently the package has a beta-Status ====%%
%%==================================================%%
%% WITH THANKS TO (alphabetically):
%% ROLF NIEPRASCHK
@@ -33,46 +33,40 @@
%%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>%%
%% Allgemeine Angaben
-\def\mdframedpackagename{mdframed}
-\def\md@PackageWarning#1{\PackageWarning{\mdframedpackagename}{#1}}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mdframed}[2010/04/30 v0.3b: mdframed]
+\ProvidesPackage{mdframed}[2010/05/02 v4: mdframed]
%%==================================================%%
%%=============== Benoetigte Pakete ================%%
%%==================================================%%
-\IfFileExists{kvoptions.sty}{%
- \RequirePackage{kvoptions}
- \SetupKeyvalOptions{family=mdf,prefix=mdf@}
+\newcommand*\mdframedpackagename{mdframed}
+\newcommand*\md@PackageWarning[1]{\PackageWarning{\mdframedpackagename}{#1}}
+\newcommand*\md@LoadFile@IfExist[1]{%
+ \IfFileExists{#1.sty}{%
+ \RequirePackage{#1}%
}{%
- \md@PackageWarning{The package kvoptions.sty does not exist\MessageBreak
- but it is requiered by \mdframedpackagename}%
- }
-\IfFileExists{etex.sty}{%
- \RequirePackage{etex}
- }{%
- \md@PackageWarning{The package etex does not exist\MessageBreak
- but it is requiered by \mdframedpackagename}%
- }
+ \md@PackageWarning{The package #1 does not exist\MessageBreak
+ but it is required by \mdframedpackagename}%
+ }
+}
+\md@LoadFile@IfExist{kvoptions}
-\IfFileExists{calc.sty}{%
- \RequirePackage{calc}
- }{%
- \md@PackageWarning{The package calc does not exist\MessageBreak
- but it is requiered by \mdframedpackagename}%
- }
+\md@LoadFile@IfExist{etex}
-\IfFileExists{color.sty}{%
- \RequirePackage{color}
- }{%
- \md@PackageWarning{The package color does not exist\MessageBreak
- but it is requiered by \mdframedpackagename}%
- }
+\md@LoadFile@IfExist{calc}
+
+\md@LoadFile@IfExist{color}
+
+\md@LoadFile@IfExist{tikz}
+
+\md@LoadFile@IfExist{etoolbox}
+
+\SetupKeyvalOptions{family=mdf,prefix=mdf@}
%%==================================================%%
%%=============== Globale Optionen ================%%
%%==================================================%%
-\DeclareStringOption[2pt]{linewidth}
+\DeclareStringOption[0.4pt]{linewidth}
\DeclareStringOption[black]{linecolor}
\DeclareStringOption[white]{backgroundcolor}
\DeclareStringOption[black]{fontcolor}
@@ -83,18 +77,28 @@
\DeclareStringOption[pt]{defaultunit}
-\DeclareStringOption[0pt]{leftmargin}
-\DeclareStringOption[0pt]{rightmargin}
+\DeclareStringOption[\z@]{leftmargin}
+\DeclareStringOption[\z@]{rightmargin}
\DeclareBoolOption{ntheorem}
+%%Optionen fuer tikz
+\DeclareStringOption[0]{style}
+\DeclareStringOption[\z@]{roundcorner}
+\DeclareStringOption[\z@]{innerlinewidth}
+\DeclareStringOption[\z@]{outerlinewidth}
+\DeclareStringOption[\mdf@linewidth]{middlelinewidth}
+
+\DeclareStringOption[\mdf@linecolor]{innerlinecolor}
+\DeclareStringOption[\mdf@linecolor]{outerlinecolor}
+\DeclareStringOption[\mdf@backgroundcolor]{middlelinecolor}
+
\ProcessKeyvalOptions*
%%==================================================%%
%%========Hilfsmakro zur Bestimmung ob Laenge=======%%
%%============= IDEE: Martin Scharrer ==============%%
%%==================================================%%
-
%%%\md@iflength{<EINGABE>}{<IST LAENGE>}{<IST KEINE LAENGE>}
\newlength{\md@templength}
\def\md@iflength#1{%
@@ -170,6 +174,29 @@
\md@iflength{\@tempa}{}{\global\edef\mdf@rightmargin{\the\md@templength}}
\endgroup
+%%\mdf@roundcorner
+\begingroup
+\let\@tempa\mdf@roundcorner
+\md@iflength{\@tempa}{}{\global\edef\mdf@roundcorner{\the\md@templength}}
+\endgroup
+
+%%\mdf@innerlinewidth
+\begingroup
+\let\@tempa\mdf@innerlinewidth
+\md@iflength{\@tempa}{}{\global\edef\mdf@innerlinewidth{\the\md@templength}}
+\endgroup
+
+%%\mdf@outerlinewidth
+\begingroup
+\let\@tempa\mdf@outerlinewidth
+\md@iflength{\@tempa}{}{\global\edef\mdf@outerlinewidth{\the\md@templength}}
+\endgroup
+
+%%\mdf@middlelinewidth
+\begingroup
+\let\@tempa\mdf@middlelinewidth
+\md@iflength{\@tempa}{}{\global\edef\mdf@middlelinewidth{\the\md@templength}}
+\endgroup
%%==================================================%%
%%========Sicherstellen der key-value-Syntax========%%
@@ -236,24 +263,110 @@
}
+\define@key{mdfl}{roundcorner}[\mdf@roundcorner]{%
+\def\@tempa{#1}
+\md@iflength{\@tempa}%
+ {\global\edef\mdfl@roundcorner{\the\md@templength}}%
+ {\global\edef\mdfl@roundcorner{\the\md@templength}}
+\let\mdf@roundcorner\mdfl@roundcorner
+}
+
+\define@key{mdfl}{style}[\mdf@style]{%
+ \def\@tempa{#1}
+ \let\mdf@style\@tempa\relax
+}
+
+\define@key{mdfl}{innerlinewidth}[\mdf@innerlinewidth]{%
+\def\@tempa{#1}
+\md@iflength{\@tempa}%
+ {\global\edef\mdfl@innerlinewidth{\the\md@templength}}%
+ {\global\edef\mdfl@innerlinewidth{\the\md@templength}}
+\let\mdf@innerlinewidth\mdfl@innerlinewidth
+}
+
+\define@key{mdfl}{outerlinewidth}[\mdf@outerlinewidth]{%
+\def\@tempa{#1}
+\md@iflength{\@tempa}%
+ {\global\edef\mdfl@outerlinewidth{\the\md@templength}}%
+ {\global\edef\mdfl@outerlinewidth{\the\md@templength}}
+\let\mdf@outerlinewidth\mdfl@outerlinewidth
+}
+
+\define@key{mdfl}{middlelinewidth}[\mdf@middlelinewidth]{%
+\def\@tempa{#1}
+\md@iflength{\@tempa}%
+ {\global\edef\mdfl@middlelinewidth{\the\md@templength}}%
+ {\global\edef\mdfl@middlelinewidth{\the\md@templength}}
+\let\mdf@middlelinewidth\mdfl@middlelinewidth
+}
+
+\define@key{mdfl}{middlelinecolor}[\mdf@middlelinecolor]{%
+\def\@tempa{#1}
+\let\mdf@middlelinecolor\@tempa\relax
+}
+
+\define@key{mdfl}{outerlinecolor}[\mdf@outerlinecolor]{%
+\def\@tempa{#1}
+\let\mdf@outerlinecolor\@tempa\relax
+}
+
+\define@key{mdfl}{innerlinecolor}[\mdf@innerlinecolor]{%
+\def\@tempa{#1}
+\let\mdf@innerlinecolor\@tempa\relax
+}
+%%==================================================%%
+%%======= Laden der gewuenschten Style-Datei =======%%
+%%==================================================%%
+\ifcase\mdf@style\relax
+ \input{md-tikz-0.mdf}%
+ \or
+ \input{md-tikz-1.mdf}%
+ \else
+ \IfFileExists{md-tikz-\mdf@style.mdf}{%
+ \input{md-tikz-\mdf@style.mdf}%
+ }{%
+ \input{md-tikz-1.mdf}%
+ \md@PackageWarning{The style number \mdf@style does not exist\MessageBreak
+ mdframed ues instead style=1 \mdframedpackagename}%
+ }%
+\fi%
+
+
%%==================================================%%
%%==Deklaration diverser Eingabe und Hilfsparameter=%%
%%==================================================%%
\newcommand\mdframedabovespace[1]{\def\md@space@above@frame{#1}}
-\mdframedabovespace{\baselineskip} %% Abstand vor der Frame-Umgebung
+\mdframedabovespace{0pt} %% Abstand vor der Frame-Umgebung
\newskip\md@temp@skip@a \md@temp@skip@a\z@ %% Hilfslaenge
\newlength{\fp@putboxa@length@md}
\setlength{\fp@putboxa@length@md}{\z@} %% Hilfslaenge
-\newif\ifmd@content@split \md@content@splitfalse %% Ifabfrage, die prueft, ob der Inhalt von mdframed geteilt wird
+\newif\ifmd@content@split \md@content@splitfalse %% If-Abfrage, die prueft, ob der Inhalt von mdframed geteilt wird
%% default - wird nicht geteilt
-\newif\ifmd@box@empty \md@box@emptyfalse %% Ifabfrage, die prueft, ob der Inhalt einer Box leer ist
+\newif\ifmd@box@empty \md@box@emptyfalse %% If-Abfrage, die prueft, ob der Inhalt einer Box leer ist
%% default - ist nicht leer
+\newif\ifmd@more@two \md@more@twofalse %% If-Abfrage ob ueber mehr als zwei Seiten gespittet wird
+
+
+\newlength{\mdf@tikz@linewidth} %% Liniendicke fuer tikz
+
+\newlength\mdf@xmargin@tikz %% Berechnungsvariable tikz
+\newlength\mdf@ymargin@tikz %% Berechnungsvariable tikz
+
+\newlength\mdfboxheight %% Berechnungsvariable tikz
+\newlength\mdfboxwidth %% Berechnungsvariable tikz
+
+\newlength{\mdf@rounded@tikz} %% Rundungsparameter tikz
+
+
+\newlength\mdf@outerlinewidth@tikz %% Laengenparameter tikz
+\newlength\mdf@innerlinewidth@tikz %% Laengenparameter tikz
+\newlength\mdf@middlelinewidth@tikz %% Laengenparameter tikz
%%==================================================%%
%%===Globale Umgebung -- noch keine Modifikation ===%%
@@ -265,6 +378,7 @@
\vskip -2\parskip%
\vskip -2\partopsep%
\vskip -2\lineskip%
+ \vskip -0.6\baselineskip%
\vspace*{\mdf@skipabove}%
\setkeys{mdfl}{#1}%
\ifmdf@ntheorem%
@@ -272,9 +386,15 @@
\theorempreskipamount0pt%
\theorempostskipamount0pt%
\else%
- {\md@PackageWarning{You haven not loaded ntheorem yet}}%
+ {\md@PackageWarning{You have not loaded ntheorem yet}}%
\fi%
\fi%
+ \ifnumless{\mdf@style}{1}%
+ {\renewcommand{\mdf@innerlinewidth}{\z@}%
+ \renewcommand{\mdf@middlelinewidth}{\mdf@linewidth}%
+ \renewcommand{\mdf@outerlinewidth}{\z@}%
+ \let\mdf@innerlinecolor\mdf@linecolor%
+ }{}%
\mdframed@global@env%
}%
{\endmdframed@global@env\addvspace{\mdf@skipbelow}}
@@ -295,11 +415,19 @@
%%================= Breite der BOX =================%%
%%==================================================%%
\def\md@margin@equation{% %% Berechnung der moeglichen Breite fuer den Rahmeninhalt
- \advance\hsize by - \mdf@margin% %% hsize minus Randvorgabe
- \advance\hsize by - \mdf@linewidth% %% hsize minus Linienbreite
+ \advance\hsize by - \mdf@margin% %% hsize minus Randvorgabe
+ \advance\hsize by - \mdf@margin% %% hsize minus Randvorgabe
+ \advance\hsize by - \mdf@middlelinewidth% %% hsize minus Linienbreite (mitte)
+ \advance\hsize by - \mdf@middlelinewidth% %% hsize minus Linienbreite (mitte)
+ \ifnumequal{1}{\mdf@style}{%
+ \advance\hsize by - \mdf@innerlinewidth% %% hsize minus Linienbreite (innen)
+ \advance\hsize by - \mdf@innerlinewidth% %% hsize minus Linienbreite (innen)
+ \advance\hsize by - \mdf@outerlinewidth% %% hsize minus Linienbreite (aussen)
+ \advance\hsize by - \mdf@outerlinewidth% %% hsize minus Linienbreite (aussen)
+ }{}%
\advance\hsize by - \mdf@leftmargin% %% hsize minus gewuenschten linken Abstand
- \advance\hsize by - \mdf@rightmargin% %% hsize minus gewuenschten linken Abstand
- \advance\hsize by - \width\md@arrayparboxrestore}%% Beruecksichtigung das Auszaehlung bzw. list-Umgebung enthalten
+ \advance\hsize by - \mdf@rightmargin% %% hsize minus gewuenschten rechten Abstand
+ \advance\hsize by - \width\md@arrayparboxrestore}%% Beruecksichtigung, dass Auszaehlung bzw. list-Umgebung enthalten
%%==================================================%%
%%===Bestimmung des Platzbedarfes fuer den Rahmen===%%
@@ -373,17 +501,10 @@
{{\setbox\z@\lastbox}\everypar{}\@endpefalse}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\md@adjheight%
- \advance\hsize by - \mdf@margin% %% hsize minus Randvorgabe links
- \advance\hsize by - \mdf@margin% %% hsize minus Randvorgabe rechts
- \advance\hsize by - \mdf@linewidth% %% hsize minus Linienbreite links
- \advance\hsize by - \mdf@linewidth% %% hsize minus Linienbreite rechts
- \advance\hsize by - \mdf@leftmargin% %% hsize minus gewuenschten linken Abstand
- \advance\hsize by - \mdf@rightmargin% %% hsize minus gewuenschten linken Abstand
- \advance\hsize by - \width\md@arrayparboxrestore%% Beruecksichtigung das Auszaehlung bzw. list-Umgebung enthalten
- \setbox\@tempboxa\vbox\bgroup\@doendpe%
+ \md@margin@equation%
+ \setbox\@tempboxa\vbox\bgroup\@doendpe%
\begingroup% %%% zweites begingroup noetig, dass fontcolor gesetzt werden kann
\color{\mdf@fontcolor}% %%% Setzen der Schriftfarbe
-% \md@margin@equation%
\textwidth\hsize \columnwidth\hsize%
}
@@ -408,24 +529,43 @@
%% auf die Seite mit dem Rahmen.
%% Es ist rekursiv, solange alles von der \@tempboxa aufgebraucht ist (\@tempboxa muss die Tiefe 0 haben.)
%% Erste Iteration: Versuche alles in einen Rahmen zu bekommen. Falls es nicht passt,
-%% splitte es für die erste Rahmenumgebung
+%% splitte es fuer die erste Rahmenumgebung
%% Spaetere Iteration: Versuche alles in den letzten Rahmen zu bekommen. Falls es nicht passt,
%% splitte es erneut. (Versuchsstadium -- Da bisher nur Anfang und Ende enthalten)
\def\md@put@frame{\relax
- \ifdim\pagegoal=\maxdimen \pagegoal\vsize \fi %%%% \pagegoal aktuelle Seitenhöhe für den Seitenumbruch
+ \ifdim\pagegoal=\maxdimen \pagegoal\vsize \fi %%%% \pagegoal aktuelle Seitenhoehe für den Seitenumbruch
%%%% Der Wert wird mit \vsize initialisiert
%%%% \pagegoal - \pagetotal ist dann der noch freie Raum auf einer Seite
%%%%
\ifinner %Rekursion-sind in der Box %%%% testet auf internal mode: Dieser ist im internal vertical mode,
%%%% also im Innern einer \vbox, oder im restricted horizontal mode,
%%%% also im Innern einer \hbox, gesetzt.
-%% \md@putbox@second %%%% Rahmen um den zweiten Teil der Box "noch zu bearbeiten"
-%% \md@afterframe %%%% siehe Anweisung
+ \md@putbox@second %%%% Rahmen um den zweiten Teil der Box "noch zu bearbeiten"
+% \md@afterframe %%%% siehe Anweisung
\else %Noch keinen Teil der Box gesetzt.
\dimen@\pagegoal
- \advance\dimen@-\pagetotal %%% \dimen@ hat jetzt den noch freien Platz auf der Seite gespeichert
- \advance\dimen@-\topskip
+ \advance\dimen@-\pagetotal %%% \dimen@ hat jetzt den noch freien Platz auf der Seite gespeichert
+ \advance\dimen@-\topskip %%% \dime@ Minus \topskip
+%%%Beginn der Beruecksichtigung fuer den Platz der Linienbreite:
+\ifmd@more@two% Abfrage ob eine mittlere Seite vorliegt
+\else %keine Mittlere Seite
+ \@tempskipa=\mdf@roundcorner
+ \divide\@tempskipa by 3
+ \ifdimless{0.4\baselineskip}{\@tempskipa}{%
+ \advance\dimen@ -0.5\@tempskipa}%
+ {\advance\dimen@ 0.4\baselineskip}
+ \advance\dimen@ -\mdf@innerlinewidth %%% Berucksichtigen, dass oben und untern keine Linie -- somit mehr Platz
+ \advance\dimen@ -\mdf@outerlinewidth %%% Berucksichtigen, dass oben und untern keine Linie -- somit mehr Platz
+ \advance\dimen@ -\mdf@middlelinewidth %%% Berucksichtigen, dass oben und untern keine Linie -- somit mehr Platz
+ \advance\dimen@ -0.4\baselineskip%
+\fi
+\ifnum\mdf@style=0\relax
+ \ifmd@more@two
+ \else
+ \advance\dimen@ \mdf@linewidth
+ \fi
+\fi
\ifdim\dimen@<2\baselineskip %%% Ist freier Platz < 2 Zeilenabstaenden, zu wenig Platz
\clearpage %%% Beginne neue Seite
\md@put@frame % %%% Rufe \md@put@frame erneut auf
@@ -481,7 +621,7 @@
\expandafter\endgroup %%% ????
\ifdim\dimen@>\pagegoal %%% Ist \dimen@ groesser der Seitenhoehe
\dimen@ii\pagegoal %%% \dimen@ii wird zur Seitenhoehe
- \advance\dimen@ii -\topskip %%% \dimen@ii wird zur Seitenhoehe Minus
+ \advance\dimen@ii -\topskip %%% \dimen@ii minus \topskip
\advance\dimen@ii \md@space@above@frame %%% \dimen@ii bekommt zusaetzlich den gewuenschten Oberen Abstand
\else %%% \dimen@ ist kleiner als die aktuelle Seitenhoehe
%%% Es ist ausreichend Platz auf der Seite
@@ -496,7 +636,7 @@
%% \advance\dimen@ii -\md@frh
\setbox\tw@\vbox to\dimen@ii % %%% Setze die abgesplittete Box auf \dimen@ii
\bgroup
- \vskip -\z@ \@plus-\pagestretch \@minus-.8\pageshrink %%% Entferne den simulierte Rahmen und Seitenflexibilitaet
+ \vskip -\z@ \@plus-\pagestretch \@minus-.8\pageshrink %%% Entferne den simulierten Rahmen und Seitenflexibilitaet
\unvbox\tw@ \unpenalty\unpenalty %%% \unpenalty entfernt einen vorangehenden \penalty
%%% in der Arbeitsliste, falls ein solcher vorhanden ist
\ifdim\lastkern=-137sp %%% \lastkern liefert, falls das letzte Element eine \kern-Operation
@@ -519,17 +659,23 @@
\md@putbox@second%
\fi
\md@afterframe
- \else % Es ist wirklich gesplittet mit oberen Teil in \tw@ und unteren Teil in \tempboxa@
+ \else % Es ist wirklich gesplittet mit oberem Teil in \tw@ und unterem Teil in \tempboxa@
\ifdim\wd\tw@>\z@ %%%Ist der Obere Teil breiter als 0pt
- \wd\tw@\wd\@tempboxa %%%setze die Beite des oberen Teils auf die Breite des unteren Teils
+ \wd\tw@\wd\@tempboxa %%%Setze die Breite des oberen Teils auf die Breite des unteren Teils
\global\md@content@splittrue %%%% Merke, dass Box gesplittet wird
%%%% gebe den oberen Teil der Box aus
- \md@putbox@first %%% Ausgabe der ersten Teilbox
+ \ifmd@more@two%
+ \md@putbox@middle% %%% Ausgabe der ersten Teilbox
+ \else%
+ \md@putbox@first% %%% Ausgabe der ersten Teilbox
+ \md@more@twotrue%
+ \fi%
\else %%Oberer Teil ist Leer
\box\tw@ %%% Ausgabe und Leerung
\fi
\hrule \@height\z@ \@width\hsize
- \clearpage
+ \vfill\eject
+ %\clearpage
\md@adjheight
\md@put@frame
\fi
@@ -540,156 +686,6 @@
}
-%%==================================================%%
-%%=Ausgabe der Box nach Vorgabe der Ausagaberoutine=%%
-%%==================================================%%
-
-\let\md@textwidth\textwidth
-
-
-%%=single=%%
-\def\md@frame@background@single{%
- \rlap{\color{\mdf@backgroundcolor}%
- \setlength{\fp@putboxa@length@md}{\ht\@tempboxa}%
- \addtolength{\fp@putboxa@length@md}{\baselineskip}%
- \addtolength{\fp@putboxa@length@md}{\mdf@linewidth}%
- \rule[-0.5\baselineskip]%
- {\md@textwidth-\mdf@leftmargin-\mdf@rightmargin-\mdf@linewidth-\mdf@linewidth}%
- {\fp@putboxa@length@md}%
- }%
-}%
-
-\def\md@frame@leftandbottomline@single{%
- \setlength{\fp@putboxa@length@md}{\ht\@tempboxa}%
- \addtolength{\fp@putboxa@length@md}{0.5\baselineskip}%
- \rlap{\color{\mdf@linecolor}\vrule width \mdf@linewidth%
- height \fp@putboxa@length@md%
- depth 0.5\baselineskip}%
- \rlap{\color{\mdf@linecolor}\rule[-0.5\baselineskip-\mdf@linewidth]%
- {\md@textwidth-\mdf@leftmargin-\mdf@rightmargin}{\mdf@linewidth}%
- }%
-}%
-
-\def\md@frame@topandrightline@single{%
- \llap{\color{\mdf@linecolor}\vrule width \mdf@linewidth%
- height \fp@putboxa@length@md%
- depth 0.5\baselineskip}%
- \llap{\color{\mdf@linecolor}\rule[\fp@putboxa@length@md]%
- {\md@textwidth-\mdf@leftmargin-\mdf@rightmargin}{\mdf@linewidth}}%
-}%
-
-
-\def\md@putbox@single{%%%%% Ausgabe der ungesplitteten Gesamtbox
- \ifvoid\@tempboxa
- \else
- \leftline{%
- \null\hspace*{\mdf@leftmargin}%
- \md@frame@leftandbottomline@single%
- \hspace*{\mdf@linewidth}%
- \md@frame@background@single%
- \hspace*{\mdf@margin}%
- {\box\@tempboxa}%
- \hspace*{\mdf@margin}%
- \hspace*{\mdf@linewidth}%
- \md@frame@topandrightline@single%
- }%
- \fi
-}
-
-
-%%=first=%%
-
-\def\md@frame@background@first{%
- \rlap{\color{\mdf@backgroundcolor}%
- \setlength{\fp@putboxa@length@md}{\ht\tw@}%
- \addtolength{\fp@putboxa@length@md}{1.4\baselineskip}%
- \addtolength{\fp@putboxa@length@md}{-\mdf@linewidth}%
- \rule[-0.4\baselineskip]{\md@textwidth-\mdf@leftmargin-\mdf@rightmargin-\mdf@linewidth-\mdf@linewidth}%
- {\fp@putboxa@length@md}%
- }%
-}%
-
-\def\md@frame@topandleftline@first{%
- \setlength{\fp@putboxa@length@md}{\ht\tw@}%
- \addtolength{\fp@putboxa@length@md}{\baselineskip}%
- \rlap{\color{\mdf@linecolor} \vrule width \mdf@linewidth%
- height \fp@putboxa@length@md%
- depth 0.4\baselineskip%
- }%
- \rlap{\color{\mdf@linecolor}\rule[\fp@putboxa@length@md-\mdf@linewidth]{\md@textwidth-\mdf@leftmargin-\mdf@rightmargin}%
- {\mdf@linewidth}%
- }%
-}%
-
-\def\md@frame@rightline@first{%
- \llap{\color{\mdf@linecolor}\vrule width \mdf@linewidth%
- height \fp@putboxa@length@md%
- depth 0.4\baselineskip%
- }%
-}%
-
-
-
-\def\md@putbox@first{%%%% Ausgabe der Teilbox 1
- \leftline{%
- \null\hspace*{\mdf@leftmargin}%
- \md@frame@topandleftline@first%
- \hspace*{\mdf@linewidth}%
- \md@frame@background@first%
- \hspace*{\mdf@margin}%
- {\box\tw@}%
- \hspace*{\mdf@margin}%
- \hspace*{\mdf@linewidth}%
- \md@frame@rightline@first%
- }%
-}
-
-%%=second=%%
-
-\def\md@frame@background@second{%
- \rlap{\color{\mdf@backgroundcolor}%
- \setlength{\fp@putboxa@length@md}{\ht\@tempboxa}%
- \addtolength{\fp@putboxa@length@md}{0.7\baselineskip}%
- \rule[-0.5\baselineskip]{\md@textwidth-\mdf@leftmargin-\mdf@rightmargin-\mdf@linewidth-\mdf@linewidth}%
- {\fp@putboxa@length@md}%
- }%
-}%
-
-\def\md@frame@leftandbottomline@second{%
- \setlength{\fp@putboxa@length@md}{\ht\@tempboxa}%
- \addtolength{\fp@putboxa@length@md}{0.2\baselineskip}% %Linienueberschuss auf zweiter Seite -- derzeit 0pt
- \rlap{\color{\mdf@linecolor}\vrule width \mdf@linewidth%
- height \fp@putboxa@length@md%
- depth 0.5\baselineskip%
- }%
- \rlap{\color{\mdf@linecolor}\rule[-0.5\baselineskip-\mdf@linewidth]%
- {\md@textwidth-\mdf@leftmargin-\mdf@rightmargin}%
- {\mdf@linewidth}}%
-}%
-
-\def\md@frame@rightline@second{%
- \llap{\color{\mdf@linecolor}\vrule width \mdf@linewidth%
- height \fp@putboxa@length@md%
- depth 0.5\baselineskip}%
-}%
-
-\def\md@putbox@second{%%%%% Ausgabe der Teilbox 2
- \ifvoid\@tempboxa%
- \else
- \leftline{%
- \null\hspace*{\mdf@leftmargin}%
- \md@frame@leftandbottomline@second%
- \hspace*{\mdf@linewidth}%
- \md@frame@background@second%
- \hspace*{\mdf@margin}%
- {\box\@tempboxa}%
- \hspace*{\mdf@margin}%
- \hspace*{\mdf@linewidth}%
- \md@frame@rightline@second%
- }%
- \fi%
-}%
-
%%==================================================%%
@@ -698,6 +694,7 @@
\def\md@afterframe{%
\global\md@content@splitfalse
\global\md@box@emptyfalse
+ \global\md@more@twofalse
\nointerlineskip \null %{\showoutput \showlists}
\penalty-30 \vskip\topsep \relax
}
@@ -707,14 +704,14 @@
%%==================================================%%
\def\md@adjheight{%
\ifdim\md@space@above@frame>\z@
- \vbox to 1.2\md@space@above@frame{}% get proper baseline skip from above.
+ \vbox to 1\md@space@above@frame{}% get proper baseline skip from above.
\nobreak \nointerlineskip
- \vskip-1.2\md@space@above@frame
+ \vskip-1\md@space@above@frame
\penalty\@M%
\else
\vbox to \md@space@above@frame{}% get proper baseline skip from above.
\penalty\@M \nointerlineskip
- \vskip-0.6\md@space@above@frame
+ \vskip-1\md@space@above@frame
\penalty\@M%
\fi
} % useful for tops of pages
@@ -743,12 +740,12 @@
% Test ob Listenumgebung enthalten ist
\ifnum \ifdim\@totalleftmargin>\z@ 1\fi %%%In latex.ltx->totalleftmargin=\z@, ausser in list-Umgebung:
%%%\advance\@totalleftmargin \leftmargin
- \ifdim\rightmargin >\z@ 1\fi %%%Default \rightmargin=\z@, ausnahme: quote usw.
- \ifnum\@listdepth >0 1\fi %%%Zaehler fuer Listentiefe -> Keine Liste \@listdepth=0 sonst, je ebene +1
+ \ifdim\rightmargin >\z@ 1\fi %%%Default \rightmargin=\z@, Ausnahme: quote usw.
+ \ifnum\@listdepth >0 1\fi %%%Zaehler fuer Listentiefe -> Keine Liste \@listdepth=0 sonst, je Ebene +1
0>\z@ %%%Ist ein Parameter erfuellt, dann ist es eine Listenumgebung
\@setminipage %%%Passform rund um das Element
- % Nun wird versucht, Aenderungen der Breite von \hsize antsprechend der Listenparameter zu uebergeben.
- % Dies ist defizitaer, denn eine erweiterte Möglichkeit, Aenderungen der Textdimension anzugegeben
+ % Nun wird versucht, Aenderungen der Breite von \hsize entsprechend der Listenparameter zu uebergeben.
+ % Dies ist defizitaer, denn eine erweiterte Moeglichkeit, Aenderungen der Textdimension anzugegeben
% ist (noch) nicht vorgesehen, insbesondere keine getrennte linke / rechte Einstellung.
\advance\linewidth-\columnwidth \advance\linewidth\hsize
\parshape\@ne \@totalleftmargin \linewidth %%% parshape definiert das Aussehen eines Absatzes Zeile fuer Zeile.
@@ -765,7 +762,7 @@
}
%%==================================================%%
-%%== Sicherstellen das Optionen nur global setzbar==%%
+%%= Sicherstellen, dass Optionen nur global setzbar=%%
%%==================================================%%
\DisableKeyvalOption[%