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 13 files changed, 287 insertions(+), 321 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/doc/latex') 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 -- cgit v1.2.3