summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mdframed
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/mdframed')
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf9
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf9
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf406
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf9
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/mdframed.sty234
5 files changed, 600 insertions, 67 deletions
diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf
index e083a8abce1..5ffb6ee0715 100644
--- a/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf
+++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf
@@ -8,14 +8,13 @@
%% Public License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
-%%$Id: md-frame-0.mdf 188 2011-09-07 10:32:16Z marco $
-%%$Rev: 188 $
+%%$Id: md-frame-0.mdf 195 2011-09-10 17:58:51Z marco $
+%%$Rev: 195 $
%%$Author: marco $
-%%$Date: 2011-09-07 12:32:16 +0200 (Mi, 07. Sep 2011) $
+%%$Date: 2011-09-10 19:58:51 +0200 (Sa, 10. Sep 2011) $
\def\mdframedOpackagename{md-frame-0}
\def\md@frameOdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space }
-\ProvidesFile{md-frame-0.mdf}[\md@frameOdate@svn$Id: md-frame-0.mdf 188 2011-09-07 10:32:16Z marco $ \mdversion: \mdframedOpackagename]
-
+\ProvidesFile{md-frame-0.mdf}[\md@frameOdate@svn$Id: md-frame-0.mdf 195 2011-09-10 17:58:51Z marco $ \mdversion: \mdframedOpackagename]
%%==================================================%%
%%================single-box========================%%
%%==================================================%%
diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf
index 7d397b2b5f6..df655bf6e31 100644
--- a/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf
+++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf
@@ -8,14 +8,13 @@
%% Public License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
-%%$Id: md-frame-1.mdf 188 2011-09-07 10:32:16Z marco $
-%%$Rev: 188 $
+%%$Id: md-frame-1.mdf 195 2011-09-10 17:58:51Z marco $
+%%$Rev: 195 $
%%$Author: marco $
-%%$Date: 2011-09-07 12:32:16 +0200 (Mi, 07. Sep 2011) $
-
+%%$Date: 2011-09-10 19:58:51 +0200 (Sa, 10. Sep 2011) $
\def\mdframedIpackagename{md-frame-1}
\def\md@frameIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space }
-\ProvidesFile{md-frame-1.mdf}[\md@frameIdate@svn$Id: md-frame-1.mdf 188 2011-09-07 10:32:16Z marco $ \mdversion: \mdframedIpackagename]
+\ProvidesFile{md-frame-1.mdf}[\md@frameIdate@svn$Id: md-frame-1.mdf 195 2011-09-10 17:58:51Z marco $ \mdversion: \mdframedIpackagename]
%%%% _____t_____
%%%% | |
%%%% | |
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..ce63d9992cc
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf
@@ -0,0 +1,406 @@
+%%==================================================%%
+%%= Ausgabe der Box nach Vorgabe der Ausgaberoutine=%%
+%%==================================================%%
+%% Styledatei fuer das Paket mdframed erstellt durch
+%% Marco Daniel
+
+%% This package may be distributed under the terms of the LaTeX Project
+%% Public License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.0 or, at your option, any later version.
+
+%%$Id: md-frame-2.mdf 195 2011-09-10 17:58:51Z marco $
+%%$Rev: 195 $
+%%$Author: marco $
+%%$Date: 2011-09-10 19:58:51 +0200 (Sa, 10. Sep 2011) $
+
+%%Allgemeine Einstellungen fuer pstricks
+%%Hier nur einfacher Rahmen mit Einstellungen
+\def\mdframedIIIpackagename{md-frame-3}
+\def\md@frameIIIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space }
+\ProvidesFile{md-frame-3.mdf}[\md@frameIIIdate@svn$Id: md-frame-2.mdf 195 2011-09-10 17:58:51Z marco $ \mdversion: \mdframedIIIpackagename]
+%
+\def\md@ptlength@to@pscode#1{\pst@number{#1} \pst@number\psxunit div}
+\let\ptTps\md@ptlength@to@pscode\relax
+%%%% _____t_____
+%%%% | |
+%%%% | |
+%%%% | |
+%%%% l| |r
+%%%% | |
+%%%% | |
+%%%% |___________|
+%%%% b
+%zusammenhaenge abfragen:
+\newrobustcmd*\md@test@ltrb{\ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline})
+ and (bool {mdf@leftline}) and (bool {mdf@rightline})}}
+%3-set
+\newrobustcmd*\md@test@ltr{\ifboolexpr{ (bool {mdf@topline}) and not (bool {mdf@bottomline})
+ and (bool {mdf@leftline}) and (bool {mdf@rightline})}}
+\newrobustcmd*\md@test@ltb{\ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline})
+ and (bool {mdf@leftline}) and not (bool {mdf@rightline})}}
+\newrobustcmd*\md@test@trb{\ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline})
+ and not (bool {mdf@leftline}) and (bool {mdf@rightline})}}
+\newrobustcmd*\md@test@lrb{\ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline})
+ and (bool {mdf@leftline}) and (bool {mdf@rightline})}}
+%2-set
+\newrobustcmd*\md@test@lb{\ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline})
+ and (bool {mdf@leftline}) and not (bool {mdf@rightline})}}
+\newrobustcmd*\md@test@rb{\ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline})
+ and not (bool {mdf@leftline}) and (bool {mdf@rightline})}}
+\newrobustcmd*\md@test@tr{\ifboolexpr{ (bool {mdf@topline}) and not (bool {mdf@bottomline})
+ and not (bool {mdf@leftline}) and (bool {mdf@rightline})}}
+\newrobustcmd*\md@test@lt{\ifboolexpr{ (bool {mdf@topline}) and not (bool {mdf@bottomline})
+ and (bool {mdf@leftline}) and not (bool {mdf@rightline})}}
+%Einzellinien
+\newrobustcmd*\md@test@single{%
+ \ifboolexpr{ not (test {\md@test@ltrb} or test {\md@test@ltr} or test {\md@test@ltb}
+ or test {\md@test@trb} or test {\md@test@lrb} or test {\md@test@lb}
+ or test {\md@test@rb} or test {\md@test@tr} or test {\md@test@lt} ) }}
+
+%%==================================================%%
+%%================single-box========================%%
+%%==================================================%%
+\def\md@putbox@single{%
+ \leftline{\null\hspace*{\mdf@leftmargin@length}%%
+ \ifbool{mdf@leftline}{\hspace*{\mdf@middlelinewidth@length}}{}%
+ \setlength\mdfboundingboxwidth{\wd\@tempboxa}%
+ \setlength\mdfboundingboxheight{\ht\@tempboxa+\dp\@tempboxa}%
+ \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax%
+ \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax%
+ \ifbool{mdf@topline}{\advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax}{}%
+ \ifbool{mdf@bottomline}{\advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax}{}%
+ \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax%
+ \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax%
+ \psset{linearc=\mdf@roundcorner@length,cornersize=absolut,}%
+ \expandafter\psset\expandafter{\mdf@psset@local}%
+ \psset{unit=1truecm}%
+ \begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight)
+ \md@test@ltrb{%
+ \psframe[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdf@middlelinewidth@length} 0.5 mul)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)
+ }{}
+ \md@test@ltr{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ 0)
+ }{}
+ \md@test@ltb{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul)%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdf@middlelinewidth@length} 0.5 mul)%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} %X
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ }{}
+ \md@test@trb{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! 0
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdf@middlelinewidth@length} 0.5 mul)
+ (! 0 \ptTps{\mdf@middlelinewidth@length} 0.5 mul)
+ }{}
+ \md@test@lrb{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdfboundingboxheight})%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdf@middlelinewidth@length} 0.5 mul )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdf@middlelinewidth@length} 0.5 mul )
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdfboundingboxheight})
+ }{}
+ \md@test@lb{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdfboundingboxheight})%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdf@middlelinewidth@length} 0.5 mul )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul )
+ }{}
+ \md@test@rb{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! 0 \ptTps{\mdf@middlelinewidth@length} 0.5 mul )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdf@middlelinewidth@length} 0.5 mul )
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdfboundingboxheight})
+ }{}
+ \md@test@tr{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! 0
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ 0)
+ }{}
+ \md@test@lt{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} %X
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ }{}
+ \md@test@single{}{%
+ \ifbool{mdf@bottomline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! 0 \ptTps{\mdf@middlelinewidth@length} 0.5 mul )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul )
+ }{}%
+ \ifbool{mdf@topline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! 0 \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add)%
+ (! \ptTps{\mdfboundingboxwidth}
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add)
+ }{}%
+ \ifbool{mdf@leftline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdfboundingboxheight} )%
+ }{}%
+ \ifbool{mdf@rightline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add 0)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add
+ \ptTps{\mdfboundingboxheight} )%
+ }{}%
+ }{}%
+ %Hintergrund
+ \psframe[linecolor=\mdf@backgroundcolor,fillstyle=solid,%
+ fillcolor=\mdf@backgroundcolor,linestyle=solid,
+ linewidth=\mdf@middlelinewidth@length,dimen=outer]%
+ (!0 \ifbool{mdf@bottomline}{\ptTps{\mdf@middlelinewidth@length}}{0})
+ (! \ptTps{\mdfboundingboxwidth} %
+ \ptTps{\mdfboundingboxheight} \ifbool{mdf@topline}{\ptTps{\mdf@middlelinewidth@length} sub}{})
+ %Ausgabe
+ \rput[b](!\ptTps{\mdfboundingboxwidth} 0.5 mul % X-Koordinate
+ \ptTps{\mdf@innerbottommargin@length}
+ \ifbool{mdf@bottomline}{\ptTps{\mdf@middlelinewidth@length} add}{}
+ ){\box\@tempboxa}
+ \end{pspicture}%
+ }%
+}
+%%==================================================%%
+%%================first-box=========================%%
+%%==================================================%%
+
+\def\md@putbox@first{%
+ \leftline{\null\hspace*{\mdf@leftmargin@length}%%
+ \ifbool{mdf@leftline}{\hspace*{\mdf@middlelinewidth@length}}{}%
+ \setlength\mdfboundingboxwidth{\wd\tw@}%
+ \setlength\mdfboundingboxheight{\ht\tw@+\dp\tw@}%
+ \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax
+ \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax%
+ \ifbool{mdf@topline}{\advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax}{}%
+ \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax%
+ \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax%
+ \psset{linearc=\mdf@roundcorner@length,cornersize=absolute}%
+ \expandafter\psset\expandafter{\mdf@psset@local}%
+ \psset{unit=1truecm}%
+ \ifdimgreater{\mdfboundingboxheight}{\vsize}
+ {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\vsize)}
+ {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight)}
+ %Hintergrund
+ \psline[linecolor=\mdf@backgroundcolor,fillstyle=solid,linestyle=solid,
+ linearc={\dimexpr\mdf@roundcorner@length-\mdf@middlelinewidth@length\relax},
+ fillcolor=\mdf@backgroundcolor,linewidth=\mdf@middlelinewidth@length]%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul 0)%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul
+ \ptTps{\mdfboundingboxheight} \ifbool{mdf@topline}%
+ {\ptTps{\mdf@middlelinewidth@length} neg 1.5 mul add}%
+ {\ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add} )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add %X
+ \ptTps{\mdfboundingboxheight} \ifbool{mdf@topline}%
+ {\ptTps{\mdf@middlelinewidth@length} neg 1.5 mul add}%
+ {\ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add} )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add %X
+ 0)
+ \ifboolexpr{ test {\md@test@ltrb} or test {\md@test@ltr}}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ 0)
+ }{}
+ \ifboolexpr{ test {\md@test@tr} or test {\md@test@trb}}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! 0
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ 0)
+ }{}
+ \ifboolexpr{ test {\md@test@ltb} or test {\md@test@lt}}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@roundcorner@length} neg add %X
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)%
+ }{}
+ \ifboolexpr{ test {\md@test@single} or test {\md@test@rb} or test {\md@test@lrb} or test {\md@test@lb}}{%
+ \ifbool{mdf@topline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! 0 \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add)%
+ (! \ptTps{\mdfboundingboxwidth}
+ \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add)
+ }{}%
+ \ifbool{mdf@leftline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdfboundingboxheight} )%
+ }{}%
+ \ifbool{mdf@rightline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add 0)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add
+ \ptTps{\mdfboundingboxheight} )%
+ }{}%
+ }{}%
+ %Ausgabe
+ \rput[b](!\ptTps{\mdfboundingboxwidth} 0.5 mul % X-Koordinate
+ \ptTps{\mdf@splitbottomskip@length}){\box\tw@}
+ \end{pspicture}%
+ }%
+}
+
+%%==================================================%%
+%%================middle-box========================%%
+%%==================================================%%
+
+\def\md@putbox@middle{%
+ \leftline{\null\hspace*{\mdf@leftmargin@length}%%
+ \ifbool{mdf@leftline}{\hspace*{\mdf@middlelinewidth@length}}{}%
+ \setlength\mdfboundingboxwidth{\wd\tw@}%
+ \setlength\mdfboundingboxheight{\ht\tw@+\dp\tw@}%
+ \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax%
+ \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax%
+ \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax%
+ \expandafter\psset\expandafter{\mdf@psset@local}%
+ \psset{linearc=\mdf@roundcorner@length,cornersize=absolute}%
+ \psset{unit=1truecm}%
+ \ifdimgreater{\mdfboundingboxheight}{\vsize}
+ {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\vsize)}
+ {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight)}
+ \ifbool{mdf@leftline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdfboundingboxheight} )%
+ }{}%
+ \ifbool{mdf@rightline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add 0)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add
+ \ptTps{\mdfboundingboxheight} )%
+ }{}%
+ %Hintergrund
+ \psframe[linecolor=\mdf@backgroundcolor,fillstyle=solid,%
+ fillcolor=\mdf@backgroundcolor,linestyle=solid,
+ linewidth=\mdf@middlelinewidth@length,dimen=outer,%
+ linearc=\z@]%
+ (!0 0)
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdfboundingboxheight})
+ %Ausgabe
+ \rput[b](!\ptTps{\mdfboundingboxwidth} 0.5 mul % X-Koordinate
+ \ptTps{\mdf@splitbottomskip@length} ){\box\tw@}
+ \end{pspicture}%
+ }%
+}
+%%==================================================%%
+%%=================last-box=========================%%
+%%==================================================%%
+\def\md@putbox@second{
+ \leftline{\null\hspace*{\mdf@leftmargin@length}%%
+ \ifbool{mdf@leftline}{\hspace*{\mdf@middlelinewidth@length}}{}%
+ \setlength\mdfboundingboxwidth{\wd\@tempboxa}%
+ \setlength\mdfboundingboxheight{\ht\@tempboxa+\dp\@tempboxa}%
+ \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax%
+ \ifbool{mdf@bottomline}{\advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax}{}%
+ \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax%
+ \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax%
+ \expandafter\psset\expandafter{\mdf@psset@local}
+ \psset{linearc=\mdf@roundcorner@length,cornersize=absolute}%
+ \psset{unit=1truecm}%
+ \begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight)
+ %Hintergrund
+ \psline[linecolor=\mdf@backgroundcolor,fillstyle=solid,linestyle=solid,
+ linearc={\dimexpr\mdf@roundcorner@length-\mdf@middlelinewidth@length\relax},
+ fillcolor=\mdf@backgroundcolor,linewidth=\mdf@middlelinewidth@length]%%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul \ptTps{\mdfboundingboxheight} )%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul
+ \ifbool{mdf@bottomline}%
+ {\ptTps{\mdf@middlelinewidth@length} neg 1.5 mul neg}%
+ {\ptTps{\mdf@middlelinewidth@length} neg 0.5 mul neg} )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add
+ \ifbool{mdf@bottomline}%
+ {\ptTps{\mdf@middlelinewidth@length} neg 1.5 mul neg}%
+ {\ptTps{\mdf@middlelinewidth@length} neg 0.5 mul neg} )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add
+ \ptTps{\mdfboundingboxheight} )
+ %%%%%%%%%%%%
+ \ifboolexpr{ test {\md@test@ltrb} or test {\md@test@lrb}}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdfboundingboxheight})%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdf@middlelinewidth@length} 0.5 mul )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdf@middlelinewidth@length} 0.5 mul )
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdfboundingboxheight})
+ }{}
+ \ifboolexpr{ test {\md@test@ltb} or test {\md@test@lb}}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdfboundingboxheight})%
+ (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdf@middlelinewidth@length} 0.5 mul )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul )
+ }{}
+ \ifboolexpr{ test {\md@test@trb} or test {\md@test@rb}}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! 0 \ptTps{\mdf@middlelinewidth@length} 0.5 mul )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdf@middlelinewidth@length} 0.5 mul )
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X
+ \ptTps{\mdfboundingboxheight})
+ }{}
+ \ifboolexpr{ test {\md@test@single} or test {\md@test@ltr} or test {\md@test@tr} or test {\md@test@lt}}{%
+ \ifbool{mdf@bottomline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! 0 \ptTps{\mdf@middlelinewidth@length} 0.5 mul )%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul )
+ }{}%
+ \ifbool{mdf@leftline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)%
+ (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdfboundingboxheight} )%
+ }{}%
+ \ifbool{mdf@rightline}{%
+ \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add 0)%
+ (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add
+ \ptTps{\mdfboundingboxheight} )%
+ }{}%
+ }{}%
+ %Ausgabe
+ \rput[b](!\ptTps{\mdfboundingboxwidth} 0.5 mul % X-Koordinate
+ \ptTps{\mdf@innerbottommargin@length}
+ \ifbool{mdf@bottomline}{\ptTps{\mdf@middlelinewidth@length} add}{}
+ ){\box\@tempboxa}
+ \end{pspicture}%
+ }%
+}
+
+\endinput
+%eof
+
diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf
index 7c4410faa8a..6c930751914 100644
--- a/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf
+++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf
@@ -8,20 +8,19 @@
%% Public License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
-%%$Id: md-frame-3.mdf 188 2011-09-07 10:32:16Z marco $
-%%$Rev: 188 $
+%%$Id: md-frame-3.mdf 195 2011-09-10 17:58:51Z marco $
+%%$Rev: 195 $
%%$Author: marco $
-%%$Date: 2011-09-07 12:32:16 +0200 (Mi, 07. Sep 2011) $
+%%$Date: 2011-09-10 19:58:51 +0200 (Sa, 10. Sep 2011) $
%%Allgemeine Einstellungen fuer pstricks
%%Hier nur einfacher Rahmen mit Einstellungen
\def\mdframedIIIpackagename{md-frame-3}
\def\md@frameIIIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space }
-\ProvidesFile{md-frame-3.mdf}[\md@frameIIIdate@svn$Id: md-frame-3.mdf 188 2011-09-07 10:32:16Z marco $ \mdversion: \mdframedIIIpackagename]
+\ProvidesFile{md-frame-3.mdf}[\md@frameIIIdate@svn$Id: md-frame-3.mdf 195 2011-09-10 17:58:51Z marco $ \mdversion: \mdframedIIIpackagename]
%
\def\md@ptlength@to@pscode#1{\pst@number{#1} \pst@number\psxunit div}
\let\ptTps\md@ptlength@to@pscode\relax
-%
%%%% _____t_____
%%%% | |
%%%% | |
diff --git a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
index fe5c8b60e92..085743f886a 100644
--- a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
+++ b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
@@ -32,17 +32,17 @@
%% %%
%%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>%%
-%%$Id: mdframed.sty 188 2011-09-07 10:32:16Z marco $
-%%$Rev: 188 $
+%%$Id: mdframed.sty 198 2011-09-11 10:50:44Z marco $
+%%$Rev: 198 $
%%$Author: marco $
-%%$Date: 2011-09-07 12:32:16 +0200 (Mi, 07. Sep 2011) $
+%%$Date: 2011-09-11 12:50:44 +0200 (So, 11. Sep 2011) $
%% Allgemeine Angaben
-\def\mdversion{v0.9b}
+\def\mdversion{v0.9e}
\def\mdframedpackagename{mdframed}
\def\md@maindate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space }
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mdframed}[\md@maindate@svn$Id: mdframed.sty 188 2011-09-07 10:32:16Z marco $ \mdversion: \mdframedpackagename]
+\ProvidesPackage{mdframed}[\md@maindate@svn$Id: mdframed.sty 198 2011-09-11 10:50:44Z marco $ \mdversion: \mdframedpackagename]
%%==================================================%%
%%=============== Benoetigte Pakete ================%%
%%==================================================%%
@@ -53,7 +53,7 @@
\RequirePackage{#1}%
}{%
\md@PackageWarning{The package #1 does not exist^^J
- but it is required by \mdframedpackagename^^J
+ but needed by \mdframedpackagename^^J
see documentation fo further information
}%
}
@@ -63,7 +63,7 @@
\md@LoadFile@IfExist{calc}
\md@LoadFile@IfExist{color}
\md@LoadFile@IfExist{etoolbox}
-
+\md@LoadFile@IfExist{zref-abspage}
\SetupKeyvalOptions{family=mdf,prefix=mdf@}
%%==================================================%%
@@ -106,10 +106,10 @@
%%Schleifenmakro zur Optioneneingabe Option==Laenge
\DeclareListParser*{\mdf@dolist}{,}
-\def\mdf@do#1{%
- \mdf@doubledo#1\@nil%
+\def\mdf@do@lengthoption#1{%
+ \mdf@lengthoption@doubledo#1\@nil%
}
-\def\mdf@doubledo#1==#2\@nil{%
+\def\mdf@lengthoption@doubledo#1==#2\@nil{%
\mdf@option@length{#1}{#2}%
\mdf@define@key@length{#1}%
}
@@ -117,28 +117,58 @@
%Festlegung welcher Stildatei
%% 0 := tex-Kommandos -- rule
%% 1 := tikz
-%% 2 := tikz-erweitert
-%% 3 := pstricks-einfach
-%% 4 := pstricks-erweitert
-\DeclareStringOption[0]{style}
-\define@key{mdf}{globalstyle}[\mdf@style]{%
- \def\md@styledo##1{%
- \def\@tempa{##1}
- \ifcase\number\@tempa\relax
+%% 2 := pstricks
+%% 3 := pstricks <- veraltet
+\newcounter{mdf@globalstyle@cnt}
+\defcounter{mdf@globalstyle@cnt}{0}
+\newcommand*\mdfglobal@style{0}
+
+\define@key{mdf}{style}{%
+ \md@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\md@LoadFile@IfExist{tikz}%1 <- tikz wird benoetigt
\or\md@LoadFile@IfExist{tikz}%2 <- tikz wird benoetigt
\or\md@LoadFile@IfExist{pstricks-add}%3 <- pstricks wird benoetigt
\or\md@LoadFile@IfExist{pstricks-add}%4 <- pstricks wird benoetigt
- \else\md@PackageWarning{Unknown global style \@tempa}%
- \fi
- }%
- \mdf@dolist{\md@styledo}{\mdf@style,#1}%
- }
+ \else\md@PackageWarning{Unknown global style \value{mdf@globalstyle@cnt}}%
+ \fi%
+}
+
+\providecommand*\mdf@framemethod{}
+\define@key{mdf}{framemethod}[default]{%
+ \def\md@framemethod@i{}%
+ \def\md@framemethod@ii{}%
+ \def\md@framemethod@iii{}%
+ \lowercase{\def\md@tempa{#1}}
+ \forcsvlist{\listadd\md@framemethod@i}{default,tex,latex,none,0}
+ \forcsvlist{\listadd\md@framemethod@ii}{tikz,1}
+ \forcsvlist{\listadd\md@framemethod@iii}{pstricks,ps,2,postscript}
+ \xifinlist{\md@tempa}{\md@framemethod@i}%
+ {\def\mdf@@framemethod{default}\defcounter{mdf@globalstyle@cnt}{0}}%
+ {\xifinlist{\md@tempa}{\md@framemethod@ii}%
+ {\def\mdf@@framemethod{tikz}\defcounter{mdf@globalstyle@cnt}{1}}%
+ {\xifinlist{\md@tempa}{\md@framemethod@iii}%
+ {\def\mdf@@framemethod{pstricks}\defcounter{mdf@globalstyle@cnt}{2}}%
+ {\md@PackageWarning{Unknown framemethod \md@tempa\MessageBreak}}%
+ }%
+ }%
+ \ifcase\value{mdf@globalstyle@cnt}\relax%
+ %0 <- kein Grafikpaket
+ \or\md@LoadFile@IfExist{tikz}%1 <- tikz wird benoetigt
+ \or\md@LoadFile@IfExist{pstricks-add}%2 <- pstricks wird benoetigt
+ \or\md@LoadFile@IfExist{pstricks-add}%3 <- pstricks wird benoetigt <- support old style
+ \fi%
+}
+
+
%%%%Optionen mit Laengen
-\mdf@dolist{\mdf@do}{%
+\mdf@dolist{\mdf@do@lengthoption}{%
{skipabove==\z@},%
{skipbelow==\z@},%
{leftmargin==\z@},%
@@ -150,8 +180,8 @@
{innerbottommargin==0.4\baselineskip},%
{splittopskip==\z@},%
{splitbottomskip==\z@},%
- {outermargin==\z@},%
- {innermargin==\z@},%
+ {outermargin==-999pt},%
+ {innermargin==-999pt},%
{linewidth==0.4pt},%
{innerlinewidth==\z@},%
{middlelinewidth==\expandafter\mdf@linewidth@length},%
@@ -194,9 +224,24 @@
\DeclareStringOption[black]{fontcolor}
\DeclareStringOption[\mdf@linecolor]{innerlinecolor}
\DeclareStringOption[\mdf@linecolor]{outerlinecolor}
-\DeclareStringOption[\mdf@backgroundcolor]{middlelinecolor}
+\DeclareStringOption[\mdf@linecolor]{middlelinecolor}
\DeclareStringOption[\mdf@backgroundcolor]{psroundlinecolor}
+%Nutzung des Paketes needspace
+\DeclareStringOption[\z@]{needspace}
+\newcommand\mdf@sneedspace{}
+\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{%
\md@PackageWarning{Unknown Option '\CurrentOption' for mdframed}}
@@ -212,9 +257,21 @@
\DeclareStringOption[none]{printheight}
-\ProcessKeyvalOptions*
+
+\ProcessKeyvalOptions*\relax
\newcommand*{\mdfsetup}{\setkeys{mdf}}
-\mdfsetup{globalstyle=0}
+
+
+%Erlauben von mdfdefinestyle sowie redefinition von style
+\define@key{mdf}{style}{%
+ \ifcsundef{mdf@definestyle@#1}{%
+ \md@PackageWarning{Unknown definedstyle #1^^J
+ You have to define a style via \string\mdfdefinedstyle\MessageBreak
+ }%
+ }%
+ {\csuse{mdf@definestyle@#1}}%
+}
+
%%==================================================%%
%%========Sicherstellen der key-value-Syntax========%%
@@ -281,6 +338,14 @@
\def\md@endparenv{%
\addpenalty\@endparpenalty\addvspace\mdf@skipbelow@length\@endpetrue}
+%%==================================================%%
+%%==================framestyle======================%%
+%%==================================================%%
+%inspired by Lars Madsen
+\newrobustcmd*\mdfdefinestyle[2]{%
+ \csdef{mdf@definestyle@#1}{\mdfsetup{#2}}%
+}
+
%%==================================================%%
@@ -418,18 +483,16 @@
%%======= Laden der gewuenschten Style-Datei =======%%
%%==================================================%%
\newrobustcmd*\mdf@load@style{%
-\ifcase\mdf@style\relax%
+\ifcase\value{mdf@globalstyle@cnt}\relax%
\input{md-frame-0.mdf}%
\or\input{md-frame-1.mdf}%
- \or\md@PackageWarning{The style number\mdf@style does not exist\MessageBreak
- mdframed ues instead style=0 \mdframedpackagename}%
- \input{md-frame-0.mdf}%
+ \or\input{md-frame-2.mdf}
\or\input{md-frame-3.mdf}%
\else%
- \IfFileExists{md-frame-\mdf@style.mdf}{\input{md-frame-\mdf@style.mdf}%
- }{\input{md-frame-1.mdf}%
- \md@PackageWarning{The style number \mdf@style does not exist\MessageBreak
- mdframed ues instead style=0 \mdframedpackagename}%
+ \IfFileExists{md-frame-\value{mdf@globalstyle@cnt}.mdf}{\input{md-frame-\value{mdf@globalstyle@cnt}.mdf}%
+ }{\input{md-frame-0.mdf}%
+ \md@PackageWarning{The style number \value{mdf@globalstyle@cnt} does not exist^^J
+ mdframed ues instead style=0 \mdframedpackagename}%
}%
\fi%
}%
@@ -438,7 +501,7 @@
%%========= style-abhaengige Modifikation ==========%%
%%==================================================%%
\newrobustcmd*\md@styledefinition{%
- \ifnumequal{\mdf@style}{0}%
+ \ifnumequal{\value{mdf@globalstyle@cnt}}{0}%
{\deflength{\mdf@innerlinewidth@length}{\z@}%
\deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}%
\deflength{\mdf@outerlinewidth@length}{\z@}%
@@ -446,18 +509,18 @@
\let\mdf@middlelinecolor\mdf@linecolor%
\let\mdf@outerlinecolor\mdf@linecolor%
}{}%
- \ifnumequal{\mdf@style}{3}%
+ \ifnumequal{\value{mdf@globalstyle@cnt}}{2}%
+ {\deflength{\mdf@innerlinewidth@length}{\z@}%
+ \deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}%
+ \deflength{\mdf@outerlinewidth@length}{\z@}%
+ \let\mdf@innerlinecolor\mdf@linecolor%
+ }{}%
+ \ifnumequal{\value{mdf@globalstyle@cnt}}{3}%
{\deflength{\mdf@innerlinewidth@length}{\z@}%
\deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}%
\deflength{\mdf@outerlinewidth@length}{\z@}%
\let\mdf@innerlinecolor\mdf@linecolor%
}{}%
-% \ifnumequal{\mdf@style}{1}%
-% {\deflength{\mdf@innerlinewidth@length}{\z@}%
-% \deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}%
-% \deflength{\mdf@outerlinewidth@length}{\z@}%
-% \let\mdf@innerlinecolor\mdf@linecolor%
-% }{}%
}
%%==================================================%%
@@ -521,6 +584,7 @@
%check is needed?
\mdfsetup{#1}%%
\mdf@settings%
+ \md@twoside@checklength%
\let\width\z@%
\let\height\z@%
\setlength{\topsep}{\mdf@skipabove@length}%
@@ -542,6 +606,59 @@
\hrule \@height\z@ \@width\hsize
\endgroup%
}
+%%==================================================%%
+%%================== Twoside-Modus =================%%
+%%==================================================%%
+\newtoggle{md:checktwoside}
+\settoggle{md:checktwoside}{false}
+\newrobustcmd*\md@twoside@checklength{%
+ \if@twoside
+ \ifboolexpr{ test {\ifdimequal{\mdf@outermargin@length}{-999pt}}
+ and
+ test {\ifdimequal{\mdf@innermargin@length}{-999pt}}
+ }%
+ {%
+ \md@PackageInfo{You haven't set the outermargin/innermargin^^
+ mdframed will use leftmargin/rightmargin}%
+ \settoggle{md:checktwoside}{false}%
+ }%
+ {\settoggle{md:checktwoside}{true}}%
+ \iftoggle{md:checktwoside}{%
+ \let\mdf@rightmargin@length\mdf@outermargin@length\relax%
+ \let\mdf@leftmargin@length\mdf@innermargin@length\relax%
+ }{}%
+ \fi
+}
+
+\newcounter{md@zref@counter}%keine doppelten laebes
+\zref@newprop*{md@pagevalue}[0]{\number\value{page}}
+\zref@addprop{\ZREF@mainlist}{md@pagevalue}
+
+\newrobustcmd*\md@zref@label{%
+ \stepcounter{md@zref@counter}
+ \zref@label{md@pagelabel-\number\value{md@zref@counter}}%
+}
+
+\newrobustcmd*\if@md@pageodd{%
+ \zref@refused{md@pagelabel-\the\value{md@zref@counter}}%
+ \ifodd\zref@extract{md@pagelabel-\the\value{md@zref@counter}}{md@pagevalue}%
+ \edef\md@reserveda{\md@pageisodd}%
+ \else
+ \edef\md@reserveda{\md@pageiseven}%
+ \fi
+ \md@reserveda%
+}
+
+\newrobustcmd*\md@pageisodd{%
+\let\mdf@rightmargin@length\mdf@outermargin@length\relax%
+\let\mdf@leftmargin@length\mdf@innermargin@length\relax%
+}
+\newrobustcmd*\md@pageiseven{%
+\let\mdf@rightmargin@length\mdf@innermargin@length\relax%
+\let\mdf@leftmargin@length\mdf@outermargin@length\relax%
+}
+
+\newrobustcmd*\md@@setzref{\md@zref@label\if@md@pageodd}
%%==================================================%%
%%================= Platz auf Seite ================%%
@@ -663,7 +780,11 @@
innerbottommargin,innerlinewidth,middlelinewidth,outerlinewidth}%
\md@keeplines@single%
\ifdimless{\md@verticalmarginwhole@length}{\md@freevspace@length}%
- {\md@putbox@single%%passt auf Seite
+ {%passt auf Seite%
+ \begingroup
+ \iftoggle{md:checktwoside}{\md@@setzref}{}%
+ \md@putbox@single%%passt auf Seite
+ \endgroup
\let\md@reserved@a\relax}%
{\def\md@reserved@a{\md@put@frame@i}}%passt nicht auf Seite
}%
@@ -733,7 +854,10 @@
\def\md@reserved@a{\md@put@frame}%
}%
{%
- \md@putbox@first%%%Groesse des Splittens passt
+ \begingroup
+ \iftoggle{md:checktwoside}{\md@@setzref}{}%
+ \md@putbox@first%%%Groesse des Splittens passt
+ \endgroup
\hrule \@height\z@ \@width\hsize
\vfill\eject%
\def\md@reserved@a{\md@put@frame@ii}%
@@ -759,20 +883,26 @@
\setbox\@tempboxa\vbox{\unvbox\@tempboxa}%PRUEFEN!!!!
\ifvoid\@tempboxa\relax%
\md@PackageWarning{You got a bad break\MessageBreak
- because the splittet box is empty\MessageBreak
+ because the split box is empty\MessageBreak
You have to change the settings}%
\fi%
- \md@putbox@middle%
+ \begingroup
+ \iftoggle{md:checktwoside}{\md@@setzref}{}%
+ \md@putbox@middle%
+ \endgroup
\hrule \@height\z@ \@width\hsize
\vfill\eject
\def\md@reserved@a{\md@put@frame@ii}%
}%Hier die Ausgabe der mittleren Box
{\ifvoid\@tempboxa
\md@PackageWarning{You got a bad break\MessageBreak
- because the last splittet box is empty\MessageBreak
+ because the last split box is empty\MessageBreak
You have to change the settings}%
\fi%
- \md@putbox@second%
+ \begingroup
+ \iftoggle{md:checktwoside}{\md@@setzref}{}%
+ \md@putbox@second%
+ \endgroup
\let\md@reserved@a\relax%
}%Hier kommt die Ausgabe der letzten Box
\md@reserved@a%
@@ -784,7 +914,7 @@
\DisableKeyvalOption[%
action=warning,
package=mdframed,
-]{mdf}{globalstyle}%
+]{mdf}{framemethod}%
\DisableKeyvalOption[%
action=warning,