From 2d87cc25c8cb4cd9a8862f8eb6dde9783efa5dd4 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 2 Jul 2013 22:50:34 +0000
Subject: mdframed (2jul13)

git-svn-id: svn://tug.org/texlive/trunk@31075 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/mdframed/mdframed.sty | 29 ++++++++++-------------
 1 file changed, 12 insertions(+), 17 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/mdframed/mdframed.sty')

diff --git a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
index 112c389e61c..27765d7882b 100644
--- a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
+++ b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
@@ -49,10 +49,10 @@
 %% ==================================================
 %% 
 
-\def\mdversion{1.9a}
+\def\mdversion{1.9b}
 \def\mdframedpackagename{mdframed}
-\def\mdfmaindate{2013/06/21}
-\def\mdfrevision{     208}% Done by github: git rev-list HEAD | wc -l
+\def\mdfmaindate{2013/07/01}
+\def\mdfrevision{     212}% Done by github: git rev-list HEAD | wc -l
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{mdframed}%
      [\mdfmaindate\space \mdversion: \mdframedpackagename]
@@ -73,6 +73,7 @@
 \RequirePackage{xparse}
 \RequirePackage{etoolbox}[2011/01/03]
 \RequirePackage{zref-abspage}
+\RequirePackage{needspace}
 \RequirePackage{color}
 \SetupKeyvalOptions{family=mdf,prefix=mdf@}
 \def\mdf@definestyle@defaultoptions{}%
@@ -208,6 +209,7 @@
    {roundcorner==\z@},%
    {footenotedistance==\medskipamount},
    {userdefinedwidth==\linewidth},
+   {needspace==\z@},
    {frametitleaboveskip==5pt},
    {frametitlebelowskip==5pt},
    {frametitlerulewidth==.2pt},
@@ -291,7 +293,6 @@
     {frametitlebottomline==true},%
     {frametitlerightline==true},%
     {frametitlerule==false},%
-    {nobreak==false},%
     {footnoteinside==true},%
     {usetwoside==true},%
     {repeatframetitle==false},%Noch nicht richtig implementiert
@@ -318,6 +319,10 @@
  }%
 }
 \appto\mdf@definestyle@defaultoptions{hidealllines=false,}%
+%%special boolflag nobreak:
+\DeclareBoolOption[true]{nobreak}
+\boolfalse{mdf@nobreak}%
+\appto\mdf@definestyle@defaultoptions{nobreak=false,}
 \def\mdf@do@alignoption#1{%
    \mdf@alignoption@tripledo#1\@nil%
 }
@@ -372,17 +377,6 @@
       \RequirePackage{xcolor}%
   \fi%
 }%
-\define@key{mdf}{needspace}[\z@]{%
-     \begingroup%
-        \setlength{\dimen@}{#1}%
-        \vskip\z@\@plus\dimen@%
-        \penalty -100\vskip\z@\@plus -\dimen@%
-        \vskip\dimen@%
-        \penalty 9999%
-        \vskip -\dimen@%
-        \vskip\z@skip % hide the previous |\vskip| from |\addvspace|
-      \endgroup%
-}
 \DeclareDefaultOption{%
    \mdf@PackageError{Unknown Option '\CurrentOption' for mdframed}}
 \ProcessKeyvalOptions*\relax
@@ -808,6 +802,7 @@
 \@definecounter{mdf@env@i}
 \@definecounter{mdf@env@ii}
 \newrobustcmd*\mdf@preenvsetting{%
+   \needspace{\mdf@needspace@length}
    \mdf@twoside@checklength%
    \edef\mdf@par@local{%
       \parskip=\the\parskip\relax%
@@ -1054,11 +1049,11 @@
        \mdf@dolist{\mdf@advancelength@sub{\dimen@}}%
          {innerlinewidth,middlelinewidth,outerlinewidth}%
       }{}%
-    \notbool{mdf@topline}%no top line
+    \ifbool{mdf@topline}{}%%no top line
        {%
            \mdf@dolist{\mdf@advancelength@add{\dimen@}}%
              {innerlinewidth,middlelinewidth,outerlinewidth}%
-       }{}%
+       }%
     \advance\dimen@.8\pageshrink%
     \ifdimless{\ht\mdf@splitbox@one+\dp\mdf@splitbox@one}{\dimen@}%
        {\mdf@PackageWarning{You got a bad break\MessageBreak
-- 
cgit v1.2.3

