summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-24 00:07:53 +0000
committerKarl Berry <karl@freefriends.org>2011-08-24 00:07:53 +0000
commit8fa06123182d0d5e84819a4bf9c42c42b3091170 (patch)
treeb76a60f32a6daaa8b9c6f67c8808c663d353ff9c /Master
parent10322a6edc9530dda41f6d12e340caf7b3d6cd9a (diff)
mdframed 0.8 (23aug11)
git-svn-id: svn://tug.org/texlive/trunk@23665 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/README11
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.pdfbin109985 -> 118207 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.tex48
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf9
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf10
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf9
-rw-r--r--Master/texmf-dist/tex/latex/mdframed/mdframed.sty89
7 files changed, 151 insertions, 25 deletions
diff --git a/Master/texmf-dist/doc/latex/mdframed/README b/Master/texmf-dist/doc/latex/mdframed/README
index bad18c08572..a58aa2823aa 100644
--- a/Master/texmf-dist/doc/latex/mdframed/README
+++ b/Master/texmf-dist/doc/latex/mdframed/README
@@ -1,7 +1,7 @@
-%%$Id: README 161 2011-08-06 11:28:15Z marco $
-%%$Rev: 161 $
+%%$Id: README 164 2011-08-22 19:09:15Z marco $
+%%$Rev: 164 $
%%$Author: marco $
-%%$Date: 2011-08-06 13:28:15 +0200 (Sa, 06. Aug 2011) $
+%%$Date: 2011-08-22 21:09:15 +0200 (Mo, 22. Aug 2011) $
Working with the command \fbox or \fcolorbox, one has to
handle page breaks by hand. The present package defines the
@@ -10,6 +10,11 @@ environment mdframed which automatically deals with page breaks.
Author's name: Marco Daniel and Elke Schubert (!new)
License type: lppl
+------------------------------------------------
+changes in version 0.8:
+- added commands: \newmdenv, \renewmdenv, \newmdtheoremenv
+- fixes bugs
+- fixes documentation
------------------------------------------------
changes in version 0.7a:
diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.pdf
index e55a5146ebe..803ef3414ef 100644
--- a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.pdf
+++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.pdf
Binary files differ
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 a94ae0ff3a1..a38344d493e 100644
--- a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.tex
+++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.tex
@@ -1,13 +1,13 @@
%Documenation of the package mdframed
-%%$Id: mdframed-doc-en.tex 160 2011-08-06 10:31:55Z marco $
-%%$Rev: 160 $
+%%$Id: mdframed-doc-en.tex 163 2011-08-22 19:08:00Z marco $
+%%$Rev: 163 $
%%$Author: marco $
%%$Dater:$
\setcounter{errorcontextlines}{999}
\documentclass[english,11pt,]{scrartcl}
%\usepackage{showframe}
\usepackage[nofancy,draft,notoday]{svninfo}
-\svnInfo $Id: mdframed-doc-en.tex 160 2011-08-06 10:31:55Z marco $
+\svnInfo $Id: mdframed-doc-en.tex 163 2011-08-22 19:08:00Z marco $
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
@@ -96,6 +96,11 @@
\newcommand*{\mdDefault}[1]{%
\ifx\relax#1\relax\else\marginpar{\small\mdsetting{default=#1}}\fi}
+\newcommand*\mdDescribeCmd[2][]{\par\kern\baselineskip%
+ \noindent\llap{%
+ \textsf{\bfseries\color{titleblue}\textbackslash #2}%
+ \quad}{#1}\ignorespaces}
+
\usepackage{pst-node}
\usepackage{pstricks-add}
@@ -181,6 +186,40 @@ The package defines only one environment with the following syntax:
<CONTENT>
\end{mdframed}
\end{mdexample}
+
+With version 0.8 you have two commands to create environments with \mdpack{mdframed}.
+\mdDescribeCmd[]{newmdenv} The command has the following syntax:
+\begin{mdexample}
+\newmdenv[<MDFRAMED OPTIONS>]{Name of the environment}
+\end{mdexample}
+In this way you can simple use:
+\begin{mdexample}
+ \newmdenv[linecolor=red,frametitle=Infobox]{infobox}
+ ...
+ \begin{infobox}[backgroundcolor=yellow]
+ foo foo foo foo foo foo
+ \end{infobox}
+\end{mdexample}
+\mdDescribeCmd[]{renewmdenv} By using this command you can redifine environments which are created by \mdcommand{newmdenv}.
+
+\mdDescribeCmd[]{newmdtheoremenv} Very often the package is used to highlight theorem environments. So I create a command\footnote{Thanks to Martin Scharrer:\newline \url{http://tex.stackexchange.com/questions/26298/own-command-to-create-new-environment}} to simplify this process. The command hast the following syntax:
+\begin{mdexample}
+\newmdtheoremenv[<mdframed-options>]{<envname>}%
+ [<numberedlike>]{<caption>}[<within>]
+\end{mdexample}
+The last four arguments are equivalent to the command \mdcommand{newtheorem}. Only the first optional argument is able to pass \mdpack{mdframed}-options. A simple example is:
+\begin{mdexample}
+\theoremstyle{<some style>}
+\newmdtheoremenv[linecolor=blue]{lemma}%
+ {Lemma}[section]
+...
+\begin{lemma}[Some title]
+ foo foo foo foo foo foo
+\end{lemma}
+\end{mdexample}
+
+
+
\section{Options}
The package allows to set global and local options which are explained below.
@@ -324,6 +363,9 @@ the second one is a number (e.g. 2) which will be multiplied by \mdoption{1 defa
\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}.}
+\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}.}
\section{Examples}
Now I present some examples. Of course I know that some of them are only gimmick. To create the following examples I am using \mdoption{style=1}.
\mdfsetup{skipabove=\baselineskip,skipbelow=\baselineskip}
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 88e4c87560b..a05479bb8dd 100644
--- a/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf
+++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-0.mdf
@@ -8,15 +8,16 @@
%% 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 161 2011-08-06 11:28:15Z marco $
-%%$Rev: 161 $
+%%$Id: md-frame-0.mdf 163 2011-08-22 19:08:00Z marco $
+%%$Rev: 163 $
%%$Author: marco $
-%%$Date: 2011-08-06 13:28:15 +0200 (Sa, 06. Aug 2011) $
+%%$Date: 2011-08-22 21:08:00 +0200 (Mo, 22. Aug 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 161 2011-08-06 11:28:15Z marco $ \mdversion: \mdframedOpackagename]
+\ProvidesFile{md-frame-0.mdf}[\md@frameOdate@svn$Id: md-frame-0.mdf 163 2011-08-22 19:08:00Z 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 1359a2e7c3f..b9ce492e339 100644
--- a/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf
+++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-1.mdf
@@ -8,15 +8,15 @@
%% 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 161 2011-08-06 11:28:15Z marco $
-%%$Rev: 161 $
+%%$Id: md-frame-1.mdf 163 2011-08-22 19:08:00Z marco $
+%%$Rev: 163 $
%%$Author: marco $
-%%$Date: 2011-08-06 13:28:15 +0200 (Sa, 06. Aug 2011) $
+%%$Date: 2011-08-22 21:08:00 +0200 (Mo, 22. Aug 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 161 2011-08-06 11:28:15Z marco $ \mdversion: \mdframedIpackagename]
+\ProvidesFile{md-frame-1.mdf}[\md@frameIdate@svn$Id: md-frame-1.mdf 163 2011-08-22 19:08:00Z marco $ \mdversion: \mdframedIpackagename]
%%%% _____t_____
%%%% | |
@@ -89,7 +89,7 @@
\ifdimgreater{\mdf@middlelinewidth@length}{\z@}% nur wenn middlelinewidth>0 wird mittlere Linie gezeichnet
{\tikzset{mdfmiddleline/.append style={%
preaction={draw=\mdf@middlelinecolor,line width=\mdf@middlelinewidth@length},%
- line width=\mdf@middlelinewidth@length,
+ line width=\mdf@middlelinewidth@length,%
tikzsetting}}%
}{}%
}%
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 4e26413d546..9168bc0903a 100644
--- a/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf
+++ b/Master/texmf-dist/tex/latex/mdframed/md-frame-3.mdf
@@ -8,10 +8,10 @@
%% 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 161 2011-08-06 11:28:15Z marco $
-%%$Rev: 161 $
+%%$Id: md-frame-3.mdf 163 2011-08-22 19:08:00Z marco $
+%%$Rev: 163 $
%%$Author: marco $
-%%$Date: 2011-08-06 13:28:15 +0200 (Sa, 06. Aug 2011) $
+%%$Date: 2011-08-22 21:08:00 +0200 (Mo, 22. Aug 2011) $
%%Allgemeine Einstellungen fuer pstricks
@@ -20,7 +20,7 @@
\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 161 2011-08-06 11:28:15Z marco $ \mdversion: \mdframedIIIpackagename]
+\ProvidesFile{md-frame-3.mdf}[\md@frameIIIdate@svn$Id: md-frame-3.mdf 163 2011-08-22 19:08:00Z marco $ \mdversion: \mdframedIIIpackagename]
\def\md@ptlength@to@pscode#1{\pst@number{#1} \pst@number\psxunit div}
\let\ptTps\md@ptlength@to@pscode\relax
@@ -60,6 +60,7 @@
\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========================%%
%%==================================================%%
diff --git a/Master/texmf-dist/tex/latex/mdframed/mdframed.sty b/Master/texmf-dist/tex/latex/mdframed/mdframed.sty
index ee5ab20348c..78f9111df6b 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 161 2011-08-06 11:28:15Z marco $
-%%$Rev: 161 $
+%%$Id: mdframed.sty 163 2011-08-22 19:08:00Z marco $
+%%$Rev: 163 $
%%$Author: marco $
-%%$Date: 2011-08-06 13:28:15 +0200 (Sa, 06. Aug 2011) $
+%%$Date: 2011-08-22 21:08:00 +0200 (Mo, 22. Aug 2011) $
%% Allgemeine Angaben
-\def\mdversion{v0.7a}
+\def\mdversion{v0.8}
\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 161 2011-08-06 11:28:15Z marco $ \mdversion: \mdframedpackagename]
+\ProvidesPackage{mdframed}[\md@maindate@svn$Id: mdframed.sty 163 2011-08-22 19:08:00Z marco $ \mdversion: \mdframedpackagename]
%%==================================================%%
%%=============== Benoetigte Pakete ================%%
@@ -241,14 +241,91 @@
\def\md@endparenv{%
\addpenalty\@endparpenalty\addvspace\mdf@skipbelow@length\@endpetrue}
+
+
+%%==================================================%%
+%%=============Umgebungdefinition===================%%
+%%==================================================%%
+%\newmdenv[<mdframed-options>]{<environmen>}
+\newrobustcmd*\newmdenv[2][]{%
+ \newenvironment{#2}{%
+ \mdfsetup{#1}%
+ \begin{mdframed}%
+ }{%
+ \end{mdframed}%
+ }%
+}
+%\renewmdenv[<mdframed-options>]{<environmen>}
+\newrobustcmd*\renewmdenv[2][]{%
+ \expandafter\let\csname #2\endcsname\relax%
+ \expandafter\let\csname end#2\endcsname\relax%
+ \newmdenv[#1]{#2}%
+ }%
+
+%http://tex.stackexchange.com/questions/26298/own-command-to-create-new-environment
+%\newtheorem{<envname>}[<numberedlike>]{<caption>}[<within>]
+%\newmdtheoremenv[<mdframed-options>]{<envname>}[<numberedlike>]{<caption>}[<within>]
+%\md@tempa[<mdframed-options>]
+%\md@tempb{<envname>}%
+%\md@tempc[<numberedlike>]%
+%\md@tempd{<caption>}%
+%\md@tempe[<within>]%
+\newrobustcmd*\newmdtheoremenv[2][]{%
+ \kernel@ifnextchar[%]
+ {\newmdtheoremenv@i}{\newmdtheoremenv@i[]}%
+}
+\def\newmdtheoremenv@i[#1]#2{%
+ \def\md@tempa{#1}%
+ \def\md@tempb{#2}%
+ \kernel@ifnextchar[%]
+ {\newmdtheoremenv@ii}{\newmdtheoremenv@ii[]}%
+}
+
+\def\newmdtheoremenv@ii[#1]#2{%
+ \def\md@tempc{#1}%
+ \def\md@tempd{#2}%
+ \kernel@ifnextchar[%]
+ {\newmdtheoremenv@iii}{\newmdtheoremenv@iii[]}%
+}
+
+\def\newmdtheoremenv@iii[#1]{%
+ \def\md@tempe{#1}%
+ \ifboolexpr{ not (test {\ifdefempty{\md@tempc}})
+ and
+ not (test {\ifdefempty{\md@tempe}})
+ }{%
+ \md@PackageWarning{You defined {\string\newtheorem} with ^^J
+ both optional arguments^^J
+ <numeredlike> and <within>. This isn't allowed^^J
+ \mdframedpackagename will use <numeredlike>\MessageBreak}%
+ \newtheorem{\csname md\md@tempb \endcsname}[\md@tempc]{\md@tempd}%
+ }%
+ {\ifdefempty{\md@tempc}{}{\newtheorem{md\md@tempb}[\md@tempc]{\md@tempd}}%
+ \ifdefempty{\md@tempe}{}{\newtheorem{md\md@tempb}{\md@tempd}[\md@tempe]}%
+ }%
+ \ifboolexpr{test {\ifdefempty{\md@tempc}}
+ and
+ test {\ifdefempty{\md@tempe}}
+ }{%
+ \newtheorem{md\md@tempb}{\md@tempd}%
+ }{}%
+ \expandafter\protected@xdef\csname\md@tempb\endcsname{\noexpand\mdfsetup{\md@tempa}%
+ \noexpand\begin{mdframed}[]\noexpand\begin{md\md@tempb}%
+ }%
+ \expandafter\protected@xdef\csname end\md@tempb\endcsname{%
+ \noexpand\end{md\md@tempb}\noexpand\end{mdframed}%
+ }%
+}
+
%%==================================================%%
%%=================== Frametitle ===================%%
%%==================================================%%
+\let\mdraggedtitle\raggedright
\providecommand*\mdframedtitleenv[1]{%
\@afterindentfalse
{\parindent \z@
\setlength{\parfillskip}{\z@ plus 1fil}%
- \raggedsection\nobreak\mdf@frametitlefont#1\relax%
+ \mdraggedtitle\nobreak\mdf@frametitlefont#1\relax%
\par}%
\@afterheading}
%