summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex
blob: 9a4dc301553062938fb01c0bc73cb77df17d63d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
%%$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $
\setcounter{errorcontextlines}{999}
\documentclass[parskip=false,english,11pt]{ltxmdf}
\ltxmdfsetifoot$Id: mdframed.dtx 320 2012-01-09 18:44:33Z marco $

\lstDeleteShortInline{|}
\newcommand\Loadedframemethod{PSTricks}
\usepackage[framemethod=\Loadedframemethod]{mdframed}

\usepackage{showexpl}
\lstset{style=lstltxmdf,explpreset={pos=b,rframe={}},}

\title{The \Pack{mdframed} package}
\subtitle{Examples for \Opt{framemethod=\Loadedframemethod}}
\author{\href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}}
\version{\mdversion}
\introduction{In this document I collect various examples for \Opt{framemethod=\Loadedframemethod}.
Some presented examples are more or less exorbitant.}

\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.
}

\newcounter{examplecount}
\setcounter{examplecount}{0}
\renewcommand\thesubsection{}
\newcommand\Examplesec[1]{%
\stepcounter{examplecount}%
\subsection{Example~\arabic{examplecount}~--~#1\relax}%
}

\begin{document}
\maketitle
\section{Loading}
In the preamble only the package \Pack{mdframed} width the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be 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}.}
X
\section{Examples}
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.
}
\end{tltxmdfexample}
\clearpage

\Examplesec{very simple}
\begin{LTXexample}
\global\mdfdefinestyle{exampledefault}{%
     linecolor=red,middlelinewidth=3pt,%
     leftmargin=1cm,rightmargin=1cm
}
\begin{mdframed}[style=exampledefault,roundcorner=5]
\ExampleText
\end{mdframed}
\end{LTXexample}

\Examplesec{hidden line + frame title}
\begin{LTXexample}
\global\mdfapptodefinestyle{exampledefault}{%
 topline=false,rightline=false,bottomline=false,
 frametitlerule=true,innertopmargin=6pt,
 outerlinewidth=6pt,outerlinecolor=blue,
 pstricksappsetting={\addtopsstyle{mdfouterlinestyle}{linestyle=dashed}},
 innerlinecolor=yellow,innerlinewidth=5pt}%
\begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}]
\ExampleText
\end{mdframed}
\end{LTXexample}

\clearpage

\Examplesec{Dash Lines}
\begin{LTXexample}
\global\mdfdefinestyle{exampledefault}{%
   pstrickssetting={linestyle=dashed,},linecolor=red,linewidth=5pt}
\begin{mdframed}[style=exampledefault,]
\ExampleText
\end{mdframed}
\end{LTXexample}

\Examplesec{Double Lines}
\begin{LTXexample}
\global\mdfdefinestyle{exampledefault}{%
   pstrickssetting={doubleline=true,doublesep=6pt},
   linecolor=red,linewidth=5pt,middlelinewidth=4pt}
\begin{mdframed}[style=exampledefault,]
\ExampleText
\end{mdframed}
\end{LTXexample}
\end{document}
 \endinput