%%
%% This is file `hyperref-luapersian.def',
%% generated with the docstrip utility.
%%   ______________________________________
%%   Copyright © 2011  Vafa Khalighi
%% 
%%   License information appended.
%% 
%% 
\ProvidesFile{hyperref-luapersian.def}[2011/08/01 v0.1 bilingual captions for hyperref package]
\ifHy@hyperfootnotes
   \let\H@@footnotetext\@footnotetext
   \let\HRTL@@RTLfootnotetext\@RTLfootnotetext
   \let\HLTR@@LTRfootnotetext\@LTRfootnotetext
    \def\@xfootnotenext[#1]{%
    \begingroup
      \csname c@\@mpfn\endcsname #1\relax
      \unrestored@protected@xdef\@thefnmark{\thempfn}%
    \endgroup
    \ifx\@footnotetext\@mpfootnotetext
      \expandafter\H@@mpfootnotetext
    \else
      \expandafter\H@@footnotetext
    \fi
  }%
    \def\@xRTLfootnotenext[#1]{%
    \begingroup
      \csname c@\@mpfn\endcsname #1\relax
      \unrestored@protected@xdef\@thefnmark{\thempfn}%
    \endgroup
    \ifx\@RTLfootnotetext\@mpRTLfootnotetext
      \expandafter\HRTL@@mpRTLfootnotetext
    \else
      \expandafter\HRTL@@RTLfootnotetext
    \fi
  }%
    \def\@xLTRfootnotenext[#1]{%
    \begingroup
      \csname c@\@mpfn\endcsname #1\relax
      \unrestored@protected@xdef\@thefnmark{\thempfn}%
    \endgroup
    \ifx\@LTRfootnotetext\@mpLTRfootnotetext
      \expandafter\HLTR@@mpLTRfootnotetext
    \else
      \expandafter\HLTR@@LTRfootnotetext
    \fi
  }%
    \def\@xfootnotemark[#1]{%
    \begingroup
      \c@footnote #1\relax
      \unrestored@protected@xdef\@thefnmark{\thefootnote}%
    \endgroup
    \H@@footnotemark
  }%
  \let\H@@mpfootnotetext\@mpfootnotetext
  \let\HRTL@@mpRTLfootnotetext\@mpRTLfootnotetext
  \let\HLTR@@mpLTRfootnotetext\@mpLTRfootnotetext
    \long\def\@mpfootnotetext#1{%
    \H@@mpfootnotetext{%
      \ifHy@nesting
        \hyper@@anchor{\Hy@footnote@currentHref}{#1}%
      \else
        \Hy@raisedlink{%
          \hyper@@anchor{\Hy@footnote@currentHref}{\relax}%
        }#1%
      \fi
    }%
  }%
  \long\def\@mpRTLfootnotetext#1{%
    \HRTL@@mpRTLfootnotetext{%
      \ifHy@nesting
        \hyper@@anchor{\Hy@footnote@currentHref}{#1}%
      \else
        \Hy@raisedlink{%
          \hyper@@anchor{\Hy@footnote@currentHref}{\relax}%
        }#1%
      \fi
    }%
  }%
    \long\def\@mpLTRfootnotetext#1{%
    \HLTR@@mpLTRfootnotetext{%
      \ifHy@nesting
        \hyper@@anchor{\Hy@footnote@currentHref}{#1}%
      \else
        \Hy@raisedlink{%
          \hyper@@anchor{\Hy@footnote@currentHref}{\relax}%
        }#1%
      \fi
    }%
  }%
    \long\def\@footnotetext#1{%
    \H@@footnotetext{%
      \ifHy@nesting
        \hyper@@anchor{\Hy@footnote@currentHref}{#1}%
      \else
        \Hy@raisedlink{%
          \hyper@@anchor{\Hy@footnote@currentHref}{\relax}%
        }%
        \let\@currentHlabel\Hy@footnote@currentHlabel
        \let\@currentHref\Hy@footnote@currentHref
        \let\@currentlabelname\@empty
        #1%
      \fi
    }%
  }%
    \long\def\@RTLfootnotetext#1{%
    \HRTL@@RTLfootnotetext{%
      \ifHy@nesting
        \hyper@@anchor{\Hy@footnote@currentHref}{#1}%
      \else
        \Hy@raisedlink{%
          \hyper@@anchor{\Hy@footnote@currentHref}{\relax}%
        }%
        \let\@currentHlabel\Hy@footnote@currentHlabel
        \let\@currentHref\Hy@footnote@currentHref
        \let\@currentlabelname\@empty
        #1%
      \fi
    }%
  }%
    \long\def\@LTRfootnotetext#1{%
    \HLTR@@LTRfootnotetext{%
      \ifHy@nesting
        \hyper@@anchor{\Hy@footnote@currentHref}{#1}%
      \else
        \Hy@raisedlink{%
          \hyper@@anchor{\Hy@footnote@currentHref}{\relax}%
        }%
        \let\@currentHlabel\Hy@footnote@currentHlabel
        \let\@currentHref\Hy@footnote@currentHref
        \let\@currentlabelname\@empty
        #1%
      \fi
    }%
  }%
  \def\@footnotemark{%
    \leavevmode
    \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
    \stepcounter{Hfootnote}%
    \global\let\Hy@saved@currentHlabel\@currentHlabel
    \global\let\Hy@saved@currentHref\@currentHref
    \hyper@makecurrent{Hfootnote}%
    \global\let\Hy@footnote@currentHlabel\@currentHlabel
    \global\let\Hy@footnote@currentHref\@currentHref
    \global\let\@currentHlabel\Hy@saved@currentHlabel
    \global\let\@currentHref\Hy@saved@currentHref
    \hyper@linkstart{link}{\Hy@footnote@currentHref}%
    \@makefnmark
    \hyper@linkend
    \ifhmode\spacefactor\@x@sf\fi
    \relax
  }%
  \let\HyOrg@maketitle\maketitle
  \def\maketitle{%
    \let\Hy@saved@footnotemark\@footnotemark
    \let\Hy@saved@footnotetext\@footnotetext
    \let\HyRTL@saved@RTLfootnotetext\@RTLfootnotetext
    \let\HyLTR@saved@LTRfootnotetext\@LTRfootnotetext
    \let\@footnotemark\H@@footnotemark
    \let\@footnotetext\H@@footnotetext
    \let\@RTLfootnotetext\HRTL@@RTLfootnotetext
    \let\@LTRfootnotetext\HLTR@@LTRfootnotetext
    \@ifnextchar[\Hy@maketitle@optarg{% ]
      \HyOrg@maketitle
      \Hy@maketitle@end
    }%
  }%
  \def\Hy@maketitle@optarg[#1]{%
    \HyOrg@maketitle[{#1}]%
    \Hy@maketitle@end
  }%
  \def\Hy@maketitle@end{%
    \ifx\@footnotemark\H@@footnotemark
      \let\@footnotemark\Hy@saved@footnotemark
    \fi
    \ifx\@footnotetext\H@@footnotetext
      \let\@footnotetext\Hy@saved@footnotetext
    \fi
    \ifx\@RTLfootnotetext\HRTL@@RTLfootnotetext
      \let\@RTLfootnotetext\HyRTL@saved@RTLfootnotetext
    \fi
    \ifx\@LTRfootnotetext\HLTR@@LTRfootnotetext
      \let\@LTRfootnotetext\HyLTR@saved@LTRfootnotetext
    \fi
  }%
  \def\realfootnote{%
    \@ifnextchar[\@xfootnote{%
      \stepcounter{\@mpfn}%
      \protected@xdef\@thefnmark{\thempfn}%
      \H@@footnotemark\H@@footnotetext
    }%
  }%
\fi
  \def\equationautorefname{\if@RTL معادله\else Equation\fi}%
  \def\footnoteautorefname{\if@RTL زیرنویس\else footnote\fi}%
  \def\itemautorefname{\if@RTL فقره\else item\fi}%
  \def\figureautorefname{\if@RTL شکل\else Figure\fi}%
  \def\tableautorefname{\if@RTL جدول\else Table\fi}%
  \def\partautorefname{\if@RTL بخش\else Part\fi}%
  \def\appendixautorefname{\if@RTL ضمیمه\else Appendix\fi}%
  \def\chapterautorefname{\if@RTL فصل\else chapter\fi}%
  \def\sectionautorefname{\if@RTL قسمت\else section\fi}%
  \def\subsectionautorefname{\if@RTL زیرقسمت\else subsection\fi}%
  \def\subsubsectionautorefname{\if@RTL زیرزیرقسمت\else subsubsection\fi}%
  \def\paragraphautorefname{\if@RTL پاراگراف\else paragraph\fi}%
  \def\subparagraphautorefname{\if@RTL زیرپاراگراف\else subparagraph\fi}%
  \def\FancyVerbLineautorefname{\if@RTL سطر\else line\fi}%
  \def\theoremautorefname{\if@RTL قضیه\else Theorem\fi}%
  \def\pageautorefname{\if@RTL صفحه\else page\fi}%
\AtBeginDocument{%
\let\HyOrg@appendix\appendix
\def\appendix{%
  \ltx@IfUndefined{chapter}%
    {\gdef\theHsection{\Alph{section}}}%
    {\gdef\theHchapter{\Alph{chapter}}}%
  \xdef\Hy@chapapp{\Hy@appendixstring}%
  \HyOrg@appendix
}
}
%% 
%% Copyright © 2011  Vafa Khalighi <vafa018@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 `hyperref-luapersian.def'.
