diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex209/contrib/loval |
Initial commit
Diffstat (limited to 'macros/latex209/contrib/loval')
-rw-r--r-- | macros/latex209/contrib/loval/loval.sty | 91 | ||||
-rw-r--r-- | macros/latex209/contrib/loval/lovaltest.pdf | bin | 0 -> 25088 bytes | |||
-rw-r--r-- | macros/latex209/contrib/loval/lovaltest.tex | 59 |
3 files changed, 150 insertions, 0 deletions
diff --git a/macros/latex209/contrib/loval/loval.sty b/macros/latex209/contrib/loval/loval.sty new file mode 100644 index 0000000000..1ce1ed535a --- /dev/null +++ b/macros/latex209/contrib/loval/loval.sty @@ -0,0 +1,91 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% LOVAL.STY \copyright by Elmar Schal\"{u}ck % +% Version 1.1 February 1991 % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\message{LOVAL.STY Ver 1.1 Feb 1991 Elmar Schal\"{u}ck} +\catcode`\@=11 % Make @ a letter +\newbox\@tmpbox % to save a box +\newdimen\@tmpdimd % dimen of depth +\newdimen\@tmpdimh % dimen of height +\newdimen\@tmpdimw % dimen of width +\newdimen\@oldunitl \newcount\@textw% +\newcount\@texth \newcount\@textd% +\newcount\@xoffs \newcount\@yoffs% +\newcount\@xoval \newcount\@yoval% +\newcount\@totalwidth \newcount\@totalheight% +\newcount\@xovaloffs \newcount\@horline% +\newcount\@ytextoffs \newcount\@xtextoffs% +\newcount\@fboxcount \newcount\@wholecount +\newcount\@stdoffs % +\newdimen\@em% +% +% \ovalbox#1 defines a box with round corners to enclose #1 +% +\long\def\ovalbox#1{\relax\leavevmode % + \@oldunitl=\unitlength % save old unitlength + \unitlength.01pt % interim value for precision + \@em=1em % 1 em + \@stdoffs=\@em % + \divide\@stdoffs by \unitlength % to avoid unwanted glues + \divide\@stdoffs by10 % + \multiply\@stdoffs by 3 % 0.3em + \setbox\@tmpbox\hbox{#1} % make #1 a box + \@tmpdimd=\dp\@tmpbox % depth of box, i.e. the part beneath + % the baseline + \@tmpdimh=\ht\@tmpbox % part above baseline + \@tmpdimw=\wd\@tmpbox % width of box + \@textw=\@tmpdimw\divide\@textw by\unitlength + \@texth=\@tmpdimh\divide\@texth by\unitlength + \@textd=\@tmpdimd\divide\@textd by\unitlength + \@fboxcount=\fboxsep\divide\@fboxcount by\unitlength + \@wholecount=\@wholewidth\divide\@wholecount by\unitlength + \advance\@texth by \@textd + \advance\@tmpdimh by\@tmpdimd % total height of original box + \@xoval=\@fboxcount\@yoval=\@texth % diametervalues of \oval + \advance\@yoval by \@fboxcount % xoval for width + \advance\@yoval by \@fboxcount % yoval for height + \@xoffs=\@xoval\divide\@xoffs by 2 % + \advance\@xoffs by -\@stdoffs % where to place left oval + \@yoffs=\@yoval\divide\@yoffs by 2 % middle of ovalheight + \@horline=\@fboxcount % + \advance\@horline by \@textw % length of horiz. line + \advance\@tmpdimd by\fboxsep % + \advance\@tmpdimd by\@wholewidth % total depth of box + \@ytextoffs=\@textd % + \advance\@ytextoffs by\@wholecount % baseline in picturevalues + \advance\@ytextoffs by\@fboxcount % + \@xtextoffs=\@fboxcount % where to put original text + \advance\@xtextoffs by -\@stdoffs % + \@totalwidth=\@wholecount % + \advance\@totalwidth by \@fboxcount % + \advance\@totalwidth by \@totalwidth % + \advance\@totalwidth by \@textw % + \advance\@totalwidth by -\@stdoffs % + \advance\@totalwidth by -\@stdoffs % width of picture enviroment + \@totalheight=\@wholecount % + \advance\@totalheight by \@fboxcount % + \advance\@totalheight by \@totalheight % + \advance\@totalheight by \@texth % height of picture enviroment + \hbox{\lower\@tmpdimd % put a box beneath baseline + \hbox% + {\relax% + \begin{picture}(\@totalwidth,\@totalheight) % + \put(\@xoffs,\@yoffs){\oval(\@xoval,\@yoval)[l]} % left oval + \put(\@xoffs,0){\line(1,0){\@horline}} % lower line + \put(\@xoffs,\@yoval){\line(1,0){\@horline}} % upper line + \put(\@xtextoffs,\@ytextoffs){#1} % original box + \advance\@xoffs by \@horline % + \put(\@xoffs,\@yoffs){\oval(\@xoval,\@yoval)[r]} % right oval + \end{picture}\relax % + } % + }% + \unitlength=\@oldunitl % restore unitlength +} % +% +\catcode`\@=12% +% reset catcode of @-sign +% +% End of LOVAL.STY +% diff --git a/macros/latex209/contrib/loval/lovaltest.pdf b/macros/latex209/contrib/loval/lovaltest.pdf Binary files differnew file mode 100644 index 0000000000..9c83b4bd1d --- /dev/null +++ b/macros/latex209/contrib/loval/lovaltest.pdf diff --git a/macros/latex209/contrib/loval/lovaltest.tex b/macros/latex209/contrib/loval/lovaltest.tex new file mode 100644 index 0000000000..c3093419b2 --- /dev/null +++ b/macros/latex209/contrib/loval/lovaltest.tex @@ -0,0 +1,59 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% LOVALTEST.tex % +% +% Description of LOVAL.STY +% +\documentstyle[loval]{article} +\pagestyle{empty} +\begin{document} +\centering{\Large LOVAL.STY - oval boxes} +\vspace{0.3in} + +This is the descreption of an option that yields similar results as +the wellknown \verb+\fbox+. It produces a \ovalbox{box} around some +text with round corners. Because I have choosen to take a picture +enviroment, some warnings occur during compilation. These may be +ignored by the user. + + +The following parameters are of some interest. +\begin{itemize} +\item \verb+\fboxsep+ + +Different values of this parameter yield different seperation amount +from text and surrounding borders, c.f. \verb+\fbox+. + +\verb+\fboxsep10pt\ovalbox{test}+ gives the following: \fboxsep10pt\ovalbox{test}. + +\verb+\fboxsep3pt\ovalbox{3pt is default}+ gives \fboxsep3pt\ovalbox{3pt is default}. + +\item \verb+\linethickness+ + +Three possibilities are given to choose the linethickness. +\begin{itemize} +\item \verb+\thinlines+ + +This is the default as in \ovalbox{this} example. + +\item \verb+\thicklines+ + +Here we get \ovalbox{thick} lines. + +\item \verb+\linethickness<dimen>+ + +\verb+\linethickness{1.5pt}+ gives these +\linethickness{1.5pt}\fboxsep8pt\ovalbox{strange} results. +\end{itemize} +\end{itemize} + +\vspace{.4in} +If you need another version of this \verb+\ovalbox+ that works with +plain\TeX\ you can mail me and I send you the other style file and a +new fontsource {\tt newcirc.mf} to build the appropriate circlefont. +This version does not give unneccesary warnings. +\vspace{.3in} + +Have some fun with my macros. + +Elmar Schal\"{u}ck elmar@uni-paderborn.de +\end{document} |