blob: f7e70223846702cf2775311219b08bf6676777e5 (
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
|
%%
%% This is file `roundbox.sty',
%%
%% __________________________________
%% Copyright © 2010–2013 Persian TeX Group
%%
%% License information appended.
%%
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{roundbox}[2013/04/04 v0.2 round boxes in LaTeX]
\def\vb@xt@{\vbox to}
\long\def\@roundbox#1{{\chardef\lub=\@ne \chardef\rub=\tw@
\chardef\llb=\thr@@ \chardef\rlb=\f@ur
\ifdim\fboxrule > 0.4pt \let\cf=\tencircw \else \let\cf=\tencirc \fi
\boxmaxdepth\maxdimen
\setbox\@temprbox=\hbox{\hskip\hrboxsep#1\relax\hskip\hrboxsep}%
\setbox\z@=\hbox{\cf\char19}\@tempdima=0.5\wd\z@ \dimen@=\@tempdima
\advance\@tempdima\fboxrule
\setbox\lub\hb@xt@\dimen@{\cf\char19\hss}%
\setbox\llb\hb@xt@\dimen@{\cf\char18\hss}%
\setbox\rub\hb@xt@\@tempdima{\hskip\dimen@\cf\char16\hss}%
\setbox\rlb\hb@xt@\@tempdima{\hskip\dimen@\cf\char17\hss}%
\setbox\lub\vb@xt@ \z@{\vss\box\lub}%
\setbox\rub\vb@xt@ \z@{\vss\box\rub}%
\setbox\llb\vb@xt@ \@tempdima{\box\llb\vss}%
\setbox\rlb\vb@xt@ \@tempdima{\box\rlb\vss}%
\setbox\@temprbox=\vbox{\vskip \vrboxsep \box\@temprbox \vskip \vrboxsep}%
\setbox\@tempboxa\vbox{\offinterlineskip
\@dorowbox\lub\rub \dimen@=\ht\@temprbox
\advance\dimen@-\dp\lub \advance\dimen@-\ht\llb
\advance\dimen@-\dp\rub \advance\dimen@-\ht\rlb
\ifdim\dimen@ > \p@
\hb@xt@\wd\@temprbox{\vrule \@width \fboxrule
\vb@xt@\dimen@{\dimen@=\wd\@temprbox
\advance\dimen@-2\fboxrule
\hb@xt@\dimen@{\hss}\vfill}\vrule \@width \fboxrule}\fi
\vss\@dorowbox\llb\rlb}%
\setbox\@tempboxa\hbox{{$\vcenter{\box\@tempboxa}$}}%
\setbox\@temprbox\hbox{{$\vcenter{\box\@temprbox}$}}%
\leavevmode\hbox to\wd\@temprbox{\box\@tempboxa\hss\box\@temprbox}%
}}
\long\def\roundbox#1{\@roundbox{\hbox{#1}}}
\def\@dorowbox#1#2{{\dimen@=\wd#1\advance\dimen@ \wd#2%
\advance\dimen@\fboxrule
\hb@xt@\wd\@temprbox{\box#1%
\ifdim\wd\@temprbox > \dimen@ \leaders\hrule \@height\fboxrule\hfill
\else \hss \fi \box#2}}}
\@ifundefined{vrboxsep}{\newdimen\vrboxsep\vrboxsep=7.2pt}{}
\@ifundefined{hrboxsep}{\newdimen\hrboxsep\hrboxsep=4pt}{}
\@ifundefined{@temprbox}{\newbox\@temprbox}{}
\@ifundefined{f@ur}{\chardef\f@ur4}{}
\endinput
%%
%% Copyright © 2010–2013 by Persian TeX Group <persian-tex@tug.org>
%%
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
%% This work is "maintained" (as per LPPL maintenance status)
%% by Persian TeX Group.
%%
%%
%%
%%
%%
%% End of file `roundbox.sty'.
|