summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty')
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty41
1 files changed, 26 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
index a690db0eb37..259777fa392 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
@@ -14,27 +14,38 @@
%%
%%
\ProvidesPackage{fontspec-patches}
- [2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTeX]
+ [2015/03/14 v2.4c Font selection for XeLaTeX and LuaLaTeX]
\ExplSyntaxOn
-\cs_set_protected:Npn \@fnsymbol #1
+\cs_if_exist:NF \TextOrMath
{
- \int_case:nnF {#1}
+ % copy official definition:
+ \protected\expandafter\def\csname TextOrMath\space\endcsname{%
+ \ifmmode \expandafter\@secondoftwo
+ \else \expandafter\@firstoftwo \fi}
+ \edef\TextOrMath#1#2{%
+ \expandafter\noexpand\csname TextOrMath\space\endcsname
+ {#1}{#2}}
+ % translation of official definition:
+ \cs_set:Npn \@fnsymbol #1
{
- {0} {}
- {1} { \mode_if_math:TF *\textasteriskcentered }
- {2} { \mode_if_math:TF \dagger\textdagger }
- {3} { \mode_if_math:TF \ddagger\textdaggerdbl }
- {4} { \mode_if_math:TF \mathsection\textsection }
- {5} { \mode_if_math:TF \mathparagraph\textparagraph }
- {6} { \mode_if_math:TF \|\textbardbl }
- {7} { \mode_if_math:TF {**}{\textasteriskcentered\textasteriskcentered} }
- {8} { \mode_if_math:TF {\dagger\dagger}{\textdagger\textdagger} }
- {9} { \mode_if_math:TF {\ddagger\ddagger}{\textdaggerdbl\textdaggerdbl} }
+ \int_case:nnF {#1}
+ {
+ {0} {}
+ {1} { \TextOrMath \textasteriskcentered* }
+ {2} { \TextOrMath \textdagger\dagger }
+ {3} { \TextOrMath \textdaggerdbl\ddagger }
+ {4} { \TextOrMath \textsection\mathsection }
+ {5} { \TextOrMath \textparagraph\mathparagraph }
+ {6} { \TextOrMath \textbardbl\| }
+ {7} { \TextOrMath {\textasteriskcentered\textasteriskcentered}{**} }
+ {8} { \TextOrMath {\textdagger\textdagger}{\dagger\dagger} }
+ {9} { \TextOrMath {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger} }
+ }
+ { \@ctrerr }
+ }
}
- { \@ctrerr }
- }
\DeclareRobustCommand \em
{
\@nomath\em