\ProvidesFile{gloss-sanskrit.ldf}[polyglossia: module for sanskrit] \makeatletter \ifx\l@sanskrit\@undefined% \ifx\l@prakrit\@undefined% \xpg@nopatterns{Sanskrit}% \adddialect\l@sanskrit\l@nohyphenation% \else% \let\l@sanskrit=\l@prakrit% \fi% \fi \def\tmp@deva{Devanagari} \define@key{sanskrit}{Script}[Devanagari]{% \gdef\sanskrit@script{#1}} \setkeys{sanskrit}{Script} \newXeTeXintercharclass\sanskrit@punctthin % ! ? ; : danda double_danda \def\sanskrit@punctthinspace{\unskip\thinspace} \def\sanskrit@punctuation{% \frenchspacing% \XeTeXinterchartokenstate=1% \XeTeXcharclass `\! \sankskrit@punctthin \XeTeXcharclass `\? \sankskrit@punctthin \XeTeXcharclass `\; \sankskrit@punctthin \XeTeXcharclass `\: \sankskrit@punctthin \XeTeXcharclass `\। \sankskrit@punctthin \XeTeXcharclass `\॥ \sankskrit@punctthin \XeTeXinterchartoks \z@ \sanskrit@punctthin = \sanskrit@punctthinspace } \def\nosanskrit@punctuation{% \nonfrenchspacing% \XeTeXinterchartokenstate=0% } %\def\captionssanskrit{% % \def\refname{<++>}% % \def\abstractname{<++>}% % \def\bibname{<++>}% % \def\prefacename{<++>}% % \def\chaptername{<++>}% % \def\appendixname{<++>}% % \def\contentsname{<++>}% % \def\listfigurename{<++>}% % \def\listtablename{<++>}% % \def\indexname{<++>}% % \def\figurename{<++>}% % \def\tablename{<++>}% % \def\thepart{}% % \def\partname{<++>}% % \def\pagename{<++>}% % \def\seename{<++>}% % \def\alsoname{<++>}% % \def\enclname{<++>}% % \def\ccname{<++>}% % \def\headtoname{<++>}% % \def\proofname{<++>}% % \def\glossaryname{<++>}% % \def\today{<++>}} \def\sanskrit@font{% \@ifundefined{sanskritfont}{% \@ifundefined{devanagarifont}{% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt \zf@check@ot@script{deva}% \ifx\sanskrit@script\tmp@deva% \if@tempswa% \addfontfeature{Script=Devanagari}% \else% \PackageError{polyglossia}{^^J The current font does not contain the devanagari script!^^J Please define \string\devanagarifont\space or \string\sanskritfont\space with \string\newfontfamily}% \fi% \else% \addfontfeature{Script=\sanskrit@script}% \fi% \zf@check@ot@lang{SAN}% \if@tempswa\addfontfeature{Language=Sanskrit}\fi% }% {\devanagarifont% \zf@check@ot@lang{SAN}% \if@tempswa\addfontfeature{Language=Sanskrit}\fi% }% }% {\sanskritfont}% } \def\selectnormalfontsanskrit{% \let\normalfont=\sanskrit@font% \let\rmfamily=\sanskrit@font% % TODO add setup to define Sans and Mono Sanskrit fonts if desired \let\sffamily=\sanskrit@font% \let\ttfamily=\sanskrit@font% \def\reset@font{\normalfont}} \def\sanskrit@language{\language=\l@sanskrit} \setlocalhyphenmins{sanskrit}{1}{5}% \def\noextras@sanskrit{% \nosanskrit@punctuation% } \def\blockextras@sanskrit{% \sanskrit@punctuation% } \endinput