From 856ac22d901c0f4f007b58ee5af58f54b40ce4d3 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 9 Mar 2013 22:47:59 +0000
Subject: mdframed (9mar13)

git-svn-id: svn://tug.org/texlive/trunk@29319 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/mdframed/mdframed.sty | 40 ++++++++++++++---------
 1 file changed, 25 insertions(+), 15 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 1c00a5a2a12..36295b6ca84 100644
--- a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
+++ b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
@@ -48,10 +48,10 @@
 %% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 %% ==================================================
 %% 
-\def\mdversion{1.6d}
+\def\mdversion{1.8}
 \def\mdframedpackagename{mdframed}
-\def\mdfmaindate{2012/09/21}
-\def\mdfrevision{162}% Done by github: git rev-list HEAD | wc -l
+\def\mdfmaindate{2013/03/09}
+\def\mdfrevision{     172}% Done by github: git rev-list HEAD | wc -l
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{mdframed}%
      [\mdfmaindate\ %
@@ -281,6 +281,7 @@
     {subsubtitleaboveline==false},
     {subsubtitlebelowline==false},
     {draft==false},
+    {suppressfirstparskip==true},
 }
 %%special boolflag hidealllines:
 \newbool{mdf@hidealllines}%
@@ -464,15 +465,16 @@
    \let\mdf@deferred@thm@head\deferred@thm@head
    \pretocmd{\deferred@thm@head}{\@inlabelfalse}%
       {\mdf@PackageInfo{mdframed detected package amsthm ^^J
-                        changed the theoerem header of amsthm\MessageBreak}%
+                        changed the theorem header of amsthm\MessageBreak}%
       }{%
        \mdf@PackageError{mdframed detected package amsthm ^^J
-                         changed the theoerem header of amsthm
+                         changed the theorem header of amsthm
                          failed\MessageBreak}%
        }%
      }%
 }{\let\mdf@patchamsthm\relax}%
 \def\mdf@trivlist#1{%
+  \edef\x{\topsep=\the\topsep\relax\partopsep=\the\partopsep\relax\parsep=\the\parsep\relax}
   \setlength{\topsep}{#1}%
   \partopsep\z@%
   \parsep\z@%
@@ -483,17 +485,17 @@
   \itemindent\z@%
   \let\@itemlabel\@empty%
   \def\makelabel##1{##1}%
-%%  \item\leavevmode\hrule \@height\z@ \@width\linewidth\relax%
+  \item\relax\x\relax\leavevmode\hrule \@height\z@ \@width\linewidth\relax%
 %%  \item\mbox{}\relax% second version
-  \item\relax% first Version
+%%  \item\relax\x% first Version
 }
 \let\endmdf@trivlist\endtrivlist
 \patchcmd\endmdf@trivlist\@endparenv\mdf@endparenv{%
-  \immediate\typeout{^^J****** mdframed patching \string\endmdf@trivlist}%
-  \immediate\typeout{^^J****** -- success******^^J}%
+  \wlog{^^J****** mdframed patching \string\endmdf@trivlist}%
+  \wlog{^^J****** -- success******^^J}%
   }{%
-  \immediate\typeout{^^J****** mdframed patching \string\endmdf@trivlist}%
-  \immediate\typeout{^^J****** -- failed******^^J}%
+  \wlog{^^J****** mdframed patching \string\endmdf@trivlist}%
+  \wlog{^^J****** -- failed******^^J}%
 }
 \def\mdf@endparenv{%
   \addpenalty\@endparpenalty\addvspace\mdf@skipbelow@length\@endpetrue}
@@ -761,6 +763,9 @@
   \fi%
 \mdf@reserved@a%
 }
+\newcount\mdf@envdepth \mdf@envdepth=0
+\@definecounter{mdf@env@i}
+\@definecounter{mdf@env@ii}
 \newenvironment{mdframed}[1][]{%
 \color@begingroup%
    \mdfsetup{userdefinedwidth=\linewidth,#1}%
@@ -772,6 +777,10 @@
      {%
       \ifdimgreater{\overfullrule}{0pt}{}{\setlength\overfullrule{5pt}}%
      }{}%
+   \ifnum\mdf@envdepth >\tw@\@toodeep\else
+    \advance\mdf@envdepth\@ne
+    \edef\mdf@depthctr{mdf@env@\romannumeral\the\mdf@envdepth}%
+   \fi
    \mdf@styledefinition%
    \mdf@footnoteinput%
    \color{\mdf@fontcolor}%
@@ -780,6 +789,7 @@
    \mdf@trivlist{\mdf@skipabove@length}%%
    \ifdefempty{\mdf@frametitle}{}{\mdf@@frametitle}%
    \mdf@settings%
+   \ifbool{mdf@suppressfirstparskip}{\addtolength{\mdf@innertopmargin@length}{-\parskip}}{}%
    \mdf@lrbox{\mdf@splitbox@one}%
   }%
   {%
@@ -1032,8 +1042,8 @@
         \ifdim\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax>\dimen@
           \advance\dimen@i by -\p@\relax
           \advance\@tempcnta by \@ne\relax
-%%          \immediate\typeout{***mdframed \string\@tempcnta=\the\@tempcnta***}
-%%          \immediate \typeout{***mdframed \string\dimen@i=\the\dimen@i***}
+%%          \wlog{***mdframed \string\@tempcnta=\the\@tempcnta***}
+%%          \wlog{***mdframed \string\dimen@i=\the\dimen@i***}
           \mdf@ignorevbadness%
           \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}%
           \splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length%
@@ -1173,8 +1183,8 @@
               \mdf@freevspace@length\relax
           \advance\dimen@i by -\p@\relax%
           \advance\@tempcnta by \@ne\relax%
-%%          \immediate\typeout{***mdframed \string\@tempcnta=\the\@tempcnta***}
-%%          \immediate \typeout{***mdframed \string\dimen@i=\the\dimen@i***}
+%%          \wlog{***mdframed \string\@tempcnta=\the\@tempcnta***}
+%%          \wlog{***mdframed \string\dimen@i=\the\dimen@i***}
           \ifnum\@tempcnta>100
             \let\iterate\relax%
             \mdf@PackageWarning{correct box splittet fails^^J
-- 
cgit v1.2.3

