Newsgroups: fj.comp.texhax
Path: galaxy.trc.rwcp.or.jp!jaist-news!cs.titech!nirvana.cs.titech!wnoc-tyo-news!hitwide!hinocgw!hsdlgw92!sdl99m!sengoku
From: sengoku@sdl.hitachi.co.jp (Hiroaki Sengoku)
Subject: Re: [asobi nimo naranai TeX]: maru.sty
In-Reply-To: uainoue@ipc.musashi-tech.ac.jp's message of Thu, 24 Mar 1994 09:25:59 GMT
Message-ID: <Cn7124.11G@sdl99m.sdl.hitachi.co.jp>
Lines: 120
Sender: news@sdl99m.sdl.hitachi.co.jp
Organization: Systems Development Lab., Hitachi Ltd., JAPAN
References: <OKI.94Mar11181735@oq-usi.ee.kyushu-u.ac.jp>
	<UAINOUE.94Mar16171820@jupost.ipc.musashi-tech.ac.jp>
	<OKI.94Mar21222721@oq-usi.ee.kyushu-u.ac.jp>
	<UAINOUE.94Mar24182559@jupost.ipc.musashi-tech.ac.jp>
Distribution: fj
Date: Thu, 24 Mar 1994 23:54:02 GMT
Xref: galaxy.trc.rwcp.or.jp fj.comp.texhax:4718
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.comp.texhax&nb=4718&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$B@g@P!wF|N)$G$9!#855-;v$N(B sty file $B$r8+$F$$$J$$$N$G$9$,!"(B(_O_)

