Debian Codegraph @

texmf-dist/doc/latex/mdframed/mdframed-example-pstricks.tex

raw
1
2 \setcounter{errorcontextlines}{999}
3 \documentclass[parskip=false,english,11pt]{ltxmdf}
4
5 \lstDeleteShortInline{|}
6 \newcommand\Loadedframemethod{PSTricks}
7 \usepackage[framemethod=\Loadedframemethod]{mdframed}
8
9 \surroundwithmdframed[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,%
10 roundcorner=10pt,innertopmargin=0pt,%
11 leftmargin=1cm,rightmargin=1cm,%
12 innerleftmargin=-15pt,innerrightmargin=-15pt,%
13 ignorelastdescenders,%
14 settings={\lstset{resetmargins}},%
15 skipbelow=\topskip,skipabove=\topskip,%
16 innerbottommargin=0pt,backgroundcolor=gray!10]%
17 {tltxmdfexample}
18
19 \newmdenv[middlelinecolor=ltxmdfblue,middlelinewidth=1pt,%
20 roundcorner=10pt,innertopmargin=0pt,%
21 leftmargin=1cm,rightmargin=1cm,%
22 innerleftmargin=-15pt,innerrightmargin=-15pt,%
23 ignorelastdescenders,%
24 settings={\lstset{resetmargins}},%
25 skipbelow=\topskip,skipabove=\topskip,%
26 innerbottommargin=0pt,backgroundcolor=gray!10]%
27 {tltxmdfhighlight}
28 \def\highlightinputenv{tltxmdfhighlight}
29
30 \title{The \Pack{mdframed} package}
31 \subtitle{Examples for \Opt{framemethod=\Loadedframemethod}}
32 \author{\href{mailto:[email protected]}{Marco Daniel}}
33 \date{\mdfmaindate}
34 \version{\mdversion}
35 \introduction{In this document I collect various examples for
36 \Opt{framemethod=\Loadedframemethod}.
37 Some presented examples are more or less exorbitant.}
38
39 \mdfsetup{skipabove=\topskip,skipbelow=\topskip}
40 \newrobustcmd\ExampleText{%
41 An \textit{inhomogeneous linear} differential equation has the form
42 \begin{align}
43 L[v ] = f,
44 \end{align}
45 where $L$ is a linear differential operator, $v$ is
46 the dependent variable, and $f$ is a given non-zero
47 function of the independent variables alone.
48 }
49
50 \newcounter{examplecount}
51 \setcounter{examplecount}{0}
52 \renewcommand\thesubsection{}
53 \newcommand\Examplesec[1]{%
54 \stepcounter{examplecount}%
55 \subsection{Example~\arabic{examplecount}~--~#1\relax}%
56 }
57
58 \begin{document}
59 \maketitle
60 \section{Loading}
61 In the preamble only the package \Pack{mdframed} width the option
62 \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be
63 done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}.
64
65 {\large\color{red!50!black}
66 \NOTE Every \Cmd{global} inside the examples is necessary to work with my own
67 created environment \Env{tltxmdfexample*}.}
68
69 \section{Examples}
70 All examples have the following settings:
71
72 \begin{tltxmdfexample}
73 \mdfsetup{skipabove=\topskip,skipbelow=\topskip}
74 \newrobustcmd\ExampleText{%
75 An \textit{inhomogeneous linear} differential equation has the form
76 \begin{align}
77 L[v ] = f,
78 \end{align}
79 where $L$ is a linear differential operator, $v$ is the dependent
80 variable, and $f$ is a given non-zero function of the independent
81 variables alone.
82 }
83 \end{tltxmdfexample}
84
85 \clearpage
86
87 \Examplesec{very simple}
88 \begin{tltxmdfexample*}
89 \global\mdfdefinestyle{exampledefault}{%
90 linecolor=red,middlelinewidth=3pt,%
91 leftmargin=1cm,rightmargin=1cm
92 }
93 \begin{mdframed}[style=exampledefault,roundcorner=5]
94 \ExampleText
95 \end{mdframed}
96 \end{tltxmdfexample*}
97
98 \Examplesec{hidden line + frame title}
99 \begin{tltxmdfexample*}[morekeywords={innerlinecolor,addtopsstyle,mdfouterlinestyle,
100 linestyle}]
101 \global\mdfapptodefinestyle{exampledefault}{%
102 topline=false,rightline=false,bottomline=false,
103 frametitlerule=true,innertopmargin=6pt,
104 outerlinewidth=6pt,outerlinecolor=blue,
105 pstricksappsetting={\addtopsstyle{mdfouterlinestyle}{linestyle=dashed}},
106 innerlinecolor=yellow,innerlinewidth=5pt}%
107 \begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}]
108 \ExampleText
109 \end{mdframed}
110 \end{tltxmdfexample*}
111
112 \Examplesec{Dash Lines}[morekeywords={pstrickssetting,linestyle,dashed}]
113 \begin{tltxmdfexample*}
114 \global\mdfdefinestyle{exampledefault}{%
115 pstrickssetting={linestyle=dashed,},linecolor=red,middlelinewidth=2pt}
116 \begin{mdframed}[style=exampledefault]
117 \ExampleText
118 \end{mdframed}
119 \end{tltxmdfexample*}
120
121 \Examplesec{Double Lines}
122 \begin{tltxmdfexample*}[morekeywords={addtopsstyle,mdfmiddlelinestyle,
123 doubleline,doublesep}]
124 \global\mdfdefinestyle{exampledefault}{%
125 pstricksappsetting={\addtopsstyle{mdfmiddlelinestyle}{%
126 doubleline=true,doublesep=6pt,linewidth=4pt}},%
127 linecolor=red,middlelinewidth=16pt}
128 \begin{mdframed}[style=exampledefault]
129 \ExampleText
130 \end{mdframed}
131 \end{tltxmdfexample*}
132
133 \Examplesec{Shadow frame}
134 \begin{tltxmdfexample*}[morekeywords={shadow,shadowsize,myshadowbox}]
135 \newmdenv[shadow=true,
136 shadowsize=11pt,
137 linewidth=8pt,
138 frametitlerule=true,
139 roundcorner=10pt,
140 ]{myshadowbox}
141 \begin{myshadowbox}[frametitle={Inhomogeneous linear}]
142 \ExampleText
143 \end{myshadowbox}
144 \end{tltxmdfexample*}
145 \end{document}
146 \endinput