diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/mdframed/README | 20 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.pdf | bin | 136219 -> 142805 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.tex | 444 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf | 406 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mdframed/mdframed.sty | 234 |
8 files changed, 927 insertions, 204 deletions
diff --git a/Master/texmf-dist/doc/latex/mdframed/README b/Master/texmf-dist/doc/latex/mdframed/README index cf04fcfaf66..4ba5eac5f01 100644 --- a/Master/texmf-dist/doc/latex/mdframed/README +++ b/Master/texmf-dist/doc/latex/mdframed/README @@ -1,18 +1,20 @@ -%%$Id: README 190 2011-09-07 10:39:52Z marco $ -%%$Rev: 190 $ +%%$Id: README 198 2011-09-11 10:50:44Z marco $ +%%$Rev: 198 $ %%$Author: marco $ -%%$Date: 2011-09-07 12:39:52 +0200 (Mi, 07. Sep 2011) $ +%%$Date: 2011-09-11 12:50:44 +0200 (So, 11. Sep 2011) $ + +The standard methods for framing text (\fbox or \fcolorbox) +require you to handle page breaks by hand, meaning that you +have to split the \fbox into two. The present package +defines the environment \mdfamed which automatically deals +with pagebreaks in framed text. -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 (!new) License type: lppl ---------------------------- -v0.9b -- fixes bugs in \newmdtheoremenv (Thanks to Enrico Gregorio) - +v0.9e +- working with twoside modus diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.pdf Binary files differindex 6e4ab46c6d3..16a9edba958 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.pdf +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.pdf diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.tex index fb041fc1032..3795a2c3d27 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.tex @@ -1,6 +1,6 @@ %Documenation of the package mdframed -%%$Id: mdframed-doc-en.tex 188 2011-09-07 10:32:16Z marco $ -%%$Rev: 188 $ +%%$Id: mdframed-doc-en.tex 198 2011-09-11 10:50:44Z marco $ +%%$Rev: 198 $ %%$Author: marco $ %%$Dater:$ %% [latex -> ps -> pdf] @@ -8,7 +8,7 @@ \documentclass[english,11pt,]{scrartcl} %\usepackage{showframe} \usepackage[nofancy,draft,notoday]{svninfo} -\svnInfo $Id: mdframed-doc-en.tex 188 2011-09-07 10:32:16Z marco $ +\svnInfo $Id: mdframed-doc-en.tex 198 2011-09-11 10:50:44Z marco $ \usepackage{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} @@ -34,11 +34,14 @@ \ifoot{\svnId} -\usepackage[left=5cm,right=3cm,top=3cm,bottom=2cm]{geometry} - +\usepackage[left=5cm,right=3cm,top=3cm,bottom=3cm]{geometry} +\usepackage{array,booktabs} \usepackage{xcolor} -\definecolor{titleblue}{rgb}{0,0,0.9} +\usepackage{tikz} +\usetikzlibrary{calc,backgrounds,arrows,matrix} + +\colorlet{titleblue}{blue!30!black} \usepackage{amsmath} \usepackage[amsmath]{ntheorem} @@ -80,7 +83,8 @@ skipabove,ntheorem,theorem,lemma,mdframed,linecolor,% frametitle,infobox,innerlinewidth,roundcorner,leftline,topline,% splitbottomskip,middlelinewidth,middlelinecolor,tikzsetting,% - rightline,bottomline,innerrightmargin,style,linewidth,lem,section},% + rightline,bottomline,innerrightmargin,style,linewidth,lem,section,% + definedstyle,needspace,mdf@globalstyle@cnt,framemethod},% moretexcs={newmdtheoremenv,newmdenv,theoremstyle,mdfsetup,@length,% md@putbox@single,@tempboxa,mdf@,% mdf@linewidth,mdf@leftmargin@length,interruptlength,% @@ -88,7 +92,7 @@ color,md@frame@leftline@single,mdf@innerbottommargin@length,% mdf@middlelinewidth@length,mdfboundingboxheight,% md@frame@rightline@single,mdfboundingboxwidth,% - mdf@innerrightmargin@length}, + mdf@innerrightmargin@length,mdfdefinestyle,defcounter}, #1, }% }% @@ -111,7 +115,7 @@ \makeatother \newcommand*\mdoption[1]{\textsf{\bfseries\color{titleblue}#1}} \newcommand*\mdname{\textsf{mdframed}\xspace} -\newcommand*\mdpack[1]{\textsf{#1}\xspace} +\newcommand*\mdpack[1]{\texttt{#1}\xspace} \newcommand*\mdsetting[1]{\textsf{#1}\xspace} \newcommand*\mdcommand[1]{\texttt{\textbackslash #1}\xspace} @@ -127,9 +131,6 @@ \textsf{\bfseries\color{titleblue}\textbackslash #2}% \quad}{#1}\ignorespaces} - \usepackage{pst-node} - \usepackage{pstricks-add} - \usepackage{hyperref} \hypersetup{% breaklinks=true, @@ -162,24 +163,18 @@ bookmarksdepth=4, \end{center} \begin{abstract} The standard methods for framing text (\mdcommand{fbox} or \mdcommand{fcolorbox}) require you to handle page breaks by hand, meaning that you have to split the \mdcommand{fbox} into two. The present package defines the environment \mdname which automatically deals with pagebreaks in framed text.\par -By using \mdcommand{newenvironment} the user may choose between several individual designs. +By defining new environments the user may choose between several individual designs. \end{abstract} +\vspace*{2\baselineskip} + \pdfbookmark[1]{\contentsname}{tocbook} \tableofcontents + + \section{Motivation} Many users wish to (further) emphasize lemmata, definitions, proofs, etc. The package \mdname allows you to create environments with breakable frames. I think an example is the best way to demonstrate its properties. -\begin{mdexample} -\newmdtheoremenv[outerlinewidth=2,leftmargin=40, - rightmargin=40,backgroundcolor=yellow,% - outerlinecolor=blue,innertopmargin=0pt,% - splittopskip=\topskip,skipbelow=\baselineskip,% - skipabove=\baselineskip,ntheorem]{theorem}% - {Theorem}[section] -\begin{theorem}[Pythagorean theorem] -... -\end{theorem} -\end{mdexample} + %\newtheorem{mdtheorem}{Theorem}[section] \newmdtheoremenv[outerlinewidth=2,leftmargin=40,rightmargin=40,% @@ -194,6 +189,21 @@ Many users wish to (further) emphasize lemmata, definitions, proofs, etc. The pa \[ a^2+b^2=c^2 \] \end{theorem} +The frame was defined with the following settings. + +\begin{mdexample} +\newmdtheoremenv[outerlinewidth=2,leftmargin=40, + rightmargin=40,backgroundcolor=yellow,% + outerlinecolor=blue,innertopmargin=0pt,% + splittopskip=\topskip,skipbelow=\baselineskip,% + skipabove=\baselineskip,ntheorem]{theorem}% + {Theorem}[section] +\begin{theorem}[Pythagorean theorem] +... +\end{theorem} +\end{mdexample} + + \section{Syntax}\label{sec:syntax} The package itself loads the packages \mdpack{kvoptions}, \mdpack{etoolbox}, \mdpack{calc} and \mdpack{color}. By setting the correct options \mdpack{mdframed} will load \mdpack{xcolor}, \mdpack{tikz} or \mdpack{pstricks}. @@ -212,10 +222,16 @@ The package defines only one environment with the following syntax: With version 0.8 you have two commands to create environments with \mdpack{mdframed}. -\par\kern\baselineskip% -\noindent\llap{\textsf{\bfseries\color{titleblue}autodetecting floats}\quad}\ignorespaces +\mdDescribeMacro{autodetecting floats} With version 0.9 I added a detection of \mdpack{float} or \mdpack{minipage} environments. If you use \mdname in such an environment \mdname will use the option \mdoption{nobreak} automaticlly. +\mdDescribeMacro{twoside-mode} With version 0.9d I added the detection of the \mdpack{twoside}. When you are using \mdname inside \mdpack{twoside} mode you have to set the option \mdoption{innermargin} +and \mdoption{outermargin} (see section \ref{optlength}). + +%%%%%%%%%%%%%%%%%%%%%%% +\section{Commands} +The following commands should countenance your by the handling with \mdpack{mdframed} + \mdDescribeCmd[]{newmdenv} The command has the following syntax: \begin{mdexample} \newmdenv[<MDFRAMED OPTIONS>]{Name of the environment} @@ -231,7 +247,7 @@ In this way you can simply use: \mdDescribeCmd[]{renewmdenv} By using this command you can redifine environments which are created by \mdcommand{newmdenv}. \mdDescribeCmd[]{newmdtheoremenv} -Since the package is often used to highlight theorem environments, I have created a command\footnote{Thanks to Martin Scharrer:\newline \href{http://tex.stackexchange.com/questions/26298/own-command-to-create-new-environment}{Own command to create new environment}} to simplify this process. The command has the following syntax: +Since the package is often used to highlight theorem environments, I have created a command\footnote{Thanks to Martin Scharrer and Enrico Gregorio:\newline \href{http://tex.stackexchange.com/questions/26298/own-command-to-create-new-environment}{Own command to create new environment}} to simplify this process. The command has the following syntax: \begin{mdexample}[deletekeywords={mdframed}] \newmdtheoremenv[<mdframed-options>]{<envname>}% @@ -250,10 +266,31 @@ The last four arguments are equivalent to the command \mdcommand{newtheorem}. On So far there is no \mdcommand{renewmdtheoremenv}! +\mdDescribeMacro{\textbackslash mdfsetup}To set the options globally +you can use the optional argument of \mdcommand{usepackage} or +you can use the command \mdcommand{mdfsetup} which is not limited to the preamble. + +\mdDescribeMacro{\textbackslash mdfdefinestyle} \mdcommand{mdfdefinestyle} allow the user to define diffenrent styles and use as an option of \mdpack{mdframed} via \mdoption{style}. The option \mdoption{style} is explained in section \ref{genopt}. + +Here a small example: +\begin{mdexample}[morekeywords={mystyle}] +\mdfdefinestyle{mystyle}{leftmargin=0pt,% + linecolor=blue} +.... +\begin{mdframed}[style=mystyle] +foo +\end{mdframed} +\end{mdexample} + + + + + +%%%%%%%%%%%%%%%%%%%%%%% \section{Options} The package allows the following global and local options: -\subsection{Global Options} +\subsection{Global Options}\label{globopt} The following options are only global options. \mdDescribeMacro[none]{xcolor} @@ -261,22 +298,37 @@ By setting this key, the package \mdpack{xcolor} will be loaded with the given value(s). Without any value \mbox{\mdname} loads the package \mdpack{color} without any options. -\mdDescribeMacro[0]{style} -With this key you can change the way frames are drawn. By using -\mdoption{style=0} the frames are drawn by the \LaTeX-command \mdcommand{rule}. -By setting the key to \mdoption{style=1} the package -\mdpack{tikz} will draw the frames. By setting the key to \mdoption{style=3} the -package \mdpack{pstricks} will draw the frames. The manipulation of the frames -depends on the \mdoption{style}. For further information see below. +\mdDescribeMacro[default]{framemethod} +With this key you can change the way frames are drawn. You can decide whether the frame is drawn with +\begin{enumerate} + \item \LaTeX-commands {\small\mdcommand{hrule}, \mdcommand{vrule}, \mdcommand{rule}}, + \item \mdpack{TikZ} {\small(the package \mdpack{TikZ} will be loaded)} or + \item \mdpack{PSTricks} {\small(the package \mdpack{pstricks} will be loaded)}. +\end{enumerate} +The option \mdoption{framemethod} requires a string. Allowed combination are listed in the following table. +\begin{table}[!ht] +\centering +\renewcommand*\arraystretch{1.3} +\caption{Allowed keys for \mdoption{framemethod}} +\begin{tabular}{@{}>{\small\bfseries}l>{\small\ttfamily}l@{}} +\toprule +\multicolumn{1}{@{}l}{\textbf{Method}} & \multicolumn{1}{l}{Allowed keys} \\\midrule +\LaTeX-commands & default, tex, latex, none, 0 \\ +\mdpack{TikZ} & tikz, 1 \\ +\mdpack{PSTricks} & pstricks, ps, postscript, 2 \\\bottomrule +\end{tabular} +\end{table} + +\noindent{\small\textbf{FYI}\qquad It is independently whether the \texttt{method} is written with no, one or more capital letter.} + +\noindent\textbf{Note}\qquad The manipulation of the frames depends on the option \mdoption{framemethod}. For further information see below. + \subsection{Global and Local Options} The options listed below can be set globally or locally. -\mdDescribeMacro{\textbackslash mdfsetup}To set the options globally -you can use the optional argument of \mdcommand{usepackage} or -you can use the command \mdcommand{mdfsetup} which is not limited to the preamble. -\subsubsection{Options with lengths} +\subsubsection{Options with lengths}\label{optlength} In figure \eqref{fig:laengen} you can see the adjustable lengths which will be described below. All lengths accept two kinds of input. The first one is a length (e.g. 2pt) and @@ -285,43 +337,93 @@ the second one is a number (e.g. 2) which will be multiplied by \mdoption{1 defa \begin{center} % \includegraphics{laengen} -\psscalebox{0.7}{% -\Large -\begin{pspicture}(-2,-2)(12,8) - % - \psframe[fillstyle=vlines,linecolor=green!70!black,hatchcolor=green!70!black](2,2)(8,4) - \rput*(5,3){Contents} - \psframe[linecolor=red!70!black,linewidth=10pt](0,0)(10,6) - \psframe[linecolor=blue!70!black,linewidth=10pt](!0 0.1 3 mul add - 0 3 0.1 mul add )% - (! 10 0.1 3 mul neg add - 6 0.1 3 mul neg add) - \psframe[linecolor=yellow!70!black,linewidth=10pt](!0 0.2 3 mul add - 0 3 0.2 mul add )% - (! 10 0.2 3 mul neg add - 6 0.2 3 mul neg add) - \psline{<->}(5,6)(5,8) - \uput[0](5,7){skipabove} - \psline{<->}(5,0)(5,-2) - \uput[0](5,-1){skipbelow} - \psline{<->}(5,4)(5,5.1) - \uput*[90](5,4){innertopmargin} - \psline{<->}(5,2)(5,0.9) - \uput*[90](5,1){innerbottommargin} - \psline{<->}(10,3)(12,3) - \uput[0](10,2.8){rightmargin} - \psline{<->}(0,3)(-2,3) - \uput[180](0,2.8){leftmargin} - \psline{<->}(8,3)(9.1,3) - \uput*[0](8.2,3){\psrotateleft{innerrightmargin}} - \psline{<->}(0.9,3)(2,3) - \uput*[0](1.2,3){\psrotateleft{innerleftmargin}} - \psline(-2,8)(12,8)\uput*[0](-2,8){text above} - \psline(-2,-2)(12,-2)\uput*[0](-2,-2){text below} -\end{pspicture} -} - - \captionof{figure}{adjustable lengths of \mdpack{mdframed}} +\begin{tikzpicture}[scale=0.9] + %Declaration + \newlength{\linew} + \setlength{\linew}{5pt} + \tikzstyle{every node}=[font=\bfseries\large\sffamily] + \coordinate (innersep) at (3.2,2.25); + \coordinate (outersep) at (3.2,2); + %Center + \node[fill=green!10,draw=black,framed,rounded corners,minimum width=3cm,minimum height=1.5cm]% + (CenterNode) {Contents}; + + %frames + \draw[draw=red!70!black,line width=\linew] % + ($(CenterNode)+(innersep)$) % + rectangle ($(CenterNode)-(innersep)$); + \draw[draw=blue!70!black,line width=\linew] % + ($(CenterNode)+(innersep)+(\linew,\linew)$)% + rectangle ($(CenterNode)-(innersep)+(-\linew,-\linew)$); + \draw[draw=yellow!70!black,line width=\linew] + ($(CenterNode)+(innersep)+(2\linew,2\linew)$)% + rectangle ($(CenterNode)-(innersep)+(-2\linew,-2\linew)$); + \draw[draw=black,line width=1] ($(CenterNode)+(innersep)+(outersep)$)% + rectangle ($(CenterNode)-(innersep)-(outersep)$); + + + \tikzstyle{every node}=[font=\small\ttfamily] + %%innertopmargin + \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) in + (CenterNode.north) -- ($(CenterNode)+(0,\y1)-(0,.5\linew)$) ; + \path let \p1=(innersep) in + (CenterNode.north) edge node[align=center,framed,fill=white,draw=white]{innertopmargin} + ($(CenterNode)+(0,\y1)-(0,.5\linew)$) ; + %%innerbottommargin + \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) in + (CenterNode.south) -- ($(CenterNode)-(0,\y1)+(0,.5\linew)$) ; + \path let \p1=(innersep) in + (CenterNode.south) edge node[align=center,framed,fill=white,draw=white]{innerbottommargin} + ($(CenterNode)-(0,\y1)+(0,.5\linew)$) ; + + %%innerleftmargin + \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) in + (CenterNode.west) -- ($(CenterNode)-(\x1,0)+(.5\linew,0)$) ; + \path let \p1=(innersep) in + (CenterNode.west) edge + node[align=center,rotate=90,framed,fill=white,draw=white]{innerleftmargin} + ($(CenterNode)-(\x1,0)+(.5\linew,0)$) ; + %%innerrightmargin + \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) in + (CenterNode.east) -- ($(CenterNode)+(\x1,0)-(.5\linew,0)$) ; + \path let \p1=(innersep) in + (CenterNode.east) edge + node[align=center,rotate=90,framed,fill=white,draw=white]{innerrightmargin} + ($(CenterNode)+(\x1,0)-(.5\linew,0)$) ; + + + %%leftmargin + \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) , \p2=(outersep) in + ($(CenterNode)-(\x1,0)-(2.5\linew,0)$) -- ($(CenterNode)-(\x1,0)-(\x2,0)$) ; + \path let \p1=(innersep) , \p2=(outersep) in + ($(CenterNode)-(\x1,0)-(2.5\linew,0)$) edge + node[align=center,rotate=0,framed,fill=white,draw=white]{leftmargin} + ($(CenterNode)-(\x1,0)-(\x2,0)$) ; + %%rightmargin + \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) , \p2=(outersep) in + ($(CenterNode)+(\x1,0)+(2.5\linew,0)$) -- ($(CenterNode)+(\x1,0)+(\x2,0)$) ; + \path let \p1=(innersep) , \p2=(outersep) in + ($(CenterNode)+(\x1,0)+(2.5\linew,0)$) edge + node[align=center,rotate=0,framed,fill=white,draw=white]{rightmargin} + ($(CenterNode)+(\x1,0)+(\x2,0)$) ; + + %%skipabove + \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) , \p2=(outersep) in + ($(CenterNode)+(0,\y1)+(0,2.5\linew)$) -- ($(CenterNode)+(0,\y1)+(0,\y2)$) ; + \path let \p1=(innersep) , \p2=(outersep) in + ($(CenterNode)+(0,\y1)+(0,2.5\linew)$) edge + node[align=center,rotate=0,framed,fill=white,draw=white]{skipabove} + ($(CenterNode)+(0,\y1)+(0,\y2)$) ; + %%skipbelow + \draw[draw=black,triangle 45-triangle 45]let \p1=(innersep) , \p2=(outersep) in + ($(CenterNode)-(0,\y1)-(0,2.5\linew)$) -- ($(CenterNode)-(0,\y1)-(0,\y2)$) ; + \path let \p1=(innersep) , \p2=(outersep) in + ($(CenterNode)-(0,\y1)-(0,2.5\linew)$) edge + node[align=center,rotate=0,framed,fill=white,draw=white]{skipbelow} + ($(CenterNode)-(0,\y1)-(0,\y2)$) ; +\end{tikzpicture} + + \captionof{figure}{adjustable lengths of \mdname} \label{fig:laengen} \end{center} @@ -340,27 +442,31 @@ the second one is a number (e.g. 2) which will be multiplied by \mdoption{1 defa \paragraph*{The following lengths are not shown in figure \eqref{fig:laengen}.} \mbox{} +\mdDescribeMacro{outermargin} Sets the length of the outer margin. This option is only avaidable in \texttt{twoside}-mode. +\mdDescribeMacro{innermargin} Sets the length of the inner margint. This option is only avaidable in \texttt{twoside}-mode. + + \mdDescribeMacro[0pt]{splittopskip} Sets the length of the skip above the split part of the environment. \mdDescribeMacro[0pt]{splitbottomskip} Sets the length of the skip below the splitt part of the environment. \mdDescribeMacro[0.4pt]{linewidth} Sets the width of the line around the environment. \mdDescribeMacro[0pt]{roundcorner} Sets the size of the radius of the corners of the frames. - \textbf{This works only with \mdoption{style=1} and \mdoption{style=3}.} + \textbf{This works only with \mdoption{framemethod=TikZ} and \mdoption{framemethod=PSTricks}.} \mdDescribeMacro[0pt]{innerlinewidth} Sets the width of the inner line around the environment. - \textbf{This works only with \mdoption{style=1}.} + \textbf{This works only with \mdoption{framemethod=TikZ}.} \mdDescribeMacro[0pt]{outerlinewidth} Sets the width of the outer line around the environment. - \textbf{This works only with \mdoption{style=1}.} + \textbf{This works only with \mdoption{framemethod=TikZ}.} \mdDescribeMacro[\newline linewidth]{middlelinewidth} Sets the width of the middle line around the environment. - \textbf{This works only with \mdoption{style=1}.} + \textbf{This works only with \mdoption{framemethod=TikZ}.} \subsubsection{Colored Options} \mdDescribeMacro[black]{linecolor} Sets the color of the line around the environment. \mdDescribeMacro[\newline linecolor]{innerlinecolor} Sets the color of the inner line around the environment. - \textbf{This works only with \mdoption{style=1}.} + \textbf{This works only with\mdoption{framemethod=TikZ}.} \mdDescribeMacro[\newline linecolor]{middlelinecolor} Sets the color of the middle line around the environment. - \textbf{This works only with \mdoption{style=1}.} + \textbf{This works only with \mdoption{framemethod=TikZ}.} \mdDescribeMacro[\newline linecolor]{outerlinecolor} Sets the color of the outer line around the environment. - \textbf{This works only with \mdoption{style=1}.} + \textbf{This works only with \mdoption{framemethod=TikZ}.} \mdDescribeMacro[white]{backgroundcolor} Sets the color of the background of the environment. \mdDescribeMacro[black]{fontcolor} Sets the color of the contents of the environment. @@ -379,7 +485,7 @@ the second one is a number (e.g. 2) which will be multiplied by \mdoption{1 defa \mdDescribeMacro[\mbox{} \mdcommand{bfseries}\mdcommand{large}]{frametitleformat} Sets the format of the frame title. -\subsubsection{General options} +\subsubsection{General options}\label{genopt} @@ -391,6 +497,11 @@ the second one is a number (e.g. 2) which will be multiplied by \mdoption{1 defa \mdDescribeMacro[false]{nobreak} Sometimes it is useful to prevent a frame from splitting. The \mdoption{nobreak} option is used for this purpose. + +\mdDescribeMacro[0pt]{needspace} Sometimes it is useful to set a minimum height befor a frame should be splittet. For such cases you can use \mdoption{needspace}. + +\mdDescribeMacro{style} If you define a special style with \mdcommand{mdfdefinstyle} you can use the key \mdoption{style} to load the style. \mdname has no predefined styles. + %%\mdDescribeMacro[none]{settings} With version 0.9 of the package \mdname this option was added. This option allows the user to commit some macros. An example is shown in the appendix. %\mdDescribeMacro[none]{printheight} This key allows the entries \texttt{none}, \texttt{info} or \texttt{warning}. In relation to the key the vertical space at the beginning of the environment \mdname on the current page will be printed in the \texttt{log} file. @@ -400,12 +511,12 @@ the second one is a number (e.g. 2) which will be multiplied by \mdoption{1 defa if you want all lines dashed you will have to set \mdoption{pstrickssetting=\{linestyle=dashed\}}. It is very important to put the options of \mdoption{pstrickssetting} in brackets. - \textbf{This works only with \mdoption{style=3}.} + \textbf{This works only with \mdoption{framemethod=PSTricks}.} \mdDescribeMacro[none]{tikzsetting} With this key you can pass several options to \mdcommand{tikzset}. Some examples are listed in the next section. It is very important to put the options of \mdoption{tikzsetting} in brackets. - \textbf{This works only with \mdoption{style=1}.} + \textbf{This works only with \mdoption{framemethod=TikZ}.} \section{Examples} -Now I present some examples. Of course I know that some of them are only gimmicks. To create the following examples I am using \mdoption{style=1}. +Now I present some examples. Of course I know that some of them are only gimmicks. To create the following examples I am using \mdoption{framemethod=TikZ}. \mdfsetup{skipabove=\baselineskip,skipbelow=\baselineskip} \begin{mdexample} \mdfsetup{outerlinewidth=5pt,innerlinewidth=0pt, @@ -469,8 +580,24 @@ Some Text Some Text Some Text Some Text Some Text Some Text %Some Text Some Text Some Text Some Text Some Text Some Text \clearpage \onecolumn -\clearpage +\subsection{Framed \texttt{listings}} +The example below is inspired by the following post on StackExchange \href{http://tex.stackexchange.com/questions/27673/background-overflows-when-using-rounded-corners-for-listings-package-listings}{Background overflows when using rounded corners for listings (package: `listings`)} + +Here the solution which can be decorate as usual. + +\begin{mdexample}[moretexcs={BeforeBeginEnvironment,AfterEndEnvironment},morekeywords={lstlisting}] +\BeforeBeginEnvironment{lstlisting}{% + \begin{mdframed}[<modification>]% + \vspace{-0.7em}} +\AfterEndEnvironment{lstlisting}{% + \vspace{-0.5em}% + \end{mdframed}} +\end{mdexample} + + + \section{Errors, Warnings and Messages} + The package \mdpack{mdframed} provides different errors, warnings and messages in the \texttt{log}-file. Some \LaTeX-editors like \TeX Maker(X) have a special tab for errors and warnings @@ -480,19 +607,21 @@ The followings errors and warnings are generated by \mdpack{mdframed}. \begin{mdexample} The package ... does not exist but - is required by mdframed + needed by mdframed \end{mdexample} To avoid this problem you should install the required packages which are listed in section \ref{sec:syntax}. \begin{mdexample} - The style number ... does not exist - mdframed ues instead style=0 + package option style is depreciated + use framemethod instead mdframed +\end{mdexample} +With version 0.9d \mdname changed the meaning of the option \mdoption{style}. The option is used to load a defined style by \mdcommand{mdfdefinestyle}. Instead uses \mdoption{framemethod} (see section \ref{globopt}). + +\begin{mdexample} + Unknown framemethod .... mdframed \end{mdexample} -If you set the option \mdoption{style} and a file -\texttt{md-frame-'number'.mdf} does not exist -you will get this warning. So check the -option \mdoption{style}. +The input string for the option \mdoption{framemethod} is unkown. See section \ref{globopt}. \begin{mdexample} You have not loaded ntheorem yet @@ -529,7 +658,7 @@ So far I have no idea how to avoid such things. like enlargethispage or something else You got a bad break \end{mdexample} -See the explanation above. +See the explaation above. \begin{mdexample} You got a bad break @@ -562,10 +691,8 @@ body you will get this warning. \section{ToDo} \begin{enumerate} \item see \glqq Known Problems\grqq. - \item Work with \mdoption{twoside}-mode by setting \mdoption{inner} and \mdoption{outer}. \item Create new styles. \item Improve page breaks. - \item Section with version history. \end{enumerate} \section{Previous versions} @@ -573,7 +700,10 @@ If you have trouble with the new version of \mdname you can load \texttt{mdframe %With the new version 0.7a I changed the internal commands (I use \mdpack{etoolbox}) and the algorithm of the splitting. So I don't know whether I will get new bugs or not. For the last case and the previous version (v0.6) works well you can load \mdpack{mdframedpre} instead of \mdpack{mdframed}. \section{Acknowledgements} -Thanks for the bug reports and suggestions + +\vskip\baselineskip + + \textsf{Dick Nickalls;\quad Dr. Dietrich Grau;\quad Piazza Luca\quad Jobst Hoffmann}. \medskip @@ -584,7 +714,7 @@ Thanks for the bug reports and suggestions \clearpage \appendix \section{More information} -\addtocontents{toc}{\protect\setcounter{tocdepth}{-4}} +%\addtocontents{toc}{\protect\setcounter{tocdepth}{-4}} In the following section I want to present how to create your own frame. \subsection{How does \mdpack{mdframed} work?} @@ -594,29 +724,48 @@ After the calculation of the width and the height of the \mdcommand{@tempboxa} ( will be set sequently (done by \mdpack{md-frame-X.mdf}). The following figure demonstrates this. \begin{center} -\newcommand{\mybox}[1]{\psframebox[linecolor=gray,shadowcolor=lightgray]{\parbox{3.5cm}{\centering\small #1}}} -% \includegraphics{way} -\begin{psmatrix}[mnode=r,colsep=4,rowsep=1.2] - [name=s1] \mybox{read in and save contents in \textbackslash @tempboxa} & - [name=f1] \mybox{\textbackslash md@putbox@single} \\ - [name=s2] \mybox{split \textbackslash @tempboxa in \textbackslash tw@ to the free space of the page} & - [name=f2] \mybox{\textbackslash md@putbox@first} \\ - [name=s3] \mybox{contents of \textbackslash @tempboxa have enough space on the new page} & - [name=f3] \mybox{\textbackslash md@putbox@second} \\ - [name=s4] \mybox{split \textbackslash @tempboxa in \textbackslash tw@ to the free space of the page} & - [name=f4] \mybox{\textbackslash md@putbox@middle} \\[.5\baselineskip] - % - \psset{arrowinset=0,arrowscale=1.3,nodesep=3pt} - \ncline{->}{s1}{f1}\naput{enough space on page} - \ncline{->}{s1}{s2}\naput{not enough space on page} - \ncline{->}{s2}{f2}\naput{type out \textbackslash tw@} - \ncline[angle=90]{->}{f2}{s3}\ncput*{calculate the height of the new \textbackslash @tempboxa} - \ncline{->}{s3}{f3}\naput{yes} - \ncline{->}{s3}{s4}\naput{no} - \ncline{->}{s4}{f4}\naput{type out \textbackslash tw@} - \ncloop[angleA=180,angleB=-90,loopsize=4.5]{<-}{s3}{f4} - \nbput{calculate the height of the new \textbackslash @tempboxa} -\end{psmatrix} +\begin{tikzpicture} +\newcommand{\mybox}[1]{\parbox{3.5cm}{\centering\small #1}} +\tikzstyle{every node}=[font=\sffamily] +\tikzset{mymatrixnodes/.style={% + matrix of nodes, + nodes={framed,draw=black,fill=yellow!10,}, + column sep=4.2cm, + row sep=1.2cm, + }} +\matrix(m)[mymatrixnodes] + {% + \mybox{read in and save contents in \mdcommand{@tempboxa}} & + \mybox{\mdcommand{md@putbox@single}} \\ + \mybox{split \textbackslash @tempboxa in \mdcommand{tw@} to the free space of the page} & + \mybox{\mdcommand{md@putbox@first}} \\ + \mybox{contents of \mdcommand{@tempboxa} have enough space on the new page} & + \mybox{\mdcommand{md@putbox@second}} \\ + \mybox{split \mdcommand{@tempboxa} in \mdcommand{tw@} to the free space of the page} & + \mybox{\mdcommand{md@putbox@middle}} \\ +}; + +\tikzstyle{every path}=[black,-triangle 45,thick,shorten >=4pt,shorten <=4pt] +\draw (m-1-1) edge node[align=center,anchor=south]{enough space on page} (m-1-2); +\draw (m-2-1) edge node[align=center,anchor=south]{type out \mdcommand{tw@}} (m-2-2); +\draw (m-3-1) edge node[align=center,anchor=south]{yes} (m-3-2); +\draw (m-4-1) edge node[align=center,anchor=south]{type out \mdcommand{tw@}} (m-4-2); + +\draw (m-2-2) edge node[align=center,fill=white]% + {calculate the height of the new \mdcommand{@tempboxa}} (m-3-1); + + +\draw (m-1-1) edge node[align=center,anchor=west]{not enough space on page} (m-2-1); +\draw (m-3-1) edge node[align=center,anchor=west]{no} (m-4-1); + +\draw let \p1=($(m-4-2.south)-(0,1)$), \p2=($(m-3-1.west)-(0.8,0)$) in + (m-4-2.south) -- ($(m-4-2.south)+(0,-1)$) -- + node[align=center,anchor=north]% + {calculate the height of the new \mdcommand{@tempboxa}} (\x2,\y1) + -- ($(m-3-1.west)-(0.8,0)$)-- ($(m-3-1.west)$) ; + + +\end{tikzpicture} \captionof{figure}{Setting the contents of \mdpack{mdframed}}\label{fig:way} \end{center} @@ -679,6 +828,7 @@ can save the file as \mdpack{md-frame-X.mdf}. In this way you can use the option \mdoption{style} to load the file by setting \mdoption{style=X}. +\clearpage \subsection{Modify the frame} The example below is inspired by the following post on StackExchange \href{http://tex.stackexchange.com/questions/24101/theorem-decorations-that-stay-with-theorem-environment}{Theorem decorations that stay with theorem environment} @@ -689,6 +839,7 @@ First I will show the the result. \setlength{\interruptlength}{2.5ex} \newrobustcmd\overlaplines{% \input{md-frame-0.mdf}% + \global\defcounter{mdf@globalstyle@cnt}{0} \appto\md@frame@leftline@single{% \llap{\color{white}% \rule[-\dp\@tempboxa-\mdf@innerbottommargin@length% @@ -713,7 +864,7 @@ First I will show the the result. }% } \overlaplines -\newmdtheoremenv[style=0,ntheorem,linecolor=blue,linewidth=3pt]{lem}{Lemma}[section] +\newmdtheoremenv[style=0,ntheorem,linecolor=blue,linewidth=2pt]{lem}{Lemma}[section] \makeatother @@ -732,11 +883,11 @@ With the new length \mdcommand{interruptlength} you can manipulate the amount of \newlength{\interruptlength} \setlength{\interruptlength}{1.5ex} \makeatletter -\makeatletter \newlength{\interruptlength} \setlength{\interruptlength}{2.5ex} \newrobustcmd\overlaplines{% \input{md-frame-0.mdf}% + \global\defcounter{mdf@globalstyle@cnt}{0} \appto\md@frame@leftline@single{% \llap{\color{white}% \rule[-\dp\@tempboxa @@ -766,13 +917,50 @@ With the new length \mdcommand{interruptlength} you can manipulate the amount of } \overlaplines \newmdtheoremenv[style=0,ntheorem,linecolor=blue,% - linewidth=3pt]{lem}{Lemma}[section] + linewidth=10pt]{lem}{Lemma}[section] \makeatother \end{mdexample} + +\subsection{\mdname in combination with \mdpack{multicol}} +How I wrote in \glqq Known Problems\grqq\ you can't combine \mdpack{multicol} with \mdname. In a simple way without any breaks you can use: +\begin{mdexample}[moretexcs={lipsum},morekeywords={lipsum,multicols}] +\begin{multicols}{2} +\lipsum[1] +\begin{mdframed} +Text\par Text\par Text +\end{mdframed} +\lipsum[2] +\end{multicols} +\end{mdexample} +\begin{multicols}{2} +\lipsum[1] +\begin{mdframed} +Text\par Text\par Text +\end{mdframed} +\lipsum[2] +\end{multicols} + %\clearpage -\subsection{Revision history}\label{rev} +\twocolumn[\subsection{Revision history}\label{rev}] \setkomafont{subsubsection}{\normalfont\bfseries} -\small +\small\raggedright +\minisec{Version 0.9e submitted 11 Sep 2011} +\begin{itemize} +\item working with \texttt{twoside} modus +\end{itemize} + +\minisec{Version 0.9d submitted 10 Sep 2011} +\begin{itemize} +\item \textcolor{red}{changed the meaning of the option \mdoption{style}}!!! (inspired by Lars Madsen) +\item added option \mdoption{framemethod} (inspired by Lars Madsen) +\item added options \mdoption{needspace} (inspired by Lars Madsen) +\item added new command \mdcommand{mdfdefinestyle} (inspired by Lars Madsen) +\item fixes documentation +\item renamed \mdpack{md-frame-3.mdf} to \mdpack{md-frame-2.mdf} +\end{itemize} + +\footnotesize + \minisec{Version 0.9b submitted 7 Sep 2011} \begin{itemize} \item fixes bugs in \mdcommand{newmdtheoremenv} (Thanks to Enrico Gregorio) diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf index e083a8abce1..5ffb6ee0715 100644 --- a/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf @@ -8,14 +8,13 @@ %% Public License, as described in lppl.txt in the base LaTeX distribution. %% Either version 1.0 or, at your option, any later version. -%%$Id: md-frame-0.mdf 188 2011-09-07 10:32:16Z marco $ -%%$Rev: 188 $ +%%$Id: md-frame-0.mdf 195 2011-09-10 17:58:51Z marco $ +%%$Rev: 195 $ %%$Author: marco $ -%%$Date: 2011-09-07 12:32:16 +0200 (Mi, 07. Sep 2011) $ +%%$Date: 2011-09-10 19:58:51 +0200 (Sa, 10. Sep 2011) $ \def\mdframedOpackagename{md-frame-0} \def\md@frameOdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } -\ProvidesFile{md-frame-0.mdf}[\md@frameOdate@svn$Id: md-frame-0.mdf 188 2011-09-07 10:32:16Z marco $ \mdversion: \mdframedOpackagename] - +\ProvidesFile{md-frame-0.mdf}[\md@frameOdate@svn$Id: md-frame-0.mdf 195 2011-09-10 17:58:51Z marco $ \mdversion: \mdframedOpackagename] %%==================================================%% %%================single-box========================%% %%==================================================%% diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf index 7d397b2b5f6..df655bf6e31 100644 --- a/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf @@ -8,14 +8,13 @@ %% Public License, as described in lppl.txt in the base LaTeX distribution. %% Either version 1.0 or, at your option, any later version. -%%$Id: md-frame-1.mdf 188 2011-09-07 10:32:16Z marco $ -%%$Rev: 188 $ +%%$Id: md-frame-1.mdf 195 2011-09-10 17:58:51Z marco $ +%%$Rev: 195 $ %%$Author: marco $ -%%$Date: 2011-09-07 12:32:16 +0200 (Mi, 07. Sep 2011) $ - +%%$Date: 2011-09-10 19:58:51 +0200 (Sa, 10. Sep 2011) $ \def\mdframedIpackagename{md-frame-1} \def\md@frameIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } -\ProvidesFile{md-frame-1.mdf}[\md@frameIdate@svn$Id: md-frame-1.mdf 188 2011-09-07 10:32:16Z marco $ \mdversion: \mdframedIpackagename] +\ProvidesFile{md-frame-1.mdf}[\md@frameIdate@svn$Id: md-frame-1.mdf 195 2011-09-10 17:58:51Z marco $ \mdversion: \mdframedIpackagename] %%%% _____t_____ %%%% | | %%%% | | diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf new file mode 100644 index 00000000000..ce63d9992cc --- /dev/null +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-2.mdf @@ -0,0 +1,406 @@ +%%==================================================%% +%%= Ausgabe der Box nach Vorgabe der Ausgaberoutine=%% +%%==================================================%% +%% Styledatei fuer das Paket mdframed erstellt durch +%% 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. +%% Either version 1.0 or, at your option, any later version. + +%%$Id: md-frame-2.mdf 195 2011-09-10 17:58:51Z marco $ +%%$Rev: 195 $ +%%$Author: marco $ +%%$Date: 2011-09-10 19:58:51 +0200 (Sa, 10. Sep 2011) $ + +%%Allgemeine Einstellungen fuer pstricks +%%Hier nur einfacher Rahmen mit Einstellungen +\def\mdframedIIIpackagename{md-frame-3} +\def\md@frameIIIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } +\ProvidesFile{md-frame-3.mdf}[\md@frameIIIdate@svn$Id: md-frame-2.mdf 195 2011-09-10 17:58:51Z marco $ \mdversion: \mdframedIIIpackagename] +% +\def\md@ptlength@to@pscode#1{\pst@number{#1} \pst@number\psxunit div} +\let\ptTps\md@ptlength@to@pscode\relax +%%%% _____t_____ +%%%% | | +%%%% | | +%%%% | | +%%%% l| |r +%%%% | | +%%%% | | +%%%% |___________| +%%%% b +%zusammenhaenge abfragen: +\newrobustcmd*\md@test@ltrb{\ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline}) + and (bool {mdf@leftline}) and (bool {mdf@rightline})}} +%3-set +\newrobustcmd*\md@test@ltr{\ifboolexpr{ (bool {mdf@topline}) and not (bool {mdf@bottomline}) + and (bool {mdf@leftline}) and (bool {mdf@rightline})}} +\newrobustcmd*\md@test@ltb{\ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline}) + and (bool {mdf@leftline}) and not (bool {mdf@rightline})}} +\newrobustcmd*\md@test@trb{\ifboolexpr{ (bool {mdf@topline}) and (bool {mdf@bottomline}) + and not (bool {mdf@leftline}) and (bool {mdf@rightline})}} +\newrobustcmd*\md@test@lrb{\ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline}) + and (bool {mdf@leftline}) and (bool {mdf@rightline})}} +%2-set +\newrobustcmd*\md@test@lb{\ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline}) + and (bool {mdf@leftline}) and not (bool {mdf@rightline})}} +\newrobustcmd*\md@test@rb{\ifboolexpr{ not (bool {mdf@topline}) and (bool {mdf@bottomline}) + and not (bool {mdf@leftline}) and (bool {mdf@rightline})}} +\newrobustcmd*\md@test@tr{\ifboolexpr{ (bool {mdf@topline}) and not (bool {mdf@bottomline}) + and not (bool {mdf@leftline}) and (bool {mdf@rightline})}} +\newrobustcmd*\md@test@lt{\ifboolexpr{ (bool {mdf@topline}) and not (bool {mdf@bottomline}) + and (bool {mdf@leftline}) and not (bool {mdf@rightline})}} +%Einzellinien +\newrobustcmd*\md@test@single{% + \ifboolexpr{ not (test {\md@test@ltrb} or test {\md@test@ltr} or test {\md@test@ltb} + or test {\md@test@trb} or test {\md@test@lrb} or test {\md@test@lb} + or test {\md@test@rb} or test {\md@test@tr} or test {\md@test@lt} ) }} + +%%==================================================%% +%%================single-box========================%% +%%==================================================%% +\def\md@putbox@single{% + \leftline{\null\hspace*{\mdf@leftmargin@length}%% + \ifbool{mdf@leftline}{\hspace*{\mdf@middlelinewidth@length}}{}% + \setlength\mdfboundingboxwidth{\wd\@tempboxa}% + \setlength\mdfboundingboxheight{\ht\@tempboxa+\dp\@tempboxa}% + \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax% + \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax% + \ifbool{mdf@topline}{\advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax}{}% + \ifbool{mdf@bottomline}{\advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax}{}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \psset{linearc=\mdf@roundcorner@length,cornersize=absolut,}% + \expandafter\psset\expandafter{\mdf@psset@local}% + \psset{unit=1truecm}% + \begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight) + \md@test@ltrb{% + \psframe[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdf@middlelinewidth@length} 0.5 mul)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add) + }{} + \md@test@ltr{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + 0) + }{} + \md@test@ltb{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul)% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdf@middlelinewidth@length} 0.5 mul)% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} %X + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + }{} + \md@test@trb{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! 0 + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdf@middlelinewidth@length} 0.5 mul) + (! 0 \ptTps{\mdf@middlelinewidth@length} 0.5 mul) + }{} + \md@test@lrb{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdfboundingboxheight})% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdf@middlelinewidth@length} 0.5 mul )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdf@middlelinewidth@length} 0.5 mul ) + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdfboundingboxheight}) + }{} + \md@test@lb{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdfboundingboxheight})% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdf@middlelinewidth@length} 0.5 mul )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul ) + }{} + \md@test@rb{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! 0 \ptTps{\mdf@middlelinewidth@length} 0.5 mul )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdf@middlelinewidth@length} 0.5 mul ) + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdfboundingboxheight}) + }{} + \md@test@tr{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! 0 + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + 0) + }{} + \md@test@lt{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} %X + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + }{} + \md@test@single{}{% + \ifbool{mdf@bottomline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! 0 \ptTps{\mdf@middlelinewidth@length} 0.5 mul )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul ) + }{}% + \ifbool{mdf@topline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! 0 \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add)% + (! \ptTps{\mdfboundingboxwidth} + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add) + }{}% + \ifbool{mdf@leftline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdfboundingboxheight} )% + }{}% + \ifbool{mdf@rightline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add 0)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add + \ptTps{\mdfboundingboxheight} )% + }{}% + }{}% + %Hintergrund + \psframe[linecolor=\mdf@backgroundcolor,fillstyle=solid,% + fillcolor=\mdf@backgroundcolor,linestyle=solid, + linewidth=\mdf@middlelinewidth@length,dimen=outer]% + (!0 \ifbool{mdf@bottomline}{\ptTps{\mdf@middlelinewidth@length}}{0}) + (! \ptTps{\mdfboundingboxwidth} % + \ptTps{\mdfboundingboxheight} \ifbool{mdf@topline}{\ptTps{\mdf@middlelinewidth@length} sub}{}) + %Ausgabe + \rput[b](!\ptTps{\mdfboundingboxwidth} 0.5 mul % X-Koordinate + \ptTps{\mdf@innerbottommargin@length} + \ifbool{mdf@bottomline}{\ptTps{\mdf@middlelinewidth@length} add}{} + ){\box\@tempboxa} + \end{pspicture}% + }% +} +%%==================================================%% +%%================first-box=========================%% +%%==================================================%% + +\def\md@putbox@first{% + \leftline{\null\hspace*{\mdf@leftmargin@length}%% + \ifbool{mdf@leftline}{\hspace*{\mdf@middlelinewidth@length}}{}% + \setlength\mdfboundingboxwidth{\wd\tw@}% + \setlength\mdfboundingboxheight{\ht\tw@+\dp\tw@}% + \advance\mdfboundingboxheight by \mdf@innertopmargin@length\relax + \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax% + \ifbool{mdf@topline}{\advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax}{}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \psset{linearc=\mdf@roundcorner@length,cornersize=absolute}% + \expandafter\psset\expandafter{\mdf@psset@local}% + \psset{unit=1truecm}% + \ifdimgreater{\mdfboundingboxheight}{\vsize} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\vsize)} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight)} + %Hintergrund + \psline[linecolor=\mdf@backgroundcolor,fillstyle=solid,linestyle=solid, + linearc={\dimexpr\mdf@roundcorner@length-\mdf@middlelinewidth@length\relax}, + fillcolor=\mdf@backgroundcolor,linewidth=\mdf@middlelinewidth@length]% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul 0)% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul + \ptTps{\mdfboundingboxheight} \ifbool{mdf@topline}% + {\ptTps{\mdf@middlelinewidth@length} neg 1.5 mul add}% + {\ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add} )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add %X + \ptTps{\mdfboundingboxheight} \ifbool{mdf@topline}% + {\ptTps{\mdf@middlelinewidth@length} neg 1.5 mul add}% + {\ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add} )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add %X + 0) + \ifboolexpr{ test {\md@test@ltrb} or test {\md@test@ltr}}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + 0) + }{} + \ifboolexpr{ test {\md@test@tr} or test {\md@test@trb}}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! 0 + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + 0) + }{} + \ifboolexpr{ test {\md@test@ltb} or test {\md@test@lt}}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@roundcorner@length} neg add %X + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul add)% + }{} + \ifboolexpr{ test {\md@test@single} or test {\md@test@rb} or test {\md@test@lrb} or test {\md@test@lb}}{% + \ifbool{mdf@topline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! 0 \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add)% + (! \ptTps{\mdfboundingboxwidth} + \ptTps{\mdfboundingboxheight} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add) + }{}% + \ifbool{mdf@leftline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdfboundingboxheight} )% + }{}% + \ifbool{mdf@rightline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add 0)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add + \ptTps{\mdfboundingboxheight} )% + }{}% + }{}% + %Ausgabe + \rput[b](!\ptTps{\mdfboundingboxwidth} 0.5 mul % X-Koordinate + \ptTps{\mdf@splitbottomskip@length}){\box\tw@} + \end{pspicture}% + }% +} + +%%==================================================%% +%%================middle-box========================%% +%%==================================================%% + +\def\md@putbox@middle{% + \leftline{\null\hspace*{\mdf@leftmargin@length}%% + \ifbool{mdf@leftline}{\hspace*{\mdf@middlelinewidth@length}}{}% + \setlength\mdfboundingboxwidth{\wd\tw@}% + \setlength\mdfboundingboxheight{\ht\tw@+\dp\tw@}% + \advance\mdfboundingboxheight by \mdf@splitbottomskip@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \expandafter\psset\expandafter{\mdf@psset@local}% + \psset{linearc=\mdf@roundcorner@length,cornersize=absolute}% + \psset{unit=1truecm}% + \ifdimgreater{\mdfboundingboxheight}{\vsize} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\vsize)} + {\begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight)} + \ifbool{mdf@leftline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdfboundingboxheight} )% + }{}% + \ifbool{mdf@rightline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add 0)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add + \ptTps{\mdfboundingboxheight} )% + }{}% + %Hintergrund + \psframe[linecolor=\mdf@backgroundcolor,fillstyle=solid,% + fillcolor=\mdf@backgroundcolor,linestyle=solid, + linewidth=\mdf@middlelinewidth@length,dimen=outer,% + linearc=\z@]% + (!0 0) + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdfboundingboxheight}) + %Ausgabe + \rput[b](!\ptTps{\mdfboundingboxwidth} 0.5 mul % X-Koordinate + \ptTps{\mdf@splitbottomskip@length} ){\box\tw@} + \end{pspicture}% + }% +} +%%==================================================%% +%%=================last-box=========================%% +%%==================================================%% +\def\md@putbox@second{ + \leftline{\null\hspace*{\mdf@leftmargin@length}%% + \ifbool{mdf@leftline}{\hspace*{\mdf@middlelinewidth@length}}{}% + \setlength\mdfboundingboxwidth{\wd\@tempboxa}% + \setlength\mdfboundingboxheight{\ht\@tempboxa+\dp\@tempboxa}% + \advance\mdfboundingboxheight by \mdf@innerbottommargin@length\relax% + \ifbool{mdf@bottomline}{\advance\mdfboundingboxheight by \mdf@middlelinewidth@length\relax}{}% + \advance\mdfboundingboxwidth by \mdf@innerleftmargin@length\relax% + \advance\mdfboundingboxwidth by \mdf@innerrightmargin@length\relax% + \expandafter\psset\expandafter{\mdf@psset@local} + \psset{linearc=\mdf@roundcorner@length,cornersize=absolute}% + \psset{unit=1truecm}% + \begin{pspicture}(0,0)(\mdfboundingboxwidth,\mdfboundingboxheight) + %Hintergrund + \psline[linecolor=\mdf@backgroundcolor,fillstyle=solid,linestyle=solid, + linearc={\dimexpr\mdf@roundcorner@length-\mdf@middlelinewidth@length\relax}, + fillcolor=\mdf@backgroundcolor,linewidth=\mdf@middlelinewidth@length]%% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul \ptTps{\mdfboundingboxheight} )% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul + \ifbool{mdf@bottomline}% + {\ptTps{\mdf@middlelinewidth@length} neg 1.5 mul neg}% + {\ptTps{\mdf@middlelinewidth@length} neg 0.5 mul neg} )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add + \ifbool{mdf@bottomline}% + {\ptTps{\mdf@middlelinewidth@length} neg 1.5 mul neg}% + {\ptTps{\mdf@middlelinewidth@length} neg 0.5 mul neg} )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg add + \ptTps{\mdfboundingboxheight} ) + %%%%%%%%%%%% + \ifboolexpr{ test {\md@test@ltrb} or test {\md@test@lrb}}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdfboundingboxheight})% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdf@middlelinewidth@length} 0.5 mul )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdf@middlelinewidth@length} 0.5 mul ) + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdfboundingboxheight}) + }{} + \ifboolexpr{ test {\md@test@ltb} or test {\md@test@lb}}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdfboundingboxheight})% + (! \ptTps{\mdf@middlelinewidth@length} 0.5 mul neg \ptTps{\mdf@middlelinewidth@length} 0.5 mul )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul ) + }{} + \ifboolexpr{ test {\md@test@trb} or test {\md@test@rb}}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! 0 \ptTps{\mdf@middlelinewidth@length} 0.5 mul )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdf@middlelinewidth@length} 0.5 mul ) + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add %X + \ptTps{\mdfboundingboxheight}) + }{} + \ifboolexpr{ test {\md@test@single} or test {\md@test@ltr} or test {\md@test@tr} or test {\md@test@lt}}{% + \ifbool{mdf@bottomline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! 0 \ptTps{\mdf@middlelinewidth@length} 0.5 mul )% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul ) + }{}% + \ifbool{mdf@leftline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul 0)% + (! \ptTps{\mdf@middlelinewidth@length} neg 0.5 mul \ptTps{\mdfboundingboxheight} )% + }{}% + \ifbool{mdf@rightline}{% + \psline[linewidth=\mdf@middlelinewidth@length,linecolor=\mdf@linecolor,fillstyle=none,dimen=middle]% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add 0)% + (! \ptTps{\mdfboundingboxwidth} \ptTps{\mdf@middlelinewidth@length} 0.5 mul add + \ptTps{\mdfboundingboxheight} )% + }{}% + }{}% + %Ausgabe + \rput[b](!\ptTps{\mdfboundingboxwidth} 0.5 mul % X-Koordinate + \ptTps{\mdf@innerbottommargin@length} + \ifbool{mdf@bottomline}{\ptTps{\mdf@middlelinewidth@length} add}{} + ){\box\@tempboxa} + \end{pspicture}% + }% +} + +\endinput +%eof + diff --git a/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf b/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf index 7c4410faa8a..6c930751914 100644 --- a/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf +++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf @@ -8,20 +8,19 @@ %% Public License, as described in lppl.txt in the base LaTeX distribution. %% Either version 1.0 or, at your option, any later version. -%%$Id: md-frame-3.mdf 188 2011-09-07 10:32:16Z marco $ -%%$Rev: 188 $ +%%$Id: md-frame-3.mdf 195 2011-09-10 17:58:51Z marco $ +%%$Rev: 195 $ %%$Author: marco $ -%%$Date: 2011-09-07 12:32:16 +0200 (Mi, 07. Sep 2011) $ +%%$Date: 2011-09-10 19:58:51 +0200 (Sa, 10. Sep 2011) $ %%Allgemeine Einstellungen fuer pstricks %%Hier nur einfacher Rahmen mit Einstellungen \def\mdframedIIIpackagename{md-frame-3} \def\md@frameIIIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } -\ProvidesFile{md-frame-3.mdf}[\md@frameIIIdate@svn$Id: md-frame-3.mdf 188 2011-09-07 10:32:16Z marco $ \mdversion: \mdframedIIIpackagename] +\ProvidesFile{md-frame-3.mdf}[\md@frameIIIdate@svn$Id: md-frame-3.mdf 195 2011-09-10 17:58:51Z marco $ \mdversion: \mdframedIIIpackagename] % \def\md@ptlength@to@pscode#1{\pst@number{#1} \pst@number\psxunit div} \let\ptTps\md@ptlength@to@pscode\relax -% %%%% _____t_____ %%%% | | %%%% | | diff --git a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty index fe5c8b60e92..085743f886a 100644 --- a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty +++ b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty @@ -32,17 +32,17 @@ %% %% %%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>%% -%%$Id: mdframed.sty 188 2011-09-07 10:32:16Z marco $ -%%$Rev: 188 $ +%%$Id: mdframed.sty 198 2011-09-11 10:50:44Z marco $ +%%$Rev: 198 $ %%$Author: marco $ -%%$Date: 2011-09-07 12:32:16 +0200 (Mi, 07. Sep 2011) $ +%%$Date: 2011-09-11 12:50:44 +0200 (So, 11. Sep 2011) $ %% Allgemeine Angaben -\def\mdversion{v0.9b} +\def\mdversion{v0.9e} \def\mdframedpackagename{mdframed} \def\md@maindate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{mdframed}[\md@maindate@svn$Id: mdframed.sty 188 2011-09-07 10:32:16Z marco $ \mdversion: \mdframedpackagename] +\ProvidesPackage{mdframed}[\md@maindate@svn$Id: mdframed.sty 198 2011-09-11 10:50:44Z marco $ \mdversion: \mdframedpackagename] %%==================================================%% %%=============== Benoetigte Pakete ================%% %%==================================================%% @@ -53,7 +53,7 @@ \RequirePackage{#1}% }{% \md@PackageWarning{The package #1 does not exist^^J - but it is required by \mdframedpackagename^^J + but needed by \mdframedpackagename^^J see documentation fo further information }% } @@ -63,7 +63,7 @@ \md@LoadFile@IfExist{calc} \md@LoadFile@IfExist{color} \md@LoadFile@IfExist{etoolbox} - +\md@LoadFile@IfExist{zref-abspage} \SetupKeyvalOptions{family=mdf,prefix=mdf@} %%==================================================%% @@ -106,10 +106,10 @@ %%Schleifenmakro zur Optioneneingabe Option==Laenge \DeclareListParser*{\mdf@dolist}{,} -\def\mdf@do#1{% - \mdf@doubledo#1\@nil% +\def\mdf@do@lengthoption#1{% + \mdf@lengthoption@doubledo#1\@nil% } -\def\mdf@doubledo#1==#2\@nil{% +\def\mdf@lengthoption@doubledo#1==#2\@nil{% \mdf@option@length{#1}{#2}% \mdf@define@key@length{#1}% } @@ -117,28 +117,58 @@ %Festlegung welcher Stildatei %% 0 := tex-Kommandos -- rule %% 1 := tikz -%% 2 := tikz-erweitert -%% 3 := pstricks-einfach -%% 4 := pstricks-erweitert -\DeclareStringOption[0]{style} -\define@key{mdf}{globalstyle}[\mdf@style]{% - \def\md@styledo##1{% - \def\@tempa{##1} - \ifcase\number\@tempa\relax +%% 2 := pstricks +%% 3 := pstricks <- veraltet +\newcounter{mdf@globalstyle@cnt} +\defcounter{mdf@globalstyle@cnt}{0} +\newcommand*\mdfglobal@style{0} + +\define@key{mdf}{style}{% + \md@PackageWarning{package option style is depreciated^^J + use framemethod instead\MessageBreak}% + \renewcommand*\mdfglobal@style{#1}% + \defcounter{mdf@globalstyle@cnt}{#1}% + \ifcase\value{mdf@globalstyle@cnt}\relax %0 <- kein Grafikpaket \or\md@LoadFile@IfExist{tikz}%1 <- tikz wird benoetigt \or\md@LoadFile@IfExist{tikz}%2 <- tikz wird benoetigt \or\md@LoadFile@IfExist{pstricks-add}%3 <- pstricks wird benoetigt \or\md@LoadFile@IfExist{pstricks-add}%4 <- pstricks wird benoetigt - \else\md@PackageWarning{Unknown global style \@tempa}% - \fi - }% - \mdf@dolist{\md@styledo}{\mdf@style,#1}% - } + \else\md@PackageWarning{Unknown global style \value{mdf@globalstyle@cnt}}% + \fi% +} + +\providecommand*\mdf@framemethod{} +\define@key{mdf}{framemethod}[default]{% + \def\md@framemethod@i{}% + \def\md@framemethod@ii{}% + \def\md@framemethod@iii{}% + \lowercase{\def\md@tempa{#1}} + \forcsvlist{\listadd\md@framemethod@i}{default,tex,latex,none,0} + \forcsvlist{\listadd\md@framemethod@ii}{tikz,1} + \forcsvlist{\listadd\md@framemethod@iii}{pstricks,ps,2,postscript} + \xifinlist{\md@tempa}{\md@framemethod@i}% + {\def\mdf@@framemethod{default}\defcounter{mdf@globalstyle@cnt}{0}}% + {\xifinlist{\md@tempa}{\md@framemethod@ii}% + {\def\mdf@@framemethod{tikz}\defcounter{mdf@globalstyle@cnt}{1}}% + {\xifinlist{\md@tempa}{\md@framemethod@iii}% + {\def\mdf@@framemethod{pstricks}\defcounter{mdf@globalstyle@cnt}{2}}% + {\md@PackageWarning{Unknown framemethod \md@tempa\MessageBreak}}% + }% + }% + \ifcase\value{mdf@globalstyle@cnt}\relax% + %0 <- kein Grafikpaket + \or\md@LoadFile@IfExist{tikz}%1 <- tikz wird benoetigt + \or\md@LoadFile@IfExist{pstricks-add}%2 <- pstricks wird benoetigt + \or\md@LoadFile@IfExist{pstricks-add}%3 <- pstricks wird benoetigt <- support old style + \fi% +} + + %%%%Optionen mit Laengen -\mdf@dolist{\mdf@do}{% +\mdf@dolist{\mdf@do@lengthoption}{% {skipabove==\z@},% {skipbelow==\z@},% {leftmargin==\z@},% @@ -150,8 +180,8 @@ {innerbottommargin==0.4\baselineskip},% {splittopskip==\z@},% {splitbottomskip==\z@},% - {outermargin==\z@},% - {innermargin==\z@},% + {outermargin==-999pt},% + {innermargin==-999pt},% {linewidth==0.4pt},% {innerlinewidth==\z@},% {middlelinewidth==\expandafter\mdf@linewidth@length},% @@ -194,9 +224,24 @@ \DeclareStringOption[black]{fontcolor} \DeclareStringOption[\mdf@linecolor]{innerlinecolor} \DeclareStringOption[\mdf@linecolor]{outerlinecolor} -\DeclareStringOption[\mdf@backgroundcolor]{middlelinecolor} +\DeclareStringOption[\mdf@linecolor]{middlelinecolor} \DeclareStringOption[\mdf@backgroundcolor]{psroundlinecolor} +%Nutzung des Paketes needspace +\DeclareStringOption[\z@]{needspace} +\newcommand\mdf@sneedspace{} +\define@key{mdf}{needspace}[\z@]{% + \begingroup% + \setlength{\dimen@}{#1}% + \vskip\z@\@plus\dimen@% + \penalty -100\vskip\z@\@plus -\dimen@% + \vskip\dimen@% + \penalty 9999% + \vskip -\dimen@% + \vskip\z@skip % hide the previous |\vskip| from |\addvspace| + \endgroup% +} + \DeclareDefaultOption{% \md@PackageWarning{Unknown Option '\CurrentOption' for mdframed}} @@ -212,9 +257,21 @@ \DeclareStringOption[none]{printheight} -\ProcessKeyvalOptions* + +\ProcessKeyvalOptions*\relax \newcommand*{\mdfsetup}{\setkeys{mdf}} -\mdfsetup{globalstyle=0} + + +%Erlauben von mdfdefinestyle sowie redefinition von style +\define@key{mdf}{style}{% + \ifcsundef{mdf@definestyle@#1}{% + \md@PackageWarning{Unknown definedstyle #1^^J + You have to define a style via \string\mdfdefinedstyle\MessageBreak + }% + }% + {\csuse{mdf@definestyle@#1}}% +} + %%==================================================%% %%========Sicherstellen der key-value-Syntax========%% @@ -281,6 +338,14 @@ \def\md@endparenv{% \addpenalty\@endparpenalty\addvspace\mdf@skipbelow@length\@endpetrue} +%%==================================================%% +%%==================framestyle======================%% +%%==================================================%% +%inspired by Lars Madsen +\newrobustcmd*\mdfdefinestyle[2]{% + \csdef{mdf@definestyle@#1}{\mdfsetup{#2}}% +} + %%==================================================%% @@ -418,18 +483,16 @@ %%======= Laden der gewuenschten Style-Datei =======%% %%==================================================%% \newrobustcmd*\mdf@load@style{% -\ifcase\mdf@style\relax% +\ifcase\value{mdf@globalstyle@cnt}\relax% \input{md-frame-0.mdf}% \or\input{md-frame-1.mdf}% - \or\md@PackageWarning{The style number\mdf@style does not exist\MessageBreak - mdframed ues instead style=0 \mdframedpackagename}% - \input{md-frame-0.mdf}% + \or\input{md-frame-2.mdf} \or\input{md-frame-3.mdf}% \else% - \IfFileExists{md-frame-\mdf@style.mdf}{\input{md-frame-\mdf@style.mdf}% - }{\input{md-frame-1.mdf}% - \md@PackageWarning{The style number \mdf@style does not exist\MessageBreak - mdframed ues instead style=0 \mdframedpackagename}% + \IfFileExists{md-frame-\value{mdf@globalstyle@cnt}.mdf}{\input{md-frame-\value{mdf@globalstyle@cnt}.mdf}% + }{\input{md-frame-0.mdf}% + \md@PackageWarning{The style number \value{mdf@globalstyle@cnt} does not exist^^J + mdframed ues instead style=0 \mdframedpackagename}% }% \fi% }% @@ -438,7 +501,7 @@ %%========= style-abhaengige Modifikation ==========%% %%==================================================%% \newrobustcmd*\md@styledefinition{% - \ifnumequal{\mdf@style}{0}% + \ifnumequal{\value{mdf@globalstyle@cnt}}{0}% {\deflength{\mdf@innerlinewidth@length}{\z@}% \deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}% \deflength{\mdf@outerlinewidth@length}{\z@}% @@ -446,18 +509,18 @@ \let\mdf@middlelinecolor\mdf@linecolor% \let\mdf@outerlinecolor\mdf@linecolor% }{}% - \ifnumequal{\mdf@style}{3}% + \ifnumequal{\value{mdf@globalstyle@cnt}}{2}% + {\deflength{\mdf@innerlinewidth@length}{\z@}% + \deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}% + \deflength{\mdf@outerlinewidth@length}{\z@}% + \let\mdf@innerlinecolor\mdf@linecolor% + }{}% + \ifnumequal{\value{mdf@globalstyle@cnt}}{3}% {\deflength{\mdf@innerlinewidth@length}{\z@}% \deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}% \deflength{\mdf@outerlinewidth@length}{\z@}% \let\mdf@innerlinecolor\mdf@linecolor% }{}% -% \ifnumequal{\mdf@style}{1}% -% {\deflength{\mdf@innerlinewidth@length}{\z@}% -% \deflength{\mdf@middlelinewidth@length}{\mdf@linewidth@length}% -% \deflength{\mdf@outerlinewidth@length}{\z@}% -% \let\mdf@innerlinecolor\mdf@linecolor% -% }{}% } %%==================================================%% @@ -521,6 +584,7 @@ %check is needed? \mdfsetup{#1}%% \mdf@settings% + \md@twoside@checklength% \let\width\z@% \let\height\z@% \setlength{\topsep}{\mdf@skipabove@length}% @@ -542,6 +606,59 @@ \hrule \@height\z@ \@width\hsize \endgroup% } +%%==================================================%% +%%================== Twoside-Modus =================%% +%%==================================================%% +\newtoggle{md:checktwoside} +\settoggle{md:checktwoside}{false} +\newrobustcmd*\md@twoside@checklength{% + \if@twoside + \ifboolexpr{ test {\ifdimequal{\mdf@outermargin@length}{-999pt}} + and + test {\ifdimequal{\mdf@innermargin@length}{-999pt}} + }% + {% + \md@PackageInfo{You haven't set the outermargin/innermargin^^ + mdframed will use leftmargin/rightmargin}% + \settoggle{md:checktwoside}{false}% + }% + {\settoggle{md:checktwoside}{true}}% + \iftoggle{md:checktwoside}{% + \let\mdf@rightmargin@length\mdf@outermargin@length\relax% + \let\mdf@leftmargin@length\mdf@innermargin@length\relax% + }{}% + \fi +} + +\newcounter{md@zref@counter}%keine doppelten laebes +\zref@newprop*{md@pagevalue}[0]{\number\value{page}} +\zref@addprop{\ZREF@mainlist}{md@pagevalue} + +\newrobustcmd*\md@zref@label{% + \stepcounter{md@zref@counter} + \zref@label{md@pagelabel-\number\value{md@zref@counter}}% +} + +\newrobustcmd*\if@md@pageodd{% + \zref@refused{md@pagelabel-\the\value{md@zref@counter}}% + \ifodd\zref@extract{md@pagelabel-\the\value{md@zref@counter}}{md@pagevalue}% + \edef\md@reserveda{\md@pageisodd}% + \else + \edef\md@reserveda{\md@pageiseven}% + \fi + \md@reserveda% +} + +\newrobustcmd*\md@pageisodd{% +\let\mdf@rightmargin@length\mdf@outermargin@length\relax% +\let\mdf@leftmargin@length\mdf@innermargin@length\relax% +} +\newrobustcmd*\md@pageiseven{% +\let\mdf@rightmargin@length\mdf@innermargin@length\relax% +\let\mdf@leftmargin@length\mdf@outermargin@length\relax% +} + +\newrobustcmd*\md@@setzref{\md@zref@label\if@md@pageodd} %%==================================================%% %%================= Platz auf Seite ================%% @@ -663,7 +780,11 @@ innerbottommargin,innerlinewidth,middlelinewidth,outerlinewidth}% \md@keeplines@single% \ifdimless{\md@verticalmarginwhole@length}{\md@freevspace@length}% - {\md@putbox@single%%passt auf Seite + {%passt auf Seite% + \begingroup + \iftoggle{md:checktwoside}{\md@@setzref}{}% + \md@putbox@single%%passt auf Seite + \endgroup \let\md@reserved@a\relax}% {\def\md@reserved@a{\md@put@frame@i}}%passt nicht auf Seite }% @@ -733,7 +854,10 @@ \def\md@reserved@a{\md@put@frame}% }% {% - \md@putbox@first%%%Groesse des Splittens passt + \begingroup + \iftoggle{md:checktwoside}{\md@@setzref}{}% + \md@putbox@first%%%Groesse des Splittens passt + \endgroup \hrule \@height\z@ \@width\hsize \vfill\eject% \def\md@reserved@a{\md@put@frame@ii}% @@ -759,20 +883,26 @@ \setbox\@tempboxa\vbox{\unvbox\@tempboxa}%PRUEFEN!!!! \ifvoid\@tempboxa\relax% \md@PackageWarning{You got a bad break\MessageBreak - because the splittet box is empty\MessageBreak + because the split box is empty\MessageBreak You have to change the settings}% \fi% - \md@putbox@middle% + \begingroup + \iftoggle{md:checktwoside}{\md@@setzref}{}% + \md@putbox@middle% + \endgroup \hrule \@height\z@ \@width\hsize \vfill\eject \def\md@reserved@a{\md@put@frame@ii}% }%Hier die Ausgabe der mittleren Box {\ifvoid\@tempboxa \md@PackageWarning{You got a bad break\MessageBreak - because the last splittet box is empty\MessageBreak + because the last split box is empty\MessageBreak You have to change the settings}% \fi% - \md@putbox@second% + \begingroup + \iftoggle{md:checktwoside}{\md@@setzref}{}% + \md@putbox@second% + \endgroup \let\md@reserved@a\relax% }%Hier kommt die Ausgabe der letzten Box \md@reserved@a% @@ -784,7 +914,7 @@ \DisableKeyvalOption[% action=warning, package=mdframed, -]{mdf}{globalstyle}% +]{mdf}{framemethod}% \DisableKeyvalOption[% action=warning, |