summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-04-09 16:29:36 +0000
committerKarl Berry <karl@freefriends.org>2012-04-09 16:29:36 +0000
commit2527a7b311b3d39a759e168a763718e6e5c22eaa (patch)
tree59220985e3f0e373c08ce716ac30b4a9dfbc93a9 /Master/texmf-dist/source
parent55c94cce03411fe9e7f0e7eb764594d57dd77786 (diff)
mdframed (8apr12)
git-svn-id: svn://tug.org/texlive/trunk@25884 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/mdframed/mdframed.dtx329
1 files changed, 218 insertions, 111 deletions
diff --git a/Master/texmf-dist/source/latex/mdframed/mdframed.dtx b/Master/texmf-dist/source/latex/mdframed/mdframed.dtx
index 58ed7a504df..28704913db2 100644
--- a/Master/texmf-dist/source/latex/mdframed/mdframed.dtx
+++ b/Master/texmf-dist/source/latex/mdframed/mdframed.dtx
@@ -206,11 +206,11 @@ Have fun!
\fi
%</internal>
%<*driver>
-%%$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
\setcounter{errorcontextlines}{999}
\documentclass[parskip=false,11pt,]{ltxmdf}
\usepackage[framemethod=TikZ]{mdframed}
-\ltxmdfsetifoot$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+\ltxmdfsetifoot$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
\EnableCrossrefs
\CodelineIndex
@@ -221,7 +221,7 @@ Have fun!
%</driver>
% \fi
%
-% \CheckSum{5807}
+% \CheckSum{5874}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -250,7 +250,7 @@ Have fun!
% \author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}%
% \href{mailto:marco.daniel@mada-nada.de}{Elke Schubert}}}
% \version{\mdversion}
-% \date{\mdfdateID$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $}
+% \date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $}
% \introduction{The standard methods for framing text (\Cmd{fbox}
% or \Cmd{fcolorbox}) require you to handle page breaks
% by hand, meaning that you have to split the \Cmd{fbox}
@@ -736,9 +736,15 @@ Have fun!
% This option is not longer supported. Use \Opt{leftmargin}
% and \Opt{rightmargin} instead.
% \ExplOpt[0pt]{leftmargin}
-% Sets the length of the left margin of the environment.
+% Sets the length of the left margin of the environment. This option has an
+% effect only in singleside-mode or, in twoside-mode, if the option
+% \Opt{usetwoside=false} has been given.
+% See also options \Opt{outermargin} and \Opt{innermargin}.
% \ExplOpt[0pt]{rightmargin}
-% Sets the length of the right margin of the environment.
+% Sets the length of the right margin of the environment. This option has an
+% effect only in singleside-mode or, in twoside-mode, if the option
+% \Opt{usetwoside=false} has been given.
+% See also options \Opt{outermargin} and \Opt{innermargin}.
% \ExplOpt[10pt]{innerleftmargin}
% Sets the length of the inner left margin of the environment.
% \ExplOpt[10pt]{innerrightmargin}
@@ -824,7 +830,7 @@ Have fun!
% The option requires a length which sets the minimum height before
% a frame will be splitted.
% \ExplOpt{style}
-% If you define a special style with \Cmd{mdfdefinstyle} you can use
+% If you define a special style with \Cmd{mdfdefinestyle} you can use
% the key \Opt{style} to load the style. \Pack{mdframed} has
% no predefined styles yet.
% \ExplOpt[none]{settings}
@@ -899,6 +905,19 @@ Have fun!
% \textbf{Before you change one please have a look at the
% file \texttt{md-frame-1.mdf} to see the settings.}
% \limitation
+% \ExplOpt[\{\}]{singleextra}
+% With this key you can put extra material to the drawing environment of \Pack{mdframed}
+% only for a non splitted frame. \limitation[TikZ and PSTricks]
+% \ExplOpt[\{\}]{firstextra}
+% With this key you can put extra material to the drawing environment of \Pack{mdframed}
+% only for the first part of the splitted frame. \limitation[TikZ and PSTricks]
+% \ExplOpt[\{\}]{middleextra}
+% With this key you can put extra material to the drawing environment of \Pack{mdframed}
+% only for the middle part of the splitted frame. \limitation[TikZ and PSTricks]
+% \ExplOpt[\{\}]{secondextra}
+% With this key you can put extra material to the drawing environment of \Pack{mdframed}
+% only for the second part of the splitted frame. \limitation[TikZ and PSTricks]
+%
%
% \subsection{Hidden Lines}
% \ExplOpt[true]{topline} Draws a line at the top.
@@ -1435,6 +1454,16 @@ Have fun!
%
% \subsection{Revision history}\label{rev}
% \raggedright
+%
+% \minisec{Version 1.5 submitted DD MM 2012}
+% \begin{itemize*}
+% \item fixed bug (Thanks Nicolas Roy)
+% \item expanded documentation (Thanks Martin Wilhelm Leidig)
+% \item added options \Opt{singleextra}, \Opt{firstextra},
+% \Opt{middleextra} and \Opt{secondextra}
+% \item expanded examples
+% \end{itemize*}
+%
% \minisec{Version 1.4d submitted 30 Mar 2012}
% \begin{itemize*}
% \item fixed bug (Thanks Nicolas Roy)
@@ -1446,6 +1475,7 @@ Have fun!
% splitted frames
% \end{itemize*}
%
+% \footnotesize
% \minisec{Version 1.4 submitted 4 Mar 2012}
% \begin{itemize*}
% \item fixed bug in combination with \Cmd{marginpar} (Thanks Juan Carlos Trujillo Ortega)
@@ -1493,7 +1523,6 @@ Have fun!
% \item added \Cmd{@parboxrestore} to \Cmd{mdf@lrbox}
% \end{itemize*}
%
-% \footnotesize
% \minisec{Version 1.0 submitted 13 Nov 2011}
% \begin{itemize*}
% \item add option \Opt{userdefinedwidth}
@@ -1614,14 +1643,14 @@ Have fun!
%
% \subsection{The Explanation of mdframed.sty}
%
-% %$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
-% %$Rev: 362 $
+% %$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
+% %$Rev: 375 $
% %$Author: marco $
-% %$Date: 2012-03-30 08:55:35 +0200 (Fr, 30. Mär 2012) $
+% %$Date: 2012-04-08 12:52:22 +0200 (So, 08. Apr 2012) $
% \begin{macro}{mdversion,mdframedpackagename,mdf@maindate@svn}
% Set package information
% \begin{macrocode}
-\def\mdversion{v1.4d}
+\def\mdversion{v1.5}
\def\mdframedpackagename{mdframed}
\def\mdf@maindate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space }
% \end{macrocode}
@@ -1630,7 +1659,7 @@ Have fun!
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mdframed}%
- [\mdf@maindate@svn$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $%
+ [\mdf@maindate@svn$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $%
\mdversion: \mdframedpackagename]
% \end{macrocode}
%
@@ -1905,6 +1934,10 @@ Have fun!
{theoremcountersep=={.}},%
{theoremtitlefont=={}},%
{theoremspace=={\space}},%
+ {singleextra=={}},
+ {firstextra=={}},
+ {middleextra=={}},
+ {secondextra=={}},
}
% \end{macrocode}
% \end{macro}
@@ -2185,7 +2218,13 @@ Have fun!
\@ifpackageloaded{amsthm}{%
\newrobustcmd\mdf@patchamsthm{%
\let\mdf@deferred@thm@head\deferred@thm@head
- \patchcmd{\deferred@thm@head}{\indent}{}{}{}
+ \patchcmd{\deferred@thm@head}{\indent}{}%
+ {\mdf@PackageInfo{mdframed detected package amsthm ^^J
+ changed the theoerem header of amsthm\MessageBreak}%
+ }{%
+ \mdf@PackageInfo{mdframed detected package amsthm ^^J
+ changed the theoerem header of amsthm failed\MessageBreak}%
+ }%
}%
}{\let\mdf@patchamsthm\relax}%
% \end{macrocode}
@@ -2262,6 +2301,7 @@ Have fun!
% \end{macro}
%
%
+%
% \changes{v1.1beta}{2011/12/15}{Redefinition of \protect\Cmd{newmdtheoremenv}.
% -- Now check of theorem definition.}
% \begin{macro}{newmdenv,renewmdenv,newmdtheoremenv,mdtheorem}
@@ -2974,18 +3014,19 @@ Have fun!
because the splittet box is empty\MessageBreak
You have to change the page settings\MessageBreak
like enlargethispage or something else}%
- \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@two%
- %benoetigt um Tiefe zu haben
- \hrule \@height\dp\strutbox \@width\z@
- \unvbox\mdf@splitbox@one}%
+ \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@two}%
\setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}%
\enlargethispage{\baselineskip}%
\def\mdf@reserved@a{\mdf@put@frame}%
\fi
\ifvoid\mdf@splitbox@two%%pruefe, ob erste Box leer ist
- \hrule \@height\z@ \@width\hsize
- %%\vfill\eject%
- \def\mdf@reserved@a{\mdf@put@frame}%
+ {\hrule \@height\f@size pt \@width\z@%
+ \hrule \@height\z@ \@width\hsize}%
+% \vfill\eject%
+% \vskip\baselineskip
+% {\hrule \@height\z@ \@width\hsize}
+ %
+ \def\mdf@reserved@a{\mdf@put@frame}%
\else
\ifdimequal{\ht\mdf@splitbox@two}{0pt}%
{\hrule \@height\z@ \@width\hsize%
@@ -3211,7 +3252,7 @@ Have fun!
%% Either version 1.0 or, at your option, any later version.
%%
%%
-%%$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
%
% \end{macrocode}
%
@@ -3221,7 +3262,7 @@ Have fun!
\def\mdframedOpackagename{md-frame-0}
\def\mdf@frameOdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space }
\ProvidesFile{md-frame-0.mdf}%
- [\mdf@frameOdate@svn$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $%
+ [\mdf@frameOdate@svn$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $%
\mdversion: \mdframedOpackagename]
% \end{macrocode}
% \end{macro}
@@ -3748,7 +3789,7 @@ Have fun!
%% Either version 1.0 or, at your option, any later version.
%%
%%
-%%$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
%
% \end{macrocode}
% \changes{v1.1beta}{2011/12/16}{added lost semicolons}
@@ -3758,7 +3799,7 @@ Have fun!
\def\mdframedIpackagename{md-frame-1}
\def\mdf@frameIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space }
\ProvidesFile{md-frame-1.mdf}%
- [\mdf@frameIdate@svn$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $ %
+ [\mdf@frameIdate@svn$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ %
\mdversion: \mdframedIpackagename]
%
% \end{macrocode}
@@ -3999,6 +4040,7 @@ Have fun!
\node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};% Ausgabebox einfuegen
\end{scope}
%HIER KOMMT EIN WEITERES MAKRO
+ \mdf@singleextra
\mdfcreateextratikz
\end{tikzpicture}%
}%
@@ -4228,6 +4270,7 @@ Have fun!
\node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};% Ausgabebox einfuegen
\end{scope}
%HIER KOMMT EIN WEITERES MAKRO
+ \mdf@firstextra
\mdfcreateextratikz%
\end{tikzpicture}%
}%
@@ -4413,6 +4456,7 @@ Have fun!
\drawbrackgroundframetitle@middle
\node[mdfbox]at(\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@two};% Ausgabebox einfuegen
\end{scope}
+ \mdf@middleextra
%HIER KOMMT EIN WEITERES MAKRO
\mdfcreateextratikz
\end{tikzpicture}%
@@ -4594,6 +4638,7 @@ Have fun!
\drawbrackgroundframetitle@second
\node[mdfbox] at (\mdf@Ax,\mdf@Ay){\box\mdf@splitbox@one};% Ausgabebox einfuegen
\end{scope}
+ \mdf@secondextra
%HIER KOMMT EIN WEITERES MAKRO
\mdfcreateextratikz
\end{tikzpicture}%
@@ -4627,7 +4672,7 @@ Have fun!
%% Either version 1.0 or, at your option, any later version.
%%
%%
-%%$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
%
% \end{macrocode}
%
@@ -4637,7 +4682,7 @@ Have fun!
\def\mdframedIIpackagename{md-frame-2}
\def\mdf@frameIIdate@svn$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space }
\ProvidesFile{md-frame-2.mdf}%
- [\mdf@frameIIdate@svn$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $ %
+ [\mdf@frameIIdate@svn$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $ %
\mdversion: \mdframedIIpackagename]
% \end{macrocode}
% \end{macro}
@@ -4914,6 +4959,7 @@ Have fun!
% \psdot(mdf@O)\uput[90](mdf@O){mdf at O}
%
% \endpsclip
+ \mdf@singleextra
\end{pspicture}%
}%
\mdf@makeboxalign@right%
@@ -5099,6 +5145,7 @@ Have fun!
% \psdot(mdf@P)\uput[90](mdf@P){mdf at P}
% \psdot(mdf@O)\uput[90](mdf@O){mdf at O}
% \endpsclip
+ \mdf@firstextra
\end{pspicture}
}%
\mdf@makeboxalign@right%
@@ -5275,6 +5322,7 @@ Have fun!
% \psdot(mdf@A)\uput[90](mdf@A){mdf at A}
% \psdot(mdf@P)\uput[90](mdf@P){mdf at P}
% \psdot(mdf@O)\uput[90](mdf@O){mdf at O}
+ \mdf@middleextra
\end{pspicture}%
}%
\mdf@makeboxalign@right%
@@ -5449,6 +5497,7 @@ Have fun!
\drawbrackgroundframetitle@second
%output%
\rput[bl](mdf@A){\box\mdf@splitbox@one}
+ \mdf@secondextra
% \psdot(mdf@A)\uput[90](mdf@A){mdf at A}
% \psdot(mdf@P)\uput[90](mdf@P){mdf at P}
% \psdot(mdf@O)\uput[90](mdf@O){mdf at O}
@@ -5504,10 +5553,10 @@ Have fun!
%
% \begin{macrocode}
%Documenation of the package mdframed
-%%$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
\setcounter{errorcontextlines}{999}
\documentclass[parskip=false,english,11pt]{ltxmdf}
-\ltxmdfsetifoot $Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+\ltxmdfsetifoot $Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
\usepackage{showexpl}
\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},}
@@ -5518,7 +5567,7 @@ Have fun!
\title{The \Pack{mdframed} package}
\subtitle{Examples for \Opt{framemethod=\Loadedframemethod}}
\author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}}
-\date{\mdfdateID$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $}
+\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $}
\version{\mdversion}
\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}.
Some presented examples are more or less exorbitant.}
@@ -5721,10 +5770,10 @@ The example below is inspired by the following post on StackExchange \href{http:
%
% \begin{macrocode}
%Documenation of the package mdframed
-%%$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
\setcounter{errorcontextlines}{999}
\documentclass[parskip=false,english,11pt]{ltxmdf}
-\ltxmdfsetifoot $Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+\ltxmdfsetifoot $Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
\usepackage{showexpl}
@@ -5736,7 +5785,7 @@ The example below is inspired by the following post on StackExchange \href{http:
\title{The \Pack{mdframed} package}
\subtitle{Examples for \Opt{framemethod=\Loadedframemethod}}
\author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}}
-\date{\mdfdateID$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $}
+\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $}
\version{\mdversion}
\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}.
Some presented examples are more or less exorbitant.}
@@ -5833,99 +5882,50 @@ function of the independent variables alone.
\begin{tltxmdfexample}
\tikzstyle{titregris} =
- [draw=gray, thick, fill=white, shading = exersicetitle, %
- text=gray, rectangle, rounded corners,
- right,minimum height=.7cm]
+ [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)}
+ {color(0bp)=(green!40); color(100bp)=(black!5)}
\pgfdeclarehorizontalshading{exersicetitle}{100bp}
-{color(0bp)=(red!40);
-color(100bp)=(black!5)}
+ {color(0bp)=(red!40);color(100bp)=(black!5)}
\newcounter{exercise}
-\renewcommand\theexercise{Exercise~n\arabic{exercise}}
+\renewcommand*\theexercise{Exercise~n\arabic{exercise}}
\makeatletter
-\def\mdf@@exercisepoints{}
+\def\mdf@@exercisepoints{}%new mdframed key:
\define@key{mdf}{exercisepoints}{%
\def\mdf@@exercisepoints{#1}
}
-\renewrobustcmd\mdfcreateextratikz{%
- \node[titregris,xshift=1cm] at (P-|O) %
- {~\mdf@frametitlefont{\theexercise}~};
- \ifdefempty{\mdf@@exercisepoints}%
- {}%
- {\node[titregris,left,xshift=-1cm] at (P)%
- {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}%
-}
\makeatother
\mdfdefinestyle{exercisestyle}{%
- outerlinewidth=1pt,
- innerlinewidth=0pt,
- roundcorner=2pt,
- linecolor=gray,
+ outerlinewidth=1pt,innerlinewidth=0pt,
+ roundcorner=2pt,linecolor=gray,
tikzsetting={shading = exersicebackground},
innertopmargin=1.2\baselineskip,
skipabove={\dimexpr0.5\baselineskip+\topskip\relax},
needspace=3\baselineskip,
frametitlefont=\sffamily\bfseries,
settings={\global\stepcounter{exercise}},
- }
-
-\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{}
-\define@key{mdf}{exercisepoints}{%
- \def\mdf@@exercisepoints{#1}
-}
-\newrobustcmd\mdfcreateextratikzlocal{%
- \node[titregris,xshift=1cm] at (P-|O) {~\textbf{\theexercise}~};
+ singleextra={%
+ \node[titregris,xshift=1cm] at (P-|O) %
+ {~\mdf@frametitlefont{\theexercise}~};
+ \ifdefempty{\mdf@@exercisepoints}%
+ {}%
+ {\node[titregris,left,xshift=-1cm] at (P)%
+ {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}%
+ },
+ firstextra={%
+ \node[titregris,xshift=1cm] at (P-|O) %
+ {~\mdf@frametitlefont{\theexercise}~};
\ifdefempty{\mdf@@exercisepoints}%
{}%
{\node[titregris,left,xshift=-1cm] at (P)%
{~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}%
+ },
}
-\makeatother
-
-\mdfdefinestyle{exercisestyle}{%
- outerlinewidth=1pt,
- innerlinewidth=0pt,
- roundcorner=2pt,
- linecolor=gray,
- tikzsetting={shading = exersicebackground},
- innertopmargin=1.2\baselineskip,
- skipabove={\dimexpr0.5\baselineskip+\topskip\relax},
- needspace=3\baselineskip,
- frametitlefont=\sffamily\bfseries,
- settings={\global\stepcounter{exercise}\let\mdfcreateextratikz\mdfcreateextratikzlocal},
- }
-
\begin{mdframed}[style=exercisestyle,]
\ExampleText
\end{mdframed}
@@ -5933,7 +5933,7 @@ color(100bp)=(black!5)}
\begin{mdframed}[style=exercisestyle,exercisepoints=10]
\ExampleText
\end{mdframed}
-
+\end{tltxmdfexample}
\clearpage
\Examplesec{Theorem environments}
\begin{LTXexample}
@@ -5975,10 +5975,10 @@ color(100bp)=(black!5)}
%
% \begin{macrocode}
%Documenation of the package mdframed
-%%$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
\setcounter{errorcontextlines}{999}
\documentclass[parskip=false,english,11pt]{ltxmdf}
-\ltxmdfsetifoot$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+\ltxmdfsetifoot$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
\lstDeleteShortInline{|}
\newcommand\Loadedframemethod{PSTricks}
@@ -5990,7 +5990,7 @@ color(100bp)=(black!5)}
\title{The \Pack{mdframed} package}
\subtitle{Examples for \Opt{framemethod=\Loadedframemethod}}
\author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}}
-\date{\mdfdateID$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $}
+\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $}
\version{\mdversion}
\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}.
Some presented examples are more or less exorbitant.}
@@ -6117,22 +6117,23 @@ function of the independent variables alone.
% \begin{macrocode}
%Documenation of the package mdframed
-%%$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+%%$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
\setcounter{errorcontextlines}{999}
\documentclass[parskip=false,english,11pt,ltxlipsum]{ltxmdf}
-\ltxmdfsetifoot $Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $
+\ltxmdfsetifoot $Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $
\usepackage{showexpl}
\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},}
-
-\newcommand\Loadedframemethod{default}
+\usepackage{tikz}
+\usetikzlibrary{calc,arrows}
+\newcommand\Loadedframemethod{tikz}
\usepackage[framemethod=\Loadedframemethod]{mdframed}
\title{The \Pack{mdframed} package}
\subtitle{Examples for \Opt{framemethod=\Loadedframemethod}}
\author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}}
-\date{\mdfdateID$Id: mdframed.dtx 362 2012-03-30 06:55:35Z marco $}
+\date{\mdfdateID$Id: mdframed.dtx 375 2012-04-08 10:52:22Z marco $}
\version{\mdversion}
\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}.
Some presented examples are more or less exorbitant.}
@@ -6249,6 +6250,112 @@ Text Text Text Text Text Text Text Text
\end{enumerate}
Text Text Text Text Text Text
\end{LTXexample}
+\clearpage
+\Examplesec{digression-environement inspired by Tobias Schwan}
+\begin{lstlisting}
+\usetikzlibrary{calc,arrows}
+\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{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{document}
\endinput
% \end{macrocode}