summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex')
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex98
1 files changed, 75 insertions, 23 deletions
diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex
index de0825c52f1..fcb53648071 100644
--- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex
+++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-tikz.tex
@@ -1,8 +1,5 @@
-%%$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $
\setcounter{errorcontextlines}{999}
\documentclass[parskip=false,english,11pt]{ltxmdf}
-\GetIdInfo$Id: mdframed.dtx 426 2012-06-02 12:18:56Z marco $
- {documentation of mdframed}
\usepackage{showexpl}
\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},}
@@ -13,7 +10,7 @@
\title{The \Pack{mdframed} package}
\subtitle{Examples for \Opt{framemethod=\Loadedframemethod}}
\author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}}
-\date{\ExplFileDate}
+\date{\mdfmaindate}
\version{\mdversion}
\introduction{In this document I collect various examples for
\Opt{framemethod=\Loadedframemethod}.
@@ -66,7 +63,7 @@ function of the independent variables alone.
}
\end{tltxmdfexample}
\clearpage
-\ExampleText{round corner}
+\Examplesec{round corner}
\begin{LTXexample}
\global\mdfdefinestyle{exampledefault}{%
outerlinewidth=5pt,innerlinewidth=0pt,
@@ -80,7 +77,7 @@ function of the independent variables alone.
\Examplesec{hidden line + frame title}
\begin{LTXexample}
\global\mdfapptodefinestyle{exampledefault}{%
- topline=false,leftline=false,}
+ topline=false,leftline=false,}
\begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}]
\ExampleText
\end{mdframed}
@@ -97,7 +94,7 @@ function of the independent variables alone.
\end{LTXexample}
\Examplesec{Gimmick}
-\begin{LTXexample}
+\begin{LTXexample}[morekeywords={line,width,dash,dashed,pattern}]
\mdfsetup{splitbottomskip=0.8cm,splittopskip=0cm,
innerrightmargin=2cm,innertopmargin=1cm,%
innerlinewidth=2pt,outerlinewidth=2pt,
@@ -112,19 +109,17 @@ function of the independent variables alone.
\end{mdframed}
\end{LTXexample}
+\clearpage
\Examplesec{complex example with TikZ}
-\begin{tltxmdfexample}
+\begin{tltxmdfexample}[morekeywords={mdf}]
\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
@@ -132,50 +127,107 @@ function of the independent variables alone.
\define@key{mdf}{exercisepoints}{%
\def\mdf@@exercisepoints{#1}
}
+\mdfdefinestyle{exercisestyle}{%
+ outerlinewidth=1em,outerlinecolor=white,%
+ leftmargin=-1em,rightmargin=-1em,%
+ middlelinewidth=1.2pt,roundcorner=5pt,linecolor=gray,
+ apptotikzsetting={\tikzset{mdfbackground/.append style ={%
+ shading = exersicebackground}}},
+ innertopmargin=1.2\baselineskip,
+ skipabove={\dimexpr0.5\baselineskip+\topskip\relax},
+ skipbelow={-1em},
+ needspace=3\baselineskip,
+ frametitlefont=\sffamily\bfseries,
+ settings={\global\stepcounter{exercise}},
+ 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
+\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{}%new mdframed key:
+\define@key{mdf}{exercisepoints}{%
+ \def\mdf@@exercisepoints{#1}
+}
\mdfdefinestyle{exercisestyle}{%
- outerlinewidth=1pt,innerlinewidth=0pt,
- roundcorner=2pt,linecolor=gray,
- tikzsetting={shading = exersicebackground},
+ outerlinewidth=1em,outerlinecolor=white,%
+ leftmargin=-1em,rightmargin=-1em,%
+ middlelinewidth=1.2pt,roundcorner=5pt,linecolor=gray,
+ apptotikzsetting={\tikzset{mdfbackground/.append style ={%
+ shading = exersicebackground}}},
innertopmargin=1.2\baselineskip,
skipabove={\dimexpr0.5\baselineskip+\topskip\relax},
+ skipbelow={-1em},
needspace=3\baselineskip,
frametitlefont=\sffamily\bfseries,
settings={\global\stepcounter{exercise}},
singleextra={%
- \node[titregris,xshift=1cm] at (P-|O) %
- {~\mdf@frametitlefont{\theexercise}~};
+ \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}~};
+ \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}~};}%
},
}
-\begin{mdframed}[style=exercisestyle,]
+\makeatother
+
+\begin{mdframed}[style=exercisestyle]
\ExampleText
\end{mdframed}
\begin{mdframed}[style=exercisestyle,exercisepoints=10]
\ExampleText
\end{mdframed}
-\end{tltxmdfexample}
+
\clearpage
\Examplesec{Theorem environments}
-\begin{LTXexample}
+\begin{LTXexample}[morekeywords={theoremstyle,definition}]
\mdfdefinestyle{theoremstyle}{%
- linecolor=red,linewidth=2pt,%
+ linecolor=red,middlelinewidth=2pt,%
frametitlerule=true,%
apptotikzsetting={\tikzset{mdfframetitlebackground/.append style={%
- shade,left color=white, right color=blue!20}}},
+ shade,left color=white, right color=blue!20}}},
frametitlerulecolor=green!60,
frametitlerulewidth=1pt,
innertopmargin=\topskip,