summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bidi/rotating-xetex-bidi.def
blob: 0f18d36d7d52afa207d3e8fcb93bdc831155b2b9 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
%%
%% This is file `rotating-xetex-bidi.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% bidi.dtx  (with options: `rotating-xetex-bidi.def')
%% 
%%   ______________________________________
%%   Copyright © 2009–2013  Persian TeX Group
%% 
%%   License information appended.
%% 
%% 
\ProvidesFile{rotating-xetex-bidi.def}[2013/04/12 v0.1 bidi adaptations for rotating package for XeTeX engine]
\def\end@rotfloat{%
   \end{minipage}\end{lrbox}%
   \stepcounter{r@tfl@t}%
   \rot@label{RF\ther@tfl@t}%
   \rot@pageref{RF\ther@tfl@t}{\R@@page}%
   \edef\@tempa{Adding sideways \@captype\space on page \R@@page\space}
   \rot@mess@toks\expandafter{\@tempa}
   \wd\rot@float@box\z@
   \ht\rot@float@box\z@
   \dp\rot@float@box\z@
   \vboxL to \textheight{%
    \setkeys{Grot}{units=360}%
    \if@rot@twoside
    \else
      \let\R@@page\rot@LR
    \fi
    \ifthenelse{\isodd{\R@@page}}{%
      \if@rot@twoside
        \rot@mess@toks\expandafter{\the\rot@mess@toks (right hand page)}%
      \fi
      \vfill
      \@@line{%
        \hskip\rotFPtop
        \rotatebox{90}{\box\rot@float@box}%
        \hskip\rotFPbot
      }%
    }{%
      \if@rot@twoside
        \rot@mess@toks\expandafter{\the\rot@mess@toks (left hand page)}%
      \fi
      \@@line{%
        \hskip\rotFPbot
        \rotatebox{-90}{\box\rot@float@box}%
        \hskip\rotFPtop
      }%
      \vfill
    }%
    \rot@message{\the\rot@mess@toks}
  }%
  \end@float
}
\let\endsidewaysfigure\end@rotfloat
\let\endsidewaystable\end@rotfloat
\def\end@rotdblfloat{%
  \end{minipage}\end{lrbox}%
  \stepcounter{r@tfl@t}%
  \rot@label{RF\ther@tfl@t}%
  \rot@pageref{RF\ther@tfl@t}{\R@@page}%
  \edef\@tempa{Adding sideways \@captype\space on page \R@@page\space}
  \rot@mess@toks\expandafter{\@tempa}
  \@tempdima\ht\rot@float@box
  \advance\@tempdima by \dp\rot@float@box
  \wd\rot@float@box\z@
  \ht\rot@float@box\z@
  \dp\rot@float@box\z@
  \vboxL to \textheight{%
    \setkeys{Grot}{units=360}%
    \if@rot@twoside
    \else
      \let\R@@page\rot@LR
    \fi
    \ifthenelse{\isodd{\R@@page}}{%
      \ifrot@messages
        \if@rot@twoside
  \rot@mess@toks\expandafter{\the\rot@mess@toks (right hand page)}%
\fi
      \fi
      \vfill
      \@@line{%
        \hskip\rotFPtop
        \rotatebox{90}{\box\rot@float@box}%
        \hskip\rotFPbot
      }%
    }{%
      \ifrot@messages
        \if@rot@twoside
  \rot@mess@toks\expandafter{\the\rot@mess@toks (left hand page)}%
\fi
      \fi%
      \@@line{%
        \hskip\rotFPbot
        \rotatebox{-90}{\box\rot@float@box}%
        \hskip\rotFPtop
      }%
      \vfill
    }%
    \rot@message{\the\rot@mess@toks}%
  }%
  \end@dblfloat
}
\def\turn#1{%
  \Grot@setangle{#1}%
  \setbox\z@\color@hbox\ifmmode\if@RTL\beginR\fi\else\if@RTL\beginR\fi\fi\ignorespaces}
\def\endturn{%
  \ifmmode\if@RTL\endR\fi\else\if@RTL\endR\fi\fi
  \unskip\color@endbox
  \Grot@x\z@
  \Grot@y\z@
  \ifmmode\else\if@RTL\beginL\fi\fi\Grot@box\ifmmode\else\if@RTL\endL\fi\fi
}
\def\rotate#1{%
  \Grot@setangle{#1}%
  \setbox\z@\color@hbox\ifmmode\if@RTL\beginR\fi\else\if@RTL\beginR\fi\fi\ignorespaces}
\def\endrotate{%
 \ifmmode\if@RTL\endR\fi\else\if@RTL\endR\fi\fi
  \unskip\color@endbox
  \Grot@x\z@
  \Grot@y\z@
  \wd0\z@\dp0\z@\ht0\z@
  \ifmmode\else\if@RTL\beginL\fi\fi\Grot@box\ifmmode\else\if@RTL\endL\fi\fi
}
\def\turnbox#1#2{%
  \Grot@setangle{#1}%
  \setbox\z@\hbox{{\ifmmode\if@RTL\beginR\fi\else\if@RTL\beginR\fi\fi#2\ifmmode\if@RTL\endR\fi\else\if@RTL\endR\fi\fi}}%
  \Grot@x\z@\Grot@y\z@
  \wd0\z@\dp0\z@\ht0\z@
  \ifmmode\else\if@RTL\beginL\fi\fi\Grot@box\ifmmode\else\if@RTL\endL\fi\fi
}
%% 
%% Copyright © 2009–2013  Persian TeX Group <persian-tex@tug.org>
%% 
%% It may be distributed and/or modified 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 `rotating-xetex-bidi.def'.