summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-26 00:11:23 +0000
committerKarl Berry <karl@freefriends.org>2010-04-26 00:11:23 +0000
commit29987447c7006b1437decf63c0d8bd59ebe41f90 (patch)
tree51e0899c567ccc1b0a219dc36776cc675c9d0fa4 /Master
parent4c52c05c509c887e64f691a2ce5859f514a740c3 (diff)
mdframed 0.3a (24apr10)
git-svn-id: svn://tug.org/texlive/trunk@17993 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/README6
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdfbin526516 -> 612384 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/mdframed-doc.tex90
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/mdframed.sty379
4 files changed, 275 insertions, 200 deletions
diff --git a/Master/texmf-dist/doc/latex/mdframed/README b/Master/texmf-dist/doc/latex/mdframed/README
index 95ffcb58d34..94dd6a525b9 100644
--- a/Master/texmf-dist/doc/latex/mdframed/README
+++ b/Master/texmf-dist/doc/latex/mdframed/README
@@ -3,4 +3,8 @@ handle page breaks by hand. The present package defines the
environment mdframed which automatically deals with page breaks.
Author's name: Marco Daniel
-License type: lppl \ No newline at end of file
+License type: lppl
+
+changes in version 0.3a:
+- Added new options: leftmargin and rightmargin
+- fixes some Bugs
diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdf
index 99208c55a69..2ef66b56905 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 515a577c2dd..0adc00e3b63 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.3}
+\def\mdversion{version 0.3a}
\documentclass[american,11pt]{article}
\usepackage{geometry}
\geometry{left=3cm,right=3cm,top=2cm,bottom=2cm}
@@ -22,16 +22,27 @@
\usepackage[babel]{microtype}
\usepackage{array,tabularx}
%%Load the the package itselfs
-\usepackage{mdframed}
-\usepackage{amsmath,amsthm}
+\usepackage[leftmargin=20pt,rightmargin=40pt]{mdframed}
+
+\usepackage{amsmath}
+\usepackage[amsmath,amsthm,hyperref]{ntheorem}
\newtheorem{mdtheorem}{Theorem}[section]
\newenvironment{theorem}{%
- \begin{mdframed}[linewidth=2,margin=40,backgroundcolor=yellow,linecolor=blue]%
+ \begin{mdframed}[leftmargin=20pt,rightmargin=40pt,linewidth=2,margin=40,backgroundcolor=yellow,linecolor=blue]%
\begin{mdtheorem}%
}{%
\end{mdtheorem}%
\end{mdframed}%
}
+
+\newtheorem{mdlemma}{Lemma}[section]
+\newenvironment{ntheorem}{%
+ \begin{mdframed}[ntheorem=true,leftmargin=20pt,rightmargin=40pt,linewidth=2,margin=40,backgroundcolor=yellow,linecolor=blue]%
+ \begin{mdlemma}%
+ }{%
+ \end{mdlemma}%
+ \end{mdframed}%
+}
\definecolor{titleblue}{rgb}{0,0,0.9}
\usepackage{listings}
@@ -57,6 +68,7 @@
urlcolor=titleblue,
pdfauthor=Marco Daniel,
pdftitle=Documentation of mdframed,
+plainpages=false
}
\usepackage{xspace}
\usepackage{multicol}
@@ -80,6 +92,7 @@
\newcommand*\mdsetting[1]{\textsf{#1}\xspace}
\newcommand*\mdcommand[1]{\texttt{\textbackslash #1}\xspace}
+\setcounter{tocdepth}{1}
\begin{document}
\vspace*{\baselineskip}
@@ -91,7 +104,7 @@
\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 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.} \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,
@@ -141,13 +154,39 @@ Load the package as usual:
The package defines only one environment with the following syntax
\begin{mdexample}
- \begin{mdframed}[<LOCAL OPTIONS>]
- <CONTENT>
+ \begin{mdframed}[< LOCAL OPTIONS >]
+ < CONTENT >
\end{mdframed}
\end{mdexample}
\section{Options}
The package allows to set global and local options which are explained below.
+
+\subsection{Global Options}
+The following options are only global options.
+
+\begin{center}
+\renewcommand{\arraystretch}{1.5}
+\begin{tabularx}{\linewidth}{@{}lXl@{}}
+ \mdoption{skipabove}=<LENGTH>& Sets an additional skip above the frame.
+ & default=\mdsetting{0pt} \\
+ \mdoption{skipbelow}=<LENGTH>& Sets an additional skip below the frame.
+ & default=\mdsetting{0pt} \\
+ \mdoption{xcolor}=<VALUE(S)>& By setting this key the package \mdpack{xcolor} will
+ be loaded with the given value(s). Without any value \mbox{\mdname} loads
+ the package \mdpack{color} without any options.
+ & default=\mdsetting{none} \\
+\end{tabularx}
+\end{center}
+
+ By setting one of these options locally, you get a warning like
+\begin{mdexample}
+ Option `...' is already consumed(mdframed) and has no effect on input line ...
+\end{mdexample}
+
+\clearpage
+\subsection{Global and Local Options}
+The listed options below allows to set global and local.
\begin{center}
\renewcommand{\arraystretch}{1.5}
\begin{tabularx}{\linewidth}{@{}lXl@{}}
@@ -161,23 +200,34 @@ The package allows to set global and local options which are explained below.
The basic unit of the length is pt. So it is possible to set
length to 6 which is equal to 6pt.
& default=\mdsetting{2pt} \\
+ \mdoption{leftmargin}=<LENGTH> & Sets the length of the left margin of 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{2pt} \\
+ \mdoption{rightmargin}=<LENGTH> & Sets the length of the right margin of 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{2pt} \\
\mdoption{linewidth}=<LENGTH>& Sets the width of the 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{20pt} \\
- \mdoption{skipabove}=<LENGTH>& Sets an additional skip above the frame. This is
- \bfseries only a global option.
- & default=\mdsetting{0pt} \\
- \mdoption{skipbelow}=<LENGTH>& Sets an additional skip below the frame. This is
- \bfseries only a global option.
- & default=\mdsetting{0pt} \\
- \mdoption{xcolor}=<VALUE(S)>& By setting this key the package \mdpack{xcolor} will
- be loaded with the given value(s). Without any value \mbox{\mdname} loads
- the package \mdpack{color} without any options. This is
- \bfseries only a global option.
- & default=\mdsetting{none} \\
+ \mdoption{ntheorem}=<boolean>& Befor setting this key you have to load the package \mdpack{ntheorem}.
+ With this option you set the values \mdcommand{theorempreskipamount}
+ and \mdcommand{theorempostskipamount} to 0pt.
+ & default=\mdsetting{false} \\
\end{tabularx}
\end{center}
+
+\subsubsection{The Option \mdoption{ntheorem}}
+
+\begin{theorem}
+ This environment is created with \mdoption{ntheorem=false}.
+\end{theorem}
+
+\begin{ntheorem}
+ This environment is created with \mdoption{ntheorem=true}.
+\end{ntheorem}
\clearpage
\section{Example}
@@ -219,7 +269,7 @@ The package allows to set global and local options which are explained below.
\end{lemma}
\end{document}\end{mdexample}
-\section{Known problems}
+\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}.
@@ -227,7 +277,7 @@ The package allows to set global and local options which are explained below.
\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 that allows to set the left or right margin
+ \item So far there is no implementation for choosing different styles of the frame. But I am workind on that.
\end{enumerate}
\end{document}
diff --git a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
index 3d3da715f4b..84b1ed38ca2 100644
--- a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
+++ b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
@@ -36,7 +36,7 @@
\def\mdframedpackagename{mdframed}
\def\md@PackageWarning#1{\PackageWarning{\mdframedpackagename}{#1}}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mdframed}[2010/04/16 v0.3: mdframed]
+\ProvidesPackage{mdframed}[2010/04/23 v0.3a: mdframed]
%%==================================================%%
%%=============== Benoetigte Pakete ================%%
@@ -48,10 +48,10 @@
\md@PackageWarning{The package kvoptions.sty does not exist\MessageBreak
but it is requiered by \mdframedpackagename}%
}
-\IfFileExists{picture.sty}{%
- \RequirePackage[etex]{picture}
+\IfFileExists{etex.sty}{%
+ \RequirePackage{etex}
}{%
- \md@PackageWarning{The package picture does not exist\MessageBreak
+ \md@PackageWarning{The package etex does not exist\MessageBreak
but it is requiered by \mdframedpackagename}%
}
@@ -77,15 +77,45 @@
\DeclareStringOption[white]{backgroundcolor}
\DeclareStringOption[black]{fontcolor}
\DeclareStringOption[20pt]{margin}
-\DeclareStringOption[\z@]{skipabove}
-\DeclareStringOption[\z@]{skipbelow}
+\DeclareStringOption[\baselineskip]{skipabove}
+\DeclareStringOption[\baselineskip]{skipbelow}
\DeclareStringOption[none]{xcolor}
+\DeclareStringOption[pt]{defaultunit}
+
+\DeclareStringOption[0pt]{leftmargin}
+\DeclareStringOption[0pt]{rightmargin}
+
+\DeclareBoolOption{ntheorem}
+
\ProcessKeyvalOptions*
+%%==================================================%%
+%%========Hilfsmakro zur Bestimmung ob Laenge=======%%
+%%============= IDEE: Martin Scharrer ==============%%
+%%==================================================%%
+
+
+%%%\md@iflength{<EINGABE>}{<IST LAENGE>}{<IST KEINE LAENGE>}
+\newlength{\md@templength}
+\def\md@iflength#1{%
+ \afterassignment\md@iflength@check%
+ \md@templength=#1\mdf@defaultunit\relax\relax
+ \expandafter\endgroup\next
+}
+\def\md@iflength@check#1{%
+ \begingroup
+ \ifx\relax#1\@empty
+ \def\next{\@secondoftwo}
+ \else
+ \def\next{\@firstoftwo}
+ \expandafter\md@iflength@cleanup
+ \fi
+}
+\def\md@iflength@cleanup#1\relax{}
+
%%==================================================%%
%%========Sicherstellen der key-value-Syntax========%%
-%%================ HIER DER GLOABEL ================%%
%%==================================================%%
\AtBeginDocument{
\@ifpackageloaded{xcolor}{%
@@ -100,123 +130,58 @@
}
}
-
-\newcommand*\mdf@get@linewidth[1]{%
- \begingroup
- \unitlength=1pt\relax
- \@tempdima#1\unitlength
- \edef\mdf@GET@linewidth{\endgroup\@tempdima=\the\@tempdima}%
- \mdf@GET@linewidth
-}
-\picture@redefine\mdf@get@linewidth{&1}
+%%%Laengentests
+%%\mdf@linewidth
\begingroup
- \mdf@get@linewidth{\mdf@linewidth}
- \global\edef\mdf@linewidth{\the\@tempdima}
+\let\@tempa\mdf@linewidth
+\md@iflength{\@tempa}{}{\global\edef\mdf@linewidth{\the\md@templength}}
\endgroup
-
-
-\newcommand*\mdf@get@margin[1]{%
- \begingroup
- \unitlength=1pt\relax
- \@tempdima#1\unitlength
- \edef\mdf@GET@margin{\endgroup\@tempdima=\the\@tempdima}%
- \mdf@GET@margin
-}
-\picture@redefine\mdf@get@margin{&1}
+%%\mdf@margin
\begingroup
- \mdf@get@margin{\mdf@margin}
- \global\edef\mdf@margin{\the\@tempdima}
+\let\@tempa\mdf@margin
+\md@iflength{\@tempa}{}{\global\edef\mdf@margin{\the\md@templength}}
\endgroup
+%%\mdf@skipabove
+\begingroup
+\let\@tempa\mdf@skipabove
+\md@iflength{\@tempa}{}{\global\edef\mdf@skipabove{\the\md@templength}}
+\endgroup
-\newcommand*\mdf@get@skipabove[1]{%
- \begingroup
- \unitlength=1pt\relax
- \@tempdima#1\unitlength
- \edef\mdf@GET@skipabove{\endgroup\@tempdima=\the\@tempdima}%
- \mdf@GET@skipabove
-}
-\picture@redefine\mdf@get@skipabove{&1}
+%%\mdf@skipbelow
\begingroup
- \mdf@get@skipabove{\mdf@skipabove}
- \global\edef\mdf@skipabove{\the\@tempdima}
+\let\@tempa\mdf@skipbelow
+\md@iflength{\@tempa}{}{\global\edef\mdf@skipbelow{\the\md@templength}}
\endgroup
+%%\mdf@leftmargin
+\begingroup
+\let\@tempa\mdf@leftmargin
+\md@iflength{\@tempa}{}{\global\edef\mdf@leftmargin{\the\md@templength}}
+\endgroup
-\newcommand*\mdf@get@skipbelow[1]{%
- \begingroup
- \unitlength=1pt\relax
- \@tempdima#1\unitlength
- \edef\mdf@GET@skipbelow{\endgroup\@tempdima=\the\@tempdima}%
- \mdf@GET@skipbelow
-}
-\picture@redefine\mdf@get@skipbelow{&1}
+%%\mdf@rightmargin
\begingroup
- \mdf@get@skipbelow{\mdf@skipbelow}
- \global\edef\mdf@skipbelow{\the\@tempdima}
+\let\@tempa\mdf@rightmargin
+\md@iflength{\@tempa}{}{\global\edef\mdf@rightmargin{\the\md@templength}}
\endgroup
+
%%==================================================%%
-%%========Sicherstellen der key-value-Syntax========%%
-%%================ HIER DIE LOKALEN ================%%
+%%==Deklaration diverser Eingabe und Hilfsparameter=%%
%%==================================================%%
-\define@key{mdframed}{linecolor}[\mdf@linecolor]{%
- \def\md@@linecolor{\color{#1}}
-}
-
-
-\define@key{mdframed}{backgroundcolor}[\mdf@backgroundcolor]{%
- \mdbackgroundcolor{#1}
-}
-
-\define@key{mdframed}{fontcolor}[\mdf@fontcolor]{%
- \mdfontcolor{#1}
- \def\md@@fontcolor{\color{#1}}
-}
-
-\newcommand*\md@linewidth{}
-\define@key{mdframed}{linewidth}[2pt]{%
- \md@get@linewidth{#1}
- \edef\md@linewidth{\the\@tempdima}
- \md@framed@linewidth\md@linewidth
-}
-\newcommand*\md@get@linewidth[1]{%
- \begingroup
- \unitlength=1pt\relax
- \@tempdima#1\unitlength
- \edef\md@GET@linewidth{\endgroup\@tempdima=\the\@tempdima}%
- \md@GET@linewidth
-}
-\picture@redefine\md@get@linewidth{&1}
-
-
-
-\newcommand*\md@margin{}
-\define@key{mdframed}{margin}[10pt]{%
- \md@get@margin{#1}
- \edef\md@margin{\the\@tempdima}
- \md@framed@margin\md@margin
-}
-\newcommand*\md@get@margin[1]{%
- \begingroup
- \unitlength=1pt\relax
- \@tempdima#1\unitlength
- \edef\md@GET@margin{\endgroup\@tempdima=\the\@tempdima}%
- \md@GET@margin
-}
-\picture@redefine\md@get@margin{&1}
-
+\newskip\md@framed@margin \md@framed@margin\mdf@margin %% Abstand |Links<INHALTE>Rechts|
+\newskip\md@framed@linewidth \md@framed@linewidth\mdf@linewidth %% Dicke der Linie
+\newskip\md@framed@leftmargin \md@framed@leftmargin\mdf@leftmargin %% Laenge des Linken Abstandes |<->|TEXT...
+\newskip\md@framed@rightmargin \md@framed@rightmargin\mdf@rightmargin %% Laenge des Linken Abstandes ...TEXT|<->|
-%%==================================================%%
-%%==Deklaration diverser Eingabe und Hilfsparameter=%%
-%%==================================================%%
-
-\newskip\md@framed@margin \md@framed@margin\mdf@margin %% Abstand |Links<INHALTE>Rechts|
-\newskip\md@framed@linewidth \md@framed@linewidth\mdf@linewidth %% Dicke der Linie
+\newskip\md@outsidemargin \md@outsidemargin\mdf@leftmargin %% Hilfslaenge -- Speicherung des gesamt
+ %% vorgebenen left-right-margin
+ \advance\md@outsidemargin\mdf@rightmargin
\newcommand\mdframedabovespace[1]{\def\md@space@above@frame{#1}}
@@ -233,25 +198,30 @@
\newif\ifmd@box@empty \md@box@emptyfalse %% Ifabfrage, die prueft, ob der Inhalt einer Box leer ist
%% default - ist nicht leer
-\newcommand\mdbackgroundcolor[1]{\def\md@backgroundcolor{#1}} %% User-Command - Hintergrundfarbe
+\def\md@@linecolor{\color{\mdf@linecolor}} %% Abkuerzungskommando Linienfarbe
+
+\def\md@@fontcolor{\color{\mdf@fontcolor}} %% Abkuerzungskommando Schriftfarbe
-\newcommand\mdlinecolor[1]{\def\md@linecolor{#1}} %% User-Command - Linienfarbe
-\def\md@@linecolor{\color{\mdf@linecolor}} %% Abkuerzungskommando
+\def\md@@backgroundcolor{\color{\mdf@backgroundcolor}}%% Abkuerzungskommando Hintergrundfarbe
-\newcommand\mdfontcolor[1]{\def\md@fontcolor{#1}}
-\def\md@@fontcolor{\color{\mdf@fontcolor}}
-\mdbackgroundcolor{\mdf@backgroundcolor}
-\mdlinecolor{\mdf@linecolor}
%%==================================================%%
%%===Globale Umgebung -- noch keine Modifikation ===%%
%%==================================================%%
\newenvironment{mdframed}[1][]% default-Umgebung
- {\setkeys{mdframed}{#1}%
- \vskip\mdf@skipabove
+ {\setkeys{mdf}{#1}%
+ \addvspace{\mdf@skipabove}%
+ \ifmdf@ntheorem
+ \ifdefined\theorempreskipamount
+ \theorempreskipamount0pt
+ \theorempostskipamount0pt
+ \else
+ {\md@PackageWarning{You haven not loaded ntheorem yet}}%
+ \fi%
+ \fi%
\mdframed@global@env}%
- {\endmdframed@global@env\vskip\mdf@skipbelow}
+ {\endmdframed@global@env\addvspace{\mdf@skipbelow}}
@@ -268,10 +238,12 @@
%%==================================================%%
%%================= Breite der BOX =================%%
%%==================================================%%
-\def\md@margin@equation{% %% Berechnung der moeglichen Breite fuer den Rahmeninhalt
- \advance\hsize by -\md@framed@margin %% hsize minus Randvorgabe
- \advance\hsize by -2\md@framed@linewidth %% hsize minus Linienbreite
- \advance\hsize by -\width\md@arrayparboxrestore}%% Beruecksichtigung das Auszaehlung bzw. list-Umgebung enthalten
+\def\md@margin@equation{% %% Berechnung der moeglichen Breite fuer den Rahmeninhalt
+ \advance\hsize by - \md@framed@margin %% hsize minus Randvorgabe
+ \advance\hsize by -2\md@framed@linewidth %% hsize minus Linienbreite
+ \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
%%==================================================%%
%%===Bestimmung des Platzbedarfes fuer den Rahmen===%%
@@ -500,86 +472,117 @@
%%==================================================%%
%%=Ausgabe der Box nach Vorgabe der Ausagaberoutine=%%
%%==================================================%%
+
\let\md@textwidth\textwidth
-\def\md@putbox@single{%%%%% Ausgabe der ungesplitteten Gesamtbox
- \ifvoid\@tempboxa
- \else
- \centerline{%
- \rlap{\color{\md@backgroundcolor}%
+
+
+%%=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}{\md@framed@linewidth}%
- \rule[-0.5\baselineskip]{\md@textwidth}{\fp@putboxa@length@md}%
- }%
- \setlength{\fp@putboxa@length@md}{\ht\@tempboxa}%
- \addtolength{\fp@putboxa@length@md}{0.5\baselineskip}%
- \rlap{\md@@linecolor%
- \vrule width \md@framed@linewidth height \fp@putboxa@length@md%
- \rule[-0.5\baselineskip-\md@framed@linewidth]{\hsize-2\md@framed@linewidth}{\md@framed@linewidth}%
- }%
- \hfill%
- {\box\@tempboxa}%
- \hfill%
- \llap{\md@@linecolor%
- \llap{%
- \rule[-0.5\baselineskip-\md@framed@linewidth]{0pt}{\md@framed@linewidth}%
- \vrule width \md@framed@linewidth height \fp@putboxa@length@md}%
- }%
- \llap{\md@@linecolor\rule[\fp@putboxa@length@md]{\hsize}{\md@framed@linewidth}}%
+ \rule[-0.5\baselineskip]{\md@textwidth-\md@outsidemargin}{\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{\md@@linecolor\vrule width \md@framed@linewidth height \fp@putboxa@length@md depth 0.5\baselineskip}%
+ \rlap{\md@@linecolor\rule[-0.5\baselineskip-\md@framed@linewidth]{\md@textwidth-\md@outsidemargin}{\md@framed@linewidth}%
+ }%
+}%
+
+\def\md@frame@topandrightline@single{%
+ \llap{\md@@linecolor\vrule width \md@framed@linewidth height \fp@putboxa@length@md depth 0.5\baselineskip}%
+ \llap{\md@@linecolor\rule[\fp@putboxa@length@md]{\md@textwidth-\md@outsidemargin}{\md@framed@linewidth}}%
+}%
+
+
+\def\md@putbox@single{%%%%% Ausgabe der ungesplitteten Gesamtbox
+ \ifvoid\@tempboxa
+ \else
+ \centerline{%
+ \null\hspace*{\md@framed@leftmargin}%
+ \md@frame@background@single%
+ \md@frame@leftandbottomline@single%
+ \hfill{\box\@tempboxa}\hfill%
+ \md@frame@topandrightline@single%
+ \hspace*{\mdf@rightmargin}\null%
+ }%
\fi
}
-\def\md@putbox@first{%%%% Ausgabe der Teilbox 1
- \centerline{%
- \rlap{\color{\md@backgroundcolor}%
+%%=first=%%
+
+\def\md@frame@background@first{%
+ \rlap{\color{\mdf@backgroundcolor}%
\setlength{\fp@putboxa@length@md}{\ht\tw@}%
\addtolength{\fp@putboxa@length@md}{0.5\baselineskip}%
\addtolength{\fp@putboxa@length@md}{-\md@framed@linewidth}%
- \rule{\md@textwidth}{\fp@putboxa@length@md}%
+ \rule{\md@textwidth-\md@outsidemargin}{\fp@putboxa@length@md}%
}%
- \setlength{\fp@putboxa@length@md}{\ht\tw@}%
- \addtolength{\fp@putboxa@length@md}{0.5\baselineskip}%
- \rlap{\md@@linecolor%
- \vrule width \md@framed@linewidth height \fp@putboxa@length@md%
- \rule[\fp@putboxa@length@md-\md@framed@linewidth]{\hsize-\md@framed@linewidth}{\md@framed@linewidth}%
- }%
- \hfill%
- {\box\tw@}%
- \hfill%
- \llap{\md@@linecolor%
- \vrule width \md@framed@linewidth height \fp@putboxa@length@md%
- }%
- }%% ??? \centerline bad idea
+}%
+
+\def\md@frame@topandleftline@first{%
+ \setlength{\fp@putboxa@length@md}{\ht\tw@}%
+ \addtolength{\fp@putboxa@length@md}{0.5\baselineskip}%
+ \rlap{\md@@linecolor \vrule width \md@framed@linewidth height \fp@putboxa@length@md%
+ \rule[\fp@putboxa@length@md-\md@framed@linewidth]{\hsize-\md@framed@linewidth-\md@outsidemargin}{\md@framed@linewidth}%
+ }%
+}%
+
+\def\md@frame@rightline@first{%
+ \llap{\md@@linecolor \vrule width \md@framed@linewidth height \fp@putboxa@length@md}%
+}%
+
+
+
+\def\md@putbox@first{%%%% Ausgabe der Teilbox 1
+ \centerline{%
+ \null\hspace*{\mdf@leftmargin}%
+ \md@frame@background@first%
+ \md@frame@topandleftline@first%
+ \hfill{\box\tw@}\hfill%
+ \md@frame@rightline@first%
+ \null\hspace*{\mdf@rightmargin}\null%
+ }%
}
+%%=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-\md@outsidemargin}{\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{\md@@linecolor \vrule width \md@framed@linewidth height \fp@putboxa@length@md depth 0.5\baselineskip}%
+ \rlap{\md@@linecolor \rule[-0.5\baselineskip-\md@framed@linewidth]{\md@textwidth-\md@outsidemargin}{\md@framed@linewidth}}%
+}%
+
+\def\md@frame@rightline@second{%
+ \llap{\md@@linecolor\vrule width \md@framed@linewidth height \fp@putboxa@length@md depth 0.5\baselineskip}%
+}%
\def\md@putbox@second{%%%%% Ausgabe der Teilbox 2
\ifvoid\@tempboxa
\else
\centerline{%
- \rlap{\color{\md@backgroundcolor}%
- \setlength{\fp@putboxa@length@md}{\ht\@tempboxa}%
- \addtolength{\fp@putboxa@length@md}{.7\baselineskip}%
- \addtolength{\fp@putboxa@length@md}{\md@framed@linewidth}%
- \rule[-0.5\baselineskip-\md@framed@linewidth]{\md@textwidth}{\fp@putboxa@length@md}%
- }%
- \setlength{\fp@putboxa@length@md}{\ht\@tempboxa}%
- \addtolength{\fp@putboxa@length@md}{0.2\baselineskip}% %Linienueberschuss auf zweiter Seite
- \rlap{\md@@linecolor%
- \vrule width \md@framed@linewidth height \fp@putboxa@length@md%
- \rule[-0.5\baselineskip-\md@framed@linewidth]{\hsize-2\md@framed@linewidth}{\md@framed@linewidth}%
- }%
- \hfill%
- {\box\@tempboxa}%
- \hfill%
- \llap{\md@@linecolor%
- \llap{%
- \rule[-0.5\baselineskip-\md@framed@linewidth]{0pt}{\md@framed@linewidth}%
- \vrule width \md@framed@linewidth height \fp@putboxa@length@md}%
- }%
- }%
+ \null\hspace*{\mdf@leftmargin}%
+ \md@frame@background@second%
+ \md@frame@leftandbottomline@second%
+ \hfill{\box\@tempboxa}\hfill%
+ \md@frame@rightline@second%
+ \hspace*{\mdf@rightmargin}\null%
+ }%
\fi
}
@@ -614,7 +617,7 @@
-%%%%%KEINE AHNUNG
+
\catcode`\|=\md@arrayparboxrestore %%%????
@@ -657,5 +660,23 @@
\sloppy
}
+%%==================================================%%
+%%== Sicherstellen das Optionen nur global setzbar==%%
+%%==================================================%%
+
+\DisableKeyvalOption[%
+ action=warning,
+ package=mdframed,
+]{mdf}{skipabove}%
+
+\DisableKeyvalOption[%
+ action=warning,
+ package=mdframed,
+]{mdf}{skipbelow}%
+
+\DisableKeyvalOption[%
+ action=warning,
+ package=mdframed,
+]{mdf}{xcolor}%
\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%