On Thu, 24 Mar 1994 09:25:59 GMT,
uainoue@ipc.musashi-tech.ac.jp (INOUE Koichi) said:
uainoue> $B<+F0E*$KBg$-$5$NJQ$o$k!V4]!W$N%U%)%s%H$,$"$l$P!"(B\left$B$G$b;H$C$F(B
uainoue> $B4JC1$K=q$1$k$s$G$9$1$I$M$(!"!"!"(B

  $B0JA0!"J8;z$r4]$G0O$`I,MW@-$,$"$C$?;~!":n$C$?(B style file $B$,$"$j$^$9!#(B

uainoue> $B;d$O%a%?%U%)%s%HA4A3CN$i$J$$$s$G!"$=$&$$$&$N$,$G$-$J$$$s$G$9$,!"(B

  $B3F<o%5%$%:$NBJ1_$+$i$J$k%U%)%s%H$r:n$C$F!";H$C$F$$$^$9!#(B

  $B$$$^$$$A4]$HJ8;z$N%P%i%s%9$,<h$l$F$$$J$$$N$G!"$I$J$?$+2~NI$7$F2<$5$k$3(B
$B$H$r4|BT$7$D$D!"(B... (^_^)

hsoval.sty
----- $B$3$3$+$i(B ----- $B$3$3$+$i(B ----- $B$3$3$+$i(B -----
% HS-OVAL DOCUMENT-STYLE OPTION
% Copyright(C)1993 by Hiroaki Sengoku -- This style file is completely
% made on the J-3100SX 081VW that Hiroaki Sengoku owns.
% sengoku@sdl.hitachi.co.jp
% Version 1.00Jan 1, 1993
%
% Sample:
%   \maru{$B@g@P(B}, ... etc
%
%  if you don't want to use HSOval font, place ``\nonhsovalfont'' in your
% document file and add bezier option to \documentstyle. But it needs
% very large storage of TeX.

\newif\ifHSOvalFont \HSOvalFonttrue

\def\nonhsovalfont{\HSOvalFontfalse}
\def\usehsovalfont{\HSOvalFonttrue}

\def\downsize{%
\ifx\@currsize\Huge \huge \else\ifx\@currsize\huge \LARGE
\else\ifx\@currsize\LARGE \Large \else\ifx\@currsize\Large \large
\else\ifx\@currsize\large \normalsize \else\ifx\@currsize\normalsize \small
\else\ifx\@currsize\small \footnotesize
\else\ifx\@currsize\footnotesize \scriptsize
\else\ifx\@currsize\scriptsize \tiny \fi\fi\fi\fi\fi\fi\fi\fi\fi}

{\catcode`\p=12\catcode`\t=12\gdef\@dedim#1pt{#1}}

\ifHSOvalFont
\newfont{\hsoval}{hsoval}
\else
\input bezier.sty
\fi

\def\@marubyoval{\unitlength 1pt
\begin{picture}(\W,\H)
\put(\hW,\hH){\oval(\W,\H)}%
\end{picture}}

\def\maru#1{{%
\setbox\@tempboxa\hbox{#1}%
\@tempdima\wd\@tempboxa \edef\W{\expandafter\@dedim\the\@tempdima}%
\divide\@tempdima by 2 \edef\hW{\expandafter\@dedim\the\@tempdima}%
\newdimen\depth \depth\dp\@tempboxa
\@tempdima\ht\@tempboxa \advance\@tempdima by \depth
\edef\H{\expandafter\@dedim\the\@tempdima}%
\divide\@tempdima by 2 \edef\hH{\expandafter\@dedim\the\@tempdima}%
\setbox\@tempboxa\hbox{%
\ifHSOvalFont
 \@tempdima\H pt \@tempdimb\W pt \multiply\@tempdimb by 5
 \divide\@tempdimb by \@tempdima \@tempcntb\@tempdimb
 \ifnum\@tempcntb>20 \@marubyoval \else
  \advance\@tempcntb by -5
  \divide\@tempdima by \p@ \@tempcnta\@tempdima \advance\@tempcnta by -2
  \divide\@tempcnta by 2 \multiply\@tempcnta by 16
  \advance\@tempcnta by \@tempcntb
  \hsoval\expandafter\char\the\@tempcnta
 \fi
\else
 \unitlength 1pt
 \begin{picture}(\W,\H)
 \bezier{200}(0,\hH)(0,\H)(\hW,\H) \bezier{200}(\hW,\H)(\W,\H)(\W,\hH)
 \bezier{200}(0,\hH)(0,0)(\hW,0) \bezier{200}(\hW,0)(\W,0)(\W,\hH)
 \end{picture}%
\fi}%
\@tempdima\dp\@tempboxa \advance\@tempdima by \ht\@tempboxa
\newbox\@tempboxb \setbox\@tempboxb\hbox{\downsize\downsize #1}%
\@tempdimb\dp\@tempboxb \advance\@tempdimb by \ht\@tempboxb
\advance\@tempdima by -\@tempdimb \divide\@tempdima by 2
\leavevmode\hbox to 0pt{\hbox to \wd\@tempboxa
 {\hfill\raise\@tempdima\box\@tempboxb\hfill}\hss}%
\lower\depth\box\@tempboxa}}
----- $B$3$3$^$G(B ----- $B$3$3$^$G(B ----- $B$3$3$^$G(B -----

hsoval.mf
----- $B$3$3$+$i(B ----- $B$3$3$+$i(B ----- $B$3$3$+$i(B -----
% HSOval font for hsoval.sty
% Copyright(C)1993 by Hiroaki Sengoku -- This metafont file is
% completely made on the J-3100SX081VW that Hiroaki Sengoku owns.
% sengoku@sdl.hitachi.co.jp
% Version 1.00Jan 1, 1993

mode_setup; font_identifier:="HSOval"; font_size 10pt#;

numeric i, j;
for i:=0 upto 15:
  for j:=0 upto 15:
    beginchar(i*16+j,(4+2*i)*(1+0.2*j)*pt#,(4+2*i)*pt#,0pt#);
      path oval;
      numeric hW, hH;
      hW = w/2; hH = (h-d)/2;
      oval = (0,hH)...(hW,-d)...(w,hH)...(hW,h)...cycle;
      pickup pencircle scaled 0.4pt;
      draw oval;
    endchar;
  endfor;
endfor;
end
----- $B$3$3$^$G(B ----- $B$3$3$^$G(B ----- $B$3$3$^$G(B -----
--
$B@g@P9@L@!w%7%9%F%`3+H/8&5f=j!%F|N)@=:n=j(B
sengoku@sdl.hitachi.co.jp (105u)
