diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/mdframed/mdframed.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/mdframed.sty | 89 |
1 files changed, 83 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty index ee5ab20348c..78f9111df6b 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 161 2011-08-06 11:28:15Z marco $ -%%$Rev: 161 $ +%%$Id: mdframed.sty 163 2011-08-22 19:08:00Z marco $ +%%$Rev: 163 $ %%$Author: marco $ -%%$Date: 2011-08-06 13:28:15 +0200 (Sa, 06. Aug 2011) $ +%%$Date: 2011-08-22 21:08:00 +0200 (Mo, 22. Aug 2011) $ %% Allgemeine Angaben -\def\mdversion{v0.7a} +\def\mdversion{v0.8} \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 161 2011-08-06 11:28:15Z marco $ \mdversion: \mdframedpackagename] +\ProvidesPackage{mdframed}[\md@maindate@svn$Id: mdframed.sty 163 2011-08-22 19:08:00Z marco $ \mdversion: \mdframedpackagename] %%==================================================%% %%=============== Benoetigte Pakete ================%% @@ -241,14 +241,91 @@ \def\md@endparenv{% \addpenalty\@endparpenalty\addvspace\mdf@skipbelow@length\@endpetrue} + + +%%==================================================%% +%%=============Umgebungdefinition===================%% +%%==================================================%% +%\newmdenv[<mdframed-options>]{<environmen>} +\newrobustcmd*\newmdenv[2][]{% + \newenvironment{#2}{% + \mdfsetup{#1}% + \begin{mdframed}% + }{% + \end{mdframed}% + }% +} +%\renewmdenv[<mdframed-options>]{<environmen>} +\newrobustcmd*\renewmdenv[2][]{% + \expandafter\let\csname #2\endcsname\relax% + \expandafter\let\csname end#2\endcsname\relax% + \newmdenv[#1]{#2}% + }% + +%http://tex.stackexchange.com/questions/26298/own-command-to-create-new-environment +%\newtheorem{<envname>}[<numberedlike>]{<caption>}[<within>] +%\newmdtheoremenv[<mdframed-options>]{<envname>}[<numberedlike>]{<caption>}[<within>] +%\md@tempa[<mdframed-options>] +%\md@tempb{<envname>}% +%\md@tempc[<numberedlike>]% +%\md@tempd{<caption>}% +%\md@tempe[<within>]% +\newrobustcmd*\newmdtheoremenv[2][]{% + \kernel@ifnextchar[%] + {\newmdtheoremenv@i}{\newmdtheoremenv@i[]}% +} +\def\newmdtheoremenv@i[#1]#2{% + \def\md@tempa{#1}% + \def\md@tempb{#2}% + \kernel@ifnextchar[%] + {\newmdtheoremenv@ii}{\newmdtheoremenv@ii[]}% +} + +\def\newmdtheoremenv@ii[#1]#2{% + \def\md@tempc{#1}% + \def\md@tempd{#2}% + \kernel@ifnextchar[%] + {\newmdtheoremenv@iii}{\newmdtheoremenv@iii[]}% +} + +\def\newmdtheoremenv@iii[#1]{% + \def\md@tempe{#1}% + \ifboolexpr{ not (test {\ifdefempty{\md@tempc}}) + and + not (test {\ifdefempty{\md@tempe}}) + }{% + \md@PackageWarning{You defined {\string\newtheorem} with ^^J + both optional arguments^^J + <numeredlike> and <within>. This isn't allowed^^J + \mdframedpackagename will use <numeredlike>\MessageBreak}% + \newtheorem{\csname md\md@tempb \endcsname}[\md@tempc]{\md@tempd}% + }% + {\ifdefempty{\md@tempc}{}{\newtheorem{md\md@tempb}[\md@tempc]{\md@tempd}}% + \ifdefempty{\md@tempe}{}{\newtheorem{md\md@tempb}{\md@tempd}[\md@tempe]}% + }% + \ifboolexpr{test {\ifdefempty{\md@tempc}} + and + test {\ifdefempty{\md@tempe}} + }{% + \newtheorem{md\md@tempb}{\md@tempd}% + }{}% + \expandafter\protected@xdef\csname\md@tempb\endcsname{\noexpand\mdfsetup{\md@tempa}% + \noexpand\begin{mdframed}[]\noexpand\begin{md\md@tempb}% + }% + \expandafter\protected@xdef\csname end\md@tempb\endcsname{% + \noexpand\end{md\md@tempb}\noexpand\end{mdframed}% + }% +} + %%==================================================%% %%=================== Frametitle ===================%% %%==================================================%% +\let\mdraggedtitle\raggedright \providecommand*\mdframedtitleenv[1]{% \@afterindentfalse {\parindent \z@ \setlength{\parfillskip}{\z@ plus 1fil}% - \raggedsection\nobreak\mdf@frametitlefont#1\relax% + \mdraggedtitle\nobreak\mdf@frametitlefont#1\relax% \par}% \@afterheading} % |