summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mdframed
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-05 00:16:23 +0000
committerKarl Berry <karl@freefriends.org>2011-09-05 00:16:23 +0000
commit45c6401dd15f7ce517e6798f2948e94148dcd8c3 (patch)
treedbca8c25cb7c90bea755773d5211f7d89ba32478 /Master/texmf-dist/doc/latex/mdframed
parentf5b4e2827c52206834b8c921b5a037c615b24f3a (diff)
mdframed (4sep11)
git-svn-id: svn://tug.org/texlive/trunk@23815 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/mdframed')
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/README12
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.pdfbin119439 -> 130982 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/mdframed-doc-en.tex202
3 files changed, 164 insertions, 50 deletions
diff --git a/Master/texmf-dist/doc/latex/mdframed/README b/Master/texmf-dist/doc/latex/mdframed/README
index 6aa1764b150..e477349dbbc 100644
--- a/Master/texmf-dist/doc/latex/mdframed/README
+++ b/Master/texmf-dist/doc/latex/mdframed/README
@@ -1,7 +1,7 @@
-%%$Id: README 165 2011-08-30 09:55:55Z marco $
-%%$Rev: 165 $
+%%$Id: README 173 2011-09-04 16:28:21Z marco $
+%%$Rev: 173 $
%%$Author: marco $
-%%$Date: 2011-08-30 11:55:55 +0200 (Di, 30. Aug 2011) $
+%%$Date: 2011-09-04 18:28:21 +0200 (So, 04. Sep 2011) $
Working with the command \fbox or \fcolorbox, one has to
handle page breaks by hand. The present package defines the
@@ -11,6 +11,12 @@ Author's name: Marco Daniel and Elke Schubert (!new)
License type: lppl
------------------------------------------------
+changes in version 0.9:
+- added option nobreak
+- detecting float environments to prevent split calculation
+- expand documentation (Thanks to Alan Munn)
+
+------------------------------------------------
changes in version 0.8a:
- fixes bugs
- fixes documentation
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 9b78f016c34..f064ed64171 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 6b8e6474740..71ae1a3b89f 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 165 2011-08-30 09:55:55Z marco $
-%%$Rev: 165 $
+%%$Id: mdframed-doc-en.tex 174 2011-09-04 17:25:41Z marco $
+%%$Rev: 174 $
%%$Author: marco $
%%$Dater:$
\setcounter{errorcontextlines}{999}
\documentclass[english,11pt,]{scrartcl}
%\usepackage{showframe}
\usepackage[nofancy,draft,notoday]{svninfo}
-\svnInfo $Id: mdframed-doc-en.tex 165 2011-08-30 09:55:55Z marco $
+\svnInfo $Id: mdframed-doc-en.tex 174 2011-09-04 17:25:41Z marco $
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
@@ -43,7 +43,7 @@
\usepackage[]{graphicx}
-\usepackage[style=1]{mdframed}
+\usepackage[style=1,]{mdframed}
\usepackage{xspace}
@@ -115,6 +115,9 @@ urlcolor=cyan,
bookmarksdepth=4,
}
%\usepackage{showframe}
+
+\newmdtheoremenv[linecolor=red]{lemma}{Lemma}[section]
+
\begin{document}
\thispagestyle{empty}
\begin{center}
@@ -127,21 +130,19 @@ bookmarksdepth=4,
\vspace*{.5\baselineskip}
\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}%
\footnote{With thanks to Heiko Oberdiek, Rolf Niepraschk,
- Martin Scharrer and Herbert Voss.},
+ Martin Scharrer and Herbert Voss.\newline Sorry for bad English.},
\href{mailto:marco.daniel@mada-nada.de}{Elke Schubert}%
\qquad \mdversion\ \qquad \today
\end{center}
\begin{abstract}
-Working with the command \mdcommand{fbox} or \mdcommand{fcolorbox}, one has to handle page breaks by hand, meaning that you have to split up the \mdcommand{fbox} into two. The present package defines the environment \mdname which automatically deals with page breaks, whence the name \glqq breakable\grqq.
-
+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.
\end{abstract}
\pdfbookmark[1]{\contentsname}{tocbook}
\tableofcontents
\section{Motivation}
-Many users wish to (further) emphasize lemmata, definitions, proofs etc. The package \mdname allows to
-create environments with breakable frames. I think an example is the best way to demonstrate the properties.
+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}
\newtheorem{mdtheorem}{Theorem}[section]
\newenvironment{theorem}{\begin{mdframed}%
@@ -188,11 +189,16 @@ The package defines only one environment with the following syntax:
\end{mdexample}
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
+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.
+
\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:
+In this way you can simply use:
\begin{mdexample}
\newmdenv[linecolor=red,frametitle=Infobox]{infobox}
...
@@ -202,7 +208,9 @@ In this way you can simple use:
\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:
+\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:
+
\begin{mdexample}
\newmdtheoremenv[<mdframed-options>]{<envname>}%
[<numberedlike>]{<caption>}[<within>]
@@ -217,11 +225,11 @@ The last four arguments are equivalent to the command \mdcommand{newtheorem}. On
foo foo foo foo foo foo
\end{lemma}
\end{mdexample}
-So far there are no \mdcommand{renewmdtheoremenv}!
+So far there is no \mdcommand{renewmdtheoremenv}!
\section{Options}
-The package allows to set global and local options which are explained below.
+The package allows the following global and local options:
\subsection{Global Options}
The following options are only global options.
@@ -244,7 +252,7 @@ depends on the \mdoption{style}. For further information see below.
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 header.
+you can use the command \mdcommand{mdfsetup} which is not limited to the preamble.
\subsubsection{Options with lengths}
@@ -310,8 +318,8 @@ 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[0pt]{splittopskip} Sets the length of the skip above the splitted part of the environment.
-\mdDescribeMacro[0pt]{splitbottomskip} Sets the length of the skip below the splitted part of the environment.
+\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}.}
@@ -349,15 +357,23 @@ 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{Useful options}
+\subsubsection{General options}
-\mdDescribeMacro[false]{ntheorem} Before setting this boolkey, you have to load the package \mdpack{ntheorem}.
+\mdDescribeMacro[false]{ntheorem} Before setting this boolean key, you have to load the package \mdpack{ntheorem}.
With this option you set the values \mdcommand{theorempreskipamount}
and\newline \mdcommand{theorempostskipamount} to 0pt.
+
+\mdDescribeMacro[false]{nobreak} Sometimes it is useful to prevent a frame from splitting. The \mdoption{nobreak} option is used for this purpose.
+
+%%\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.
+
+
\mdDescribeMacro[none]{pstrickssetting} With this key you can pass several options to \mdcommand{psset}. For example
if you want all lines dashed you will have to set
\mdoption{pstrickssetting=\{linestyle=dashed\}}. It is very important
@@ -367,7 +383,7 @@ the second one is a number (e.g. 2) which will be multiplied by \mdoption{1 defa
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}.
+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}.
\mdfsetup{skipabove=\baselineskip,skipbelow=\baselineskip}
\begin{mdexample}
\mdfsetup{outerlinewidth=5pt,innerlinewidth=0pt,
@@ -421,10 +437,10 @@ Some Text Some Text Some Text Some Text Some Text Some Text
Some Text Some Text Some Text Some Text Some Text Some Text
\end{mdframed}
\clearpage
-\twocolumn[\subsection{Working with twocolumn}]
-\lipsum[1]\lipsum[2]
+\twocolumn[\subsection{Working in twocolumn mode}]
+\lipsum[1]
\begin{mdframed}[leftmargin=10pt,rightmargin=10pt,outerlinecolor=blue,outerlinewidth=5pt,backgroundcolor=yellow]
-\lipsum[1]\lipsum[2]
+\lipsum[1]
\end{mdframed}
Some Text Some Text Some Text Some Text Some Text Some Text
%Some Text Some Text Some Text Some Text Some Text Some Text
@@ -436,16 +452,16 @@ Some Text Some Text Some Text Some Text Some Text Some Text
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
-but not for messages. So you should look in the \texttt{log-File}.
+but not for messages. So you should look in the \texttt{log-File} itself.
The followings errors and warnings are generated by \mdpack{mdframed}.
\begin{mdexample}
The package ... does not exist but
- it is required by mdframed
+ is required by mdframed
\end{mdexample}
To avoid this problem you should install the required
-package which are named in section \nameref{sec:syntax}.
+packages which are listed in section \ref{sec:syntax}.
\begin{mdexample}
The style number ... does not exist
@@ -465,8 +481,8 @@ load the package \mdpack{ntheorem}.
\begin{mdexample}
You have only a width of 3cm
\end{mdexample}
-The package \mdpack{mdframed} calculate the width of the contents
-by given options. If the width of the contents smaller then
+The package \mdpack{mdframed} calculates the width of the contents
+based on the given options. If the width of the contents smaller than
3\,cm you will get this warnings. You should change the
settings to get a greater width.
@@ -482,11 +498,11 @@ In this situation you will get this warning because the contents
of this box is empty. You have the possibility to change the
settings or include a \mdcommand{clearpage} in front of
the environment \mdpack{mdframed}.
-So far I have no idea to avoid such things.
+So far I have no idea how to avoid such things.
\begin{mdexample}
You got a bad break
- because the splittet box is empty
+ because the split box is empty
You have to change the page settings
like enlargethispage or something else
You got a bad break
@@ -495,7 +511,7 @@ See the explanation above.
\begin{mdexample}
You got a bad break
- because the last splittet box is empty
+ because the last split box is empty
You have to change the settings
\end{mdexample}
The same reason as above but only in the last box.
@@ -510,14 +526,14 @@ body you will get this warning.
\section{Known Problems}
In this section I will collect known problems. In case you encounter any further problems, please
- drop me an email, \href{mailto:marco.daniel@mada-nada.de}{marco.daniel'at'mada-nada.de}.
+ drop me an email, \href{mailto:marco.daniel@mada-nada.de}{marco.daniel at mada-nada.de}.
Do you have any ideas / wishes on further extensions to this package? Please let me know!
\begin{enumerate}
\item So far the environment isn't compatible with the package \mdpack{gmverb}.
\item So far it isn't possible to combine the environment \mdcommand{begin\{multicols\}} of the package \mdpack{multicol} with \mdpack{mdframed}.
- \item So far it isn't possible to use footnotes.
+ \item So far it isn't possible to use footnotes within a frame.
\end{enumerate}
@@ -527,21 +543,22 @@ body you will get this warning.
\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}
-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}.
+If you have trouble with the new version of \mdname you can load \texttt{mdframedpre} instead. In this way you load the version v0.6.
+%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{Acknowledgement}
+\section{Acknowledgements}
Thanks for the bug reports and suggestions
-\textsf{Dick Nickalls;\quad Dr. Dietrich Grau;\quad Piazza Luca}.
+\textsf{Dick Nickalls;\quad Dr. Dietrich Grau;\quad Piazza Luca\quad Jobst Hoffmann}.
\medskip
\noindent Thanks for proofreading
-\textsf{Nahid Shajari}.
-
+\textsf{Alan Munn} and \textsf{Nahid Shajari}
\clearpage
\appendix
\section{More information}
@@ -583,16 +600,19 @@ will be set sequently (done by \mdpack{md-frame-X.mdf}). The following figure de
\end{center}
The width of the contents is the result of the settings of \mdoption{leftmargin}, \mdoption{rightmargin}, \mdoption{linewidth}, \mdoption{innerleftmargin} and \mdoption{innerrightmargin} (see figure \eqref{fig:laengen}).
+
+
+
\subsection{The Framecommands}
The package \mdpack{mdframed} knows four kinds of \glqq Framecommand\grqq. These commands tell \LaTeX\ how to set the contents of \mdpack{mdframed}.
\begin{description}
- \item[\mdcommand{md@putbox@single}] This command sets the contents of a single non-splitted frame.
- \item[\mdcommand{md@putbox@first}] This command sets the contents of the first frame of a splitted frame.
- \item[\mdcommand{md@putbox@middle}] This command sets the contents of the middle frame of a splitted frame.
- \item[\mdcommand{md@putbox@second}] This command sets the contents of the last frame of a splitted frame.
+ \item[\mdcommand{md@putbox@single}] This command sets the contents of a single unspliot frame.
+ \item[\mdcommand{md@putbox@first}] This command sets the contents of the first frame of a split frame.
+ \item[\mdcommand{md@putbox@middle}] This command sets the contents of the middle frame of a split frame.
+ \item[\mdcommand{md@putbox@second}] This command sets the contents of the last frame of a split frame.
\end{description}
-Uses the explained commands we give an example. The command \mdcommand{box} use the contents of the savebox and types them out.
+Using the explained commands we give an example. The command \mdcommand{box} uses the contents of the savebox and types them out.
First we want to type out the single box without any settings (but with the calculated width).
\begin{mdexample}
@@ -607,12 +627,11 @@ I am using the command \mdcommand{leftline} to start the \glqq Framecommands\grq
\makeatother
\end{mdexample}
-Now you have to know how the lengths are named. Every length which can be modified by the options has the following syntax
+Now you have to know how the lengths are named. Every length which can be modified by the options has the following syntax:
\begin{mdexample}
-\mdf@'Name of the Length'@length
+\mdf@<Name of the Length>@length
\end{mdexample}
-For example the leftmargin is
-
+For example the leftmargin is:
\begin{mdexample}
\mdf@leftmargin@length
\end{mdexample}
@@ -638,6 +657,95 @@ 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}.
+\subsection{Modify the frame}
-\end{document}
+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}
+First I will show the the result.
+\makeatletter
+\newlength{\interruptlength}
+\setlength{\interruptlength}{2.5ex}
+\newrobustcmd\overlaplines{%
+ \input{md-frame-0.mdf}%
+ \appto\md@frame@leftline@single{%
+ \llap{\color{white}%
+ \rule[-\dp\@tempboxa-\mdf@innerbottommargin@length%
+ -\mdf@middlelinewidth@length+\interruptlength]%
+ {\mdf@middlelinewidth@length}%
+ {\mdfboundingboxheight%
+ +2\mdf@middlelinewidth@length
+ -2\interruptlength}%
+ }%
+ }%
+ \appto\md@frame@rightline@single{%
+ \rlap{\color{white}%
+ \hspace*{\mdfboundingboxwidth}%
+ \hspace*{\mdf@innerrightmargin@length}%
+ \rule[-\dp\@tempboxa-\mdf@innerbottommargin@length%
+ -\mdf@middlelinewidth@length+\interruptlength]%
+ {\mdf@middlelinewidth@length}
+ {\mdfboundingboxheight%
+ +2\mdf@middlelinewidth@length%
+ -2\interruptlength}%
+ }%
+ }%
+}
+\overlaplines
+\newmdtheoremenv[style=0,ntheorem,linecolor=blue,linewidth=3pt]{lem}{Lemma}[section]
+\makeatother
+
+
+
+\begin{lem}
+\lipsum[1]
+\end{lem}
+
+You can see how the lines on the left and the right are interrupted. Now I will show the code.
+
+I define a command which draws white lines on the left and the right side in the same way as in the style file. For this example I must include the file \texttt{md-frame-1.mdf} because this document used the global style 1.
+
+With the new length \mdcommand{interruptlength} you can manipulate the amount of overlap.
+
+\begin{mdexample}
+\newlength{\interruptlength}
+\setlength{\interruptlength}{1.5ex}
+\makeatletter
+\makeatletter
+\newlength{\interruptlength}
+\setlength{\interruptlength}{2.5ex}
+\newrobustcmd\overlaplines{%
+ \input{md-frame-0.mdf}%
+ \appto\md@frame@leftline@single{%
+ \llap{\color{white}%
+ \rule[-\dp\@tempboxa
+ -\mdf@innerbottommargin@length%
+ -\mdf@middlelinewidth@length
+ +\interruptlength]%
+ {\mdf@middlelinewidth@length}%
+ {\mdfboundingboxheight%
+ +2\mdf@middlelinewidth@length
+ -2\interruptlength}%
+ }%
+ }%
+ \appto\md@frame@rightline@single{%
+ \rlap{\color{white}%
+ \hspace*{\mdfboundingboxwidth}%
+ \hspace*{\mdf@innerrightmargin@length}%
+ \rule[-\dp\@tempboxa
+ -\mdf@innerbottommargin@length%
+ -\mdf@middlelinewidth@length
+ +\interruptlength]%
+ {\mdf@middlelinewidth@length}
+ {\mdfboundingboxheight%
+ +2\mdf@middlelinewidth@length%
+ -2\interruptlength}%
+ }%
+ }%
+}
+\overlaplines
+\newmdtheoremenv[style=0,ntheorem,linecolor=blue,%
+ linewidth=3pt]{lem}{Lemma}[section]
+\makeatother
+\end{mdexample}
+
+\end{document}