From 0f3246084432cce62eeafbf11e702cb4720db9ec Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 19 Sep 2010 22:55:13 +0000 Subject: realscripts update (19sep10) git-svn-id: svn://tug.org/texlive/trunk@19811 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/realscripts/realscripts.sty | 30 ++++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/realscripts/realscripts.sty b/Master/texmf-dist/tex/latex/realscripts/realscripts.sty index 22658d56dee..be557c70890 100644 --- a/Master/texmf-dist/tex/latex/realscripts/realscripts.sty +++ b/Master/texmf-dist/tex/latex/realscripts/realscripts.sty @@ -11,21 +11,28 @@ %% License information appended %% \ProvidesPackage{realscripts} - [2010/08/05 v0.1 Access OpenType subscripts and superscripts] + [2010/09/20 v0.2 Access OpenType subscripts and superscripts] \RequirePackage{fontspec}[2010/05/14 v2.0] \ExplSyntaxOn +\cs_if_exist:NTF \textsubscript +{ + \cs_set_eq:NN \fakesubscript \textsubscript + \cs_set_eq:NN \fakesuperscript \textsuperscript +} +{ + \DeclareDocumentCommand \fakesubscript {m} { + \@textsubscript{\selectfont#1} + } + \DeclareDocumentCommand \fakesuperscript {m} { + \@textsuperscript{\selectfont#1} + } +} \DeclareDocumentCommand \textsubscript {s} { \IfBooleanTF #1 \fakesubscript \realsubscript } \DeclareDocumentCommand \textsuperscript {s} { \IfBooleanTF #1 \fakesuperscript \realsuperscript } -\DeclareDocumentCommand \fakesubscript {m} { - \@textsubscript{\selectfont#1} -} -\DeclareDocumentCommand \fakesuperscript {m} { - \@textsuperscript{\selectfont#1} -} \DeclareDocumentCommand \realsubscript {m} { \fontspec_if_fontspec_font:TF { \fontspec_if_opentype:TF @@ -59,7 +66,14 @@ { \fakesuperscript{#1} } } \cs_set:Npn \@makefnmark { - \mbox{\normalfont\textsuperscript{\@thefnmark}} + \mbox{\footnotemarkfont\textsuperscript{\@thefnmark}} +} +\cs_if_exist:NTF \ftntm@font +{ + \cs_new:Npn \footnotemarkfont {\ftntm@font} +} +{ + \cs_new:Npn \footnotemarkfont {\normalfont} } %% %% Copyright (C) 2010 by Will Robertson -- cgit v1.2.3