summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/seminar/semrot.sty
blob: 4b0d400a0d7576d0a6f10138dc91253d6da8e008 (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
70
71
72
73
74
75
76
77
78
79
80
%% BEGIN sem-rot.sty
\def\fileversion{1.0}
\def\filedate{93/04/01}
%%
%% LaTeX style option `semrot.sty'.
%% For use with LaTeX v2.09 and the `seminar' document style.
%%
%% COPYRIGHT 1993, by Timothy Van Zandt, Timothy.VAN-ZANDT@insead.edu
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.2 of this license
%% or (at your option) any later version.  The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.2 or later is part of all distributions of LaTeX version
%% 1999/12/01 or later.
%%
%%
%% The following is just an interface for seminar.sty:
\def\leftsliderotation#1{\@rotate[l]{#1}}
\def\rightsliderotation#1{\@rotate[r]{#1}}
\sliderotation{left}
%%
%% And the rest is rotate.sty, as distributed with Rokicki's dvips.
%%
%   These macros allow you to rotate or flip a \TeX\ box.  Very useful for
%   sideways tables or upsidedown answers.
%
%   To use, create a box containing the information you want to rotate.
%   (An hbox or vbox will do.)  Now call \@rotr\boxnum to rotate the
%   material and create a new box with the appropriate (flipped) dimensions.
%   \@rotr rotates right, \@rotl rotates left, \@rotu turns upside down, and
%   \@rotf flips.  These boxes may contain other rotated boxes.
%
\newdimen\@rotdimen
\newbox\@rotbox

\def\@vspec#1{\special{ps:#1}}%  passes #1 verbatim to the output
\def\@rotstart#1{\@vspec{gsave currentpoint currentpoint translate
   #1 neg exch neg exch translate}}% #1 can be any origin-fixing transformation
\def\@rotfinish{\@vspec{currentpoint grestore moveto}}% gets back in synch
%
%   First, the rotation right. The reference point of the rotated box
%   is the lower right corner of the original box.
%
\def\@rotr#1{\@rotdimen=\ht#1\advance\@rotdimen by\dp#1%
   \hbox to\@rotdimen{\hskip\ht#1\vbox to\wd#1{\@rotstart{90 rotate}%
   \box#1\vss}\hss}\@rotfinish}
%
%   Next, the rotation left. The reference point of the rotated box
%   is the upper left corner of the original box.
%
\def\@rotl#1{\@rotdimen=\ht#1\advance\@rotdimen by\dp#1%
   \hbox to\@rotdimen{\vbox to\wd#1{\vskip\wd#1\@rotstart{270 rotate}%
   \box#1\vss}\hss}\@rotfinish}%
%
%   Upside down is simple. The reference point of the rotated box
%   is the upper right corner of the original box. (The box's height
%   should be the current font's xheight, \fontdimen5\font,
%   if you want that xheight to be at the baseline after rotation.)
%
\def\@rotu#1{\@rotdimen=\ht#1\advance\@rotdimen by\dp#1%
   \hbox to\wd#1{\hskip\wd#1\vbox to\@rotdimen{\vskip\@rotdimen
   \@rotstart{-1 dup scale}\box#1\vss}\hss}\@rotfinish}%
%
%   And flipped end for end is pretty ysae too. We retain the baseline.
%
\def\@rotf#1{\hbox to\wd#1{\hskip\wd#1\@rotstart{-1 1 scale}%
   \box#1\hss}\@rotfinish}%
%
%   Now the user interface for LaTeX:  \rotate[type]{text} where
%   ``type'' is `l' for left, `r' for right, `u' for upside-down, or
%   `f' for flip.  `l' is the default.
%
\def\rotate{\@ifnextchar[{\@rotate}{\@rotate[l]}}
\def\@rotate[#1]#2{\setbox\@rotbox=\hbox{#2}\@nameuse{@rot#1}\@rotbox}
\endinput
%% END sem-rot.sty