%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /data/old/usr/share/texlive/texmf-dist/tex/xelatex/polyglossia/
Upload File :
Create Path :
Current File : //data/old/usr/share/texlive/texmf-dist/tex/xelatex/polyglossia/gloss-sanskrit.ldf

\ProvidesFile{gloss-sanskrit.ldf}[polyglossia: module for sanskrit]
\RequirePackage{devanagaridigits}

\PolyglossiaSetup{sanskrit}{
  langtag=SAN,
  hyphennames={sanskrit,prakrit},
  hyphenmins={1,3},
  frenchspacing=true,
  fontsetup=false, % will be done below
  %TODO localnumber=sanskritnumber
}

\define@key{sanskrit}{Script}[Devanagari]{%
  \setkeys[xpg@setup]{sanskrit}{script=#1}%
  \ifcsdef{fontsetup@sanskrit@#1}%
    {\csname fontsetup@sanskrit@#1\endcsname}%
    {\xpg@error{`#1' is not a valid script for Sanskrit}%
  }%
}

\def\fontsetup@sanskrit@Devanagari{%
  \def\xpg@scripttag@sanskrit{deva}%
  \xpg@fontsetup@nonlatin{sanskrit}}
\def\fontsetup@sanskrit@Gujarati{%
  \def\xpg@scripttag@sanskrit{gujr}%
  \xpg@fontsetup@nonlatin{sanskrit}}
\def\fontsetup@sanskrit@Malayalam{%
  \def\xpg@scripttag@sanskrit{mlym}%
  \xpg@fontsetup@nonlatin{sanskrit}}
\def\fontsetup@sanskrit@Bengali{%
  \def\xpg@scripttag@sanskrit{beng}%
  \xpg@fontsetup@nonlatin{sanskrit}}
\def\fontsetup@sanskrit@Kannada{%
  \def\xpg@scripttag@sanskrit{knda}%
  \xpg@fontsetup@nonlatin{sanskrit}}
\def\fontsetup@sanskrit@Telugu{%
  \def\xpg@scripttag@sanskrit{telu}%
  \xpg@fontsetup@nonlatin{sanskrit}}

\setkeys{sanskrit}{Script} %sets the default for Devanagari

%% TODO option for numerals (Devanagari or Western)
%\def\tmp@western{Western}
%\newif\ifsanskrit@devanagari@numerals
%\sanskrit@devanagari@numeralstrue
%
%\define@key{sanskrit}{numerals}[Devanagari]{%
%  \def\@tmpa{#1}%
%  \ifx\@tmpa\tmp@western
%    \sanskrit@devanagari@numeralsfalse
%  \fi}

\newXeTeXintercharclass\sanskrit@punctthin % ! ? ; : danda double_danda

\def\sanskrit@punctthinspace{{\unskip\thinspace}}

\def\sanskrit@punctuation{%
  \XeTeXinterchartokenstate=1%
  \XeTeXcharclass `\! \sanskrit@punctthin
  \XeTeXcharclass `\? \sanskrit@punctthin
  \XeTeXcharclass `\; \sanskrit@punctthin
  \XeTeXcharclass `\: \sanskrit@punctthin
  \XeTeXcharclass `\। \sanskrit@punctthin
  \XeTeXcharclass `\॥ \sanskrit@punctthin
  \XeTeXinterchartoks \z@ \sanskrit@punctthin = \sanskrit@punctthinspace
}

\def\nosanskrit@punctuation{%
  \XeTeXcharclass `\! \z@
  \XeTeXcharclass `\? \z@
  \XeTeXcharclass `\; \z@
  \XeTeXcharclass `\: \z@
  \XeTeXcharclass `\। \z@
  \XeTeXcharclass `\॥ \z@
  \XeTeXinterchartokenstate=0%
}

\def\noextras@sanskrit{%
  \nosanskrit@punctuation%
}

\def\blockextras@sanskrit{%
  \sanskrit@punctuation%
}

\endinput

Zerion Mini Shell 1.0