Newsgroups: fj.comp.texhax
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!dclsic!yilnws!hamamatsu-pc!news.tcp-net.ad.jp!niq0!niqnews!newssinet!hakata!kudpc!kuis-news!kuamp!imamura
From: imamura@kuamp.kyoto-u.ac.jp (Toshiyuki Imamura)
Subject: Re: [Q] vertical caption in figure
Content-Type: text/plain; charset=ISO-2022-JP
Distribution: fj
X-Newsreader: mnews [version 1.19PL2] 1996-01/26(Fri)
Sender: usenet@kuamp.kyoto-u.ac.jp (0000-NewsAdmin(0000))
Lines: 152
Organization: Div. of Applied Systems Science, Kyoto Univ., JAPAN
Message-ID: <DnHoq0.HsF@kuamp.kyoto-u.ac.jp>
References: <TOSHI.96Feb22182631@stork.nml.t.u-tokyo.ac.jp>
Mime-Version: 1.0
X-Nntp-Posting-Host: randy.kuamp.kyoto-u.ac.jp
Date: Wed, 28 Feb 1996 14:10:48 GMT
Xref: galaxy.trc.rwcp.or.jp fj.comp.texhax:7592
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.comp.texhax&nb=7592&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:#B<!w5~Bg1~%7%9$G$9!#(B

>> 
>> $B$J$*!"$3$NCf$G(Binput$B$7$F$$$k(B frbox.sty $B$O0J2<$N$h$&$J$b$N$G$9(B($B:rG/$3$3(B
>> fj.comp.texhax$B$KN.$l$^$7$?(B)$B!#(B
>> 
>> -----<frbox.sty>-----
>> %
>> %
>> %F R B O X . S T Yby T.Imamura <imamura@kuamp.kyoto-u.ac.jp>
>> %
>> %Version 1.1, Feb 13 1995.
>> %Version1.0, Feb  7 1995.

