diff options
author | Karl Berry <karl@freefriends.org> | 2010-09-12 22:58:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-09-12 22:58:06 +0000 |
commit | 6522724bb7b7c44c0ba5f960df0d434a5d0d6bd5 (patch) | |
tree | 97b64e3a5396c4d5c56f1d2dc4f6b8069bcae473 /Master/texmf-dist/tex/latex/realscripts | |
parent | ed4611e274ed836df971a830eab84056a1e8980e (diff) |
new latex package realscripts (5aug10)
git-svn-id: svn://tug.org/texlive/trunk@19690 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/realscripts')
-rw-r--r-- | Master/texmf-dist/tex/latex/realscripts/realscripts.sty | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/realscripts/realscripts.sty b/Master/texmf-dist/tex/latex/realscripts/realscripts.sty new file mode 100644 index 00000000000..22658d56dee --- /dev/null +++ b/Master/texmf-dist/tex/latex/realscripts/realscripts.sty @@ -0,0 +1,80 @@ +%% +%% This is file `realscripts.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% realscripts.dtx (with options: `package') +%% ____________________________ +%% The REALSCRIPTS package +%% (C) 2010 Will Robertson +%% License information appended +%% +\ProvidesPackage{realscripts} + [2010/08/05 v0.1 Access OpenType subscripts and superscripts] +\RequirePackage{fontspec}[2010/05/14 v2.0] +\ExplSyntaxOn +\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 + { \fontspec_if_feature:nTF {+subs} + { {\addfontfeature{VerticalPosition=Inferior}#1} } + { \fontspec_if_feature:nTF {+sinf} + { {\addfontfeature{VerticalPosition=ScientificInferior}#1} } + { \fakesubscript{#1} } + } + } + { \fontspec_if_aat_feature:nnTF {10} {2} + { {\addfontfeature{VerticalPosition=Inferior}#1} } + { \fakesubscript{#1} } + } + } + { \fakesubscript{#1} } +} +\DeclareDocumentCommand \realsuperscript {m} { + \fontspec_if_fontspec_font:TF + { + \fontspec_if_opentype:TF + { \fontspec_if_feature:nTF {+sups} + { {\addfontfeature{VerticalPosition=Superior}#1} } + { \fakesuperscript{#1} } + } + { \fontspec_if_aat_feature:nnTF {10} {1} + { {\addfontfeature{VerticalPosition=Superior}#1} } + { \fakesuperscript{#1} } + } + } + { \fakesuperscript{#1} } +} +\cs_set:Npn \@makefnmark { + \mbox{\normalfont\textsuperscript{\@thefnmark}} +} +%% +%% Copyright (C) 2010 by Will Robertson <will.robertson@latex-project.org> +%% +%% Distributable 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 Will Robertson. +%% +%% This work consists of the file realscripts.dtx +%% and the derived files realscripts.sty, +%% realscripts.ins, and +%% realscripts.pdf. +%% +%% +%% End of file `realscripts.sty'. |