summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bidi/empheq-xetex-bidi.def
blob: 3b833c44eb6c01c18b6e68ecdbb4577d5fd387d6 (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
%%
%% This is file `empheq-xetex-bidi.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% bidi.dtx  (with options: `empheq-xetex-bidi.def')
%% 
%%   ______________________________________
%%   Copyright © 2009–2011  Vafa Khalighi
%% 
%%   License information appended.
%% 
%% 
\ProvidesFile{empheq-xetex-bidi.def}[2011/03/01 v0.1 bidi adaptations for empheq package for XeTeX engine]
\MHInternalSyntaxOn
\AtBeginDocument{%
  \@ifpackageloaded{fancybox}{%
    \@ifpackageloaded{color}{\definecolor{shadowcolor}{rgb}{0,0,0}}%
    {\renewcommand*\textcolor[2]{\normalcolor{#2}}}%
    \renewcommand*\shadowbox{%
      \@ifstar{\MH_set_boolean_T:n {shadowbox_star}
               \VerbBox\EQ_shadowbox:n}
              {\MH_set_boolean_F:n {shadowbox_star}
               \VerbBox\EQ_shadowbox:n}}
    \def\EQ_shadowbox:n #1{%
      \sbox{\z@}{\fbox{#1}}%
      \MH_if_boolean:nTF {shadowbox_star}{
        \MH_setlength:dn \@tempdima{\z@}%
      }{
        \MH_setlength:dn \@tempdima{\dp\z@+\shadowsize}%
      }
      \raisebox{\@tempdima}{%
      \if@RTL\makebox[\z@][r]{%
          \kern\shadowsize \textcolor{shadowcolor}{%
            \rule[-\dp\z@-\shadowsize]{\wd\z@}{\shadowsize}}%
        }\else%
        \makebox[\z@][l]{%
          \kern\shadowsize \textcolor{shadowcolor}{%
            \rule[-\dp\z@-\shadowsize]{\wd\z@}{\shadowsize}}%
        }\fi%
        \usebox\z@\textcolor{shadowcolor}{%
          \rule[-\dp\z@-\shadowsize]{\shadowsize}{\ht\z@+\dp\z@}}}}%
  }{}%
}
\renewenvironment{EmphEqMainEnv}{\@RTLfalse\collect@body\EQ_getbody:n}{%
  \if_num:w \l_EQ_equationtype_int=\z@ %ZeroCheckpoint
    \EQ_upgrade_error:
  \else:
    \EQ_post_process:
    \ignorespacesafterend
  \fi:}
\MHInternalSyntaxOff
%% 
%% Copyright © 2009–2011  Vafa Khalighi <vafakhlgh@gmail.com>
%% 
%% 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 “author-maintained” (as per LPPL maintenance status)
%% by Vafa Khalighi.
%% 
%% 
%% 
%%
%% End of file `empheq-xetex-bidi.def'.