summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-06-23 23:43:14 +0000
committerKarl Berry <karl@freefriends.org>2013-06-23 23:43:14 +0000
commit0ade4baaa2b1857abfa6b1385ca4a72b9c68a08b (patch)
tree8e34059b97843eedf3e5760dff025d89d19a98de /Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex
parentf42dda28c8d669e48f9adcba4a7809d26e210bea (diff)
mdframed (23jun13)
git-svn-id: svn://tug.org/texlive/trunk@30868 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex')
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex88
1 files changed, 54 insertions, 34 deletions
diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex
index 9f202f496d6..2a2d4156f17 100644
--- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex
+++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex
@@ -1,12 +1,33 @@
+
\setcounter{errorcontextlines}{999}
\documentclass[parskip=false,english,11pt]{ltxmdf}
-\usepackage{showexpl}
-\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},}
+\lstset{style=lstltxmdf}
\newcommand\Loadedframemethod{default}
\usepackage[framemethod=\Loadedframemethod]{mdframed}
+\surroundwithmdframed[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,%
+ roundcorner=10pt,innertopmargin=0pt,%
+ leftmargin=1cm,rightmargin=1cm,%
+ innerleftmargin=-15pt,innerrightmargin=-15pt,%
+ ignorelastdescenders,%
+ settings={\lstset{resetmargins}},%
+ skipbelow=\topskip,skipabove=\topskip,%
+ innerbottommargin=0pt,backgroundcolor=gray!10]%
+ {tltxmdfexample}
+
+\newmdenv[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,%
+ roundcorner=10pt,innertopmargin=0pt,%
+ leftmargin=1cm,rightmargin=1cm,%
+ innerleftmargin=-15pt,innerrightmargin=-15pt,%
+ ignorelastdescenders,%
+ settings={\lstset{resetmargins}},%
+ skipbelow=\topskip,skipabove=\topskip,%
+ innerbottommargin=0pt,backgroundcolor=gray!10]%
+ {tltxmdfhighlight}
+\def\highlightinputenv{tltxmdfhighlight}
+
\title{The \Pack{mdframed} package}
\subtitle{Examples for \Opt{framemethod=\Loadedframemethod}}
\author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}}
@@ -43,8 +64,8 @@ In the preamble only the package \Pack{mdframed} with the option
done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}.
{\large\color{red!50!black}
-\NOTE Every \Cmd{global} inside the examples is necessary to work with the
-package \Pack{showexpl}.}
+\NOTE Every \Cmd{global} inside the examples is necessary to work with my own
+created environment \Env{tltxmdfexample*}.}
\section{Examples}
All examples have the following settings:
@@ -52,19 +73,19 @@ All examples have the following settings:
\begin{tltxmdfexample}
\mdfsetup{skipabove=\topskip,skipbelow=\topskip}
\newrobustcmd\ExampleText{%
-An \textit{inhomogeneous linear} differential equation
-has the form
-\begin{align}
-L[v ] = f,
-\end{align}
-where $L$ is a linear differential operator, $v$ is
-the dependent variable, and $f$ is a given non-zero
-function of the independent variables alone.
+ An \textit{inhomogeneous linear} differential equation has the form
+ \begin{align}
+ L[v ] = f,
+ \end{align}
+ where $L$ is a linear differential operator, $v$ is the dependent
+ variable, and $f$ is a given non-zero function of the independent
+ variables alone.
}
\end{tltxmdfexample}
+
\clearpage
\Examplesec{very simple}
-\begin{LTXexample}
+\begin{tltxmdfexample*}
\global\mdfdefinestyle{exampledefault}{%
linecolor=red,linewidth=3pt,%
leftmargin=1cm,rightmargin=1cm
@@ -72,20 +93,19 @@ function of the independent variables alone.
\begin{mdframed}[style=exampledefault]
\ExampleText
\end{mdframed}
-\end{LTXexample}
+\end{tltxmdfexample*}
\Examplesec{hidden line + frame title}
-\begin{LTXexample}
+\begin{tltxmdfexample*}
\global\mdfapptodefinestyle{exampledefault}{%
topline=false,bottomline=false}
\begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}]
\ExampleText
\end{mdframed}
-\end{LTXexample}
-\clearpage
+\end{tltxmdfexample*}
\Examplesec{colored frame title}
-\begin{LTXexample}
+\begin{tltxmdfexample*}
\global\mdfapptodefinestyle{exampledefault}{%
rightline=true,innerleftmargin=10,innerrightmargin=10,
@@ -95,21 +115,21 @@ function of the independent variables alone.
\begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}]
\ExampleText
\end{mdframed}
-\end{LTXexample}
+\end{tltxmdfexample*}
\Examplesec{framed picture which is centered}
-\begin{LTXexample}[morekeywords=width]
+\begin{tltxmdfexample*}[morekeywords=width]
\begin{mdframed}[userdefinedwidth=6cm,align=center,
linecolor=blue,linewidth=4pt]
-\IfFileExists{donald-duck.jpg}%
- {\includegraphics[width=\linewidth]{donald-duck}}%
+\textit{CTAN lion drawing by Duane Bibby; thanks to \url{www.ctan.org}}
+\IfFileExists{ctan-lion.png}%
+ {\includegraphics[width=\linewidth]{ctan-lion.png}}%
{\rule{\linewidth}{4cm}}%
\end{mdframed}
-\end{LTXexample}
+\end{tltxmdfexample*}
-\clearpage
\Examplesec{Theorem environments}
-\begin{LTXexample}[morekeywords={theoremstyle,definition}]
+\begin{tltxmdfexample*}[morekeywords={theoremstyle,definition}]
\mdfdefinestyle{theoremstyle}{%
linecolor=red,linewidth=2pt,%
frametitlerule=true,%
@@ -126,11 +146,10 @@ function of the independent variables alone.
\begin{definition*}[Inhomogeneous linear]
\ExampleText
\end{definition*}
-\end{LTXexample}
+\end{tltxmdfexample*}
-\clearpage
\Examplesec{theorem with separate header and the help of TikZ (complex)}
-\begin{LTXexample}[%
+\begin{tltxmdfexample*}[%
morekeywords={theo,baseline,anchor,outer,sep,current,bounding,box,east},%
moretexcs=tikz]
\newcounter{theo}[section]
@@ -161,15 +180,14 @@ function of the independent variables alone.
\begin{theo}
\ExampleText
\end{theo}
-\end{LTXexample}
+\end{tltxmdfexample*}
-\clearpage
\Examplesec{hide only a part of a line}
The example below is inspired by the following post on StackExchange
\href{http://tex.stackexchange.com/questions/24101/theorem-decorations^^A
-that-stay-with-theorem-environment}%
{Theorem decorations that stay with theorem environment}
-\begin{LTXexample}[morekeywords={mdf@frame@leftline@single,mdf@frame@rightline@single,%
+\begin{tltxmdfexample*}[morekeywords={mdf@frame@leftline@single,mdf@frame@rightline@single,%
mdf@frame@leftline@first,mdf@frame@rightline@first,%
mdf@frame@leftline@second,mdf@frame@rightline@second,%
mdf@frame@leftline@middle,mdf@frame@rightline@middle,%
@@ -179,8 +197,10 @@ The example below is inspired by the following post on StackExchange
\newlength{\interruptlength}
\newrobustcmd\interruptrule[3]{%
\color{#1}%
- \hspace*{\dimexpr\mdfboundingboxwidth+\mdf@innerrightmargin@length\relax}%
- \rule[\dimexpr-\mdfboundingboxdepth+#2\interruptlength\relax]%
+ \hspace*{\dimexpr\mdfboundingboxwidth+
+ \mdf@innerrightmargin@length\relax}%
+ \rule[\dimexpr-\mdfboundingboxdepth+
+ #2\interruptlength\relax]%
{\mdf@middlelinewidth@length}%
{\dimexpr\mdfboundingboxtotalheight-#3\interruptlength\relax}%
}
@@ -206,6 +226,6 @@ The example below is inspired by the following post on StackExchange
\begin{mdframed}[linecolor=blue,linewidth=8pt]
\ExampleText
\end{mdframed}
-\end{LTXexample}
+\end{tltxmdfexample*}
\end{document}
\endinput