From 2116b098967c4ac8c5c341b24ece64007d46d45f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 21 Sep 2012 22:30:34 +0000 Subject: mdframed (21sep12) git-svn-id: svn://tug.org/texlive/trunk@27762 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/mdframed/mdframed-example-default.pdf | Bin 271171 -> 271437 bytes .../latex/mdframed/mdframed-example-default.tex | 71 ++-- .../latex/mdframed/mdframed-example-pstricks.pdf | Bin 69205 -> 69620 bytes .../latex/mdframed/mdframed-example-pstricks.tex | 29 +- .../doc/latex/mdframed/mdframed-example-texsx.pdf | Bin 258567 -> 258441 bytes .../doc/latex/mdframed/mdframed-example-texsx.tex | 23 +- .../doc/latex/mdframed/mdframed-example-tikz.pdf | Bin 286480 -> 290107 bytes .../doc/latex/mdframed/mdframed-example-tikz.tex | 98 +++-- Master/texmf-dist/doc/latex/mdframed/mdframed.pdf | Bin 883618 -> 875723 bytes Master/texmf-dist/source/latex/mdframed/Makefile | 43 +- .../texmf-dist/source/latex/mdframed/mdframed.dtx | 437 ++++++++++++++------- .../source/latex/mdframed/mdframedmake.bat | 126 +++++- Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls | 22 +- .../texmf-dist/tex/latex/mdframed/md-frame-0.mdf | 5 +- .../texmf-dist/tex/latex/mdframed/md-frame-1.mdf | 52 ++- .../texmf-dist/tex/latex/mdframed/md-frame-2.mdf | 7 +- .../texmf-dist/tex/latex/mdframed/md-frame-3.mdf | 7 +- Master/texmf-dist/tex/latex/mdframed/mdframed.sty | 72 ++-- 18 files changed, 679 insertions(+), 313 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.pdf index b1d2d276fef..68a5e5fbc56 100644 Binary files a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.pdf and b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.pdf differ diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex index 7aba53867bf..9f202f496d6 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex @@ -1,8 +1,5 @@ -%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ - {documentation of mdframed} \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} @@ -13,7 +10,7 @@ \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\ExplFileDate} +\date{\mdfmaindate} \version{\mdversion} \introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. @@ -41,7 +38,7 @@ \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option +In the preamble only the package \Pack{mdframed} with the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. @@ -80,7 +77,7 @@ function of the independent variables alone. \Examplesec{hidden line + frame title} \begin{LTXexample} \global\mdfapptodefinestyle{exampledefault}{% - topline=false,rightline=true,bottomline=false} + topline=false,bottomline=false} \begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] \ExampleText \end{mdframed} @@ -101,7 +98,7 @@ function of the independent variables alone. \end{LTXexample} \Examplesec{framed picture which is centered} -\begin{LTXexample} +\begin{LTXexample}[morekeywords=width] \begin{mdframed}[userdefinedwidth=6cm,align=center, linecolor=blue,linewidth=4pt] \IfFileExists{donald-duck.jpg}% @@ -112,7 +109,7 @@ function of the independent variables alone. \clearpage \Examplesec{Theorem environments} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={theoremstyle,definition}] \mdfdefinestyle{theoremstyle}{% linecolor=red,linewidth=2pt,% frametitlerule=true,% @@ -133,7 +130,9 @@ function of the independent variables alone. \clearpage \Examplesec{theorem with separate header and the help of TikZ (complex)} -\begin{LTXexample} +\begin{LTXexample}[% + morekeywords={theo,baseline,anchor,outer,sep,current,bounding,box,east},% + moretexcs=tikz] \newcounter{theo}[section] \newenvironment{theo}[1][]{% \stepcounter{theo}% @@ -170,36 +169,40 @@ The example below is inspired by the following post on StackExchange \href{http://tex.stackexchange.com/questions/24101/theorem-decorations^^A -that-stay-with-theorem-environment}% {Theorem decorations that stay with theorem environment} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={mdf@frame@leftline@single,mdf@frame@rightline@single,% + mdf@frame@leftline@first,mdf@frame@rightline@first,% + mdf@frame@leftline@second,mdf@frame@rightline@second,% + mdf@frame@leftline@middle,mdf@frame@rightline@middle,% + mdfboundingboxdepth,mdfboundingboxtotalheight,% + mdf@topline,ifbool,interruptrule,everyline}] \makeatletter \newlength{\interruptlength} -\setlength{\interruptlength}{2.5ex} -\newrobustcmd\overlaplines{% - \appto\mdf@frame@leftline@single{% - \llap{\color{white}% - \rule[\dimexpr-\mdfboundingboxdepth+\interruptlength\relax]% - {\mdf@middlelinewidth@length}% - {\dimexpr\mdfboundingboxtotalheight% - \ifbool{mdf@topline}{+\mdf@middlelinewidth@length}{} - -2\interruptlength\relax}% - }% - }% - \appto\mdf@frame@rightline@single{% - \rlap{\color{white}% - \hspace*{\mdfboundingboxwidth}% - \hspace*{\mdf@innerrightmargin@length}% - \rule[\dimexpr-\mdfboundingboxdepth% - +\interruptlength\relax]% - {\mdf@middlelinewidth@length}% - {\dimexpr\mdfboundingboxtotalheight% - +\ifbool{mdf@topline}{\mdf@middlelinewidth@length}{0pt} - -2\interruptlength\relax}% - }% - }% +\newrobustcmd\interruptrule[3]{% + \color{#1}% + \hspace*{\dimexpr\mdfboundingboxwidth+\mdf@innerrightmargin@length\relax}% + \rule[\dimexpr-\mdfboundingboxdepth+#2\interruptlength\relax]% + {\mdf@middlelinewidth@length}% + {\dimexpr\mdfboundingboxtotalheight-#3\interruptlength\relax}% +} +\newrobustcmd\overlaplines[2][white]{% + \mdfsetup{everyline=false}% + \setlength{\interruptlength}{#2} + \appto\mdf@frame@leftline@single{\llap{\interruptrule{#1}{1}{2}}} + \appto\mdf@frame@rightline@single{\rlap{\interruptrule{#1}{1}{2}}} + \appto\mdf@frame@leftline@first{\llap{\interruptrule{#1}{0}{1}}} + \appto\mdf@frame@rightline@first{\rlap{\interruptrule{#1}{0}{1}}} + \appto\mdf@frame@leftline@second{\llap{\interruptrule{#1}{1}{1}}} + \appto\mdf@frame@rightline@second{\rlap{\interruptrule{#1}{1}{1}}} + \appto\mdf@frame@leftline@middle{\llap{\interruptrule{#1}{0}{0}}} + \appto\mdf@frame@rightline@middle{\rlap{\interruptrule{#1}{0}{0}}} } \makeatother -\overlaplines +\overlaplines{2.5ex} +\begin{mdframed}[linecolor=blue,linewidth=8pt] +\ExampleText +\end{mdframed} +\overlaplines[blue!70!black!20]{2.5ex} \begin{mdframed}[linecolor=blue,linewidth=8pt] \ExampleText \end{mdframed} diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.pdf index a66b5a606e6..f3006e6157e 100644 Binary files a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.pdf and b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.pdf differ diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex index f06c52e1635..e116dcbd44d 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex @@ -1,8 +1,5 @@ -%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ - {documentation of mdframed} \lstDeleteShortInline{|} \newcommand\Loadedframemethod{PSTricks} @@ -14,7 +11,7 @@ \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\ExplFileDate} +\date{\mdfmaindate} \version{\mdversion} \introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. @@ -49,7 +46,7 @@ done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} \NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} -X + \section{Examples} All examples have the following settings: @@ -80,7 +77,8 @@ function of the independent variables alone. \end{LTXexample} \Examplesec{hidden line + frame title} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={innerlinecolor,addtopsstyle,mdfouterlinestyle, + linestyle}] \global\mdfapptodefinestyle{exampledefault}{% topline=false,rightline=false,bottomline=false, frametitlerule=true,innertopmargin=6pt, @@ -94,27 +92,30 @@ function of the independent variables alone. \clearpage -\Examplesec{Dash Lines} +\Examplesec{Dash Lines}[morekeywords={pstrickssetting,linestyle,dashed}] \begin{LTXexample} \global\mdfdefinestyle{exampledefault}{% - pstrickssetting={linestyle=dashed,},linecolor=red,linewidth=5pt} -\begin{mdframed}[style=exampledefault,] + pstrickssetting={linestyle=dashed,},linecolor=red,middlelinewidth=2pt} +\begin{mdframed}[style=exampledefault] \ExampleText \end{mdframed} \end{LTXexample} \Examplesec{Double Lines} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={addtopsstyle,mdfmiddlelinestyle, + doubleline,doublesep}] \global\mdfdefinestyle{exampledefault}{% - pstrickssetting={doubleline=true,doublesep=6pt}, - linecolor=red,linewidth=5pt,middlelinewidth=4pt} -\begin{mdframed}[style=exampledefault,] + pstricksappsetting={\addtopsstyle{mdfmiddlelinestyle}{% + doubleline=true,doublesep=6pt,linewidth=4pt}},% + linecolor=red,middlelinewidth=16pt} +\begin{mdframed}[style=exampledefault] \ExampleText \end{mdframed} \end{LTXexample} +\clearpage \Examplesec{Shadow frame} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={shadow,shadowsize,myshadowbox}] \newmdenv[shadow=true, shadowsize=11pt, linewidth=8pt, diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.pdf index 8ad20b90300..c29d1e65aaf 100644 Binary files a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.pdf and b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.pdf differ diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.tex index 72eae7ec695..b486389e415 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.tex @@ -1,9 +1,6 @@ -%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt,lipsum=true]{ltxmdf} -\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ - {documentation of mdframed} \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} @@ -15,7 +12,7 @@ \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\ExplFileDate} +\date{\mdfmaindate} \version{\mdversion} \introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. @@ -89,14 +86,14 @@ Here the solution which can be decorate as usual. With the new command \Cmd{surroundwithmdframed} you can use \begin{tltxmdfexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment}, - morekeywords={lstlisting}] + morekeywords={listings}] \surroundwithmdframed{listings} \end{tltxmdfexample} \Examplesec{Package multicol} How I wrote in \enquote{Known Problems} you can't combine \Pack{multicol} with \Pack{mdframed}. In a simple way without any breaks you can use: -\begin{LTXexample} +\begin{LTXexample}[morekeywords={multicols}] \begin{multicols}{2} \lipsum[1] \begin{mdframed} @@ -132,11 +129,11 @@ How I wrote in \enquote{Known Problems} you can't combine \Pack{multicol} with \clearpage \onecolumn \Examplesec{Working inside enumerate} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={enumerate}] Text Text Text Text Text Text Text Text \begin{enumerate} \item in the following \ldots - \begin{mdframed}[linecolor=blue,linewidth=2] + \begin{mdframed}[linecolor=blue,middlelinewidth=2] \ExampleText \end{mdframed} \item \lipsum[2] @@ -179,7 +176,11 @@ Text Text Text Text Text Text \clearpage \Examplesec{digression-environement inspired by Tobias Weh} -\begin{lstlisting} +\begin{lstlisting}[morekeywords={% + font,anchor,let,in,arrow,round,cap,controls,coordinate,% + excursus,head,arrows,calc,line,width,and,to,digressionarrows,% + base,west},% + moretexcs={usetikzlibrary}] \usetikzlibrary{calc,arrows} \tikzset{ excursus arrow/.style={% @@ -285,7 +286,7 @@ Text Text Text Text Text Text \end{mdframed} \Examplesec{Theorem style shading background} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={top,bottom,Theorem,shadow,alternativtheorem}] \mdtheorem[% apptotikzsetting={\tikzset{mdfbackground/.append style =% {top color=yellow!40!white, @@ -293,7 +294,7 @@ Text Text Text Text Text Text mdfframetitlebackground/.append style =% {top color=purple!40!white, bottom color=purple!80!black} - } + }% }, ,roundcorner=10pt,middlelinewidth=2pt, shadow=true,frametitlerule=true,frametitlerulewidth=4pt, diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.pdf index 4198c38f488..39656da30cd 100644 Binary files a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.pdf and b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.pdf differ diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex index de0825c52f1..fcb53648071 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex @@ -1,8 +1,5 @@ -%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ - {documentation of mdframed} \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} @@ -13,7 +10,7 @@ \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\ExplFileDate} +\date{\mdfmaindate} \version{\mdversion} \introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. @@ -66,7 +63,7 @@ function of the independent variables alone. } \end{tltxmdfexample} \clearpage -\ExampleText{round corner} +\Examplesec{round corner} \begin{LTXexample} \global\mdfdefinestyle{exampledefault}{% outerlinewidth=5pt,innerlinewidth=0pt, @@ -80,7 +77,7 @@ function of the independent variables alone. \Examplesec{hidden line + frame title} \begin{LTXexample} \global\mdfapptodefinestyle{exampledefault}{% - topline=false,leftline=false,} + topline=false,leftline=false,} \begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] \ExampleText \end{mdframed} @@ -97,7 +94,7 @@ function of the independent variables alone. \end{LTXexample} \Examplesec{Gimmick} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={line,width,dash,dashed,pattern}] \mdfsetup{splitbottomskip=0.8cm,splittopskip=0cm, innerrightmargin=2cm,innertopmargin=1cm,% innerlinewidth=2pt,outerlinewidth=2pt, @@ -112,19 +109,17 @@ function of the independent variables alone. \end{mdframed} \end{LTXexample} +\clearpage \Examplesec{complex example with TikZ} -\begin{tltxmdfexample} +\begin{tltxmdfexample}[morekeywords={mdf}] \tikzstyle{titregris} = [draw=gray, thick, fill=white, shading = exersicetitle, % text=gray, rectangle, rounded corners, right,minimum height=.7cm] - \pgfdeclarehorizontalshading{exersicebackground}{100bp} {color(0bp)=(green!40); color(100bp)=(black!5)} - \pgfdeclarehorizontalshading{exersicetitle}{100bp} {color(0bp)=(red!40);color(100bp)=(black!5)} - \newcounter{exercise} \renewcommand*\theexercise{Exercise~n\arabic{exercise}} \makeatletter @@ -132,50 +127,107 @@ function of the independent variables alone. \define@key{mdf}{exercisepoints}{% \def\mdf@@exercisepoints{#1} } +\mdfdefinestyle{exercisestyle}{% + outerlinewidth=1em,outerlinecolor=white,% + leftmargin=-1em,rightmargin=-1em,% + middlelinewidth=1.2pt,roundcorner=5pt,linecolor=gray, + apptotikzsetting={\tikzset{mdfbackground/.append style ={% + shading = exersicebackground}}}, + innertopmargin=1.2\baselineskip, + skipabove={\dimexpr0.5\baselineskip+\topskip\relax}, + skipbelow={-1em}, + needspace=3\baselineskip, + frametitlefont=\sffamily\bfseries, + settings={\global\stepcounter{exercise}}, + singleextra={% + \node[titregris,xshift=1cm] at (P-|O) % + {~\mdf@frametitlefont{\theexercise}~}; + \ifdefempty{\mdf@@exercisepoints}% + {}% + {\node[titregris,left,xshift=-1cm] at (P)% + {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}% + }, + firstextra={% + \node[titregris,xshift=1cm] at (P-|O) % + {~\mdf@frametitlefont{\theexercise}~}; + \ifdefempty{\mdf@@exercisepoints}% + {}% + {\node[titregris,left,xshift=-1cm] at (P)% + {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}% + }, +} \makeatother +\begin{mdframed}[style=exercisestyle] +\ExampleText +\end{mdframed} + +\begin{mdframed}[style=exercisestyle,exercisepoints=10] +\ExampleText +\end{mdframed} +\end{tltxmdfexample} + +\tikzstyle{titregris} = + [draw=gray, thick, fill=white, shading = exersicetitle, % + text=gray, rectangle, rounded corners, right,minimum height=.7cm] +\pgfdeclarehorizontalshading{exersicebackground}{100bp} + {color(0bp)=(green!40); color(100bp)=(black!5)} +\pgfdeclarehorizontalshading{exersicetitle}{100bp} + {color(0bp)=(red!40);color(100bp)=(black!5)} +\newcounter{exercise} +\renewcommand*\theexercise{Exercise~n\arabic{exercise}} +\makeatletter +\def\mdf@@exercisepoints{}%new mdframed key: +\define@key{mdf}{exercisepoints}{% + \def\mdf@@exercisepoints{#1} +} \mdfdefinestyle{exercisestyle}{% - outerlinewidth=1pt,innerlinewidth=0pt, - roundcorner=2pt,linecolor=gray, - tikzsetting={shading = exersicebackground}, + outerlinewidth=1em,outerlinecolor=white,% + leftmargin=-1em,rightmargin=-1em,% + middlelinewidth=1.2pt,roundcorner=5pt,linecolor=gray, + apptotikzsetting={\tikzset{mdfbackground/.append style ={% + shading = exersicebackground}}}, innertopmargin=1.2\baselineskip, skipabove={\dimexpr0.5\baselineskip+\topskip\relax}, + skipbelow={-1em}, needspace=3\baselineskip, frametitlefont=\sffamily\bfseries, settings={\global\stepcounter{exercise}}, singleextra={% - \node[titregris,xshift=1cm] at (P-|O) % - {~\mdf@frametitlefont{\theexercise}~}; + \node[titregris,xshift=1cm] at (P-|O) % + {~\mdf@frametitlefont{\theexercise}~}; \ifdefempty{\mdf@@exercisepoints}% {}% {\node[titregris,left,xshift=-1cm] at (P)% {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}% }, firstextra={% - \node[titregris,xshift=1cm] at (P-|O) % - {~\mdf@frametitlefont{\theexercise}~}; + \node[titregris,xshift=1cm] at (P-|O) % + {~\mdf@frametitlefont{\theexercise}~}; \ifdefempty{\mdf@@exercisepoints}% {}% {\node[titregris,left,xshift=-1cm] at (P)% {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}% }, } -\begin{mdframed}[style=exercisestyle,] +\makeatother + +\begin{mdframed}[style=exercisestyle] \ExampleText \end{mdframed} \begin{mdframed}[style=exercisestyle,exercisepoints=10] \ExampleText \end{mdframed} -\end{tltxmdfexample} + \clearpage \Examplesec{Theorem environments} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={theoremstyle,definition}] \mdfdefinestyle{theoremstyle}{% - linecolor=red,linewidth=2pt,% + linecolor=red,middlelinewidth=2pt,% frametitlerule=true,% apptotikzsetting={\tikzset{mdfframetitlebackground/.append style={% - shade,left color=white, right color=blue!20}}}, + shade,left color=white, right color=blue!20}}}, frametitlerulecolor=green!60, frametitlerulewidth=1pt, innertopmargin=\topskip, diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf index 44f7ab50c98..864a4c77827 100644 Binary files a/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf and b/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf differ diff --git a/Master/texmf-dist/source/latex/mdframed/Makefile b/Master/texmf-dist/source/latex/mdframed/Makefile index 53c5c0d3b2f..a1f2040f1d1 100644 --- a/Master/texmf-dist/source/latex/mdframed/Makefile +++ b/Master/texmf-dist/source/latex/mdframed/Makefile @@ -1,6 +1,6 @@ ################################################################ ## Makefile for mdframed project folder -## $Id: Makefile 422 2012-05-31 17:07:26Z marco $ +## $Id: Makefile 428 2012-06-06 12:30:18Z marco $ ################################################################ ## Definitions ################################################################ @@ -22,7 +22,7 @@ STYLE_IV = md-frame-3 EXAMPLLIST= $(EXAMPLED) $(EXAMPLET) $(EXAMPLEP) $(EXAMPLESX) FILELIST = $(PACKAGE) $(EXAMPLED) $(EXAMPLET) $(EXAMPLEP) $(EXAMPLESX) STYLELIST = $(STYLE_I) $(STYLE_II) $(STYLE_III) $(STYLE_IV) -AUXFILES = aux dtxe glo glolog gls hd ins idx idxlog ilg ind log out ps thm tmp toc +AUXFILES = aux dtxe glo glolog gls hd ins idx idxlog ilg ind log out ps thm tmp toc xdv ################################################################ ## Colordefinition ################################################################ @@ -41,13 +41,20 @@ help: @echo -e "\tmake examples\t\t--\tcompiles all example files" @echo -e "\tmake clean\t\t--\tremove all helpfiles created by mdframed" @echo -e "\tmake changeversion\t--\tmaintaner tool to change the version" + @echo -e "\tmake changerevision\t--\tmaintaner tool to change the revision" + @echo -e "\tmake changedate\t--\tmaintaner tool to change the date" @echo -e "\tmake localinstall\t--\tinstall the package in TEXMFHOME" @echo -e "$(WARN_COLOR)End help$(NO_COLOR)" ################################################################ ## Compilation ################################################################ -%.pdf: %.tex +$(EXAMPLED).pdf: $(EXAMPLED).tex +$(EXAMPLET).pdf: $(EXAMPLET).tex +$(EXAMPLEP).ps: $(EXAMPLEP).tex +$(EXAMPLESX).pdf: $(EXAMPLESX).tex + +%.pdf: NAME=`basename $< .tex` ;\ echo -e "" ;\ echo -e "\t$(WARN_COLOR)Typesetting $$NAME$(NO_COLOR)" ;\ @@ -62,14 +69,14 @@ help: fi ;\ echo -e "\t$(OK_COLOR)Typesetting $$NAME finished $(NO_COLOR)" ;\ -%.ps: %.tex +%.ps: NAME=`basename $< .tex` ;\ echo -e "" ;\ echo -e "\t$(WARN_COLOR)Typesetting $$NAME$(NO_COLOR)" ;\ xelatex --no-pdf --interaction=nonstopmode $< > /dev/null ;\ if [ $$? = 0 ] ; then \ echo -e "\t$(OK_COLOR)compilation in draftmode without errors$(NO_COLOR)" ;\ - echo -e "\t$(OK_COLOR)Run LaTeX again on $$NAME.tex$(NO_COLOR)" ;\ + echo -e "\t$(OK_COLOR)Run XeLaTeX again on $$NAME.tex$(NO_COLOR)" ;\ xelatex --interaction=nonstopmode $< > /dev/null ;\ else \ echo -e "\t$(ERROR_COLOR)compilation in draftmode with errors$(NO_COLOR)" ;\ @@ -130,13 +137,13 @@ docsty: $(PACKAGE).dtx exit 0;\ fi ;\ -examples: $(EXAMPLED).pdf $(EXAMPLET).pdf $(EXAMPLEP).ps $(EXAMPLESX).pdf - exampled: $(EXAMPLED).pdf examplet: $(EXAMPLET).pdf examplep: $(EXAMPLEP).ps examplesx:$(EXAMPLESX).pdf +examples: exampled examplet examplep examplesx + clean: echo "" ;\ echo -e "\t$(WARN_COLOR)Start removing help files$(NO_COLOR)" ;\ @@ -176,7 +183,7 @@ makelocalinstall: echo -e "\t$(OK_COLOR)Installation done$(NO_COLOR)" ;\ ################################################################ -## maintaner tool +## maintainer tool ################################################################ changeversion: @echo @@ -187,6 +194,26 @@ changeversion: echo -e "$(OK_COLOR)Version geändert zu $$REPLY$(NO_COLOR)" @echo +changerevision: + @echo + @echo -e "$(OK_COLOR)Aktuell wird die folgende Revision verwendet" + @sed '/\\def\\mdfrevision/!d' $(PACKAGE).dtx + @echo -e "$(WARN_COLOR)" + @REPLY=`git rev-list HEAD | wc -l` && sed -rie "s/(\\\\def\\\\mdfrevision\{).*(})/\1$$REPLY\2/" $(PACKAGE).dtx&&\ + echo -e "$(OK_COLOR)Revision geändert zu $$REPLY$(NO_COLOR)" + @echo + +changedate: + @echo + @echo -e "$(OK_COLOR)Aktuell wird die folgendes Datum verwendet" + @sed '/\\def\\mdfmaindate/!d' $(PACKAGE).dtx + @echo -e "$(WARN_COLOR)" + @REPLY=`date +"%Y\/%m\/%d"` && sed -rie "s/(\\\\def\\\\mdfmaindate\{).*(})/\1$$REPLY\2/" $(PACKAGE).dtx&&\ + echo -e "$(OK_COLOR)Datum geändert zu $$REPLY$(NO_COLOR)" + @echo + +change: changeversion changerevision changedate + usectanify: echo "" ;\ echo -e "\t$(ERROR_COLOR)Start ctanify$(NO_COLOR)" ;\ diff --git a/Master/texmf-dist/source/latex/mdframed/mdframed.dtx b/Master/texmf-dist/source/latex/mdframed/mdframed.dtx index 0952179831e..7f80de45b5b 100644 --- a/Master/texmf-dist/source/latex/mdframed/mdframed.dtx +++ b/Master/texmf-dist/source/latex/mdframed/mdframed.dtx @@ -213,14 +213,11 @@ Have fun! \fi % %<*driver> -%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ + \setcounter{errorcontextlines}{999} \documentclass[parskip=false,11pt,]{ltxmdf} \usepackage[framemethod=TikZ]{mdframed} -\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ - {documentation of mdframed} - \EnableCrossrefs \CodelineIndex %%\RecordChanges @@ -253,12 +250,10 @@ Have fun! % \title{The \Pack{mdframed} package % \footnote{Extending the package \texttt{framed.sty}}} % \subtitle{auto-split frame environment} -% \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}% +% \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}, % \href{mailto:marco.daniel@mada-nada.de}{Elke Schubert}} % \version{\mdversion} -% \GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ -% {documentation of mdframed} -% \date{\ExplFileDate} +% \date{\mdfmaindate} % \introduction{The standard methods for framing text (\Cmd{fbox} % or \Cmd{fcolorbox}) require you to handle page breaks % by hand, meaning that you have to split the \Cmd{fbox} @@ -791,7 +786,7 @@ Have fun! % \eqref{fig:laengen}.} % % \mbox{} -% \ExplOpt[0\,pt]{userdefinedwidth} +% \ExplOpt[\textbackslash linewidth]{userdefinedwidth} % Sets the width of the whole \Pack{mdframed} environment. % The width represent the width including the line width and % the inner margins. The outer margins will be ignored. @@ -892,6 +887,18 @@ Have fun! % mdframed-ignore-descenders-in-last-line}^^A % {How to make mdframed ignore descenders in last line} % +% +% +% \ExplOpt[false]{draft} +% Activate the draft mode for the package. This option is useful for +% \Opt{framemethod=tikz} which clips the contents related to the surrounded +% frame. The options is motivated by the question +% \href{http://tex.stackexchange.com/questions/73059/^^A +% mdframedtikz-to-display-overfullrule}^^A +% {mdframed+tikz to display overfullrule} +% at \href{http://tex.stackexchange.com/}{tex.stackexchange}. +% +% % \ExplOpt[false]{shadow} % Draw a shadow. The shadow doesn't influence the bounding box so the % shadow can be drawn in the margin without any overfull box. @@ -997,7 +1004,7 @@ Have fun! % Sets the skip of the frame title to the margin above of \Env{mdframed}. % \ExplOpt[5\,pt]{frametitlebelowskip} % Sets the skip of the frame title to the rule of the frame title. -% \ExplOpt[white]{frametitlebackgroundcolor} +% \ExplOpt[backroundcolor]{frametitlebackgroundcolor} % Sets the color of the background of the frametitle % \ExplOpt[false]{repeatframetitle} % Repeat the frame title on every frame. @@ -1658,6 +1665,13 @@ Have fun! % % \subsection{Revision history}\label{rev} % \raggedright +% +% \minisec{Version 1.6d submitted 21 Sep 2012} +% \begin{itemize*} +% \item fixed bugs +% \item added option \Opt{draft} +% \end{itemize*} +% % \minisec{Version 1.6b submitted 02 Jun 2012} % \begin{itemize*} % \item added commands \Cmd{mdfsubtitle} and \Cmd{mdfsubsubtitle} @@ -1885,23 +1899,20 @@ Have fun! % % \subsection{The Explanation of mdframed.sty} % -% %$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ -% %$Rev: 426 $ -% %$Author: marco $ -% %$Date: 2012-06-02 14:18:56 +0200 (Sa, 02 Jun 2012) $ -% \begin{macro}{mdversion,mdframedpackagename,mdf@maindate@svn} +% \begin{macro}{mdversion,mdframedpackagename,mdfmaindate} % Set package information % \begin{macrocode} -\def\mdversion{v1.6b} +\def\mdversion{1.6d} \def\mdframedpackagename{mdframed} -\def\mdf@maindate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } +\def\mdfmaindate{2012/09/21} +\def\mdfrevision{162}% Done by github: git rev-list HEAD | wc -l % \end{macrocode} % \end{macro} % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mdframed}% - [\mdf@maindate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $% + [\mdfmaindate\ % \mdversion: \mdframedpackagename] % \end{macrocode} % @@ -2241,6 +2252,7 @@ Have fun! {subtitlebelowline==false}, {subsubtitleaboveline==false}, {subsubtitlebelowline==false}, + {draft==false}, } %%special boolflag hidealllines: \newbool{mdf@hidealllines}% @@ -2508,7 +2520,7 @@ Have fun! {% \newrobustcmd\mdf@patchamsthm{% \let\mdf@deferred@thm@head\deferred@thm@head - \patchcmd{\deferred@thm@head}{\indent}{}% + \pretocmd{\deferred@thm@head}{\@inlabelfalse}% {\mdf@PackageInfo{mdframed detected package amsthm ^^J changed the theoerem header of amsthm\MessageBreak}% }{% @@ -2771,9 +2783,9 @@ Have fun! \newrobustcmd*\mdf@@frametitle@use{% \parskip\z@\relax% \parindent\z@\relax% - \offinterlineskip\relax% \mdf@ignorevbadness% \setbox\mdf@splitbox@one=\vbox{% + \offinterlineskip\relax% \unvcopy\mdf@frametitlebox\relax% \mdf@@frametitlerule\relax% \unvbox\mdf@splitbox@one\relax% @@ -2913,6 +2925,15 @@ Have fun! \let\width\z@% \let\height\z@% \mdf@checkntheorem% +% \end{macrocode} +% Draft mode +% \begin{macrocode} + \ifbool{mdf@draft}% + {% + \ifdimgreater{\overfullrule}{0pt}{}{\setlength\overfullrule{5pt}}% + }{}% +% \end{macrocode} +% \begin{macrocode} \mdf@styledefinition% \mdf@footnoteinput% \color{\mdf@fontcolor}% @@ -3288,7 +3309,8 @@ Have fun! % \begin{macrocode} \ifdimgreater{\ht\mdf@splitbox@two+\dp\mdf@splitbox@two}{\dimen@}% {%splitted wrong - \mdf@PackageInfo{Box was splittet wrong^^M starting loop to iterate + \mdf@PackageInfo{Box was splittet wrong^^J + starting loop to iterate the splitting point\MessageBreak}% % \end{macrocode} % restore save box \Cmd{mdf@splitbox@one} by the save one @@ -3304,21 +3326,24 @@ Have fun! \ifdim\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax>\dimen@ \advance\dimen@i by -\p@\relax \advance\@tempcnta by \@ne\relax - \ifnum\@tempcnta>100 - \let\iterate\relax - \mdf@PackageWarning{correct box splittet fails^^M - It seems you are using a non splittable - contents\MessageBreak} - \fi -% \immediate\typeout{***mdframed \string\@tempcnta=\the\@tempcnta***} -% \immediate \typeout{***mdframed \string\dimen@i=\the\dimen@i***} +%% \immediate\typeout{***mdframed \string\@tempcnta=\the\@tempcnta***} +%% \immediate \typeout{***mdframed \string\dimen@i=\the\dimen@i***} \mdf@ignorevbadness% - \setbox\mdf@splitbox@one=\vbox{\break\unvcopy\mdf@splitbox@save}% + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% \splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length% \mdf@ignorevbadness% \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \dimen@i\relax% \setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two}% \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}% + \ifnum\@tempcnta>100 + \let\iterate\relax + \mdf@PackageWarning{correct box splittet fails^^J + It seems you are using a non splittable + contents\MessageBreak} + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% + \setbox\mdf@splitbox@two=\vbox{}% + \def\mdf@reserved@a{\mdf@put@frame}% + \fi \repeat% }{}% % \end{macrocode} @@ -3326,9 +3351,9 @@ Have fun! % \begin{macrocode} \ifvoid\mdf@splitbox@one\relax% \mdf@PackageWarning{You got a bad break because the splittet box - is empty^^M - You have to change the page settings^^M - like enlargethispage or something else^^M + is empty^^J + You have to change the page settings^^J + like enlargethispage or something else^^J the package increases do \enlargethispage{\baselineskip}\MessageBreak}% \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save} @@ -3340,11 +3365,11 @@ Have fun! % \begin{macrocode} \ifdim\wd\mdf@splitbox@two=\wd\mdf@splitbox@one\relax \else% - \mdf@PackageInfo{You first box width is to small^^M + \mdf@PackageInfo{You first box width is to small^^J mdframed fixed it\MessageBreak}% \setbox\mdf@splitbox@two=\vbox% {% - \hrule \@height\z@ \@width\wd\mdf@splitbox@one\relax + \hrule \@height\z@ \@width\mdfboundingboxwidth\relax \unvcopy\mdf@splitbox@two% }% \fi% @@ -3499,9 +3524,11 @@ Have fun! % \end{macrocode} % Test whether the splitted box fits the required dimension % \begin{macrocode} - \ifdimgreater{\ht\mdf@splitbox@two+\dp\mdf@splitbox@two}{\dimen@}% + \ifdimgreater{\ht\mdf@splitbox@two+\dp\mdf@splitbox@two}% + {\mdf@freevspace@length}% {%splitted wrong - \mdf@PackageInfo{Box was splittet wrong^^M starting loop to iterate + \mdf@PackageInfo{Box was splittet wrong^^J + starting loop to iterate the splitting point\MessageBreak}% % \end{macrocode} % Start loop until splitting fits -- break after 100 attempts @@ -3513,15 +3540,16 @@ Have fun! \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***} +%% \immediate\typeout{***mdframed \string\@tempcnta=\the\@tempcnta***} +%% \immediate \typeout{***mdframed \string\dimen@i=\the\dimen@i***} \ifnum\@tempcnta>100 \let\iterate\relax% - \mdf@PackageWarning{correct box splittet fails^^M + \mdf@PackageWarning{correct box splittet fails^^J It seems you are using a non splittable contents\MessageBreak}% \fi - \setbox\mdf@splitbox@one=\vbox{\break\unvcopy\mdf@splitbox@save}% + \mdf@ignorevbadness% + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% \splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length% \mdf@ignorevbadness% \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \dimen@i\relax% @@ -3534,9 +3562,9 @@ Have fun! % \begin{macrocode} \ifvoid\mdf@splitbox@one\relax% \mdf@PackageWarning{You got a bad break because the splittet box is - empty^^M - You have to change the page settings^^M - like enlargethispage or something else^^M + empty^^J + You have to change the page settings^^J + like enlargethispage or something else^^J the package increases do \enlargethispage{\baselineskip}\MessageBreak}% \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% @@ -3546,6 +3574,16 @@ Have fun! % Output of the middle frame % \begin{macrocode} \else +% Test if first splitted frame doesn't have the original with. +% \begin{macrocode} + \setbox\mdf@splitbox@two=\vbox% + {% + \hrule \@height\z@ \@width\mdfboundingboxwidth\relax + \unvcopy\mdf@splitbox@two% + }% +% \end{macrocode} +% +% \begin{macrocode} \begingroup\mdf@@setzref\mdf@putbox@middle\endgroup% \hrule \@height\z@ \@width\hsize% \vfill\eject% @@ -3701,18 +3739,14 @@ Have fun! %% Public License, as described in lppl.txt in the base LaTeX distribution. %% Either version 1.0 or, at your option, any later version. %% -%% -%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ -% % \end{macrocode} % -% \begin{macro}{mdframedOpackagename,mdf@frameOdate@svn} +% \begin{macro}{mdframedOpackagename} % local settings % \begin{macrocode} \def\mdframedOpackagename{md-frame-0} -\def\mdf@frameOdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{md-frame-0.mdf}% - [\mdf@frameOdate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $% + [\mdfmaindate\ % \mdversion: \mdframedOpackagename] % \end{macrocode} % \end{macro} @@ -4809,24 +4843,21 @@ Have fun! %\fi % \subsection{The Explanation of md-frame-1.mdf} % \begin{macrocode} -%% Style file for mdframed for package option `framemethod=default` +%% Style file for mdframed for package option `framemethod=tikz` %% %% 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: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ % % \end{macrocode} % \changes{v1.1beta}{2011/12/16}{added lost semicolons} -% \begin{macro}{mdframedIpackagename,mdf@frameIdate@svn} +% \begin{macro}{mdframedIpackagename} % local settings % \begin{macrocode} \def\mdframedIpackagename{md-frame-1} -\def\mdf@frameIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{md-frame-1.mdf}% - [\mdf@frameIdate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ % + [\mdfmaindate\ % \mdversion: \mdframedIpackagename] % % \end{macrocode} @@ -4838,6 +4869,7 @@ Have fun! %Allgemeine Einstellungen fuer tikz \def\mdf@tikz@settings{% % + \mdf@testdraftmode% \tikzset{mdfbox/.style={anchor=south west,% inner sep=0pt,% outer sep=0pt,% @@ -4922,6 +4954,57 @@ Have fun! % % % +% \begin{macro}{mdf@testdraftmode} +% draftmode test +% \begin{macrocode} +\newrobustcmd*\mdf@testdraftmode{% + \ifbool{mdf@draft}% + {% + \renewrobustcmd*\mdf@tikzbox@tfl[1]{%three or four borders + \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% + \begin{scope}[mdfcorners]% + \clip[preaction=mdfouterline]% + [postaction=mdfbackground]% + [postaction=mdfinnerline]##1;% + \end{scope}% + \path[mdfmiddleline,mdfcorners]##1; + }% + \renewrobustcmd*\mdf@tikzbox@otl[2]{%one or two borders + \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% + \begin{scope} + \path[mdfouterline,mdfcorners]##1;% + \clip[postaction=mdfbackground]##2;% + \path[mdfinnerline,mdfcorners]##1;% + \end{scope}% + \path[mdfmiddleline,mdfcorners]##1;% + }% + }{% + \ifdimgreater{\overfullrule}{0pt}{% + \renewrobustcmd*\mdf@tikzbox@tfl[1]{%three or four borders + \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% + \begin{scope}[mdfcorners]% + \clip[preaction=mdfouterline]% + [postaction=mdfbackground]% + [postaction=mdfinnerline]##1;% + \end{scope}% + \path[mdfmiddleline,mdfcorners]##1; + }% + \renewrobustcmd*\mdf@tikzbox@otl[2]{%one or two borders + \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% + \begin{scope} + \path[mdfouterline,mdfcorners]##1;% + \clip[postaction=mdfbackground]##2;% + \path[mdfinnerline,mdfcorners]##1;% + \end{scope}% + \path[mdfmiddleline,mdfcorners]##1;% + }% + }{}% + }% +} +% \end{macrocode} +% \end{macro} +% +% % \begin{macro}{mdf@put@frametitlerule} % frametitlerule with tikz % \begin{macrocode} @@ -6075,24 +6158,21 @@ Have fun! %\fi % \subsection{The Explanation of md-frame-2.mdf / md-frame-3.mdf} % \begin{macrocode} -%% Style file for mdframed for package option `framemethod=default` +%% Style file for mdframed for package option `framemethod=pstricks` %% %% 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: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ % % \end{macrocode} % -% \begin{macro}{mdframedIIpackagename,mdf@frameIIdate@svn} +% \begin{macro}{mdframedIIpackagename} % local settings % \begin{macrocode} \def\mdframedIIpackagename{md-frame-2} -\def\mdf@frameIIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{md-frame-2.mdf}% - [\mdf@frameIIdate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ % + [\mdfmaindate\ % \mdversion: \mdframedIIpackagename] % \end{macrocode} % \end{macro} @@ -7400,11 +7480,9 @@ Have fun! % % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ - {documentation of mdframed} + \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} @@ -7415,7 +7493,7 @@ Have fun! \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\ExplFileDate} +\date{\mdfmaindate} \version{\mdversion} \introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. @@ -7443,12 +7521,12 @@ Have fun! \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option +In the preamble only the package \Pack{mdframed} with the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} -\NOTE Every \Cmd{global} inside the examples is necessary to work with the +\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} \section{Examples} @@ -7482,7 +7560,7 @@ function of the independent variables alone. \Examplesec{hidden line + frame title} \begin{LTXexample} \global\mdfapptodefinestyle{exampledefault}{% - topline=false,rightline=true,bottomline=false} + topline=false,bottomline=false} \begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] \ExampleText \end{mdframed} @@ -7503,7 +7581,7 @@ function of the independent variables alone. \end{LTXexample} \Examplesec{framed picture which is centered} -\begin{LTXexample} +\begin{LTXexample}[morekeywords=width] \begin{mdframed}[userdefinedwidth=6cm,align=center, linecolor=blue,linewidth=4pt] \IfFileExists{donald-duck.jpg}% @@ -7514,7 +7592,7 @@ function of the independent variables alone. \clearpage \Examplesec{Theorem environments} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={theoremstyle,definition}] \mdfdefinestyle{theoremstyle}{% linecolor=red,linewidth=2pt,% frametitlerule=true,% @@ -7533,10 +7611,11 @@ function of the independent variables alone. \end{definition*} \end{LTXexample} - \clearpage \Examplesec{theorem with separate header and the help of TikZ (complex)} -\begin{LTXexample} +\begin{LTXexample}[% + morekeywords={theo,baseline,anchor,outer,sep,current,bounding,box,east},% + moretexcs=tikz] \newcounter{theo}[section] \newenvironment{theo}[1][]{% \stepcounter{theo}% @@ -7569,40 +7648,44 @@ function of the independent variables alone. \clearpage \Examplesec{hide only a part of a line} -The example below is inspired by the following post on StackExchange +The example below is inspired by the following post on StackExchange \href{http://tex.stackexchange.com/questions/24101/theorem-decorations^^A -that-stay-with-theorem-environment}% {Theorem decorations that stay with theorem environment} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={mdf@frame@leftline@single,mdf@frame@rightline@single,% + mdf@frame@leftline@first,mdf@frame@rightline@first,% + mdf@frame@leftline@second,mdf@frame@rightline@second,% + mdf@frame@leftline@middle,mdf@frame@rightline@middle,% + mdfboundingboxdepth,mdfboundingboxtotalheight,% + mdf@topline,ifbool,interruptrule,everyline}] \makeatletter \newlength{\interruptlength} -\setlength{\interruptlength}{2.5ex} -\newrobustcmd\overlaplines{% - \appto\mdf@frame@leftline@single{% - \llap{\color{white}% - \rule[\dimexpr-\mdfboundingboxdepth+\interruptlength\relax]% - {\mdf@middlelinewidth@length}% - {\dimexpr\mdfboundingboxtotalheight% - \ifbool{mdf@topline}{+\mdf@middlelinewidth@length}{} - -2\interruptlength\relax}% - }% - }% - \appto\mdf@frame@rightline@single{% - \rlap{\color{white}% - \hspace*{\mdfboundingboxwidth}% - \hspace*{\mdf@innerrightmargin@length}% - \rule[\dimexpr-\mdfboundingboxdepth% - +\interruptlength\relax]% - {\mdf@middlelinewidth@length}% - {\dimexpr\mdfboundingboxtotalheight% - +\ifbool{mdf@topline}{\mdf@middlelinewidth@length}{0pt} - -2\interruptlength\relax}% - }% - }% +\newrobustcmd\interruptrule[3]{% + \color{#1}% + \hspace*{\dimexpr\mdfboundingboxwidth+\mdf@innerrightmargin@length\relax}% + \rule[\dimexpr-\mdfboundingboxdepth+#2\interruptlength\relax]% + {\mdf@middlelinewidth@length}% + {\dimexpr\mdfboundingboxtotalheight-#3\interruptlength\relax}% +} +\newrobustcmd\overlaplines[2][white]{% + \mdfsetup{everyline=false}% + \setlength{\interruptlength}{#2} + \appto\mdf@frame@leftline@single{\llap{\interruptrule{#1}{1}{2}}} + \appto\mdf@frame@rightline@single{\rlap{\interruptrule{#1}{1}{2}}} + \appto\mdf@frame@leftline@first{\llap{\interruptrule{#1}{0}{1}}} + \appto\mdf@frame@rightline@first{\rlap{\interruptrule{#1}{0}{1}}} + \appto\mdf@frame@leftline@second{\llap{\interruptrule{#1}{1}{1}}} + \appto\mdf@frame@rightline@second{\rlap{\interruptrule{#1}{1}{1}}} + \appto\mdf@frame@leftline@middle{\llap{\interruptrule{#1}{0}{0}}} + \appto\mdf@frame@rightline@middle{\rlap{\interruptrule{#1}{0}{0}}} } \makeatother -\overlaplines +\overlaplines{2.5ex} +\begin{mdframed}[linecolor=blue,linewidth=8pt] +\ExampleText +\end{mdframed} +\overlaplines[blue!70!black!20]{2.5ex} \begin{mdframed}[linecolor=blue,linewidth=8pt] \ExampleText \end{mdframed} @@ -7627,12 +7710,8 @@ The example below is inspired by the following post on StackExchange % % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ - {documentation of mdframed} - \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} @@ -7643,7 +7722,7 @@ The example below is inspired by the following post on StackExchange \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\ExplFileDate} +\date{\mdfmaindate} \version{\mdversion} \introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. @@ -7671,12 +7750,12 @@ The example below is inspired by the following post on StackExchange \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option +In the preamble only the package \Pack{mdframed} width the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} -\NOTE Every \Cmd{global} inside the examples is necessary to work with the +\NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} \section{Examples} @@ -7696,7 +7775,7 @@ function of the independent variables alone. } \end{tltxmdfexample} \clearpage -\ExampleText{round corner} +\Examplesec{round corner} \begin{LTXexample} \global\mdfdefinestyle{exampledefault}{% outerlinewidth=5pt,innerlinewidth=0pt, @@ -7710,7 +7789,7 @@ function of the independent variables alone. \Examplesec{hidden line + frame title} \begin{LTXexample} \global\mdfapptodefinestyle{exampledefault}{% - topline=false,leftline=false,} + topline=false,leftline=false,} \begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] \ExampleText \end{mdframed} @@ -7727,7 +7806,7 @@ function of the independent variables alone. \end{LTXexample} \Examplesec{Gimmick} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={line,width,dash,dashed,pattern}] \mdfsetup{splitbottomskip=0.8cm,splittopskip=0cm, innerrightmargin=2cm,innertopmargin=1cm,% innerlinewidth=2pt,outerlinewidth=2pt, @@ -7742,19 +7821,17 @@ function of the independent variables alone. \end{mdframed} \end{LTXexample} +\clearpage \Examplesec{complex example with TikZ} -\begin{tltxmdfexample} +\begin{tltxmdfexample}[morekeywords={mdf}] \tikzstyle{titregris} = [draw=gray, thick, fill=white, shading = exersicetitle, % text=gray, rectangle, rounded corners, right,minimum height=.7cm] - \pgfdeclarehorizontalshading{exersicebackground}{100bp} {color(0bp)=(green!40); color(100bp)=(black!5)} - \pgfdeclarehorizontalshading{exersicetitle}{100bp} {color(0bp)=(red!40);color(100bp)=(black!5)} - \newcounter{exercise} \renewcommand*\theexercise{Exercise~n\arabic{exercise}} \makeatletter @@ -7762,50 +7839,107 @@ function of the independent variables alone. \define@key{mdf}{exercisepoints}{% \def\mdf@@exercisepoints{#1} } +\mdfdefinestyle{exercisestyle}{% + outerlinewidth=1em,outerlinecolor=white,% + leftmargin=-1em,rightmargin=-1em,% + middlelinewidth=1.2pt,roundcorner=5pt,linecolor=gray, + apptotikzsetting={\tikzset{mdfbackground/.append style ={% + shading = exersicebackground}}}, + innertopmargin=1.2\baselineskip, + skipabove={\dimexpr0.5\baselineskip+\topskip\relax}, + skipbelow={-1em}, + needspace=3\baselineskip, + frametitlefont=\sffamily\bfseries, + settings={\global\stepcounter{exercise}}, + singleextra={% + \node[titregris,xshift=1cm] at (P-|O) % + {~\mdf@frametitlefont{\theexercise}~}; + \ifdefempty{\mdf@@exercisepoints}% + {}% + {\node[titregris,left,xshift=-1cm] at (P)% + {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}% + }, + firstextra={% + \node[titregris,xshift=1cm] at (P-|O) % + {~\mdf@frametitlefont{\theexercise}~}; + \ifdefempty{\mdf@@exercisepoints}% + {}% + {\node[titregris,left,xshift=-1cm] at (P)% + {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}% + }, +} \makeatother +\begin{mdframed}[style=exercisestyle] +\ExampleText +\end{mdframed} + +\begin{mdframed}[style=exercisestyle,exercisepoints=10] +\ExampleText +\end{mdframed} +\end{tltxmdfexample} + +\tikzstyle{titregris} = + [draw=gray, thick, fill=white, shading = exersicetitle, % + text=gray, rectangle, rounded corners, right,minimum height=.7cm] +\pgfdeclarehorizontalshading{exersicebackground}{100bp} + {color(0bp)=(green!40); color(100bp)=(black!5)} +\pgfdeclarehorizontalshading{exersicetitle}{100bp} + {color(0bp)=(red!40);color(100bp)=(black!5)} +\newcounter{exercise} +\renewcommand*\theexercise{Exercise~n\arabic{exercise}} +\makeatletter +\def\mdf@@exercisepoints{}%new mdframed key: +\define@key{mdf}{exercisepoints}{% + \def\mdf@@exercisepoints{#1} +} \mdfdefinestyle{exercisestyle}{% - outerlinewidth=1pt,innerlinewidth=0pt, - roundcorner=2pt,linecolor=gray, - tikzsetting={shading = exersicebackground}, + outerlinewidth=1em,outerlinecolor=white,% + leftmargin=-1em,rightmargin=-1em,% + middlelinewidth=1.2pt,roundcorner=5pt,linecolor=gray, + apptotikzsetting={\tikzset{mdfbackground/.append style ={% + shading = exersicebackground}}}, innertopmargin=1.2\baselineskip, skipabove={\dimexpr0.5\baselineskip+\topskip\relax}, + skipbelow={-1em}, needspace=3\baselineskip, frametitlefont=\sffamily\bfseries, settings={\global\stepcounter{exercise}}, singleextra={% - \node[titregris,xshift=1cm] at (P-|O) % - {~\mdf@frametitlefont{\theexercise}~}; + \node[titregris,xshift=1cm] at (P-|O) % + {~\mdf@frametitlefont{\theexercise}~}; \ifdefempty{\mdf@@exercisepoints}% {}% {\node[titregris,left,xshift=-1cm] at (P)% {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}% }, firstextra={% - \node[titregris,xshift=1cm] at (P-|O) % - {~\mdf@frametitlefont{\theexercise}~}; + \node[titregris,xshift=1cm] at (P-|O) % + {~\mdf@frametitlefont{\theexercise}~}; \ifdefempty{\mdf@@exercisepoints}% {}% {\node[titregris,left,xshift=-1cm] at (P)% {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}% }, } -\begin{mdframed}[style=exercisestyle,] +\makeatother + +\begin{mdframed}[style=exercisestyle] \ExampleText \end{mdframed} \begin{mdframed}[style=exercisestyle,exercisepoints=10] \ExampleText \end{mdframed} -\end{tltxmdfexample} + \clearpage \Examplesec{Theorem environments} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={theoremstyle,definition}] \mdfdefinestyle{theoremstyle}{% - linecolor=red,linewidth=2pt,% + linecolor=red,middlelinewidth=2pt,% frametitlerule=true,% apptotikzsetting={\tikzset{mdfframetitlebackground/.append style={% - shade,left color=white, right color=blue!20}}}, + shade,left color=white, right color=blue!20}}}, frametitlerulecolor=green!60, frametitlerulewidth=1pt, innertopmargin=\topskip, @@ -7839,11 +7973,8 @@ function of the independent variables alone. % % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ - {documentation of mdframed} \lstDeleteShortInline{|} \newcommand\Loadedframemethod{PSTricks} @@ -7855,7 +7986,7 @@ function of the independent variables alone. \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\ExplFileDate} +\date{\mdfmaindate} \version{\mdversion} \introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. @@ -7890,7 +8021,7 @@ done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. {\large\color{red!50!black} \NOTE Every \Cmd{global} inside the examples is necessary to work with the package \Pack{showexpl}.} -X + \section{Examples} All examples have the following settings: @@ -7921,7 +8052,8 @@ function of the independent variables alone. \end{LTXexample} \Examplesec{hidden line + frame title} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={innerlinecolor,addtopsstyle,mdfouterlinestyle, + linestyle}] \global\mdfapptodefinestyle{exampledefault}{% topline=false,rightline=false,bottomline=false, frametitlerule=true,innertopmargin=6pt, @@ -7935,27 +8067,30 @@ function of the independent variables alone. \clearpage -\Examplesec{Dash Lines} +\Examplesec{Dash Lines}[morekeywords={pstrickssetting,linestyle,dashed}] \begin{LTXexample} \global\mdfdefinestyle{exampledefault}{% - pstrickssetting={linestyle=dashed,},linecolor=red,linewidth=5pt} -\begin{mdframed}[style=exampledefault,] + pstrickssetting={linestyle=dashed,},linecolor=red,middlelinewidth=2pt} +\begin{mdframed}[style=exampledefault] \ExampleText \end{mdframed} \end{LTXexample} \Examplesec{Double Lines} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={addtopsstyle,mdfmiddlelinestyle, + doubleline,doublesep}] \global\mdfdefinestyle{exampledefault}{% - pstrickssetting={doubleline=true,doublesep=6pt}, - linecolor=red,linewidth=5pt,middlelinewidth=4pt} -\begin{mdframed}[style=exampledefault,] + pstricksappsetting={\addtopsstyle{mdfmiddlelinestyle}{% + doubleline=true,doublesep=6pt,linewidth=4pt}},% + linecolor=red,middlelinewidth=16pt} +\begin{mdframed}[style=exampledefault] \ExampleText \end{mdframed} \end{LTXexample} +\clearpage \Examplesec{Shadow frame} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={shadow,shadowsize,myshadowbox}] \newmdenv[shadow=true, shadowsize=11pt, linewidth=8pt, @@ -7986,12 +8121,8 @@ function of the independent variables alone. % \begin{macrocode} %Documenation of the package mdframed -%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt,lipsum=true]{ltxmdf} -\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ - {documentation of mdframed} - \usepackage{showexpl} \lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} @@ -8003,7 +8134,7 @@ function of the independent variables alone. \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} -\date{\ExplFileDate} +\date{\mdfmaindate} \version{\mdversion} \introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}. @@ -8077,14 +8208,14 @@ Here the solution which can be decorate as usual. With the new command \Cmd{surroundwithmdframed} you can use \begin{tltxmdfexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment}, - morekeywords={lstlisting}] + morekeywords={listings}] \surroundwithmdframed{listings} \end{tltxmdfexample} \Examplesec{Package multicol} How I wrote in \enquote{Known Problems} you can't combine \Pack{multicol} with \Pack{mdframed}. In a simple way without any breaks you can use: -\begin{LTXexample} +\begin{LTXexample}[morekeywords={multicols}] \begin{multicols}{2} \lipsum[1] \begin{mdframed} @@ -8120,11 +8251,11 @@ How I wrote in \enquote{Known Problems} you can't combine \Pack{multicol} with \clearpage \onecolumn \Examplesec{Working inside enumerate} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={enumerate}] Text Text Text Text Text Text Text Text \begin{enumerate} \item in the following \ldots - \begin{mdframed}[linecolor=blue,linewidth=2] + \begin{mdframed}[linecolor=blue,middlelinewidth=2] \ExampleText \end{mdframed} \item \lipsum[2] @@ -8167,7 +8298,11 @@ Text Text Text Text Text Text \clearpage \Examplesec{digression-environement inspired by Tobias Weh} -\begin{lstlisting} +\begin{lstlisting}[morekeywords={% + font,anchor,let,in,arrow,round,cap,controls,coordinate,% + excursus,head,arrows,calc,line,width,and,to,digressionarrows,% + base,west},% + moretexcs={usetikzlibrary}] \usetikzlibrary{calc,arrows} \tikzset{ excursus arrow/.style={% @@ -8273,7 +8408,7 @@ Text Text Text Text Text Text \end{mdframed} \Examplesec{Theorem style shading background} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={top,bottom,Theorem,shadow,alternativtheorem}] %\usetikzlibrary{shadings,shadows}% loaded in the header \mdtheorem[% apptotikzsetting={\tikzset{mdfbackground/.append style =% @@ -8282,7 +8417,7 @@ Text Text Text Text Text Text mdfframetitlebackground/.append style =% {top color=purple!40!white, bottom color=purple!80!black} - } + }% }, ,roundcorner=10pt,middlelinewidth=2pt, shadow=true,frametitlerule=true,frametitlerulewidth=4pt, diff --git a/Master/texmf-dist/source/latex/mdframed/mdframedmake.bat b/Master/texmf-dist/source/latex/mdframed/mdframedmake.bat index 269739a64a1..0025945b1d6 100755 --- a/Master/texmf-dist/source/latex/mdframed/mdframedmake.bat +++ b/Master/texmf-dist/source/latex/mdframed/mdframedmake.bat @@ -1,33 +1,117 @@ ::################################################################ ::## Makefile for mdframed project folder (WINDOWS) ::## -::## $Id: mdframedmake.bat 391 2012-05-19 11:10:49Z marco $ +::## $Id: mdframedmake.bat 427 2012-06-06 12:24:09Z marco $ ::################################################################ -title Entpacken mdframed.dtx unter windows @echo off +title Compiling mdframed.dtx (Windows) :: -pdflatex mdframed.dtx -makeindex -s gglo.ist -o mdframed.gls mdframed.glo -makeindex -s gind.ist mdframed.idx -pdflatex mdframed.dtx -pdflatex mdframed.dtx +:: You can use a prompt to call a special mode of this file. +:: mdframedmake all -- standard mode, run docsty examples clean +:: mdframedmake docsty -- typesets the documentation and the package +:: mdframemdmake examples -- all example files +:: mdframedmake clean -- remove all helpfiles created by mdframed :: -pdflatex mdframed-example-default.tex -pdflatex mdframed-example-default.tex +set mode=all +for %%I in (d docsty) do (if /I %%Ix equ %1x set mode=docsty) +for %%I in (e examples) do (if /I %%Ix equ %1x set mode=examples) +for %%I in (cx cleanx) do (if /I %%I equ %1x set mode=clean) :: -pdflatex mdframed-example-tikz.tex -pdflatex mdframed-example-tikz.tex +call:%mode% +echo. +echo Finished +echo. +pause +goto:eof :: -latex mdframed-example-pstricks.tex -latex mdframed-example-pstricks.tex -dvips mdframed-example-pstricks.dvi -call ps2pdf mdframed-example-pstricks.ps +::############################ +::## Subroutines +::############################ :: -pdflatex mdframed-example-texsx.tex -pdflatex mdframed-example-texsx.tex +:all +call:docsty mdframed +call:examples +call:clean +goto:eof :: -for %%I in (aux glo hd idx dvi log out ps syntex.gz thm tmp toc) do ( - for %%J in (default tikz pstricks texsx) do (del mdframed-example-%%J.%%I) -) +:docsty + echo. + echo Typesetting %1.dtx + pdflatex --draftmode --interaction=nonstopmode %1.dtx >NUL + if not errorlevel 1 ( + echo comipilation in draftmode without errors + if exist %1.glo ( + makeindex -q -t %1.glolog -s gglo.ist -o %1.gls %1.glo >NUL + if not errorlevel 1 ( + echo compiliation of glossar without errors + ) else ( + echo compilation of glossar with errors + ) + ) + if exist %1.idx ( + makeindex -q -t %1.idxlog -s gind.ist %1.idx >NUL + if not errorlevel 1 ( + echo compiliation of index without errors + ) else ( + echo compilation of index with errors + ) + ) + pdflatex --interaction=nonstopmode %1.dtx >NUL + if not errorlevel 1 ( + echo Second pdflatex compiliation without errors + pdflatex --interaction=nonstopmode %1.dtx >NUL + ) else ( + echo Second pdflatex compiliation with errors + ) + ) else ( + echo compilation in draftmode with errors + ) + goto:eof :: -for %%I in (aux dtxe glo gls hd idx ilg ind ins log out thm toc) do (del mdframed.%%I) +:examples +call:pdf mdframed-example-default +call:pdf mdframed-example-tikz +call:ps mdframed-example-pstricks +call:pdf mdframed-example-texsx +goto:eof +:: +:pdf + echo. + echo Typesetting %1 + pdflatex --draftmode --interaction=nonstopmode %1.tex >NUL + if not errorlevel 1 ( + echo compilation in draftmode without errors + echo Run pdflatex again on %1.tex + pdflatex --interaction=nonstopmode %1.tex >NUL + echo Typesetting %1 finished + ) else ( + echo compilation in draftmode with errors) +goto:eof +:: +:ps + echo. + echo Typesetting %1 + latex -draftmode -interaction=nonstopmode %1.tex >NUL + if not errorlevel 1 ( + echo compilation in draftmode without errors + echo Run LaTeX again on %1.tex + latex -interaction=nonstopmode %1.tex >NUL + dvips -q %1.dvi + call ps2pdf %1.ps + echo Typesetting %1 finished + ) else ( + echo compilation in draftmode with errors) + goto:eof +:: +:clean + echo. + echo Removing help files + :: + for %%I in (aux dtxe dvi glo glolog gls hd ins idx idxlog ilg ind log out ps thm tmp toc xdv) do ( + if exist mdframed.%%I del mdframed.%%I + for %%J in (default tikz pstricks texsx) do ( + if exist mdframed-example-%%J.%%I del mdframed-example-%%J.%%I + ) + ) + echo Removing finished + goto:eof diff --git a/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls b/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls index 967dc754c9a..4c1185ff42d 100644 --- a/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls +++ b/Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls @@ -9,13 +9,13 @@ %% Either version 1.0 or, at your option, any later version. -%%$Id: ltxmdf.cls 421 2012-05-31 15:51:38Z marco $ -%%$Rev: 421 $ +%%$Id: ltxmdf.cls 431 2012-06-20 16:40:42Z marco $ +%%$Rev: 431 $ %%$Author: marco $ -%%$Date: 2012-05-31 17:51:38 +0200 (Do, 31 Mai 2012) $ +%%$Date: 2012-06-20 18:40:42 +0200 (Mi, 20 Jun 2012) $ \RequirePackage{expl3} -\GetIdInfo$Id: ltxmdf.cls 421 2012-05-31 15:51:38Z marco $ +\GetIdInfo$Id: ltxmdf.cls 431 2012-06-20 16:40:42Z marco $ {documentation class for Marco Daniel} \ProvidesExplClass{\ExplFileName} @@ -36,6 +36,7 @@ \ProcessKeysOptions { ltxmdf } \LoadClassWithOptions { scrartcl } +\cs_set_eq:NN \c_keys_code_root_tl \c__keys_code_root_tl \RequirePackage{ifxetex,ifluatex} @@ -107,7 +108,9 @@ \ihead{\rightmark} \ohead{\leftmark} \ofoot{\pagemark} -\ifoot{{\ExplFileDate}\qquad SVN~version:~{\ExplFileVersion}\qquad{\ExplFileName}} +\providecommand\mdfmaindate{2012/09/20} +\providecommand\mdfrevision{1} +\ifoot{{\mdfmaindate}\qquad revision:~{\mdfrevision}\qquad{\jobname}} @@ -153,7 +156,10 @@ innerleftmargin,frametitlerule,frametitlebelowskip, frametitleaboveskip,frametitlebackgroundcolor, frametitlerulecolor,picins,figure,hidealllines,fontcolor, - firstextra,secondextra,middleextra,singleextra,overlay,node}, + firstextra,secondextra,middleextra,singleextra,overlay,node, + pstricksappsetting,apptotikzsetting,frametitlerulewidth, + userdefinedwidth,mdfbackground,append,mdfframetitlebackground, + left,shade,align,exampledefault}, moretexcs={newmdtheoremenv,newmdenv,theoremstyle,mdfsetup,@length, md@putbox@single,@tempboxa,mdf@,mdf@linewidth, mdf@leftmargin@length,interruptlength,setlength,newrobustcmd, @@ -167,7 +173,8 @@ define@key,renewrobustcmd,mdfcreateextratikz,node,ifdefempty, mdf@frametitlefont,dimexpr,mdframedtitleenv,ifstrempty, @undefined,mdtheorem,surroundwithmdframed,@captype,@dblarg, - @newcaption,newcaption,mdflength,tikzset,path,p1,p2% + @newcaption,newcaption,mdflength,tikzset,path,p1,p2, + IfFileExists,includegraphics% },% } @@ -493,5 +500,6 @@ %%%% + \tex_endinput:D 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 9173d48a003..ae92366d67b 100644 --- a/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf @@ -4,12 +4,9 @@ %% Public License, as described in lppl.txt in the base LaTeX distribution. %% Either version 1.0 or, at your option, any later version. %% -%% -%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \def\mdframedOpackagename{md-frame-0} -\def\mdf@frameOdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{md-frame-0.mdf}% - [\mdf@frameOdate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $% + [\mdfmaindate\ % \mdversion: \mdframedOpackagename] \def\mdf@background@default{\color{\mdf@backgroundcolor}} \def\mdf@frametitlebackground@default{\color{\mdf@frametitlebackgroundcolor}} 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 8a1c2910a40..77ad630c594 100644 --- a/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf @@ -1,17 +1,15 @@ -%% Style file for mdframed for package option `framemethod=default` +%% Style file for mdframed for package option `framemethod=tikz` %% %% 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: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \def\mdframedIpackagename{md-frame-1} -\def\mdf@frameIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{md-frame-1.mdf}% - [\mdf@frameIdate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ % + [\mdfmaindate\ % \mdversion: \mdframedIpackagename] \def\mdf@tikz@settings{% + \mdf@testdraftmode% \tikzset{mdfbox/.style={anchor=south west,% inner sep=0pt,% outer sep=0pt,% @@ -76,6 +74,50 @@ \path[mdfinnerline,mdfcorners]#1;% \end{scope}% \path[mdfmiddleline,mdfcorners]#1;}% +\newrobustcmd*\mdf@testdraftmode{% + \ifbool{mdf@draft}% + {% + \renewrobustcmd*\mdf@tikzbox@tfl[1]{%three or four borders + \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% + \begin{scope}[mdfcorners]% + \clip[preaction=mdfouterline]% + [postaction=mdfbackground]% + [postaction=mdfinnerline]##1;% + \end{scope}% + \path[mdfmiddleline,mdfcorners]##1; + }% + \renewrobustcmd*\mdf@tikzbox@otl[2]{%one or two borders + \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% + \begin{scope} + \path[mdfouterline,mdfcorners]##1;% + \clip[postaction=mdfbackground]##2;% + \path[mdfinnerline,mdfcorners]##1;% + \end{scope}% + \path[mdfmiddleline,mdfcorners]##1;% + }% + }{% + \ifdimgreater{\overfullrule}{0pt}{% + \renewrobustcmd*\mdf@tikzbox@tfl[1]{%three or four borders + \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% + \begin{scope}[mdfcorners]% + \clip[preaction=mdfouterline]% + [postaction=mdfbackground]% + [postaction=mdfinnerline]##1;% + \end{scope}% + \path[mdfmiddleline,mdfcorners]##1; + }% + \renewrobustcmd*\mdf@tikzbox@otl[2]{%one or two borders + \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% + \begin{scope} + \path[mdfouterline,mdfcorners]##1;% + \clip[postaction=mdfbackground]##2;% + \path[mdfinnerline,mdfcorners]##1;% + \end{scope}% + \path[mdfmiddleline,mdfcorners]##1;% + }% + }{}% + }% +} \tikzset{mdfframetitlerule/.style={% draw=none, fill=\mdf@frametitlerulecolor, diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf index 7609c34e420..52eb36485a6 100644 --- a/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf @@ -1,15 +1,12 @@ -%% Style file for mdframed for package option `framemethod=default` +%% Style file for mdframed for package option `framemethod=pstricks` %% %% 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: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \def\mdframedIIpackagename{md-frame-2} -\def\mdf@frameIIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{md-frame-2.mdf}% - [\mdf@frameIIdate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ % + [\mdfmaindate\ % \mdversion: \mdframedIIpackagename] \def\mdf@ptlength@to@pscode#1{\pst@number{#1} \pst@number\psxunit div } \def\mdf@ptlength@to@pscode@length#1{% 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 7609c34e420..52eb36485a6 100644 --- a/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf @@ -1,15 +1,12 @@ -%% Style file for mdframed for package option `framemethod=default` +%% Style file for mdframed for package option `framemethod=pstricks` %% %% 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: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ \def\mdframedIIpackagename{md-frame-2} -\def\mdf@frameIIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{md-frame-2.mdf}% - [\mdf@frameIIdate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $ % + [\mdfmaindate\ % \mdversion: \mdframedIIpackagename] \def\mdf@ptlength@to@pscode#1{\pst@number{#1} \pst@number\psxunit div } \def\mdf@ptlength@to@pscode@length#1{% diff --git a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty index acc8315d123..1c00a5a2a12 100644 --- a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty +++ b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty @@ -48,12 +48,13 @@ %% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> %% ================================================== %% -\def\mdversion{v1.6b} +\def\mdversion{1.6d} \def\mdframedpackagename{mdframed} -\def\mdf@maindate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } +\def\mdfmaindate{2012/09/21} +\def\mdfrevision{162}% Done by github: git rev-list HEAD | wc -l \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mdframed}% - [\mdf@maindate@svn$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $% + [\mdfmaindate\ % \mdversion: \mdframedpackagename] \newcommand*\mdf@PackageError[1]{\PackageError{\mdframedpackagename}{#1}} \newcommand*\mdf@PackageWarning[1]{\PackageWarning{\mdframedpackagename}{#1}} @@ -279,6 +280,7 @@ {subtitlebelowline==false}, {subsubtitleaboveline==false}, {subsubtitlebelowline==false}, + {draft==false}, } %%special boolflag hidealllines: \newbool{mdf@hidealllines}% @@ -460,7 +462,7 @@ {% \newrobustcmd\mdf@patchamsthm{% \let\mdf@deferred@thm@head\deferred@thm@head - \patchcmd{\deferred@thm@head}{\indent}{}% + \pretocmd{\deferred@thm@head}{\@inlabelfalse}% {\mdf@PackageInfo{mdframed detected package amsthm ^^J changed the theoerem header of amsthm\MessageBreak}% }{% @@ -667,9 +669,9 @@ \newrobustcmd*\mdf@@frametitle@use{% \parskip\z@\relax% \parindent\z@\relax% - \offinterlineskip\relax% \mdf@ignorevbadness% \setbox\mdf@splitbox@one=\vbox{% + \offinterlineskip\relax% \unvcopy\mdf@frametitlebox\relax% \mdf@@frametitlerule\relax% \unvbox\mdf@splitbox@one\relax% @@ -766,6 +768,10 @@ \let\width\z@% \let\height\z@% \mdf@checkntheorem% + \ifbool{mdf@draft}% + {% + \ifdimgreater{\overfullrule}{0pt}{}{\setlength\overfullrule{5pt}}% + }{}% \mdf@styledefinition% \mdf@footnoteinput% \color{\mdf@fontcolor}% @@ -1016,7 +1022,8 @@ \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}% \ifdimgreater{\ht\mdf@splitbox@two+\dp\mdf@splitbox@two}{\dimen@}% {%splitted wrong - \mdf@PackageInfo{Box was splittet wrong^^M starting loop to iterate + \mdf@PackageInfo{Box was splittet wrong^^J + starting loop to iterate the splitting point\MessageBreak}% \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% \dimen@i=\dimen@%\relax @@ -1025,26 +1032,31 @@ \ifdim\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax>\dimen@ \advance\dimen@i by -\p@\relax \advance\@tempcnta by \@ne\relax - \ifnum\@tempcnta>100 - \let\iterate\relax - \mdf@PackageWarning{correct box splittet fails^^M - It seems you are using a non splittable - contents\MessageBreak} - \fi +%% \immediate\typeout{***mdframed \string\@tempcnta=\the\@tempcnta***} +%% \immediate \typeout{***mdframed \string\dimen@i=\the\dimen@i***} \mdf@ignorevbadness% - \setbox\mdf@splitbox@one=\vbox{\break\unvcopy\mdf@splitbox@save}% + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% \splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length% \mdf@ignorevbadness% \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \dimen@i\relax% \setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two}% \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}% + \ifnum\@tempcnta>100 + \let\iterate\relax + \mdf@PackageWarning{correct box splittet fails^^J + It seems you are using a non splittable + contents\MessageBreak} + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% + \setbox\mdf@splitbox@two=\vbox{}% + \def\mdf@reserved@a{\mdf@put@frame}% + \fi \repeat% }{}% \ifvoid\mdf@splitbox@one\relax% \mdf@PackageWarning{You got a bad break because the splittet box - is empty^^M - You have to change the page settings^^M - like enlargethispage or something else^^M + is empty^^J + You have to change the page settings^^J + like enlargethispage or something else^^J the package increases do \enlargethispage{\baselineskip}\MessageBreak}% \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save} @@ -1053,11 +1065,11 @@ \fi% \ifdim\wd\mdf@splitbox@two=\wd\mdf@splitbox@one\relax \else% - \mdf@PackageInfo{You first box width is to small^^M + \mdf@PackageInfo{You first box width is to small^^J mdframed fixed it\MessageBreak}% \setbox\mdf@splitbox@two=\vbox% {% - \hrule \@height\z@ \@width\wd\mdf@splitbox@one\relax + \hrule \@height\z@ \@width\mdfboundingboxwidth\relax \unvcopy\mdf@splitbox@two% }% \fi% @@ -1148,9 +1160,11 @@ \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \mdf@freevspace@length \setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two} \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one} - \ifdimgreater{\ht\mdf@splitbox@two+\dp\mdf@splitbox@two}{\dimen@}% + \ifdimgreater{\ht\mdf@splitbox@two+\dp\mdf@splitbox@two}% + {\mdf@freevspace@length}% {%splitted wrong - \mdf@PackageInfo{Box was splittet wrong^^M starting loop to iterate + \mdf@PackageInfo{Box was splittet wrong^^J + starting loop to iterate the splitting point\MessageBreak}% \dimen@i=\mdf@freevspace@length%\relax \@tempcnta=\z@\relax @@ -1159,13 +1173,16 @@ \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***} \ifnum\@tempcnta>100 \let\iterate\relax% - \mdf@PackageWarning{correct box splittet fails^^M + \mdf@PackageWarning{correct box splittet fails^^J It seems you are using a non splittable contents\MessageBreak}% \fi - \setbox\mdf@splitbox@one=\vbox{\break\unvcopy\mdf@splitbox@save}% + \mdf@ignorevbadness% + \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% \splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length% \mdf@ignorevbadness% \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \dimen@i\relax% @@ -1175,15 +1192,20 @@ }{}% \ifvoid\mdf@splitbox@one\relax% \mdf@PackageWarning{You got a bad break because the splittet box is - empty^^M - You have to change the page settings^^M - like enlargethispage or something else^^M + empty^^J + You have to change the page settings^^J + like enlargethispage or something else^^J the package increases do \enlargethispage{\baselineskip}\MessageBreak}% \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}% \enlargethispage{\baselineskip}% \def\mdf@reserved@a{\mdf@put@frame@ii}% \else + \setbox\mdf@splitbox@two=\vbox% + {% + \hrule \@height\z@ \@width\mdfboundingboxwidth\relax + \unvcopy\mdf@splitbox@two% + }% \begingroup\mdf@@setzref\mdf@putbox@middle\endgroup% \hrule \@height\z@ \@width\hsize% \vfill\eject% -- cgit v1.2.3