Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- usepackage{xcolor}
- usepackage[framemethod=tikz]{mdframed}
- usetikzlibrary{shadows,shadings}
- usepackage{calc}
- usepackage{tikz}
- usetikzlibrary{shapes,snakes}
- newcounter{demo_counter}
- renewcommandthetheorem{Demonstration ~arabic{demo_counter}}
- makeatletter
- mdf@dolist{mdf@do@stringoption}{%
- {theoremtitle=={}}%
- }
- renewrobustcmdmdfcreateextratikz{%
- node[anchor=west,rounded corners,draw=orange,thick,fill=blue!20,xshift=2cm,minimum height=.7cm,minimum width=2cm] at (P-|O)
- {~mdf@frametitlefont{thetheorem}%
- ifdefempty{mdf@theoremtitle}%
- {~}%
- {:~mdf@theoremtitle~}%
- };
- }
- makeatother
- mdfdefinestyle{theoremstyle}{%
- outerlinewidth=1pt,
- innerlinewidth=3pt,
- roundcorner=5pt,
- linecolor=orange,
- splittopskip=1cm, % THIS IS THE REQUIRED OPTION FOR SPACE ABOVE THE SPLIT ON THE SECOND PAGE
- splitbottomskip=1cm, % THIS IS THE REQUIRED OPTION FOR SPACE BELOW THE SPLIT ON THE FIRST PAGE
- tikzsetting={fill=blue!5},
- innertopmargin=1.2baselineskip,
- skipabove={dimexpr0.5baselineskip+topskiprelax},
- needspace=3baselineskip,
- frametitlefont=sffamilybfseries,
- settings={globalstepcounter{demo_counter}},
- }
- newenvironment{demo}[1][]
- {begin{mdframed}[style=theoremstyle,theoremtitle={#1}]
- relax}{
- end{mdframed}
- }
- newcounter{remark_counter}
- renewcommandtheremark{Remark ~arabic{remark_counter}}
- renewrobustcmdmdfcreateextratikz{%
- node[anchor=west,rounded corners,draw=green,thick,fill=blue!20,xshift=2cm,minimum height=.7cm,minimum width=2cm] at (P-|O)
- {~mdf@frametitlefont{theremark}%
- ifdefempty{mdf@remarktitle}%
- {~}%
- {:~mdf@remarktitle~}%
- };
- }
- mdfdefinestyle{remarkstyle}{%
- outerlinewidth=1pt,
- innerlinewidth=3pt,
- roundcorner=5pt,
- linecolor=green,
- splittopskip=1cm,
- splitbottomskip=1cm,
- tikzsetting={fill=blue!5},
- innertopmargin=1.2baselineskip,
- skipabove={dimexpr0.5baselineskip+topskiprelax},
- needspace=3baselineskip,
- frametitlefont=sffamilybfseries,
- settings={globalstepcounter{remark_counter}},
- }
- newenvironment{remark}[1][]
- {begin{mdframed}[style=remarkstyle,remarktitle={#1}]
- relax}{
- end{mdframed}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement