From 0ade4baaa2b1857abfa6b1385ca4a72b9c68a08b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 23 Jun 2013 23:43:14 +0000 Subject: mdframed (23jun13) git-svn-id: svn://tug.org/texlive/trunk@30868 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/mdframed/README | 70 - Master/texmf-dist/doc/latex/mdframed/README.txt | 71 + Master/texmf-dist/doc/latex/mdframed/ctan-lion.png | Bin 0 -> 81950 bytes .../texmf-dist/doc/latex/mdframed/donald-duck.jpg | Bin 27527 -> 0 bytes .../latex/mdframed/mdframed-example-default.pdf | Bin 269653 -> 307426 bytes .../latex/mdframed/mdframed-example-default.tex | 88 +- .../latex/mdframed/mdframed-example-pstricks.pdf | Bin 68418 -> 78504 bytes .../latex/mdframed/mdframed-example-pstricks.tex | 66 +- .../doc/latex/mdframed/mdframed-example-texsx.pdf | Bin 256253 -> 258691 bytes .../doc/latex/mdframed/mdframed-example-texsx.tex | 168 +- .../doc/latex/mdframed/mdframed-example-tikz.pdf | Bin 288571 -> 327653 bytes .../doc/latex/mdframed/mdframed-example-tikz.tex | 145 +- Master/texmf-dist/doc/latex/mdframed/mdframed.pdf | Bin 879862 -> 811591 bytes Master/texmf-dist/source/latex/mdframed/Makefile | 2 +- .../texmf-dist/source/latex/mdframed/mdframed.dtx | 4302 +++++++++----------- .../texmf-dist/source/latex/mdframed/mdframed.ins | 3 +- Master/texmf-dist/tex/latex/mdframed/ltxmdf.cls | 195 +- .../texmf-dist/tex/latex/mdframed/md-frame-0.mdf | 142 +- .../texmf-dist/tex/latex/mdframed/md-frame-1.mdf | 1000 ++--- .../texmf-dist/tex/latex/mdframed/md-frame-2.mdf | 172 +- .../texmf-dist/tex/latex/mdframed/md-frame-3.mdf | 172 +- Master/texmf-dist/tex/latex/mdframed/mdframed.sty | 716 ++-- 22 files changed, 3082 insertions(+), 4230 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/mdframed/README create mode 100644 Master/texmf-dist/doc/latex/mdframed/README.txt create mode 100644 Master/texmf-dist/doc/latex/mdframed/ctan-lion.png delete mode 100644 Master/texmf-dist/doc/latex/mdframed/donald-duck.jpg (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/mdframed/README b/Master/texmf-dist/doc/latex/mdframed/README deleted file mode 100644 index df8944c8a17..00000000000 --- a/Master/texmf-dist/doc/latex/mdframed/README +++ /dev/null @@ -1,70 +0,0 @@ -================================================================ -================================================================ -Working with the command \fbox or \fcolorbox, one has to -handle page breaks by hand. The present package defines the -environment mdframed which automatically deals with page breaks. - -Author's name: Marco Daniel and Elke Schubert (supports tikz implementation) -License type: lppl - -================================================================ -The revision history is printed in the documentation. - -================================================================ -The current development is available at github: -https://github.com/marcodaniel/mdframed - -================================================================ -The package provides - * one dtx files, - * one Makefile (compiling for Linux/Mac), - * one mdframedmake.bat (compiling for Windows) - * one personal documentclass ltxmdf.cls - * one example picture donald-duck.jpg - -By running the script `make all` you will -produce the following files: -- README.txt -- mdframed.sty -- mdframed.pdf -- md-frame-0.mdf -- md-frame-1.mdf -- md-frame-2.mdf -- md-frame-3.mdf -- mdframed-example-default.tex -- mdframed-example-default.pdf -- mdframed-example-tikz.tex -- mdframed-example-tikz.pdf -- mdframed-example-pstricks.tex -- mdframed-example-pstricks.pdf -- mdframed-example-texsx.tex -- mdframed-example-texsx.pdf - -I recommend the following installation in your texmf-tree: - -/doc/latex/mdframed/ -- README.txt -- mdframed.pdf -- mdframed-example-default.tex -- mdframed-example-default.pdf -- mdframed-example-tikz.tex -- mdframed-example-tikz.pdf -- mdframed-example-pstricks.tex -- mdframed-example-pstricks.pdf -- mdframed-example-texsx.tex -- mdframed-example-texsx.pdf -- donald-duck.jpg - -/source/latex/mdframed/ -- Makefile -- mdframed.dtx - -/tex/latex/mdframed -- mdframed.sty -- md-frame-0.mdf -- md-frame-1.mdf -- md-frame-2.mdf -- md-frame-3.mdf -- ltxmdf.cls -================================================================ -================================================================ diff --git a/Master/texmf-dist/doc/latex/mdframed/README.txt b/Master/texmf-dist/doc/latex/mdframed/README.txt new file mode 100644 index 00000000000..3f53c02ae52 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mdframed/README.txt @@ -0,0 +1,71 @@ +================================================================ +================================================================ +Working with the command \fbox or \fcolorbox, one has to +handle page breaks by hand. The present package defines the +environment mdframed which automatically deals with page breaks. + +Author's name: Marco Daniel and Elke Schubert (supports tikz implementation) +License type: lppl + +================================================================ +The revision history is printed in the documentation. + +================================================================ +The current development is available at github: +https://github.com/marcodaniel/mdframed + +================================================================ +The package provides + * one dtx files, + * one Makefile (compiling for Linux/Mac), + * one mdframedmake.bat (compiling for Windows) + * one personal documentclass ltxmdf.cls + * one example picture donald-duck.jpg + +By running the script `make all` you will +produce the following files: +- README.txt +- mdframed.sty +- mdframed.pdf +- md-frame-0.mdf +- md-frame-1.mdf +- md-frame-2.mdf +- md-frame-3.mdf +- mdframed-example-default.tex +- mdframed-example-default.pdf +- mdframed-example-tikz.tex +- mdframed-example-tikz.pdf +- mdframed-example-pstricks.tex +- mdframed-example-pstricks.pdf +- mdframed-example-texsx.tex +- mdframed-example-texsx.pdf + +I recommend the following installation in your texmf-tree: + +/doc/latex/mdframed/ +- README.txt +- mdframed.pdf +- mdframed-example-default.tex +- mdframed-example-default.pdf +- mdframed-example-tikz.tex +- mdframed-example-tikz.pdf +- mdframed-example-pstricks.tex +- mdframed-example-pstricks.pdf +- mdframed-example-texsx.tex +- mdframed-example-texsx.pdf +- ctan-lion.png "CTAN lion drawing by Duane Bibby; thanks to www.ctan.org". + +/source/latex/mdframed/ +- Makefile +- mdframed.dtx + +/tex/latex/mdframed +- mdframed.sty +- md-frame-0.mdf +- md-frame-1.mdf +- md-frame-2.mdf +- md-frame-3.mdf +- ltxmdf.cls +================================================================ +================================================================ + diff --git a/Master/texmf-dist/doc/latex/mdframed/ctan-lion.png b/Master/texmf-dist/doc/latex/mdframed/ctan-lion.png new file mode 100644 index 00000000000..c24d9a98f25 Binary files /dev/null and b/Master/texmf-dist/doc/latex/mdframed/ctan-lion.png differ diff --git a/Master/texmf-dist/doc/latex/mdframed/donald-duck.jpg b/Master/texmf-dist/doc/latex/mdframed/donald-duck.jpg deleted file mode 100644 index fe4f2a769e4..00000000000 Binary files a/Master/texmf-dist/doc/latex/mdframed/donald-duck.jpg and /dev/null differ 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 8f50a07fdda..15f1530bc24 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 9f202f496d6..2a2d4156f17 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex @@ -1,12 +1,33 @@ + \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\usepackage{showexpl} -\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} +\lstset{style=lstltxmdf} \newcommand\Loadedframemethod{default} \usepackage[framemethod=\Loadedframemethod]{mdframed} +\surroundwithmdframed[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,% + roundcorner=10pt,innertopmargin=0pt,% + leftmargin=1cm,rightmargin=1cm,% + innerleftmargin=-15pt,innerrightmargin=-15pt,% + ignorelastdescenders,% + settings={\lstset{resetmargins}},% + skipbelow=\topskip,skipabove=\topskip,% + innerbottommargin=0pt,backgroundcolor=gray!10]% + {tltxmdfexample} + +\newmdenv[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,% + roundcorner=10pt,innertopmargin=0pt,% + leftmargin=1cm,rightmargin=1cm,% + innerleftmargin=-15pt,innerrightmargin=-15pt,% + ignorelastdescenders,% + settings={\lstset{resetmargins}},% + skipbelow=\topskip,skipabove=\topskip,% + innerbottommargin=0pt,backgroundcolor=gray!10]% + {tltxmdfhighlight} +\def\highlightinputenv{tltxmdfhighlight} + \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} @@ -43,8 +64,8 @@ In the preamble only the package \Pack{mdframed} with the option 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}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with my own +created environment \Env{tltxmdfexample*}.} \section{Examples} All examples have the following settings: @@ -52,19 +73,19 @@ All examples have the following settings: \begin{tltxmdfexample} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% -An \textit{inhomogeneous linear} differential equation -has the form -\begin{align} -L[v ] = f, -\end{align} -where $L$ is a linear differential operator, $v$ is -the dependent variable, and $f$ is a given non-zero -function of the independent variables alone. + An \textit{inhomogeneous linear} differential equation has the form + \begin{align} + L[v ] = f, + \end{align} + where $L$ is a linear differential operator, $v$ is the dependent + variable, and $f$ is a given non-zero function of the independent + variables alone. } \end{tltxmdfexample} + \clearpage \Examplesec{very simple} -\begin{LTXexample} +\begin{tltxmdfexample*} \global\mdfdefinestyle{exampledefault}{% linecolor=red,linewidth=3pt,% leftmargin=1cm,rightmargin=1cm @@ -72,20 +93,19 @@ function of the independent variables alone. \begin{mdframed}[style=exampledefault] \ExampleText \end{mdframed} -\end{LTXexample} +\end{tltxmdfexample*} \Examplesec{hidden line + frame title} -\begin{LTXexample} +\begin{tltxmdfexample*} \global\mdfapptodefinestyle{exampledefault}{% topline=false,bottomline=false} \begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] \ExampleText \end{mdframed} -\end{LTXexample} -\clearpage +\end{tltxmdfexample*} \Examplesec{colored frame title} -\begin{LTXexample} +\begin{tltxmdfexample*} \global\mdfapptodefinestyle{exampledefault}{% rightline=true,innerleftmargin=10,innerrightmargin=10, @@ -95,21 +115,21 @@ function of the independent variables alone. \begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] \ExampleText \end{mdframed} -\end{LTXexample} +\end{tltxmdfexample*} \Examplesec{framed picture which is centered} -\begin{LTXexample}[morekeywords=width] +\begin{tltxmdfexample*}[morekeywords=width] \begin{mdframed}[userdefinedwidth=6cm,align=center, linecolor=blue,linewidth=4pt] -\IfFileExists{donald-duck.jpg}% - {\includegraphics[width=\linewidth]{donald-duck}}% +\textit{CTAN lion drawing by Duane Bibby; thanks to \url{www.ctan.org}} +\IfFileExists{ctan-lion.png}% + {\includegraphics[width=\linewidth]{ctan-lion.png}}% {\rule{\linewidth}{4cm}}% \end{mdframed} -\end{LTXexample} +\end{tltxmdfexample*} -\clearpage \Examplesec{Theorem environments} -\begin{LTXexample}[morekeywords={theoremstyle,definition}] +\begin{tltxmdfexample*}[morekeywords={theoremstyle,definition}] \mdfdefinestyle{theoremstyle}{% linecolor=red,linewidth=2pt,% frametitlerule=true,% @@ -126,11 +146,10 @@ function of the independent variables alone. \begin{definition*}[Inhomogeneous linear] \ExampleText \end{definition*} -\end{LTXexample} +\end{tltxmdfexample*} -\clearpage \Examplesec{theorem with separate header and the help of TikZ (complex)} -\begin{LTXexample}[% +\begin{tltxmdfexample*}[% morekeywords={theo,baseline,anchor,outer,sep,current,bounding,box,east},% moretexcs=tikz] \newcounter{theo}[section] @@ -161,15 +180,14 @@ function of the independent variables alone. \begin{theo} \ExampleText \end{theo} -\end{LTXexample} +\end{tltxmdfexample*} -\clearpage \Examplesec{hide only a part of a line} 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}[morekeywords={mdf@frame@leftline@single,mdf@frame@rightline@single,% +\begin{tltxmdfexample*}[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,% @@ -179,8 +197,10 @@ The example below is inspired by the following post on StackExchange \newlength{\interruptlength} \newrobustcmd\interruptrule[3]{% \color{#1}% - \hspace*{\dimexpr\mdfboundingboxwidth+\mdf@innerrightmargin@length\relax}% - \rule[\dimexpr-\mdfboundingboxdepth+#2\interruptlength\relax]% + \hspace*{\dimexpr\mdfboundingboxwidth+ + \mdf@innerrightmargin@length\relax}% + \rule[\dimexpr-\mdfboundingboxdepth+ + #2\interruptlength\relax]% {\mdf@middlelinewidth@length}% {\dimexpr\mdfboundingboxtotalheight-#3\interruptlength\relax}% } @@ -206,6 +226,6 @@ The example below is inspired by the following post on StackExchange \begin{mdframed}[linecolor=blue,linewidth=8pt] \ExampleText \end{mdframed} -\end{LTXexample} +\end{tltxmdfexample*} \end{document} \endinput 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 d27b9dfd610..2061649b842 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 e116dcbd44d..e347be7342e 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex @@ -1,3 +1,4 @@ + \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} @@ -5,8 +6,26 @@ \newcommand\Loadedframemethod{PSTricks} \usepackage[framemethod=\Loadedframemethod]{mdframed} -\usepackage{showexpl} -\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} +\surroundwithmdframed[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,% + roundcorner=10pt,innertopmargin=0pt,% + leftmargin=1cm,rightmargin=1cm,% + innerleftmargin=-15pt,innerrightmargin=-15pt,% + ignorelastdescenders,% + settings={\lstset{resetmargins}},% + skipbelow=\topskip,skipabove=\topskip,% + innerbottommargin=0pt,backgroundcolor=gray!10]% + {tltxmdfexample} + +\newmdenv[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,% + roundcorner=10pt,innertopmargin=0pt,% + leftmargin=1cm,rightmargin=1cm,% + innerleftmargin=-15pt,innerrightmargin=-15pt,% + ignorelastdescenders,% + settings={\lstset{resetmargins}},% + skipbelow=\topskip,skipabove=\topskip,% + innerbottommargin=0pt,backgroundcolor=gray!10]% + {tltxmdfhighlight} +\def\highlightinputenv{tltxmdfhighlight} \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} @@ -44,8 +63,8 @@ In the preamble only the package \Pack{mdframed} width the option 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}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with my own +created environment \Env{tltxmdfexample*}.} \section{Examples} All examples have the following settings: @@ -53,20 +72,20 @@ All examples have the following settings: \begin{tltxmdfexample} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% -An \textit{inhomogeneous linear} differential equation -has the form -\begin{align} -L[v ] = f, -\end{align} -where $L$ is a linear differential operator, $v$ is -the dependent variable, and $f$ is a given non-zero -function of the independent variables alone. + An \textit{inhomogeneous linear} differential equation has the form + \begin{align} + L[v ] = f, + \end{align} + where $L$ is a linear differential operator, $v$ is the dependent + variable, and $f$ is a given non-zero function of the independent + variables alone. } \end{tltxmdfexample} + \clearpage \Examplesec{very simple} -\begin{LTXexample} +\begin{tltxmdfexample*} \global\mdfdefinestyle{exampledefault}{% linecolor=red,middlelinewidth=3pt,% leftmargin=1cm,rightmargin=1cm @@ -74,10 +93,10 @@ function of the independent variables alone. \begin{mdframed}[style=exampledefault,roundcorner=5] \ExampleText \end{mdframed} -\end{LTXexample} +\end{tltxmdfexample*} \Examplesec{hidden line + frame title} -\begin{LTXexample}[morekeywords={innerlinecolor,addtopsstyle,mdfouterlinestyle, +\begin{tltxmdfexample*}[morekeywords={innerlinecolor,addtopsstyle,mdfouterlinestyle, linestyle}] \global\mdfapptodefinestyle{exampledefault}{% topline=false,rightline=false,bottomline=false, @@ -88,21 +107,19 @@ function of the independent variables alone. \begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] \ExampleText \end{mdframed} -\end{LTXexample} - -\clearpage +\end{tltxmdfexample*} \Examplesec{Dash Lines}[morekeywords={pstrickssetting,linestyle,dashed}] -\begin{LTXexample} +\begin{tltxmdfexample*} \global\mdfdefinestyle{exampledefault}{% pstrickssetting={linestyle=dashed,},linecolor=red,middlelinewidth=2pt} \begin{mdframed}[style=exampledefault] \ExampleText \end{mdframed} -\end{LTXexample} +\end{tltxmdfexample*} \Examplesec{Double Lines} -\begin{LTXexample}[morekeywords={addtopsstyle,mdfmiddlelinestyle, +\begin{tltxmdfexample*}[morekeywords={addtopsstyle,mdfmiddlelinestyle, doubleline,doublesep}] \global\mdfdefinestyle{exampledefault}{% pstricksappsetting={\addtopsstyle{mdfmiddlelinestyle}{% @@ -111,11 +128,10 @@ function of the independent variables alone. \begin{mdframed}[style=exampledefault] \ExampleText \end{mdframed} -\end{LTXexample} +\end{tltxmdfexample*} -\clearpage \Examplesec{Shadow frame} -\begin{LTXexample}[morekeywords={shadow,shadowsize,myshadowbox}] +\begin{tltxmdfexample*}[morekeywords={shadow,shadowsize,myshadowbox}] \newmdenv[shadow=true, shadowsize=11pt, linewidth=8pt, @@ -125,6 +141,6 @@ function of the independent variables alone. \begin{myshadowbox}[frametitle={Inhomogeneous linear}] \ExampleText \end{myshadowbox} -\end{LTXexample} +\end{tltxmdfexample*} \end{document} \endinput 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 54af09821f2..513e71a93e8 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 b486389e415..6f34f23d9a6 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-texsx.tex @@ -1,14 +1,34 @@ + \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt,lipsum=true]{ltxmdf} -\usepackage{showexpl} -\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} \usepackage{tikz} \usetikzlibrary{calc,arrows,shadings,shadows} \newcommand\Loadedframemethod{tikz} \usepackage[framemethod=\Loadedframemethod]{mdframed} +\surroundwithmdframed[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,% + roundcorner=10pt,innertopmargin=0pt,% + leftmargin=1cm,rightmargin=1cm,% + innerleftmargin=-15pt,innerrightmargin=-15pt,% + ignorelastdescenders,% + settings={\lstset{resetmargins}},% + skipbelow=\topskip,skipabove=\topskip,% + innerbottommargin=0pt,backgroundcolor=gray!10]% + {tltxmdfexample} + +\newmdenv[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,% + roundcorner=10pt,innertopmargin=0pt,% + leftmargin=1cm,rightmargin=1cm,% + innerleftmargin=-15pt,innerrightmargin=-15pt,% + ignorelastdescenders,% + settings={\lstset{resetmargins}},% + skipbelow=\topskip,skipabove=\topskip,% + innerbottommargin=0pt,backgroundcolor=gray!10]% + {tltxmdfhighlight} +\def\highlightinputenv{tltxmdfhighlight} + \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} @@ -45,8 +65,8 @@ In the preamble only the package \Pack{mdframed} width the option 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}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with my own +created environment \Env{tltxmdfexample*}.} \section{Examples} All examples have the following settings: @@ -54,14 +74,13 @@ All examples have the following settings: \begin{tltxmdfexample} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% -An \textit{inhomogeneous linear} differential equation -has the form -\begin{align} -L[v ] = f, -\end{align} -where $L$ is a linear differential operator, $v$ is -the dependent variable, and $f$ is a given non-zero -function of the independent variables alone. + An \textit{inhomogeneous linear} differential equation has the form + \begin{align} + L[v ] = f, + \end{align} + where $L$ is a linear differential operator, $v$ is the dependent + variable, and $f$ is a given non-zero function of the independent + variables alone. } \end{tltxmdfexample} \clearpage @@ -90,24 +109,24 @@ With the new command \Cmd{surroundwithmdframed} you can use \surroundwithmdframed{listings} \end{tltxmdfexample} +\clearpage \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}[morekeywords={multicols}] -\begin{multicols}{2} -\lipsum[1] -\begin{mdframed} -\ExampleText -\end{mdframed} -\lipsum[2] -\end{multicols} -\end{LTXexample} + +\begin{tltxmdfexample*}[morekeywords={multicols}] + \begin{multicols}{2} + \lipsum[1] + \begin{mdframed} + \ExampleText + \end{mdframed} + \lipsum[2] + \end{multicols} +\end{tltxmdfexample*} + \clearpage \twocolumn[\Examplesec{Working in twocolumn mode}] -\begin{tltxmdfexample} -\twocolumn[% - \Examplesec{Working in - twocolumn mode}] +\begin{tltxmdfexample*}[moretexcs={Examplesec}] \lipsum[1]\lipsum[2] \begin{mdframed}[% leftmargin=10pt,% @@ -117,19 +136,12 @@ How I wrote in \enquote{Known Problems} you can't combine \Pack{multicol} with \ExampleText \end{mdframed} \lipsum[2] -\end{tltxmdfexample} -\lipsum[1]\lipsum[2] -\begin{mdframed}[leftmargin=10pt,% - rightmargin=10pt,% - linecolor=red, - backgroundcolor=yellow] -\ExampleText -\end{mdframed} -\lipsum[2] +\end{tltxmdfexample*} + \clearpage \onecolumn \Examplesec{Working inside enumerate} -\begin{LTXexample}[morekeywords={enumerate}] +\begin{tltxmdfexample*}[morekeywords={enumerate}] Text Text Text Text Text Text Text Text \begin{enumerate} \item in the following \ldots @@ -139,10 +151,10 @@ Text Text Text Text Text Text Text Text \item \lipsum[2] \end{enumerate} Text Text Text Text Text Text -\end{LTXexample} -\clearpage +\end{tltxmdfexample*} + \Examplesec{Position a specific symbol at a line} -\begin{LTXexample} +\begin{tltxmdfexample*} \tikzset{ warningsymbol/.style={ rectangle,draw=red, @@ -172,11 +184,10 @@ Text Text Text Text Text Text \begin{mdframed}[style=warning] \ExampleText \end{mdframed} -\end{LTXexample} +\end{tltxmdfexample*} -\clearpage \Examplesec{digression-environement inspired by Tobias Weh} -\begin{lstlisting}[morekeywords={% +\begin{tltxmdfexample*}[morekeywords={% font,anchor,let,in,arrow,round,cap,controls,coordinate,% excursus,head,arrows,calc,line,width,and,to,digressionarrows,% base,west},% @@ -232,70 +243,21 @@ Text Text Text Text Text Text \begin{mdframed}[style=digressionarrows] \ExampleText \end{mdframed} -\end{lstlisting} - -\tikzset{ - excursus arrow/.style={% - line width=2pt, - draw=gray!40, - rounded corners=2ex, - }, - excursus head/.style={ - fill=white, - font=\bfseries\sffamily, - text=gray!80, - anchor=base west, - }, -} -\mdfdefinestyle{digressionarrows}{% - singleextra={% - \path let \p1=(P), \p2=(O) in (\x2,\y1) coordinate (Q); - \path let \p1=(Q), \p2=(O) in (\x1,{(\y1-\y2)/2}) coordinate (M); - \path [excursus arrow, round cap-to] - ($(O)+(5em,0ex)$) -| (M) |- % - ($(Q)+(12em,0ex)$) .. controls +(0:16em) and +(185:6em) .. % - ++(23em,2ex); - \node [excursus head] at ($(Q)+(2.5em,-0.75pt)$) {Digression};}, - firstextra={% - \path let \p1=(P), \p2=(O) in (\x2,\y1) coordinate (Q); - \path [excursus arrow,-to] - (O) |- % - ($(Q)+(12em,0ex)$) .. controls +(0:16em) and +(185:6em) .. % - ++(23em,2ex); - \node [excursus head] at ($(Q)+(2.5em,-2pt)$) {Digression};}, - secondextra={% - \path let \p1=(P), \p2=(O) in (\x2,\y1) coordinate (Q); - \path [excursus arrow,round cap-] - ($(O)+(5em,0ex)$) -| (Q);}, - middleextra={% - \path let \p1=(P), \p2=(O) in (\x2,\y1) coordinate (Q); - \path [excursus arrow] - (O) -- (Q);}, - middlelinewidth=2.5em,middlelinecolor=white, - hidealllines=true,topline=true, - innertopmargin=0.5ex, - innerbottommargin=2.5ex, - innerrightmargin=2pt, - innerleftmargin=2ex, - skipabove=0.87\baselineskip, - skipbelow=0.62\baselineskip, -} - -\begin{mdframed}[style=digressionarrows] - \ExampleText -\end{mdframed} +\end{tltxmdfexample*} \Examplesec{Theorem style shading background} -\begin{LTXexample}[morekeywords={top,bottom,Theorem,shadow,alternativtheorem}] +\begin{tltxmdfexample*}[morekeywords={top,bottom,Theorem,shadow,alternativtheorem}] \mdtheorem[% - apptotikzsetting={\tikzset{mdfbackground/.append style =% - {top color=yellow!40!white, - bottom color=yellow!80!black}, - mdfframetitlebackground/.append style =% - {top color=purple!40!white, - bottom color=purple!80!black} - }% - }, + apptotikzsetting={% + \tikzset{mdfbackground/.append style ={% + top color=yellow!40!white, + bottom color=yellow!80!black}, + mdfframetitlebackground/.append style={ + top color=purple!40!white, + bottom color=purple!80!black + } + }% + }, ,roundcorner=10pt,middlelinewidth=2pt, shadow=true,frametitlerule=true,frametitlerulewidth=4pt, innertopmargin=10pt,% @@ -303,6 +265,6 @@ Text Text Text Text Text Text \begin{alternativtheorem}[Inhomogeneous linear] \ExampleText \end{alternativtheorem} -\end{LTXexample} +\end{tltxmdfexample*} \end{document} \endinput 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 24108560453..9044a27f3ef 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 fcb53648071..64462bf143f 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex @@ -1,12 +1,31 @@ + \setcounter{errorcontextlines}{999} \documentclass[parskip=false,english,11pt]{ltxmdf} -\usepackage{showexpl} -\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},} - \newcommand\Loadedframemethod{TikZ} \usepackage[framemethod=\Loadedframemethod]{mdframed} +\surroundwithmdframed[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,% + roundcorner=10pt,innertopmargin=0pt,% + leftmargin=1cm,rightmargin=1cm,% + innerleftmargin=-15pt,innerrightmargin=-15pt,% + ignorelastdescenders,% + settings={\lstset{resetmargins}},% + skipbelow=\topskip,skipabove=\topskip,% + innerbottommargin=0pt,backgroundcolor=gray!10]% + {tltxmdfexample} + +\newmdenv[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,% + roundcorner=10pt,innertopmargin=0pt,% + leftmargin=1cm,rightmargin=1cm,% + innerleftmargin=-15pt,innerrightmargin=-15pt,% + ignorelastdescenders,% + settings={\lstset{resetmargins}},% + skipbelow=\topskip,skipabove=\topskip,% + innerbottommargin=0pt,backgroundcolor=gray!10]% + {tltxmdfhighlight} +\def\highlightinputenv{tltxmdfhighlight} + \title{The \Pack{mdframed} package} \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}} \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}} @@ -43,8 +62,8 @@ In the preamble only the package \Pack{mdframed} width the option 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}.} +\NOTE Every \Cmd{global} inside the examples is necessary to work with my own +created environment \Env{tltxmdfexample*}.} \section{Examples} All examples have the following settings: @@ -52,19 +71,19 @@ All examples have the following settings: \begin{tltxmdfexample} \mdfsetup{skipabove=\topskip,skipbelow=\topskip} \newrobustcmd\ExampleText{% -An \textit{inhomogeneous linear} differential equation -has the form -\begin{align} -L[v ] = f, -\end{align} -where $L$ is a linear differential operator, $v$ is -the dependent variable, and $f$ is a given non-zero -function of the independent variables alone. + An \textit{inhomogeneous linear} differential equation has the form + \begin{align} + L[v ] = f, + \end{align} + where $L$ is a linear differential operator, $v$ is the dependent + variable, and $f$ is a given non-zero function of the independent + variables alone. } \end{tltxmdfexample} + \clearpage \Examplesec{round corner} -\begin{LTXexample} +\begin{tltxmdfexample*} \global\mdfdefinestyle{exampledefault}{% outerlinewidth=5pt,innerlinewidth=0pt, outerlinecolor=red,roundcorner=5pt @@ -72,29 +91,30 @@ function of the independent variables alone. \begin{mdframed}[style=exampledefault] \ExampleText \end{mdframed} -\end{LTXexample} +\end{tltxmdfexample*} \Examplesec{hidden line + frame title} -\begin{LTXexample} +\begin{tltxmdfexample*} \global\mdfapptodefinestyle{exampledefault}{% topline=false,leftline=false,} \begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] \ExampleText \end{mdframed} -\end{LTXexample} -\clearpage +\end{tltxmdfexample*} + \Examplesec{framed picture which is centered} -\begin{LTXexample} +\begin{tltxmdfexample*} \begin{mdframed}[userdefinedwidth=6cm,align=center, linecolor=blue,middlelinewidth=4pt,roundcorner=5pt] -\IfFileExists{donald-duck.jpg}% - {\includegraphics[width=\linewidth]{donald-duck}}% +\textit{CTAN lion drawing by Duane Bibby; thanks to \url{www.ctan.org}} +\IfFileExists{ctan-lion.png}% + {\includegraphics[width=\linewidth]{ctan-lion.png}}% {\rule{\linewidth}{4cm}}% \end{mdframed} -\end{LTXexample} +\end{tltxmdfexample*} \Examplesec{Gimmick} -\begin{LTXexample}[morekeywords={line,width,dash,dashed,pattern}] +\begin{tltxmdfexample*}[morekeywords={line,width,dash,dashed,pattern}] \mdfsetup{splitbottomskip=0.8cm,splittopskip=0cm, innerrightmargin=2cm,innertopmargin=1cm,% innerlinewidth=2pt,outerlinewidth=2pt, @@ -107,15 +127,15 @@ function of the independent variables alone. \begin{mdframed} \ExampleText \end{mdframed} -\end{LTXexample} +\end{tltxmdfexample*} \clearpage \Examplesec{complex example with TikZ} -\begin{tltxmdfexample}[morekeywords={mdf}] -\tikzstyle{titregris} = - [draw=gray, thick, fill=white, shading = exersicetitle, % - text=gray, rectangle, rounded corners, right,minimum height=.7cm] +\begin{tltxmdfexample*}[morekeywords={mdf}] +\tikzset{titregris/.style = + {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} @@ -141,73 +161,19 @@ function of the independent variables alone. settings={\global\stepcounter{exercise}}, singleextra={% \node[titregris,xshift=1cm] at (P-|O) % - {~\mdf@frametitlefont{\theexercise}~}; + {~\mdf@frametitlefont{\theexercise}\hbox{~}}; \ifdefempty{\mdf@@exercisepoints}% {}% {\node[titregris,left,xshift=-1cm] at (P)% - {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}% + {~\mdf@frametitlefont{\mdf@@exercisepoints points}\hbox{~}};}% }, firstextra={% \node[titregris,xshift=1cm] at (P-|O) % - {~\mdf@frametitlefont{\theexercise}~}; + {~\mdf@frametitlefont{\theexercise}\hbox{~}}; \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=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}~};}% + {~\mdf@frametitlefont{\mdf@@exercisepoints points}\hbox{~}};}% }, } \makeatother @@ -219,10 +185,11 @@ function of the independent variables alone. \begin{mdframed}[style=exercisestyle,exercisepoints=10] \ExampleText \end{mdframed} +\end{tltxmdfexample*} \clearpage \Examplesec{Theorem environments} -\begin{LTXexample}[morekeywords={theoremstyle,definition}] +\begin{tltxmdfexample*}[morekeywords={theoremstyle,definition}] \mdfdefinestyle{theoremstyle}{% linecolor=red,middlelinewidth=2pt,% frametitlerule=true,% @@ -239,7 +206,7 @@ function of the independent variables alone. \begin{definition*}[Inhomogeneous linear] \ExampleText \end{definition*} -\end{LTXexample} - +\end{tltxmdfexample*} \end{document} \endinput + diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed.pdf index c6ee0aeb87d..6e8a24268a9 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 0976d3355e9..fd9d5b99a31 100644 --- a/Master/texmf-dist/source/latex/mdframed/Makefile +++ b/Master/texmf-dist/source/latex/mdframed/Makefile @@ -220,7 +220,7 @@ usectanify: echo "" ;\ echo -e "\t$(ERROR_COLOR)Start ctanify$(NO_COLOR)" ;\ ctanify $(PACKAGE).ins $(PACKAGE).pdf README.txt ltxmdf.cls \ - donald-duck.jpg=doc/latex/mdframed/ \ + ctan-lion.png=doc/latex/mdframed/ \ $(EXAMPLED).tex=doc/latex/mdframed/ \ $(EXAMPLED).pdf=doc/latex/mdframed/ \ $(EXAMPLET).tex=doc/latex/mdframed/ \ diff --git a/Master/texmf-dist/source/latex/mdframed/mdframed.dtx b/Master/texmf-dist/source/latex/mdframed/mdframed.dtx index f1209ceffba..dd30dbe2c1f 100644 --- a/Master/texmf-dist/source/latex/mdframed/mdframed.dtx +++ b/Master/texmf-dist/source/latex/mdframed/mdframed.dtx @@ -59,7 +59,7 @@ I recommend the following installation in your texmf-tree: - mdframed-example-pstricks.pdf - mdframed-example-texsx.tex - mdframed-example-texsx.pdf -- donald-duck.jpg +- ctan-lion.png "CTAN lion drawing by Duane Bibby; thanks to www.ctan.org". /source/latex/mdframed/ @@ -106,7 +106,7 @@ License type: lppl HEIKO OBERDIEK HERBERT VOSS - Copyright (c) 2010 Marco Daniel + Copyright (c) 2010-2013 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. @@ -216,19 +216,22 @@ Have fun! \setcounter{errorcontextlines}{999} \documentclass[parskip=false,11pt,]{ltxmdf} +\usepackage{pdfpages} \usepackage[framemethod=TikZ]{mdframed} - +\usetikzlibrary{shadows} \surroundwithmdframed[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,% roundcorner=10pt,innertopmargin=0pt,% leftmargin=1cm,rightmargin=1cm,% innerleftmargin=-15pt,innerrightmargin=-15pt,% ignorelastdescenders,% settings={\lstset{resetmargins}},% - skipbelow=\topskip,skipabove=\topskip, - innerbottommargin=0pt,backgroundcolor=gray!10]{tltxmdfexample} + skipbelow=\topskip,skipabove=\topskip,% + innerbottommargin=0pt,backgroundcolor=gray!10]% + {tltxmdfexample} \EnableCrossrefs \CodelineIndex +\OnlyDescription %%\RecordChanges \begin{document} \DocInput{mdframed.dtx} @@ -302,14 +305,12 @@ Have fun! % roundcorner = 10pt ,% % leftmargin = 40 ,% % rightmargin = 40 ,% -% backgroundcolor = yellow ,% -% outerlinecolor = blue ,% +% backgroundcolor = yellow!40 ,% +% outerlinecolor = blue!70!black ,% % innertopmargin = \topskip ,% % splittopskip = \topskip ,% % ntheorem = true ,% -% skipabove = \baselineskip ,% -% skipbelow = \baselineskip] -% {theorem}{Theorem}[section] +% ]{theorem}{Theorem}[section] % % \begin{theorem}[Pythagorean theorem] % In any right triangle, the area of the square whose side is the hypotenuse @@ -327,16 +328,15 @@ Have fun! \begin{tltxmdfexample}[columns=fixed,fontadjust=false] \newmdtheoremenv[% outerlinewidth = 2 ,% + roundcorner = 10pt ,% leftmargin = 40 ,% rightmargin = 40 ,% - backgroundcolor = yellow ,% - outerlinecolor = blue ,% + backgroundcolor = yellow!40 ,% + outerlinecolor = blue!70!black ,% innertopmargin = \topskip ,% splittopskip = \topskip ,% ntheorem = true ,% - skipabove = \baselineskip ,% - skipbelow = \baselineskip] - {theorem}{Theorem}[section] + ]{theorem}{Theorem}[section] \begin{theorem}[Pythagorean theorem] ... \end{theorem} @@ -348,20 +348,16 @@ Have fun! % % \section{Syntax}\label{sec:syntax} % -% \minisec{Loadings \Pack{mdframed}} +% \minisec{Required packages by \Pack{mdframed}} % The package itself loads the packages -% \begin{itemize} -% \item \Pack{kvoptions}, -% \item \Pack{xparse} (new), -% \item \Pack{etoolbox} and -% \item \Pack{color}. -% \end{itemize} -% Depending on the options \Pack{mdframed} will load -% \begin{itemize} -% \item \Pack{xcolor}, -% \item \Pack{tikz} or -% \item \Pack{pstricks}. -% \end{itemize} +% \begin{center} +% \Pack{kvoptions}\qquad\Pack{xparse}\qquad\Pack{etoolbox} +% \quad\Pack{color}. +% \end{center} +% Depending on the option \Opt{framemthod} \Pack{mdframed} will load +% \begin{center} +% \Pack{xcolor}\qquad\Pack{tikz}\qquad\Pack{pstricks}. +% \end{center} % % Load the package as usual: % \iffalse @@ -399,21 +395,16 @@ Have fun! % an environment \Pack{mdframed} will use the option \Opt{nobreak} % automatically. % -% \minisec{Twoside-mode} -% If you are using \Pack{mdframed} inside \Pack{twoside}-mode you can set -% the option \Opt{innermargin} and \Opt{outermargin} (see section % -% \ref{optlength}). The length will be ignored if you use the option -% \Opt{usetwoside}. % % % %%%%%%%%%%%%%%%%%%%%%%% -% \section{The frames}\label{sec:cmds} +% \section{The frames}\label{sec:frames} % % Normally you can say \Pack{mdframed} draws only some lines. % To allow page breaks the following designs are supported. % If you load the package with \Opt{framemethod=default} you -% can only draw a single line. Inside the gray box the text -% will be printed. +% can only draw a single line. Inside the gray boxes of the images below +% the text will be printed. % \newcommand\Punkt[2][below]{% % \node[label=#1:#2] at (#2){\tikz\fill(0,0)circle(0.05);};} % \newcommand\Single[1][]{\path[#1] (O)--(O|-P)--(P)--(P|-O)--cycle;} @@ -496,10 +487,12 @@ Have fun! %\end{center} % %%%%%%%%%%%%%%%%%%%%%%% % \section{Commands}\label{sec:cmds} +% % The following commands should countenance your by the handling with % \Pack{mdframed}. % -% \ExplCmd{newmdenv} The command has the following syntax: +% \ExplCmd{newmdenv[options]\{env-name\}} The command allows the definition of a new environment +% which is surrounded by \Env{mdframed}. The command has the following syntax: % \iffalse %<*example> % \fi @@ -509,29 +502,29 @@ Have fun! % \iffalse % % \fi -% In this way you can simply use: +% In this way you can say: % \iffalse %<*example> % \fi \begin{tltxmdfexample} \newmdenv[linecolor=red,frametitle=Infobox]{infobox} - ... + \begin{infobox}[backgroundcolor=yellow] - foo foo foo foo foo foo + Some Infos\ldots \end{infobox} \end{tltxmdfexample} % \iffalse % % \fi -% \ExplCmd{renewmdenv} +% \ExplCmd{renewmdenv[options]\{env-name\}} % By using this command you can redefine environments which are created by % \Cmd{newmdenv}. % -% \ExplCmd{surroundwithmdframed} +% \ExplCmd{surroundwithmdframed[options]\{environment\}} % Sometimes you have predefined environments. This commands allows you to -% set an \Env{environment} surround this predefined environment. To set a -% \Env{mdframed} around the environment \Env{verbatim} you can simple say -% without changing the original name. +% surround an predefined \Env{environment} with \Env{mdframed} without +% changing the original name. To set a \Env{mdframed} around the +% environment \Env{verbatim} you can simple say. % \iffalse %<*example> % \fi @@ -543,9 +536,9 @@ Have fun! % \fi % % -% \ExplCmd{mdflength} +% \ExplCmd{mdflength\{options\}} % If you want to work with length defined by \Pack{mdframed} (for example -% \Opt{innerleftmargin}) you can now simple use the command \Cmd{mdflength}. +% \Opt{innerleftmargin}) you can use the command \Cmd{mdflength}. % \iffalse %<*example> % \fi @@ -562,7 +555,7 @@ Have fun! % \end{center} % % -% \ExplCmd{mdfsetup}To set the options +% \ExplCmd{mdfsetup\{options\}}To set the options % you can use the optional argument of \Cmd{usepackage} or % you can use the command \Cmd{mdfsetup} which is not limited to the preamble. % Inside a group the settings work only local.\par @@ -577,19 +570,32 @@ Have fun! % The sole exception is the option \Opt{framemethod} which must given as an optional % argument of \Cmd{usepackage}. % -% \ExplCmd{mdfdefinestyle} -% \Cmd{mdfdefinestyle} allows the user to define different styles and use -% as an option of \Pack{mdframed} via \Opt{style}. The option \Opt{style} -% is explained in section \ref{genopt}. % +% +% +% \section{Defining your own style} +% In the next section all options are introduced. However instead of +% passing them global or as an optional argument of the environment +% you can define your own styles. The method is as follows +% \ExplCmd{mdfdefinestyle\{style name\}\{options\}} +% \Cmd{mdfdefinestyle} allows the user to define different styles which can +% be used as an option of \Pack{mdframed} via \Opt{style}. +% \ExplCmd{mdfapptodefinestyle\{style name\}\{options\}} +% This commands add options to a defined style.\footnote{Thanks +% to Martin Scharrer and Enrico Gregorio:\newline +% \href{http://tex.stackexchange.com/questions/34684/argument-of-setkeys} +% {http://tex.stackexchange.com/questions/34684/argument-of-setkeys}} +% \ExplOpt{style} +% If you define a special style with \Cmd{mdfdefinestyle} you can use +% the key \Opt{style} to load the style. \Pack{mdframed} has +% no predefined styles yet. +% % Here a small example: % \iffalse %<*example> % \fi \begin{tltxmdfexample}[morekeywords={mystyle}] - \mdfdefinestyle{mystyle}{leftmargin=0pt,% - linecolor=blue} - .... + \mdfdefinestyle{mystyle}{leftmargin=1cm,linecolor=blue} \begin{mdframed}[style=mystyle] foo \end{mdframed} @@ -598,13 +604,6 @@ Have fun! % % \fi % -% \ExplCmd{mdfapptodefinestyle} -% This commands allows to expand a defined style.\footnote{Thanks -% to Martin Scharrer and Enrico Gregorio:\newline -% \href{http://tex.stackexchange.com/questions/34684/argument-of-setkeys} -% {http://tex.stackexchange.com/questions/34684/argument-of-setkeys}} -% -% % % %%%%%%%%%%%%%%%%%%%%%%% % \section{Options} @@ -634,10 +633,9 @@ Have fun! % \end{enumerate} % The option \Opt{framemethod} requires a string. Allowed combinations are % listed in the following table. -% \begin{table}[!ht] -% \centering +% \begin{center} % \renewcommand*\arraystretch{1.3} -% \caption{Allowed keys for \Opt{framemethod}} +% \captionof{table}{Allowed keys for \Opt{framemethod}} % \begin{tabular}{@{}>{\small\bfseries}l>{\small\ttfamily}l@{}} % \toprule % \multicolumn{1}{@{}l}{\textbf{Method}} & \multicolumn{1}{l}{Allowed keys}\\ @@ -647,30 +645,70 @@ Have fun! % \Pack{PSTricks} & pstricks, ps, postscript, 2 \\ % \bottomrule % \end{tabular} -% \end{table} -% +% \end{center} +% +% If you are lazy you can also work with the following short forms: +% \Opt{tikz}, \Opt{TikZ}, \Opt{pstricks}, \Opt{PSTricks} or \Opt{ps}. Of +% course for the default method exists no key. +% % \minisec{FYI} % It is independently whether the \texttt{method} is % written with no, one or more capital letter. % -% \minisec{Note} -% The manipulation of the frames depends on the option \Opt{framemethod}. -% For further information see below. -% -% \subsection{Global and Local Options} -% The options listed below can be set globally or locally and they are not -% limited to the preamble. -% I tried to define self explained names. +% All other options listed below can be set globally or locally and they are not +% limited to the preamble. I was trying to define self explained names. +% +% \subsection{Restoring the settings} +% Sometimes it's useful to remove all done settings. Every default value +% is saved in a style wich can be called by the option \Opt{default} or +% a more suitable +% name \Opt{style=defaultoptions}. Both do the same. +% +% Here a small example: +% \iffalse +%<*example> +% \fi +\begin{tltxmdfexample}[morekeywords={mystyle}] + \mdfsetup{% + middlelinecolor=red, + middlelinewidth=2pt, + backgroundcolor=red!10, + roundcorner=10pt} + \begin{mdframed} + Text\par Text + \end{mdframed} + + \begin{mdframed}[default] + Text\par Text + \end{mdframed} +\end{tltxmdfexample} +% \iffalse +% +% \fi % -% \subsubsection{Options with lengths}\label{optlength} +% \begin{mdframed}[% +% backgroundcolor=yellow!70!brown,linewidth=1.5pt, +% roundcorner=8pt,linecolor=brown!70!black,innerleftmargin=10pt] +% \mdfsetup{default, +% middlelinecolor=red, +% middlelinewidth=2pt, +% backgroundcolor=red!10, +% roundcorner=10pt} +% \begin{mdframed} +% Text\par Text +% \end{mdframed} +% +% \begin{mdframed}[default] +% Text\par Text +% \end{mdframed} +% \end{mdframed} +% +% +% +% \subsection{Options with lengths}\label{optlength} % % In figure \eqref{fig:laengen} you can see the adjustable lengths -% (compare also figure \eqref{fig:basicframes}) which will be described below. -% All lengths accept two kinds of input. The first one is a length (e.g. 2pt) -% and the second one is a number (e.g. 2) which will be multiplied by -% \Opt{1 defaultunit}. The figure shows three different colored frames. -% -% \ExplOpt[pt]{defaultunit} see the sentence above. +% (compare also figure \eqref{fig:basicframes}). % % \begin{center} % \begin{tikzpicture}[scale=0.9] @@ -782,231 +820,253 @@ Have fun! % \label{fig:laengen} % \end{center} % -% \ExplOpt[0\,pt]{skipabove} -% Sets an additional skip above the frame. -% \ExplOpt[0\,pt]{skipbelow} -% Sets an additional skip below the frame. -% \ExplOpt[]{margin} -% This option is not longer supported. Use \Opt{leftmargin} -% and \Opt{rightmargin} instead. -% \ExplOpt[0pt]{leftmargin} -% Sets the length of the left margin of the environment. This option has -% an effect only in singleside-mode or, in twoside-mode, if the option -% \Opt{usetwoside=false} has been given. -% See also options \Opt{outermargin} and \Opt{innermargin}. -% \ExplOpt[0\,pt]{rightmargin} -% Sets the length of the right margin of the environment. This option has -% an effect only in singleside-mode or, in twoside-mode, if the option -% \Opt{usetwoside=false} has been given. -% See also options \Opt{outermargin} and \Opt{innermargin}. -% \ExplOpt[10\,pt]{innerleftmargin} -% Sets the length of the inner left margin of the environment. -% \ExplOpt[10\,pt]{innerrightmargin} -% Sets the length of the inner right margin of the environment. -% \ExplOpt[.4\textbackslash baselineskip]{innertopmargin} -% Sets the length of the inner top margin of the environment. -% \ExplOpt[.4\textbackslash baselineskip]{innerbottommargin} -% Sets the length of the inner bottom margin of the environment. -% -% \paragraph*{The following lengths are not shown in figure -% \eqref{fig:laengen}.} -% -% \mbox{} -% \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. -% \ExplOpt[0\,pt]{outermargin} -% Sets the length of the outer margin. This option is only available -% in \texttt{twoside}-mode. -% \ExplOpt[0\,pt]{innermargin} -% Sets the length of the inner margin. This option is only available -% in \texttt{twoside}-mode. -% \ExplOpt[0\,pt]{splittopskip} -% Sets the length of the skip above the split part of the environment. -% \ExplOpt[0\,pt]{splitbottomskip} -% Sets the length of the skip below the split part of the environment. -% \ExplOpt[0.4\,pt]{linewidth} -% Sets the width of the line around the environment. -% \limitation[\Opt{default}] -% \ExplOpt[0\,pt]{roundcorner} -% Sets the size of the radius of the corners of the frames. -% \limitation[TikZ or PSTricks] -% \ExplOpt[0\,pt]{innerlinewidth} -% Sets the width of the inner line around the environment. -% \limitation[TikZ or PSTricks] -% \ExplOpt[0\,pt]{outerlinewidth} -% Sets the width of the outer line around the environment. -% \limitation[TikZ or PSTricks] -% \ExplOpt[0.4\,pt]{middlelinewidth} -% Sets the width of the middle line around the environment. -% \limitation[TikZ or PSTricks] +% \ExplOpt[pt]{defaultunit} +% All lengths accept two kinds of input. The first one is a length (e.g. 2pt) +% and the second one is a number (e.g. 2) which will be multiplied by +% \Opt{1 defaultunit}. To get a better overview, all length options with their +% default value are listet in a table. I think the names are self explained +% so that don't describe it anymore. Although special hints and length are +% described below +% % -% \subsubsection{Colored Options} -% \ExplOpt[black]{linecolor} -% Sets the color of the line around the environment. -% \ExplOpt[white]{backgroundcolor} -% Sets the color of the background of the environment. -% \ExplOpt[black]{fontcolor} -% Sets the color of the contents of the environment. -% \ExplOpt[linecolor]{innerlinecolor} -% Sets the color of the inner line around the environment. -% \limitation[TikZ or PSTricks] -% \ExplOpt[linecolor]{middlelinecolor} -% Sets the color of the middle line around the environment. -% \limitation[TikZ or PSTricks] -% \ExplOpt[linecolor]{outerlinecolor} -% Sets the color of the outer line around the environment. -% \limitation[TikZ or PSTricks] +% The first table lists the length for the geometry of the frame. +% \begin{center} +% \def\arraystretch{1.4} +% \begin{tabular}{@{}% +% >{\Opt\bgroup}l<{\egroup}@{${}={}$}>{\ttfamily}l% +% @{\qquad} +% >{\Opt\bgroup}l<{\egroup}@{${}={}$}>{\ttfamily}l% +% @{}} +% \hline +% skipabove & 0pt & skipbelow & 0pt \\ +% leftmargin & 0pt & rightmargin & 0pt \\ +% innerleftmargin & 10pt & innerrightmargin & 10pt \\ +% innertopmargin & 5pt & innerbottommargin & 5pt \\ +% \hline +% \end{tabular} +% \end{center} +% Before the next options are introduced here an example where the described +% length are used. +% \iffalse +%<*example> +% \fi +\begin{tltxmdfexample}[morekeywords={mystyle}] + \mdfdefinestyle{mdfexample1}{leftmargin=1cm,rightmargin=2cm,% + innerleftmargin=1cm,innerrightmargin=1cm,roundcorner=10pt} + \begin{mdframed}[style=mdfexample1] + In any right triangle, the area of the square whose side is the hypotenuse + is equal to the sum of the areas of the squares whose sides are the two + legs. + \end{mdframed} +\end{tltxmdfexample} +% \iffalse +% +% \fi +% \begin{mdframed}[% +% backgroundcolor=yellow!70!brown,linewidth=1.5pt, +% roundcorner=8pt,linecolor=brown!70!black,innerleftmargin=10pt] +% \mdfdefinestyle{mdfexample1}{default,leftmargin=1cm,rightmargin=2cm,% +% innerleftmargin=2cm,innerrightmargin=1cm,roundcorner=10pt} +% \begin{mdframed}[style=mdfexample1] +% In any right triangle, the area of the square whose side is the hypotenuse +% is equal to the sum of the areas of the squares whose sides are the two +% legs. +% \end{mdframed} +% \end{mdframed} +% +% +% The next table lists the options to manipulate the lines of \Env{mdframed}. +% If you are working with \Opt{framemethod=default} you have only one line +% for framing. +% \begin{center} +% \def\arraystretch{1.4} +% \begin{tabular}{@{}% +% >{\Opt\bgroup}l<{\egroup}@{${}={}$}>{\ttfamily}l% +% @{\qquad} +% >{\Opt\bgroup}l<{\egroup}@{${}={}$}>{\ttfamily}l% +% @{\qquad} +% >{\Opt\bgroup}l<{\egroup}@{${}={}$}>{\ttfamily}l% +% @{}} +% \hline +% linewidth & 0.4pt & innerlinewidth & 0pt & +% middlelinewidth & 0.4pt \\ +% outerlinewidth & 0pt & roundcorner & 0pt & +% \multicolumn{2}{c}{} \\ +% \hline +% \end{tabular} +% \end{center} +% If you are working width \Opt{framemethod=tikz} or \Opt{framemethod=pstricks} +% the option \Opt{linewidth} is an alias for the option \Opt{middlelinewidth}. % -% \subsubsection{General options}\label{genopt} % +% \subsection{Colored Options} +% Now we want to bring some color on your frames. The limitation is equal +% the the length options. For \Opt{framemethod=default} you have only one +% line. +% \begin{center} +% \def\arraystretch{1.4} +% \begin{tabular}{@{}% +% >{\Opt\bgroup}l<{\egroup}@{${}={}$}>{\ttfamily}l% +% @{\qquad} +% >{\Opt\bgroup}l<{\egroup}@{${}={}$}>{\ttfamily}l% +% @{}} +% \hline +% linecolor & black & innerlinecolor & black \\ +% middlelinecolor & black & outerlinecolor & black \\ +% backgroundcolor & white & fontcolor & black \\ +% \hline +% \end{tabular} +% \end{center} % -% \ExplOpt[false]{everyline} -% Allows to draw a bottom and a top line at splitted frames. % \ExplOpt[\{\}]{font} -% Sets the font of the environment. -% \ExplOpt[false]{ntheorem} -% Before setting this boolean key, you have to load -% the package \Pack{ntheorem}. With this option you set the -% values \Cmd{theorempreskipamount} and -% \Cmd{theorempostskipamount} to 0\,pt. -% \ExplOpt[false]{nobreak} -% Sometimes it is useful to prevent a frame from splitting. -% The \Opt{nobreak} option is used for this purpose. -% If you activate this option you can enable it by -% setting \Opt{nobreak=false}. -% \ExplOpt[true]{usetwoside} -% If you set the twoside option you can work with \Opt{outermargin}. -% This option disable this and you work with -% \Opt{leftmargin} and \Opt{rightmargin}. -% \ExplOpt[0\,pt]{needspace} -% Sometimes it is useful to set a minimum height before a -% frame should be splitted. For such cases you can use \Opt{needspace}. -% The option requires a length which sets the minimum height before -% a frame will be splitted. -% \ExplOpt{style} -% If you define a special style with \Cmd{mdfdefinestyle} you can use -% the key \Opt{style} to load the style. \Pack{mdframed} has -% no predefined styles yet. -% \ExplOpt[none]{settings} -% This option allows the user to commit some macros. An example is shown -% in the example files. -% \ExplOpt[left]{align} -% Sometimes it is useful to align the environment itself. -% For this you have the option \Opt{align} which can be set to the -% following strings: -% \begin{itemize} -% \item \Opt{left}, -% \item \Opt{right} and -% \item \Opt{center}. -% \end{itemize} -% The alignments \Opt{left} or \Opt{right} depend on the given lengths -% \Opt{leftmargin} and \Opt{rightmargin}. Later I will present an example -% to demonstrate my bad English explanation. -% -% \ExplOpt[false]{ignorelastdescenders} -% Try to ignore the last descenders of the environment \Env{mdframed}. The -% complete idea was inspired by Tobias Weh and the solution was provided -% by Stefan Lemke. See -% \href{http://tex.stackexchange.com/questions/47584/how-to-make-^^A -% mdframed-ignore-descenders-in-last-line}^^A -% {How to make mdframed ignore descenders in last line} +% Although it's no really a color options you can also specify the font +% of the contents. Therefor the option \Opt{font} can be used. % +% Ok after we have some lengths and some colors we can improve our example. +% \iffalse +%<*example> +% \fi +\begin{tltxmdfexample}[morekeywords={example1}] + \mdfapptodefinestyle{example1}{backgroundcolor=brown!20,% + linecolor=red!40!black,linewidth=4pt} + \begin{mdframed}[style=mdfexample1] + In any right triangle, the area of the square whose side is the hypotenuse + is equal to the sum of the areas of the squares whose sides are the two + legs. + \end{mdframed} +\end{tltxmdfexample} +% \iffalse +% +% \fi +% \begin{mdframed}[% +% backgroundcolor=yellow!70!brown,linewidth=1.5pt, +% roundcorner=8pt,linecolor=brown!70!black,innerleftmargin=10pt] +% \mdfdefinestyle{mdfexample1}{default,leftmargin=1cm,rightmargin=2cm,% +% innerleftmargin=2cm,innerrightmargin=1cm,roundcorner=10pt,% +% backgroundcolor=brown!20,linecolor=red!40!black, linewidth=4pt} +% \begin{mdframed}[style=mdfexample1] +% In any right triangle, the area of the square whose side is the hypotenuse +% is equal to the sum of the areas of the squares whose sides are the two +% legs. +% \end{mdframed} +% \end{mdframed} +% +% +% +% \subsection{Shadows}\label{sec:shadow} +% Another possibility to highlight a frame can be a shadow. The package +% \Pack{mdframed} supports some elementary options to add a shadow. For +% \Opt{framemethod=tikz} the library \Pack{shadows} is needed which must be +% loaded by the user by \verb+\usetikzlibrary{shadows}+. +% \ExplOpt[8\,pt]{shadowsize} +% \ExplOpt[black!50]{shadowcolor} +% If a shadow is used depends on the option \Opt{shadow} which can be either +% \texttt{true} or \texttt{false}. The option shadows enables two new options +% \Opt{shadowsize} and \Opt{shadowcolor}. +% \iffalse +%<*example> +% \fi +\begin{tltxmdfexample}[morekeywords={example1}] + \begin{mdframed}[backgroundcolor=gray!40,shadow=true,roundcorner=8pt] + In any right triangle, the area of the square whose side is the hypotenuse + is equal to the sum of the areas of the squares whose sides are the two + legs. + \end{mdframed} +\end{tltxmdfexample} +% \iffalse +% +% \fi +% \begin{mdframed}[backgroundcolor=gray!40!white,shadow=true,roundcorner=8pt] +% In any right triangle, the area of the square whose side is the hypotenuse +% is equal to the sum of the areas of the squares whose sides are the two +% legs. +% \end{mdframed} % % -% \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}. +% \subsection{Hidden Lines} +% The default behaoiur of the output was shown in a previous picture. +% \Pack{mdframed} offers the possibility to print only requested lines. If +% you don't want any right line you can say \Opt{rightline=false}. The +% table below listed all keys to this topic and shows their default setting. +% \begin{center} +% \def\arraystretch{1.4} +% \begin{tabular}{@{}% +% >{\Opt\bgroup}l<{\egroup}@{${}={}$}>{\ttfamily}l% +% @{\qquad} +% >{\Opt\bgroup}l<{\egroup}@{${}={}$}>{\ttfamily}l% +% @{}} +% \hline +% topline & true & rightline & true \\ +% leftline & true & bottomline & true \\ +% \hline +% \end{tabular} +% \end{center} +% \ExplOpt[false]{hidealllines} +% If you want to disable all lines you can use the short from +% \Opt{hidealllines}. % % -% \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. -% Note if you are using the TikZ you must load the library. -% \Pack{mdframed} doesn't do the job to avoid double loading of a library. +% \subsection{Working in twoside-mode} +% +% Many books are written in \texttt{twoside} mode. In those cases it's +% better to set the margins related to the site. Instead of the +% explained options \Opt{leftmargin} and \Opt{rightmargin} you can work with the +% options \Opt{outermargin} and \Opt{innermargin}. Of course if you working +% in \texttt{oneside} mode the options have no effect. If you don't want to +% work with \Opt{outermargin} and \Opt{innermargin} whether the document is +% done in \texttt{twoside} mode you can disable the behaviour by the option +% \Opt{usetwoside}. Allowed values for this key are \texttt{true} or +% \texttt{false}. +% % -% \ExplOpt[8\,pt]{shadowsize} -% Specify the size of the shadow. -% \ExplOpt[black!50]{shadowcolor} -% Specify the color of the shadow. -% +% \subsection{Footnotes} +% Inside the environment you can use the command \Cmd{footnote} as usual. +% \Pack{mdframed} uses the syntax of environment \Pack{minipage} with +% the same counter. % -% \ExplOpt[\{\}]{pstrickssetting} -% With this key you can pass several options to \Cmd{psset}. -% For example if you want all lines dashed you will have to set -% \Opt{pstrickssetting=\{linestyle=dashed\}}. It is very important -% to put the options of \Opt{pstrickssetting} in brackets. -% \limitation[PSTricks] -% \ExplOpt[\{\}]{pstricksappsetting} -% \Pack{mdframed} works with defined style for the different elements. By -% using \Cmd{addtopsstyle} in combination with this option -% you can expand the definition. The predefined styles are -% \begin{itemize} -% \item \Opt{mdfbackgroundstyle} -% \item \Opt{mdfframetitlebackgroundstyle} -% \item \Opt{mdfouterlinestyle} -% \item \Opt{mdfinnerlinestyle} -% \item \Opt{mdfmiddlelinestyle} -% \end{itemize} -% \textbf{Before you change one please have a look at the file -% \texttt{md-frame-2.mdf} to see the settings.} -% \limitation[PSTricks] -% \ExplOpt[\{\}]{tikzsetting} -% With this key you can pass several options to \Cmd{tikzset}. -% Some examples are listed in the next section. It is very important -% to put the options of \Opt{tikzsetting} in brackets. -% \limitation -% \ExplOpt[\{\}]{apptotikzsetting} -% With this key you can add several options to \Opt{tikzsetting}. -% This key based on the idea of manipulation of predefined keys -% of \Pack{mdframed}. The package \Pack{mdframed} defines via -% \Cmd{tikzset} the following keys to draw frames. -% \begin{itemize} -% \item \Cmd{tikzset\{mdfbox/.style\}} -% \item \Cmd{tikzset\{mdfcorners/.style\}} -% \item \Cmd{tikzset\{mdfbackground/.style\}} -% \item \Cmd{tikzset\{mdfinnerline/.style\}} -% \item \Cmd{tikzset\{mdfouterline/.style\}} -% \item \Cmd{tikzset\{mdfmiddleline/.style\}} -% \item \Cmd{tikzset\{mdfframetitlerule/.style\}} -% \item \Cmd{tikzset\{mdfframetitlebackground/.style\}} -% \item \Cmd{tikzset\{mdfshadow/.style\}} -% \end{itemize} -% \textbf{Before you change one please have a look at the -% file \texttt{md-frame-1.mdf} to see the settings.} -% \limitation -% \ExplOpt[\{\}]{singleextra} -% With this key you can put extra material to the drawing environment of -% \Pack{mdframed} only for a non splitted frame. -% \limitation[TikZ and PSTricks] -% \ExplOpt[\{\}]{firstextra} -% With this key you can put extra material to the drawing environment of -% \Pack{mdframed} only for the first part of the splitted frame. -% \limitation[TikZ and PSTricks] -% \ExplOpt[\{\}]{middleextra} -% With this key you can put extra material to the drawing environment of -% \Pack{mdframed} only for the middle part of the splitted frame. -% \limitation[TikZ and PSTricks] -% \ExplOpt[\{\}]{secondextra} -% With this key you can put extra material to the drawing environment of -% \Pack{mdframed} only for the second part of the splitted frame. -% \limitation[TikZ and PSTricks] +% Every footnote text will be collected inside a box and will be displayed +% at the end of the environment \Pack{mdframed}. +% +% \ExplOpt[\mbox{} \Cmd{bigskipamount}]{footnotedistance} +% The length is the distance between the end of the environment +% \Pack{mdframed} and the displaying of the \Cmd{footnoterule}. +% \ExplOpt[true]{footnoteinside} +% The position of the footnotes can be changed with the option +% \Opt{footnoteinside}. The footnotes will be displayed at the end +% of the environment but you can decide whether the output is inside +% \Pack{mdframed} or after. +% +% \minisec{Note} +% The output of the footnotes with the option \Opt{footnoteinside=false} +% are not in a splitted frame. I think it isn't useful because the first line +% of a new page shouldn't be a footnote. +% % +% +% +%\subsection{Page breaks} +% The package \Pack{mdframed} splits its content if neccessary. In figure +% \ref{fig:basicframes} the default style for splitting is presented. However +% there a sevaral situations where no page preak should occur. +% \ExplOpt[false]{nobreak} +% For this case you can use the option \Opt{nobreak} which is either +% \texttt{true} or \texttt{false}. As you can see in figure +% \ref{fig:basicframes} the different elements have different ways of drawing. +% E.g. the middle part of \Pack{mdframed} has only a left and a right line. % -% \subsection{Hidden Lines} -% \ExplOpt[true]{topline} Draws a line at the top. -% \ExplOpt[true]{bottomline} Draws a line at the bottom. -% \ExplOpt[true]{leftline} Draws a line on the left. -% \ExplOpt[true]{rightline} Draws a line on the right. -% \ExplOpt[false]{hidealllines} -% With this option you can decide whether all lines should be drawn or -% not. +% \ExplOpt[false]{everyline} +% If you want that all parts of \Pack{mdframed} get a whole frame you can work +% with the option \Opt{everyline}. Then all parts are displayed as a single +% frame. +% +% In a previous section the options \Opt{innertopmargin} and +% \Opt{innerbottommaring} were introduced. However if a page break occurs +% you have two new length options which influence the space at the breaking +% point. +% \ExplOpt[0\,pt]{splittopskip} +% Sets the length of the skip above the split part of the environment. +% \ExplOpt[0\,pt]{splitbottomskip} +% Sets the length of the skip below the split part of the environment. % % \subsection{Frametitle} % In this section all relevant options of the frame title will be presented. @@ -1035,11 +1095,6 @@ Have fun! % \ExplOpt[false]{repeatframetitle} % Repeat the frame title on every frame. % -% \minisec{FYI and Note} -% The splitting of the frame title is really a fiddly issue. If you want to use -% the option \Opt{repeatframetitle} a splitting is more than wrong. On the -% other hand if you use the option \Opt{repeatframetitle} the user must prepare -% the contents well. % % The following picture demonstrates the behaviour of the lengths if the option % \Opt{frametitle} is used. @@ -1088,22 +1143,27 @@ Have fun! % \end{center} % % +% \minisec{FYI and Note} +% The splitting of the frame title is really a fiddly issue. If you want to use +% the option \Opt{repeatframetitle} a splitting is more than wrong. On the +% other hand if you use the option \Opt{repeatframetitle} the user must prepare +% the contents well. +% % \subsection{Title commands inside the environment} % -% To provide titles inside the environment \Pack{mdframed} you can one of the -% two following commands. The relavant options are listed below. +% To provide titles inside the environment \Pack{mdframed} you can use +% \Cmd{mdfsubtitle}. The relavant options are listed below. % % \ExplCmd{mdfsubtitle} % Set a title inside \Pack{mdframed} of the internal level 1. % -% \ExplCmd{mdfsubsubtitle} -% Set a title inside \Pack{mdframed} of the internal level 2. -% -% Both commands have the same syntax. They accept one optional and one +% The command accepts one optional and one % mandatory argument. The optional argument sets the option of \Pack{mdframed} % whereby everything will be local. The second argument of subtitle also allows % paragraph breaking. % +% Breaks inside the \Cmd{mdfsubtitle} are not supported. +% % \iffalse %<*example> % \fi @@ -1142,59 +1202,224 @@ Have fun! % \ExplOpt[0.5\string\baselineskip]{subtitleinnerbelowskip} % Sets the skip after the subtitle and the line below. % +% Here an example to demonstrate the behaviour: % +%\newmdenv[% +% roundcorner=5pt,nobreak=true, +% subtitlebelowline=true,subtitleaboveline=true, +% subtitlebackgroundcolor=yellow!70!white, +% backgroundcolor=blue!20!white, +% frametitle={Theorem},frametitlerule=true, +% frametitlebackgroundcolor=yellow!70!white, +% ]{subtitleenv} % -% \subsubsection{Options related to the title of level 2} -% -% \ExplOpt[false]{subsubtitleaboveline} -% Decide to draw a line above the subsubtile. -% \ExplOpt[false]{subtitlebelowline} -% Decide to draw a line below the subsubtitle. -% \ExplOpt[\string\normalfont]{subsubtitlefont} -% Sets the font for subsubtitles. -% \ExplOpt[white]{subsubtitlebackgroundcolor} -% Sets the background color of the subsubtitle between the above and below -% line. -% \ExplOpt[black]{subsubtitleabovelinecolor} -% Sets the line color of the line above. -% \ExplOpt[black]{subsubtitlebelowlinecolor} -% Sets the line color of the line below. -% \ExplOpt[0.8\,pt]{subsubtitleabovelinewidth} -% Sets the line width of the line above. -% \ExplOpt[0.6\,pt]{subsubtitlebelowlinewidth} -% Sets the line width of the line below. -% \ExplOpt[\string\baselineskip]{subsubtitleaboveskip} -% Sets the skip before the subsubtitle line above will be drawn. -% \ExplOpt[1.2\string\baselineskip]{subsubtitlebelowskip} -% Sets the skip after the subsubtitle line below is drawn. -% \ExplOpt[0.5\string\baselineskip]{subsubtitleinneraboveskip} -% Sets the skip after the line above and the subsubtitle itself. -% \ExplOpt[0.5\string\baselineskip]{subsubtitleinnerbelowskip} -% Sets the skip after the subsubtitle and the line below. -% -% +% \begin{subtitleenv} +% Some Text \ldots +% \mdfsubtitle{Notes} +% Some Text \ldots +% \end{subtitleenv} % -% \subsection{Theorems} -% In this section is described which commands can help you to define -% theorem environments with \Pack{mdframed}. -% -% \ExplCmd{newmdtheoremenv} -% Since the package is often used to highlight theorem environments, -% the package providesa command to simplify this process. The command has the -% following syntax: -% % \iffalse %<*example> % \fi -\begin{tltxmdfexample}[deletekeywords={mdframed}] - \newmdtheoremenv[]{}% - []{}[] +\begin{tltxmdfexample} +\newmdenv[% + roundcorner=5pt, + subtitlebelowline=true,subtitleaboveline=true, + subtitlebackgroundcolor=yellow!70!white, + backgroundcolor=blue!20!white, + frametitle={Theorem},frametitlerule=true, + frametitlebackgroundcolor=yellow!70!white, + ]{subtitleenv} +\begin{subtitleenv} + Some Text \ldots + \mdfsubtitle{Notes} + Some Text \ldots +\end{subtitleenv} \end{tltxmdfexample} % \iffalse % % \fi -% The last four arguments are equivalent to the command \Cmd{newtheorem}. -% Only the first optional argument is able to pass \Pack{mdframed}-options. A +% +% +% +% \subsection{General options}\label{genopt} +% Some options can't be classified. Such options are listed in this section. +% \ExplOpt[false]{ntheorem} +% Before setting this boolean key, you have to load +% the package \Pack{ntheorem}. With this option you set the +% values \Cmd{theorempreskipamount} and +% \Cmd{theorempostskipamount} to 0\,pt to avoid extra vertical skip. +% \ExplOpt[0\,pt]{needspace} +% Sometimes it is useful to set a minimum height before a +% frame should be splitted. For such cases you can use \Opt{needspace}. +% The option requires a length which sets the minimum height before +% a frame will be splitted. +% \ExplOpt[false]{ignorelastdescenders} +% Try to ignore the last descenders of the environment \Env{mdframed}. The +% complete idea was inspired by Tobias Weh and the solution was provided +% by Stefan Lemke. See +% \href{http://tex.stackexchange.com/questions/47584/how-to-make-^^A +% mdframed-ignore-descenders-in-last-line}^^A +% {How to make mdframed ignore descenders in last line} +% Of course you have some more length which can be manipulate. +% \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. +% +% \ExplOpt[left]{align} +% Sometimes it is useful to align the environment itself. +% For this you have the option \Opt{align} which can be set to the +% following strings: +% \begin{itemize} +% \item \Opt{left}, +% \item \Opt{right} and +% \item \Opt{center}. +% \end{itemize} +% The alignments \Opt{left} or \Opt{right} depend on the given lengths +% \Opt{leftmargin} and \Opt{rightmargin}. Later I will present an example +% to demonstrate my bad English explanation. +% +% Be aware of using this option please. +% +% +% \subsection{TikZ options}\label{tikzopt} +% \mbox{} +% \ExplOpt[\{\}]{tikzsetting} +% With this key you can pass several options to \Cmd{tikzset}. +% Some examples are listed in the next section. It is very important +% to put the options of \Opt{tikzsetting} in brackets. +% \ExplOpt[\{\}]{apptotikzsetting} +% With this key you can add several options to \Opt{tikzsetting}. +% This key based on the idea of manipulation of predefined keys +% of \Pack{mdframed}. The package \Pack{mdframed} defines via +% \Cmd{tikzset} the following keys to draw frames. +% \begin{itemize} +% \item \Cmd{tikzset\{mdfbox/.style\}} +% \item \Cmd{tikzset\{mdfcorners/.style\}} +% \item \Cmd{tikzset\{mdfbackground/.style\}} +% \item \Cmd{tikzset\{mdfinnerline/.style\}} +% \item \Cmd{tikzset\{mdfouterline/.style\}} +% \item \Cmd{tikzset\{mdfmiddleline/.style\}} +% \item \Cmd{tikzset\{mdfframetitlerule/.style\}} +% \item \Cmd{tikzset\{mdfframetitlebackground/.style\}} +% \item \Cmd{tikzset\{mdfshadow/.style\}} +% \end{itemize} +% \textbf{Before you change one please have a look at the +% file \texttt{md-frame-1.mdf} to see the settings.} +% +% +% \subsection{PSTricks options}\label{pstricksopt} +% \mbox{} +% \ExplOpt[\{\}]{pstrickssetting} +% With this key you can pass several options to \Cmd{psset}. +% For example if you want all lines dashed you will have to set +% \Opt{pstrickssetting=\{linestyle=dashed\}}. It is very important +% to put the options of \Opt{pstrickssetting} in brackets. +% \ExplOpt[\{\}]{pstricksappsetting} +% \Pack{mdframed} works with defined styles for the different elements. By +% using \Cmd{addtopsstyle} in combination with this option +% you can expand the definition. The predefined styles are +% \begin{itemize} +% \item \Opt{mdfbackgroundstyle} +% \item \Opt{mdfframetitlebackgroundstyle} +% \item \Opt{mdfouterlinestyle} +% \item \Opt{mdfinnerlinestyle} +% \item \Opt{mdfmiddlelinestyle} +% \end{itemize} +% \textbf{Before you change one please have a look at the file +% \texttt{md-frame-2.mdf} to see the settings.} +% +% +% \section{Hooks and Bools}\label{hooksandbools} +% The following options and bool flags can be used by the any user. Of course +% some needs more experience than other. + +% \ExplOpt[\{\}]{settings} +% This option allows the user to commit some macros at the beginning of +% \Pack{mdframed}. The given material is executed before the savebox starts. +% +% \ExplOpt[\{\}]{extra} +% Add material to every drawn frame. +% \ExplOpt[\{\}]{singleextra} +% With this key you can put extra material to the drawing environment of +% \Pack{mdframed} only for a non splitted frame. +% \ExplOpt[\{\}]{firstextra} +% With this key you can put extra material to the drawing environment of +% \Pack{mdframed} only for the first part of the splitted frame. +% \ExplOpt[\{\}]{middleextra} +% With this key you can put extra material to the drawing environment of +% \Pack{mdframed} only for the middle part of the splitted frame. +% \limitation[TikZ and PSTricks] +% \ExplOpt[\{\}]{secondextra} +% With this key you can put extra material to the drawing environment of +% \Pack{mdframed} only for the second part of the splitted frame. +% +% +% After you can add material to any part of the frame you can also detect which +% part of the frame is drawn. Therefor the bool flags are defined which can be +% test by \Cmd{ifbool\{boolflag\}}. All flags are set to true before the output +% of the content occurs. +% \ExplOpt[false]{mdfsingleframe} +% This bool is only true for a non splitting frame. +% \ExplOpt[false]{mdffirstframe} +% This bool is only for the first part of the frame true. +% \ExplOpt[false]{mdfmiddleframe} +% see above. +% \ExplOpt[false]{mdflastframe} +% see above. +% +% For the advanced users there are also some other hooks which can be used +% to manipulate the output: +% \ExplOpt[\{\}]{beforesingleframe} +% Every given code to this option is executed before a single frame is +% is printed. +% \ExplOpt[\{\}]{aftersingleframe} +% Every given code to this option is executed after a single frame is +% is printed. +% \ExplOpt[\{\}]{beforebreak} +% The value of this option is only executed at breakable frames. Related to +% the introduction the first and middle frame can be manipulated. +% \ExplOpt[\{\}]{afterbreak} +% The value of this option is only executed at breakable frames. Related to +% the introduction the first and middle frame can be manipulated. +% \ExplOpt[\{\}]{beforelastframe} +% The option is executed only for the last frame of a splitted frame. +% \ExplOpt[\{\}]{afterlastframe} +% The option is executed only for the last frame of a splitted frame. +% +% \ExplOpt[\{\}]{startcode} +% Every code given to this option is executed at the beginning of the +% environment. +% \ExplOpt[\{\}]{startinnercode} +% This option is executed at the beginning of the save box. +% \ExplOpt[\{\}]{endinnercode} +% This option is executed at the end of the save box. +% \ExplOpt[\{\}]{endcode} +% The code is executed at the end of the environment. +% +% \section{Theorems} +% In this section is described which commands can help you to define +% theorem environments with \Pack{mdframed}. +% +% \ExplCmd{newmdtheoremenv} +% Since the package is often used to highlight theorem environments, +% the package providesa command to simplify this process. The command has the +% following syntax: +% +% \iffalse +%<*example> +% \fi +\begin{tltxmdfexample}[deletekeywords={mdframed}] + \newmdtheoremenv[]{}% + []{}[] +\end{tltxmdfexample} +% \iffalse +% +% \fi +% The last four arguments are equivalent to the command \Cmd{newtheorem}. +% Only the first optional argument is able to pass \Pack{mdframed}-options. A % simple example is: % \iffalse %<*example> @@ -1265,32 +1490,107 @@ Have fun! % Sets the space after \Opt{theoremseparator}. % % Examples can be found in the attached files. -% -% \subsection{Footnotes} -% Inside the environment you can use the command \Cmd{footnote} as usual. -% \Pack{mdframed} uses the syntax of environment \Pack{minipage} with -% the same counter. +% +% +% +% +% \section{complexe example -- Matlab Terminal} +% The following example was inspiered by a question on TeX.SX. +% \definecolor{DarkBlue}{rgb}{.11,.23,.60} +% \mdfdefinestyle{commandline}% +% {leftmargin=5pt, rightmargin=10pt,innerleftmargin=15pt, +% middlelinecolor=DarkBlue, +% middlelinewidth=2pt, +% frametitlerule=false, +% backgroundcolor=black!10!white, +% frametitle={Command Window}, +% frametitlefont={\normalfont\sffamily\color{white}\hspace{-1em}}, +% frametitlebackgroundcolor=DarkBlue, +% singleextra={\draw[black!20,line width=12pt] +% ($(O)+(7pt,1pt)$) -- +% ($(O|-P)+(7pt,-\mdfframetitleboxtotalheight)-(0,1pt)$); +% \node[inner sep=0pt,color=black]at ($(O)+(7pt,9pt)$)% +% {$\scriptstyle f\!x$}; }, +% nobreak=true, +% } % -% Every footnote text will be collected inside a box and will be displayed -% at the end of the environment \Pack{mdframed}. +% \lstnewenvironment{script} {% +% \lstset{language=Matlab,basicstyle=\tiny\ttfamily,breaklines=true,% +% aboveskip=0pt,belowskip=0pt}}{} +% \surroundwithmdframed[style=commandline]{script} +% \begin{script} +% >> help sin +% sin Sine of argument in radians. +% sin(X) is the sine of the elements of X. +% +% See also asin, sind. +% +% Overloaded methods: +% sdpvar/sin +% codistributed/sin +% gpuArray/sin +% +% Reference page in Help browser +% doc sin +% +% >> +% \end{script} +% +% The code for this result is: +% \iffalse +%<*example> +% \fi +\begin{tltxmdfexample}[moretexcs={lstnewenvironment,definecolor,lstset}] + \definecolor{DarkBlue}{rgb}{.11,.23,.60} + \mdfdefinestyle{commandline}% + {leftmargin=5pt, rightmargin=10pt,innerleftmargin=15pt, + middlelinecolor=DarkBlue, + middlelinewidth=2pt, + frametitlerule=false, + backgroundcolor=black!10!white, + frametitle={Command Window}, + frametitlefont={\normalfont\sffamily\color{white}\hspace{-1em}}, + frametitlebackgroundcolor=DarkBlue, + singleextra={\draw[black!20,line width=12pt] + ($(O)+(7pt,1pt)$) -- + ($(O|-P)+(7pt,-\mdfframetitleboxtotalheight)-(0,1pt)$); + \node[inner sep=0pt,color=black]at ($(O)+(7pt,9pt)$)% + {$\scriptstyle f\!x$}; }, + nobreak, + } + + \lstnewenvironment{script} {% + \lstset{language=Matlab,basicstyle=\tiny\ttfamily,breaklines=true,% + aboveskip=0pt,belowskip=0pt}}{} + \surroundwithmdframed[style=commandline]{script} + \begin{script} + >> help sin + sin Sine of argument in radians. + sin(X) is the sine of the elements of X. + + See also asin, sind. + + Overloaded methods: + sdpvar/sin + codistributed/sin + gpuArray/sin + + Reference page in Help browser + doc sin + + >> + \end{script} +\end{tltxmdfexample} +% \iffalse +% +% \fi +% % -% \ExplOpt[\mbox{} \Cmd{bigskipamount}]{footnotedistance} -% The length is the distance between the end of the environment -% \Pack{mdframed} and the displaying of the \Cmd{footnoterule}. -% \ExplOpt[true]{footnoteinside} -% The position of the footnotes can be changed with the option -% \Opt{footnoteinside}. The footnotes will be displayed at the end -% of the environment but you can decide whether the output is inside -% \Pack{mdframed} or after. % -% \minisec{Note} -% The output of the footnotes with the option \Opt{footnoteinside=false} -% are not in a splitted frame. I think it isn't useful because the first line -% of a new page shouldn't be a footnote. % % \section{Examples} % -% I outsource the examples in four files to limit the documentation. The files +% I outsource the examples in four files documentation. The files % are % \begin{description}[style=nextline] % \item[\texttt{mdframed-example-default}] @@ -1312,6 +1612,16 @@ Have fun! % \href{http://prezi.com/zc355i9tcsgz/talk-kts-2012-mdframed/}^^A % {kts 2012 mdframed}. % +% +% \IfFileExists{mdframed-example-default.pdf}% +% {\includepdf[pages=-]{mdframed-example-default.pdf}}{} +% \IfFileExists{mdframed-example-tikz.pdf}% +% {\includepdf[pages=-]{mdframed-example-tikz.pdf}}{} +% \IfFileExists{mdframed-example-texsx.pdf}% +% {\includepdf[pages=-]{mdframed-example-texsx.pdf}}{} +% \IfFileExists{mdframed-example-pstricks.pdf}% +% {\includepdf[pages=-]{mdframed-example-pstricks.pdf}}{} +% % \section{Errors, Warnings and Messages} % % The package \Pack{mdframed} provides different errors, warnings and @@ -1449,8 +1759,8 @@ Have fun! % If you set a global option inside the document % body you will get this warning. % -% \section{Known Problems} -% In this section I will collect known problems. In case you encounter +% \section{Known Limitations} +% In this section I will collect known issues. In case you encounter % any further problems, please drop me an email, % \href{mailto:marco.daniel@mada-nada.de}{marco.daniel at mada-nada.de}. % @@ -1687,12 +1997,19 @@ Have fun! % In this way you can use the option \Opt{framemethod} to % load the file by setting \Opt{framemethod=X}. % +%\iffalse % \clearpage % % \subsection{Revision history}\label{rev} % \raggedright % % +% \minisec{Version 1.8X submitted XX Mar 2013} +% \begin{itemize*} +% \item added \Cmd{topskip=0pt} to remove unwanted space after \Cmd{newpage} or \Cmd{clearpage} +% \end{itemize*} +% +% \footnotesize % \minisec{Version 1.8 submitted 09 Mar 2013} % \begin{itemize*} % \item fixed bugs (e.g. related to \Cmd{parskip} of KOMA) @@ -1700,8 +2017,6 @@ Have fun! % \item fixed some typos % \end{itemize*} % -% -% \footnotesize % \minisec{Version 1.6d submitted 21 Sep 2012} % \begin{itemize*} % \item fixed bugs @@ -1916,16 +2231,22 @@ Have fun! % % \clearpage % +% +% +% +% % \section{Implementation}\label{implementation} % % And finally, here's how it all works\ldots % +%\fi %\StopEventually{^^A -% %%\clearpage -% %%\PrintChanges^^A -% \clearpage -% \PrintIndex^^A +% ^^A\clearpage +% ^^A\PrintChanges^^A +% ^^A\clearpage +% ^^A\PrintIndex^^A %} +% %\iffalse % \begin{macrocode} %<*package> @@ -1937,18 +2258,17 @@ Have fun! % \begin{macro}{mdversion,mdframedpackagename,mdfmaindate} % Set package information % \begin{macrocode} -\def\mdversion{1.8} +\def\mdversion{1.9a} \def\mdframedpackagename{mdframed} -\def\mdfmaindate{2013/03/09} -\def\mdfrevision{ 172}% Done by github: git rev-list HEAD | wc -l +\def\mdfmaindate{2013/06/21} +\def\mdfrevision{ 208}% Done by github: git rev-list HEAD | wc -l % \end{macrocode} % \end{macro} % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mdframed}% - [\mdfmaindate\ % - \mdversion: \mdframedpackagename] + [\mdfmaindate\space \mdversion: \mdframedpackagename] % \end{macrocode} % % \begin{macro}{mdf@PackageWarning,mdf@PackageInfo,mdf@LoadFile@IfExist} @@ -1966,7 +2286,7 @@ Have fun! but needed by \mdframedpackagename\MessageBreak see documentation fo further information }% - } + }% } % \end{macrocode} % \end{macro} @@ -1984,7 +2304,16 @@ Have fun! % \begin{macrocode} \SetupKeyvalOptions{family=mdf,prefix=mdf@} % \end{macrocode} - +% +% \begin{macro}{mdf@definestyle@defaultoptions} +% Save all keys in a macro which can be used by \Opt{style} or +% as an option +% \begin{macrocode} +\def\mdf@definestyle@defaultoptions{}% +% \end{macrocode} +% \end{macro} +% +% % \begin{macro}{mdf@iflength,mdf@iflength@check,mdf@iflength@check} % Command which checks the input of length options. If the length option is % only a number the |defaultunit| will be used. Syntax: @@ -2011,24 +2340,32 @@ Have fun! % % % \begin{macro}{mdf@dolist} -% Loop used by \Pack{mdframed}. +% Loop used by \Pack{mdframed}. I can handle comma separated list. The command +% \Cmd{DeclareListParser} is provided by `etoolbox`. % \begin{macrocode} \DeclareListParser*{\mdf@dolist}{,} % \end{macrocode} % \end{macro} % -% \begin{macro}{mdf@option@length,mdf@define@key@length} -% Command to define a new length width a default value. -%| \mdf@option@length{}{}| +% \begin{macro}{mdf@do@lengthoption} +% We need lots of length options. So the declaration is simplified. % \begin{macrocode} +% \mdf@dolist{\mdf@do@lengthoption}{{option name ==default value},...}% +% resulst to the length \mdf@