\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{simurgh-empheq}[2013/09/22 v0.01b changes to `empheq.sty']
\MHInternalSyntaxOn
\def\EQ_post_process:{%
  \EQ_initialize:
  \EQ_begin_equation:
  \MH_if_boolean:nT {outer_mult}{
    \setkeys{\MT_options_name:}{
      firstline-afterskip=0pt,
      lastline-preskip=0pt,
      multlined-width=0pt,
    }
    \ifodd \l_EQ_alignmentmode_int
      \setkeys{\MT_options_name:}{multlined-pos=b}
    \else:
      \setkeys{\MT_options_name:}{multlined-pos=t}
    \fi:
      \g@addto@macro\EQ_complete_mathdisplay:{
        \begin{MTmultlined}\relax}
  }
  \g@addto@macro\EQ_complete_mathdisplay:\EQ_mathbody:
  \MH_if_boolean:nT {outer_mult}{
    \g@addto@macro\EQ_complete_mathdisplay:{\end{MTmultlined}}
  }
  \EQ_end_equation:
  \edef\EQ_hyperref_link_fint{\number\Hy@linkcounter}
  \savecounters@
  \EQ_typeset_tags:
  \edef\l_EQ_equation_fint{\number\c@equation}
  \restorecounters@
  \Hy@linkcounter=\EQ_hyperref_link_fint
  \settowidth\l_EQ_totalwidth_dim{%
    $\EQ_left_side:\EQ_innerbox:{}\EQ_right_side:$}%
  \MH_if_boolean:nTF {outer_mult}
    { \def\EQ_next:{_mult} }
    { \def\EQ_next:{} }
  \@nameuse{EQ_modify_linewidth_
            \romannumeral\l_EQ_equationtype_int\EQ_next: :}%
  \EQ_typeset_display:
  \@nameuse{find_displaywidth_
           \romannumeral\l_EQ_equationtype_int\EQ_next: :}
  \MH_addtolength:dn
    \l_EQ_totalwidth_dim{\l_EQ_displaywidth_dim}
  \savebox\EQ_mathdisplay_box[\l_EQ_totalwidth_dim][c]{%
    $\EQ_left_side:
    \EQ_innerbox:{%
      \if_case:w \l_EQ_alignmentmode_int\or:
        \makebox[\l_EQ_displaywidth_dim][c]
          {\usebox{\EQ_mathdisplay_box}}%
      \or:
        \makebox[\l_EQ_displaywidth_dim][c]
          {\usebox{\EQ_mathdisplay_box}}%
      \or:
        \if@RTL\makebox[\l_EQ_displaywidth_dim][r]{%op
          \if_num:w \l_EQ_equationtype_int=5 \else:
            \if_num:w \l_EQ_equationtype_int=6 \else:
              \kern-\@mathmargin
            \fi:
          \fi:
          \usebox{\EQ_mathdisplay_box}}\else%
          \makebox[\l_EQ_displaywidth_dim][l]{%op
          \if_num:w \l_EQ_equationtype_int=5 \else:
            \if_num:w \l_EQ_equationtype_int=6 \else:
              \kern-\@mathmargin
            \fi:
          \fi:
          \usebox{\EQ_mathdisplay_box}}\fi%
      \or:
        \if@RTL\makebox[\l_EQ_displaywidth_dim][r]{%
          \if_num:w \l_EQ_equationtype_int=5 \else:
            \if_num:w \l_EQ_equationtype_int=6 \else:
              \kern-\@mathmargin
            \fi:
          \fi:
          \usebox{\EQ_mathdisplay_box}}\else%
          \makebox[\l_EQ_displaywidth_dim][l]{%
          \if_num:w \l_EQ_equationtype_int=5 \else:
            \if_num:w \l_EQ_equationtype_int=6 \else:
              \kern-\@mathmargin
            \fi:
          \fi:
          \usebox{\EQ_mathdisplay_box}}\fi%
      \fi:}%
    \EQ_right_side:$}%
  \begin{AmSequation*}
  \@nameuse{EQ_place_display_
           \romannumeral\l_EQ_equationtype_int\EQ_next: :}
  \if_dim:w \g_EQ_widesttag_dim>\z@
  \MH_set_boolean_T:n {show_manual_tags}
    \if_case:w \l_EQ_alignmentmode_int
    \or: \EQ_place_tag:N r %#1
    \or: \EQ_place_tag:N l %#2
    \or: \EQ_place_tag:N r %#3
    \or: \EQ_place_tag:N l %#4
    \fi:
  \fi:
  \end{AmSequation*}
  \global\c@equation=\l_EQ_equation_fint\relax
}
\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@}}}}%
  }{}%
}
\MHInternalSyntaxOff


\endinput