summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-02-20 23:42:49 +0000
committerKarl Berry <karl@freefriends.org>2016-02-20 23:42:49 +0000
commit7affec99ba7efed53547246678612f6a2b78608a (patch)
treebab03c500aeb206de93e8d6293d97a28fc3b7c65 /Master/texmf-dist/tex
parent2660ff9b164e0df66d71e66640d107543c8651e0 (diff)
lroundrect (20feb16)
git-svn-id: svn://tug.org/texlive/trunk@39804 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/lroundrect/lroundrect.sty259
1 files changed, 259 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/lroundrect/lroundrect.sty b/Master/texmf-dist/tex/latex/lroundrect/lroundrect.sty
new file mode 100644
index 00000000000..cc66c9272de
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lroundrect/lroundrect.sty
@@ -0,0 +1,259 @@
+%%
+%% This is file `lroundrect.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lroundrect.dtx (with options: `package')
+%% This is a generated file.
+%%
+%% This document is copyright 2015 by Donald P. Goodman, and is
+%% released publicly under the LaTeX Project Public License. The
+%% distribution and modification of this work is constrained by the
+%% conditions of that license. See
+%% http://www.latex-project.org/lppl.txt
+%% for the text of the license. This document is released
+%% under version 1.3 of that license, and this work may be distributed
+%% or modified under the terms of that license or, at your option, any
+%% later version.
+%%
+%% This work has the LPPL maintenance status 'maintained'.
+%%
+%% The Current Maintainer of this work is Donald P. Goodman
+%% (dgoodmaniii@gmail.com).
+%%
+%% This work consists of the files lroundrect.dtx and
+%% lroundrect.ins, along with the generated file lroundrect.mp
+%% and lroundrect.pdf, and the README.
+
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{lroundrect}[2015/09/01 v1.0 LaTeX macros utilizing the Metapost roundrect code]
+\def\rralertbox#1{%
+\begin{mpost}
+rrborderpen(pencircle scaled 3);
+rrbodytext := "#1";
+rrbordercolor(0.8red);
+rrtextcolor := 0.8red;
+rrinnercolor := 0.5[red,white];
+roundrect(1in,2in)(alertbox);
+draw alertbox;
+\end{mpost}
+}%
+\newlength{\rrorangewid}
+\newdimen\rrblueht
+\newdimen\rrorangeht
+\newbox\rrbluebox
+\newbox\rrorangebox
+\def\rrorangebluebox#1#2{%
+\settowidth{\rrorangewid}{\ \scshape #1\ }
+\savebox\rrbluebox{\parbox{\linewidth}{#2}}
+\advance\rrorangewid by6pt
+\savebox\rrorangebox{\parbox{\rrorangewid}{#1}}
+\rrorangeht=\ht\rrorangebox
+\advance\rrorangeht by\dp\rrorangebox
+\advance\rrorangeht by\baselineskip
+\rrblueht=\ht\rrbluebox
+\advance\rrblueht by\dp\rrbluebox
+\advance\rrblueht by\baselineskip
+\begin{mpost}
+input mpcolornames;
+rrborderrad(10pt);
+rrbotlftborderrad := 0pt;
+rrbotrtborderrad := 0pt;
+rrbordercolor(DarkGoldenrod1);
+rrinnercolor := DarkGoldenrod1;
+rrtextalign := "\unexpanded{\raggedright}";
+rrtextfont := "\unexpanded{\scshape}";
+rrbodytext := "#1";
+roundrect(\mpdim{\rrorangeht})(\mpdim{\rrorangewid})(orangebluebox);
+rrrestorevals;
+rrborderrad(10pt);
+rrbordercolor(blue);
+rrinnercolor := blue;
+rrbodytext := "#2";
+rrtextcolor := white;
+rrtextfont := "\unexpanded{\bfseries}";
+rrtextalign := "";
+roundrect(\mpdim{\rrblueht})(\mpdim{\linewidth})(mainbox);
+draw orangebluebox shifted (-\mpdim{0.3\linewidth},0);
+draw mainbox shifted (0,-\mpdim{\rrblueht}/2-\mpdim{\rrorangeht}/2);
+\end{mpost}
+}%
+\newlength{\rrtitlewid}
+\newlength{\rrtitleht}
+\newlength{\rrmainht}
+\newbox\rrtitlebox\newbox\rrmainbox
+\def\rrdefaultbox#1#2{%
+\settowidth{\rrtitlewid}{\ \scshape #1\ }
+\savebox\rrmainbox{\parbox{\linewidth}{#2}}
+\advance\rrtitlewid by6pt
+\savebox\rrtitlebox{\parbox{\rrtitlewid}{#1}}
+\rrtitleht=\ht\rrtitlebox
+\advance\rrtitleht by\dp\rrtitlebox
+\advance\rrtitleht by\baselineskip
+\rrmainht=\ht\rrmainbox
+\advance\rrmainht by\dp\rrmainbox
+\advance\rrmainht by\baselineskip
+\begin{mpost}
+input mpcolornames;
+rrborderrad(10pt);
+rrbotlftborderrad := 0pt;
+rrbotrtborderrad := 0pt;
+rrbodytext := "#1";
+roundrect(\mpdim{\rrtitleht})(\mpdim{\linewidth})(titlebox);
+rrrestorevals;
+rrborderrad(10pt);
+rrtoplftborderrad := 0pt;
+rrtoprtborderrad := 0pt;
+rrtopborderpen := pencircle scaled 1;
+rrbodytext := "#2";
+rrtextalign := "";
+roundrect(\mpdim{\rrmainht})(\mpdim{\linewidth})(mainbox);
+draw titlebox;
+draw mainbox shifted (0,-\mpdim{\rrmainht}/2-\mpdim{\rrtitleht}/2);
+\end{mpost}
+}
+\def\rrtcolorex#1{%
+\begin{mpost}
+rrborderrad(10pt);
+rrbordercolor(blue);
+rrtopbordercolor := 0.5[green,black];
+rrinnercolor := 0.8[blue,white];
+rrbodytext := "#1";
+roundrect(2\mpdim{\baselineskip},\mpdim{\linewidth})(rrexampbox);
+draw rrexampbox;
+\end{mpost}
+}%
+\newdimen\rrtcoltagwd
+\newbox\rrtcoltagbox
+\def\rrtcoltag#1#2{%
+\settowidth{\rrtcoltagwd}{#2}
+\advance\rrtcoltagwd by12pt
+\begin{mpost}
+input mpcolornames;
+rrborderrad(5pt);
+rrbotlftborderrad := 0pt;
+rrbotrtborderrad := 0pt;
+rrnobot := true;
+rrinnercolor := 0.5[green,white];
+rrbodytext := "#1";
+rrtextfont := "\unexpanded{\sffamily}";
+rrtextcolor := Khaki1;
+roundrect(\mpdim{1.5em},2.5\mpdim{\baselineskip})(rrtaglabel);
+rrrestorevals;
+rrborderrad(5pt);
+rrtoplftborderrad := 0pt;
+rrbotlftborderrad := 0pt;
+rrinnercolor := 0.7[green,white];
+rrnolft := true;
+rrbodytext := "#2";
+roundrect(2.5\mpdim{\baselineskip},\mpdim{\rrtcoltagwd})(rrtextlabel);
+draw rrtaglabel rotatedaround((0,0),90);
+draw rrtextlabel shifted (\mpdim{\rrtcoltagwd}/2+0.625\mpdim{\baselineskip},0);
+\end{mpost}
+}%
+\def\rrtransbox#1{%
+\begin{mpost}[mpmem=metafun]
+rrbodytext := "#1";
+rrdropshadow := true;
+rrborderrad(20pt);
+rrinnercolor := transparent(0.5,0.5,0.5red);
+rrshadowcolor := transparent(0.5,0.5,0.625blue);
+rrshadowx := rrbotlftborderrad/4;
+rrshadowy := -rrbotlftborderrad/4;
+roundrect(1in,2in)(rectangle);
+draw rectangle;
+\end{mpost}
+}%
+\def\rrincludepdf{%
+ \long\def\gmp@innermpost##1\end##2{%
+\ifgmp@nowrite\else
+\gmp@write\gmp@out{%
+##1^^Jendfig;^^Jend.%
+\gmp@doiflatex{^^Jverbatimtex^^J\string\end{document}^^Jetex}}%
+\gmp@closeout\gmp@out
+\count@=\gmp@runs
+\loop\ifnum\count@>\z@
+\gmp@shellcommand{\gmp@command\space
+-tex=\gmp@mpxprogram\space\gmp@jobname\gmp@ext
+\gmp@fourdigits{\gmp@number}}%
+\advance\count@\m@ne
+\repeat
+\ifxetex
+\gmp@shellcommand{epstopdf --hires
+\gmp@jobname\gmp@ext
+\gmp@fourdigits{\gmp@number}.mps}%
+\fi
+\gmp@shellcommand{mptopdf
+--result=\gmp@jobname\gmp@ext
+\gmp@fourdigits{\gmp@number}.pdf
+\gmp@jobname\gmp@ext
+\gmp@fourdigits{\gmp@number}.mps}%
+\gmp@shellcommand{mv
+\gmp@jobname\gmp@ext
+\gmp@fourdigits{\gmp@number}-mps.pdf
+\gmp@jobname\gmp@ext
+\gmp@fourdigits{\gmp@number}.pdf}%
+\egroup
+\end{##2}\ifgmp@use
+\gmp@usempost{\thegmp@count}\fi}
+ \def\gmp@usempost##1{%
+ \edef\gmp@thempsfile{\gmp@jobname\gmp@ext\gmp@fourdigits{##1}}%
+ \IfFileExists{\gmp@thempsfile.pdf}%
+ {\includegraphics{\gmp@thempsfile.pdf}}%
+ {\gmp@nemessage\gmp@box}}
+ \renewcommand\usempost[2][]{%
+ \IfFileExists{\gmp@jobname\gmp@ext\csname gmp@fig##2\endcsname.pdf}%
+ {\includegraphics[##1]
+ {\gmp@jobname\gmp@ext\csname gmp@fig##2\endcsname.pdf}}%
+ {\gmp@nemessage\gmp@box}}
+}%
+\def\rrincludemps{%
+\long\def\gmp@innermpost##1\end##2{%
+ \ifgmp@nowrite\else
+ \gmp@write\gmp@out{%
+ ##1^^Jendfig;^^Jend.%
+ \gmp@doiflatex{^^Jverbatimtex^^J\string\end{document}^^Jetex}}%
+ \gmp@closeout\gmp@out
+ \count@=\gmp@runs
+ \loop\ifnum\count@>\z@
+ \gmp@shellcommand{\gmp@command\space
+ -tex=\gmp@mpxprogram\space\gmp@jobname\gmp@ext
+ \gmp@fourdigits{\gmp@number}}%
+ \advance\count@\m@ne
+ \repeat
+ \ifxetex
+ \gmp@shellcommand{epstopdf --hires \gmp@jobname\gmp@ext
+ \gmp@fourdigits{\gmp@number}.mps}%
+ \fi
+ \fi
+ \egroup
+ \end{##2}\ifgmp@use
+ \gmp@usempost{\thegmp@count}\fi}
+\ifxetex
+ \def\gmp@usempost##1{%
+ \edef\gmp@thempsfile{\gmp@jobname\gmp@ext\gmp@fourdigits{##1}}%
+ \IfFileExists{\gmp@thempsfile.pdf}%
+ {\includegraphics{\gmp@thempsfile.pdf}}%
+ {\gmp@nemessage\gmp@box}}
+ \renewcommand\usempost[2][]{%
+ \IfFileExists{\gmp@jobname\gmp@ext\csname gmp@fig##2\endcsname.pdf}%
+ {\includegraphics[##1]
+ {\gmp@jobname\gmp@ext\csname gmp@fig##2\endcsname.pdf}}%
+ {\gmp@nemessage\gmp@box}}
+\else
+ \def\gmp@usempost##1{%
+ \edef\gmp@thempsfile{\gmp@jobname\gmp@ext\gmp@fourdigits{##1}}%
+ \IfFileExists{\gmp@thempsfile.mps}%
+ {\includegraphics[hiresbb]{\gmp@thempsfile.mps}}%
+ {\gmp@nemessage\gmp@box}}
+\renewcommand\usempost[2][]{%
+ \IfFileExists{\gmp@jobname\gmp@ext\csname gmp@fig##2\endcsname.mps}%
+ {\includegraphics[hiresbb,##1]
+ {\gmp@jobname\gmp@ext\csname gmp@fig##2\endcsname.mps}}%
+ {\gmp@nemessage\gmp@box}}
+\fi
+}%
+\endinput
+%%
+%% End of file `lroundrect.sty'.