diff options
author | Karl Berry <karl@freefriends.org> | 2012-09-21 22:30:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-09-21 22:30:34 +0000 |
commit | 2116b098967c4ac8c5c341b24ece64007d46d45f (patch) | |
tree | 32c33c20d5ddeda9c7a13f31a0b6500671318b81 /Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex | |
parent | 079a8c9e4012ed38f664b039daf7d3011d02a4a2 (diff) |
mdframed (21sep12)
git-svn-id: svn://tug.org/texlive/trunk@27762 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.tex | 71 |
1 files changed, 37 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 7aba53867bf..9f202f496d6 100644 --- a/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.tex +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-example-default.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}. @@ -41,7 +38,7 @@ \begin{document} \maketitle \section{Loading} -In the preamble only the package \Pack{mdframed} width the option +In the preamble only the package \Pack{mdframed} with the option \Opt{framemethod=\Loadedframemethod} is loaded. All other modifications will be done by \Cmd{mdfdefinestyle} or \Cmd{mdfsetup}. @@ -80,7 +77,7 @@ function of the independent variables alone. \Examplesec{hidden line + frame title} \begin{LTXexample} \global\mdfapptodefinestyle{exampledefault}{% - topline=false,rightline=true,bottomline=false} + topline=false,bottomline=false} \begin{mdframed}[style=exampledefault,frametitle={Inhomogeneous linear}] \ExampleText \end{mdframed} @@ -101,7 +98,7 @@ function of the independent variables alone. \end{LTXexample} \Examplesec{framed picture which is centered} -\begin{LTXexample} +\begin{LTXexample}[morekeywords=width] \begin{mdframed}[userdefinedwidth=6cm,align=center, linecolor=blue,linewidth=4pt] \IfFileExists{donald-duck.jpg}% @@ -112,7 +109,7 @@ function of the independent variables alone. \clearpage \Examplesec{Theorem environments} -\begin{LTXexample} +\begin{LTXexample}[morekeywords={theoremstyle,definition}] \mdfdefinestyle{theoremstyle}{% linecolor=red,linewidth=2pt,% frametitlerule=true,% @@ -133,7 +130,9 @@ function of the independent variables alone. \clearpage \Examplesec{theorem with separate header and the help of TikZ (complex)} -\begin{LTXexample} +\begin{LTXexample}[% + morekeywords={theo,baseline,anchor,outer,sep,current,bounding,box,east},% + moretexcs=tikz] \newcounter{theo}[section] \newenvironment{theo}[1][]{% \stepcounter{theo}% @@ -170,36 +169,40 @@ 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} +\begin{LTXexample}[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,% + mdfboundingboxdepth,mdfboundingboxtotalheight,% + mdf@topline,ifbool,interruptrule,everyline}] \makeatletter \newlength{\interruptlength} -\setlength{\interruptlength}{2.5ex} -\newrobustcmd\overlaplines{% - \appto\mdf@frame@leftline@single{% - \llap{\color{white}% - \rule[\dimexpr-\mdfboundingboxdepth+\interruptlength\relax]% - {\mdf@middlelinewidth@length}% - {\dimexpr\mdfboundingboxtotalheight% - \ifbool{mdf@topline}{+\mdf@middlelinewidth@length}{} - -2\interruptlength\relax}% - }% - }% - \appto\mdf@frame@rightline@single{% - \rlap{\color{white}% - \hspace*{\mdfboundingboxwidth}% - \hspace*{\mdf@innerrightmargin@length}% - \rule[\dimexpr-\mdfboundingboxdepth% - +\interruptlength\relax]% - {\mdf@middlelinewidth@length}% - {\dimexpr\mdfboundingboxtotalheight% - +\ifbool{mdf@topline}{\mdf@middlelinewidth@length}{0pt} - -2\interruptlength\relax}% - }% - }% +\newrobustcmd\interruptrule[3]{% + \color{#1}% + \hspace*{\dimexpr\mdfboundingboxwidth+\mdf@innerrightmargin@length\relax}% + \rule[\dimexpr-\mdfboundingboxdepth+#2\interruptlength\relax]% + {\mdf@middlelinewidth@length}% + {\dimexpr\mdfboundingboxtotalheight-#3\interruptlength\relax}% +} +\newrobustcmd\overlaplines[2][white]{% + \mdfsetup{everyline=false}% + \setlength{\interruptlength}{#2} + \appto\mdf@frame@leftline@single{\llap{\interruptrule{#1}{1}{2}}} + \appto\mdf@frame@rightline@single{\rlap{\interruptrule{#1}{1}{2}}} + \appto\mdf@frame@leftline@first{\llap{\interruptrule{#1}{0}{1}}} + \appto\mdf@frame@rightline@first{\rlap{\interruptrule{#1}{0}{1}}} + \appto\mdf@frame@leftline@second{\llap{\interruptrule{#1}{1}{1}}} + \appto\mdf@frame@rightline@second{\rlap{\interruptrule{#1}{1}{1}}} + \appto\mdf@frame@leftline@middle{\llap{\interruptrule{#1}{0}{0}}} + \appto\mdf@frame@rightline@middle{\rlap{\interruptrule{#1}{0}{0}}} } \makeatother -\overlaplines +\overlaplines{2.5ex} +\begin{mdframed}[linecolor=blue,linewidth=8pt] +\ExampleText +\end{mdframed} +\overlaplines[blue!70!black!20]{2.5ex} \begin{mdframed}[linecolor=blue,linewidth=8pt] \ExampleText \end{mdframed} |