diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/glossaries-xepersian.def')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xepersian/glossaries-xepersian.def | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/glossaries-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/glossaries-xepersian.def new file mode 100644 index 00000000000..af83f3337dc --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/xepersian/glossaries-xepersian.def @@ -0,0 +1,100 @@ +%% +%% This is file `glossaries-xepersian.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% xepersian.dtx (with options: `glossaries-xepersian.def') +%% +%% ______________________________________ +%% Copyright © 2008–2013 Persian TeX Group +%% +%% License information appended. +%% +%% + +\ProvidesFile{glossaries-xepersian.def}[2013/04/08 v0.1 xepersian adaptations for glossaries package for XeTeX engine] +\newcommand*{\gls@harfipage}{\@harfi\c@page} +\newcommand*{\gls@tartibipage}{\@tartibi\c@page} +\newcommand*{\gls@adadipage}{\@adadi\c@page} +\renewcommand{\gls@protected@pagefmts}{% + \gls@numberpage,\gls@alphpage,\gls@Alphpage,\gls@romanpage,\gls@harfipage,\gls@tartibipage,\gls@adadipage +} +\renewcommand*{\@@do@wrglossary}[1]{% + \begingroup + \let\orgnumber\number + \let\orgromannumeral\romannumeral + \let\orgalph\@alph + \let\orgAlph\@Alph + \let\orgharfi\@harfi + \let\orgadadi\@adadi + \let\orgtartibi\@tartibi + \def\the##1{% + \ifx##1\c@page \gls@numberpage\else\orgnumber##1\fi}% + \def\number##1{% + \ifx##1\c@page \gls@numberpage\else\orgnumber##1\fi}% + \def\romannumeral##1{% + \ifx##1\c@page \gls@romanpage\else\orgnumber##1\fi}% + \def\@alph##1{% + \ifx##1\c@page \gls@alphpage\else\orgnumber##1\fi}% + \def\@Alph##1{% + \ifx##1\c@page \gls@Alphpage\else\orgnumber##1\fi}% + \def\@harfi##1{% + \ifx##1\c@page \gls@harfipage\else\orgnumber##1\fi}% + \def\@adadi##1{% + \ifx##1\c@page \gls@adadipage\else\orgnumber##1\fi}% + \def\@tartibi##1{% + \ifx##1\c@page \gls@tartibipage\else\orgnumber##1\fi}% + \gls@disablepagerefexpansion + \protected@xdef\@glslocref{\theglsentrycounter}% + \endgroup + \@gls@checkmkidxchars\@glslocref + \expandafter\ifx\theHglsentrycounter\theglsentrycounter + \def\@glo@counterprefix{}% + \else + \protected@edef\@glsHlocref{\theHglsentrycounter}% + \@gls@checkmkidxchars\@glsHlocref + \edef\@do@gls@getcounterprefix{\noexpand\@gls@getcounterprefix + {\@glslocref}{\@glsHlocref}% + }% + \@do@gls@getcounterprefix + \fi + \ifglsxindy + \expandafter\@glo@check@mkidxrangechar\@glsnumberformat\@nil + \def\@glo@range{}% + \expandafter\if\@glo@prefix(\relax + \def\@glo@range{:open-range}% + \else + \expandafter\if\@glo@prefix)\relax + \def\@glo@range{:close-range}% + \fi + \fi + \glossary[\csname glo@#1@type\endcsname]{% + (indexentry :tkey (\csname glo@#1@index\endcsname) + :locref \string"{\@glo@counterprefix}{\@glslocref}\string" % + :attr \string"\@gls@counter\@glo@suffix\string" + \@glo@range + ) + }% + \else + \@set@glo@numformat{\@glo@numfmt}{\@gls@counter}{\@glsnumberformat}% + {\@glo@counterprefix}% + \glossary[\csname glo@#1@type\endcsname]{% + \string\glossaryentry{\csname glo@#1@index\endcsname + \@gls@encapchar\@glo@numfmt}{\@glslocref}}% + \fi +} +%% +%% Copyright © 2008–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 `glossaries-xepersian.def'. |