$B%P!<%8%g%s%"%C%W$7$F$^$9$N$G$I$&$>(B
TeX$B4X78$O(B

  http://fndsys.kuamp.kyoto-u.ac.jp/~imamura/tex-styles/tex-utils.html

$B$r8+$k$H2?$+;29M$K$J$k$+$b$7$l$^$;$s!#(B

%
%
%F R B O X . S T Yby T.Imamura <imamura@kuamp.kyoto-u.ac.jp>
%
%Version 1.2, Nov 22 1995.
%Version 1.1, Feb 13 1995.
%Version1.0, Feb  7 1995.
%
%
%For Flip-and-Rotate box LaTeX style
%This style depend on DVI->PS driver!
%Now it supports dvi2ps and jdvi2kps. (maybe dvips.)
%
%[Usage]\frbox{strings}
%    : 180 deg rotate (same as frbox[r])
%\frbox[opt]{strings}
%opt : v ... vertically flip
%    : h ... horizontally flip
%    : r ... 180 deg rotate
%    : + ... +90 deg rotate(clock wise)
%    : - ... -90 deg rotate(clock wise)
%: 0 ...   0 deg rotate
%: 1 ...  45 deg rotate
%: 2 ...  90 deg rotate
%: 3 ... 135 deg rotate
%: 4 ... 180 deg rotate
%: 5 ... 225 deg rotate
%: 6 ... 270 deg rotate
%: 7 ... 315 deg rotate
%
%    other option will be ignored.
\newbox\@frboxbox
\newdimen\@frboxdima
\newdimen\@frboxdimb
\newdimen\@frboxdimc
\newdimen\@frboxdimd
%
\def\@froptanalys#1{%
  \def\@frboxopt{#1}\global\def\@frboxmode{1}%
  \if\@frboxopt v\global\def\@frboxmode{1}\fi%
  \if\@frboxopt h\global\def\@frboxmode{1}\fi%
  \if\@frboxopt r\global\def\@frboxmode{1}\fi%
  \if\@frboxopt +\global\def\@frboxmode{2}\fi%
  \if\@frboxopt -\global\def\@frboxmode{2}\fi%
  \if\@frboxopt 0\global\def\@frboxmode{1}\fi%
  \if\@frboxopt 1\global\def\@frboxmode{3}\fi%
  \if\@frboxopt 2\global\def\@frboxmode{2}\fi%
  \if\@frboxopt 3\global\def\@frboxmode{3}\fi%
  \if\@frboxopt 4\global\def\@frboxmode{1}\fi%
  \if\@frboxopt 5\global\def\@frboxmode{3}\fi%
  \if\@frboxopt 6\global\def\@frboxmode{2}\fi%
  \if\@frboxopt 7\global\def\@frboxmode{3}\fi%
}
\def\frbox{\@ifnextchar[{\@frbox}{\@frbox[r]}}
\def\@frbox[#1]#2{\leavevmode%
  \def\@frboxopt{#1}\@froptanalys{#1}%
  \setbox\@frboxbox\hbox{\strut#2}%
  \if\@frboxmode1%
    \@frboxdima.5\ht\@frboxbox%
    \advance\@frboxdima-.5\dp\@frboxbox%
    \@frboxdimb.5\wd\@frboxbox%
    \kern\@frboxdimb\raise\@frboxdima\hbox to\@frboxdimb{%
    \vrule height\ht\@frboxbox width\z@%
    \special{ps: currentpoint gsave}%
    \if\@frboxopt v%vertically filip
      \special{ps: 0 currentpoint exch pop 2 mul translate 1 -1 scale}\fi%
    \if\@frboxopt h%holizontally filip
      \special{ps: currentpoint pop 2 mul 0 translate -1 1 scale}\fi%
    \if\@frboxopt r%180 deg rotate
      \special{ps: currentpoint 2 mul exch 2 mul exch translate 180 rotate}\fi%
    \if\@frboxopt 4%180 deg rotate
      \special{ps: currentpoint 2 mul exch 2 mul exch translate 180 rotate}\fi%
%else are ignored and printed as normal image.
    \makebox(0,0){\usebox\@frboxbox}%
    \special{ps: grestore moveto}\hss}%
  \fi%
  \if\@frboxmode2%rotate plus minus 90 degree
    \@frboxdima.5\ht\@frboxbox%
    \advance\@frboxdima.5\dp\@frboxbox%
    \@frboxdimb.5\wd\@frboxbox%
    \advance\@frboxdimb-\dp\@frboxbox%
    \kern\@frboxdima\raise\@frboxdimb\hbox to\@frboxdima{%
    \advance\@frboxdimb\@frboxdima%
    \vrule height\@frboxdimb width\z@%
    \special{ps: currentpoint gsave currentpoint}%
    \if\@frboxopt +%90 deg rotate
      \special{ps: add currentpoint exch sub translate 90 rotate}\fi%
    \if\@frboxopt 2%90 deg rotate
      \special{ps: add currentpoint exch sub translate 90 rotate}\fi%
    \if\@frboxopt -%-90 deg rotate
      \special{ps: sub currentpoint add translate -90 rotate}\fi%
    \if\@frboxopt 6%-90 deg rotate
      \special{ps: sub currentpoint add translate -90 rotate}\fi%
    \makebox(0,0){\usebox\@frboxbox}%
    \special{ps: grestore moveto}\hss}%
  \fi%
  \if\@frboxmode3%
     \@frboxdima\wd\@frboxbox%
     \advance\@frboxdima\ht\@frboxbox%
     \advance\@frboxdima\dp\@frboxbox%
     \@frboxdima.35355\@frboxdima%A:=(wd+ht+dp)*sqrt(2)/4
     \@frboxdimb\@frboxdima%
     \advance\@frboxdimb-\dp\@frboxbox%B:=(wd+ht+dp)*sqrt(2)/4-dp
     \kern\@frboxdima\raise\@frboxdimb\hbox to\@frboxdima{%
     \vrule height\@frboxdima width\z@%
     \special{ps: currentpoint gsave}%
     \if\@frboxopt 1%
       \special{ps: currentpoint pop currentpoint sub 2 sqrt div sub}%
       \special{ps: currentpoint exch pop currentpoint add 2 sqrt div sub}%
       \special{ps: translate 45 rotate}\fi%
     \if\@frboxopt 3%
       \special{ps: currentpoint pop currentpoint add 2 sqrt div add}%
       \special{ps: currentpoint exch pop currentpoint sub 2 sqrt div sub}%
       \special{ps: translate 135 rotate}\fi%
     \if\@frboxopt 5%
       \special{ps: currentpoint pop currentpoint sub 2 sqrt div add}%
       \special{ps: currentpoint exch pop currentpoint add 2 sqrt div add}%
       \special{ps: translate 225 rotate}\fi%
     \if\@frboxopt 7%
       \special{ps: currentpoint pop currentpoint add 2 sqrt div sub}%
       \special{ps: currentpoint exch pop currentpoint sub 2 sqrt div add}%
       \special{ps: translate 315 rotate}\fi%
     \makebox(0,0){\usebox\@frboxbox}%
     \special{ps: grestore moveto}\hss}%
  \fi%
}
%
\endinput


