summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/realscripts/README45
-rw-r--r--Master/texmf-dist/doc/latex/realscripts/realscripts.pdfbin0 -> 90799 bytes
-rw-r--r--Master/texmf-dist/source/latex/realscripts/realscripts.dtx264
-rw-r--r--Master/texmf-dist/source/latex/realscripts/realscripts.ins58
-rw-r--r--Master/texmf-dist/tex/latex/realscripts/realscripts.sty80
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/realscripts.tlpsrc0
8 files changed, 449 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/realscripts/README b/Master/texmf-dist/doc/latex/realscripts/README
new file mode 100644
index 00000000000..c81220e8ddd
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/realscripts/README
@@ -0,0 +1,45 @@
+The REALSCRIPTS package
+=======================
+
+Small package to replace `\textsuperscript` & `\textsubscript`
+by equivalent commands that use OpenType font features
+to access the appropriate glyphs if possible.
+
+Also patches LaTeX's default footnote command to use this
+new `\textsuperscript` for footnote symbols.
+
+Requires fontspec running on either XeLaTeX or LuaLaTeX.
+
+For more information see the documentation realscripts.pdf.
+
+Change History
+--------------
+
+v0.1
+
+ * First release
+ * Extracted from the xltxtra package
+
+Maintenance
+-----------
+
+The release version of this package is available from CTAN:
+
+* <http://ctan.org/pkg/realscripts>
+
+Development and historical versions are available from GitHub:
+
+* <http://github.com/wspr/realscripts/>
+
+Please report bugs and feature suggestions to the issue tracker:
+
+* <http://github.com/wspr/realscripts/issues>
+
+Licence
+-------
+
+The realscripts package is released under the
+[LaTeX Project Public License](http://www.latex-project.org/lppl/)
+version 1.3c or greater. The current maintainer is Will Robertson.
+
+Copyright 2010 Will Robertson
diff --git a/Master/texmf-dist/doc/latex/realscripts/realscripts.pdf b/Master/texmf-dist/doc/latex/realscripts/realscripts.pdf
new file mode 100644
index 00000000000..2f6a63cffd7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/realscripts/realscripts.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/realscripts/realscripts.dtx b/Master/texmf-dist/source/latex/realscripts/realscripts.dtx
new file mode 100644
index 00000000000..22b00f667ea
--- /dev/null
+++ b/Master/texmf-dist/source/latex/realscripts/realscripts.dtx
@@ -0,0 +1,264 @@
+% \iffalse
+%
+%<*internal>
+\begingroup
+%</internal>
+%<*batchfile>
+\input docstrip.tex
+\keepsilent
+\preamble
+ ____________________________
+ The REALSCRIPTS package
+ (C) 2010 Will Robertson
+ License information appended
+
+\endpreamble
+\postamble
+
+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.
+
+\endpostamble
+\askforoverwritefalse
+\generate{\file{realscripts.sty}{\from{realscripts.dtx}{package}}}
+%</batchfile>
+%<batchfile>\endbatchfile
+%<*internal>
+\generate{\file{realscripts.ins}{\from{realscripts.dtx}{batchfile}}}
+\def\tmpa{plain}
+\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
+\endgroup
+%</internal>
+%
+% \begin{macrocode}
+%<*driver>
+\ProvidesFile{realscripts.dtx}
+%</driver>
+%<package>\ProvidesPackage{realscripts}
+%<*package>
+ [2010/08/05 v0.1 Access OpenType subscripts and superscripts]
+%</package>
+% \end{macrocode}
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{color,graphicx,metalogo,hologo,fontspec,realscripts}
+\linespread{1.05} % A bit more space between lines
+\frenchspacing % Remove extra space after punctuation
+\definecolor{niceblue}{rgb}{0.1,0.2,1}
+\def\theCodelineNo{\textcolor{niceblue}{\sffamily\tiny\arabic{CodelineNo}}}
+\newcommand*\pkg[1]{\texttt{#1}}
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+% \errorcontextlines=999
+% \makeatletter
+%
+% \GetFileInfo{\jobname.sty}
+%
+% \title{The \pkg{\jobname} package}
+% \author{Will Robertson}
+% \date{\filedate \qquad \fileversion}
+%
+% \maketitle
+%
+% \noindent
+% OpenType fonts provide the possiblity of using specially-drawn glyphs for
+% subscript and superscript text. \LaTeX\ by default simply uses a smaller
+% font size, which is acceptable if the font has optical sizes. Most fonts
+% don't, however.
+%
+% If you are using the \pkg{fontspec} package\footnote{The \pkg{fontspec} package requires \XeLaTeX\ or \hologo{LuaLaTeX}.} to select OpenType fonts
+% (or other sorts of fonts with the necessary font features), then loading
+% this package will provide versions of the \cmd\textsuperscript\ and
+% \cmd\textsubscript\ commands that take advantage of the OpenType font
+% features.
+%
+% This package will also patch the default \LaTeX\ footnote mechanism to
+% use \cs{textsuperscript} automatically.
+%
+% Here is an example using the `{\fontspec{Skia} Skia}' font of Mac\,OS\,X: (surrounded by `A' and `Z' for visual context)
+%
+% \begin{quotation}\color{niceblue}
+% \fontspec{Skia}
+% |\textsuperscript | A \textsuperscript{abcdefghijklmnopqrstuvwxyz1234567890} Z\par
+% |\textsubscript | A \textsubscript{abcdefghijklmnopqrstuvwxyz1234567890} Z
+% \end{quotation}
+% The original definitions are available in starred verions of the commands:
+% (compare this example to that above to see why using these features is often desirable)
+% \begin{quotation}\color{niceblue}
+% \fontspec{Skia}
+% |\textsuperscript* | A \textsuperscript*{abcdefghijklmnopqrstuvwxyz1234567890} Z\par
+% |\textsubscript* | A \textsubscript*{abcdefghijklmnopqrstuvwxyz1234567890} Z
+% \end{quotation}
+% When the glyphs are not available the commands will fall back on the standard technique of scaling down the text font:
+% (this is Mac\,OS\,X's `{\fontspec{Didot} Didot}')
+% \begin{quotation}\color{niceblue}
+% \fontspec{Didot}
+% |\textsuperscript | A \textsuperscript{abcdefghijklmnopqrstuvwxyz1234567890} Z\par
+% |\textsubscript | A \textsubscript{abcdefghijklmnopqrstuvwxyz1234567890} Z
+% \end{quotation}
+% But beware fonts that contain the necessary font features but lack the full repertoire of glyphs: (this is `{\fontspec{Adobe Jenson Pro}Adobe Jenson Pro}')
+% \begin{quotation}\color{niceblue}
+% \fontspec{Adobe Jenson Pro}
+% |\textsuperscript | A {\textsuperscript{abcdefghijklmnopqrstuvwxyz1234567890}} Z\par
+% |\textsubscript | A {\textsubscript{abcdefghijklmnopqrstuvwxyz1234567890}} Z
+% \end{quotation}
+%
+% The functionality of the starred and non-starred commands can
+% also be accessed using the macros
+% \cmd\realsubscript,
+% \cmd\realsuperscript,
+% \cmd\fakesubscript, and
+% \cmd\fakesuperscript, in case another package (or you wish to)
+% redefine the original \cmd\text\dots\ commands
+%
+% \newpage
+% \part{The \textsf{\jobname} package}
+%\iffalse
+%<*package>
+%\fi
+% This is the package implementation.
+%
+% \begin{macrocode}
+\RequirePackage{fontspec}[2010/05/14 v2.0]
+\ExplSyntaxOn
+% \end{macrocode}
+%
+% \begin{macro}{\textsubscript}
+% \begin{macro}{\textsubscript*}
+% \begin{macro}{\textsuperscript}
+% \begin{macro}{\textsuperscript*}
+% These commands are either defined to create fake or real sub-/super-scripts if they are starred or not, respectively.
+% \begin{macrocode}
+\DeclareDocumentCommand \textsubscript {s} {
+ \IfBooleanTF #1 \fakesubscript \realsubscript
+}
+\DeclareDocumentCommand \textsuperscript {s} {
+ \IfBooleanTF #1 \fakesuperscript \realsuperscript
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\fakesubscript}
+% \begin{macro}{\fakesuperscript}
+% The old (`fake') methods:
+% \begin{macrocode}
+\DeclareDocumentCommand \fakesubscript {m} {
+ \@textsubscript{\selectfont#1}
+}
+\DeclareDocumentCommand \fakesuperscript {m} {
+ \@textsuperscript{\selectfont#1}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\realsubscript}
+% The new subscript command to use OpenType features if possible.
+% \begin{macrocode}
+\DeclareDocumentCommand \realsubscript {m} {
+ \fontspec_if_fontspec_font:TF {
+% \end{macrocode}
+% For OpenType fonts, the subscript feature (|subs|) is used, but if that doesn't
+% exist then the scientific inferior feature (|sinf|) is used on the assumption
+% that something's better than nothing.
+% \begin{macrocode}
+ \fontspec_if_opentype:TF
+ { \fontspec_if_feature:nTF {+subs}
+ { {\addfontfeature{VerticalPosition=Inferior}#1} }
+ { \fontspec_if_feature:nTF {+sinf}
+ { {\addfontfeature{VerticalPosition=ScientificInferior}#1} }
+ { \fakesubscript{#1} }
+ }
+ }
+% \end{macrocode}
+% ATSUI fonts:
+% \begin{macrocode}
+ { \fontspec_if_aat_feature:nnTF {10} {2}
+ { {\addfontfeature{VerticalPosition=Inferior}#1} }
+ { \fakesubscript{#1} }
+ }
+ }
+% \end{macrocode}
+% Non-fontspec fonts:
+% \begin{macrocode}
+ { \fakesubscript{#1} }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\realsuperscript}
+% The new superscript command to use OpenType features if possible.
+% \begin{macrocode}
+\DeclareDocumentCommand \realsuperscript {m} {
+ \fontspec_if_fontspec_font:TF
+ {
+% \end{macrocode}
+% OpenType fonts:
+% \begin{macrocode}
+ \fontspec_if_opentype:TF
+ { \fontspec_if_feature:nTF {+sups}
+ { {\addfontfeature{VerticalPosition=Superior}#1} }
+ { \fakesuperscript{#1} }
+ }
+% \end{macrocode}
+% ATSUI fonts:
+% \begin{macrocode}
+ { \fontspec_if_aat_feature:nnTF {10} {1}
+ { {\addfontfeature{VerticalPosition=Superior}#1} }
+ { \fakesuperscript{#1} }
+ }
+ }
+% \end{macrocode}
+% Non-fontspec fonts:
+% \begin{macrocode}
+ { \fakesuperscript{#1} }
+}
+% \end{macrocode}
+% \end{macro}
+% Patching footnotes:
+% \begin{macro}{\@makefnmark}
+% This is the command used to typeset the `footnote mark'.
+% \begin{macrocode}
+\cs_set:Npn \@makefnmark {
+ \mbox{\normalfont\textsuperscript{\@thefnmark}}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%\iffalse
+%</package>
+%\fi
+%
+% \Finale
+%
+% \typeout{*************************************************************}
+% \typeout{*}
+% \typeout{* To finish the installation you have to move the following}
+% \typeout{* file into a directory searched by XeTeX:}
+% \typeout{*}
+% \typeout{* \space\space\space realscripts.sty}
+% \typeout{*}
+% \typeout{*************************************************************}
+%
+\endinput
+
diff --git a/Master/texmf-dist/source/latex/realscripts/realscripts.ins b/Master/texmf-dist/source/latex/realscripts/realscripts.ins
new file mode 100644
index 00000000000..be1d9da986f
--- /dev/null
+++ b/Master/texmf-dist/source/latex/realscripts/realscripts.ins
@@ -0,0 +1,58 @@
+%%
+%% This is file `realscripts.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% realscripts.dtx (with options: `batchfile')
+%% ____________________________
+%% The REALSCRIPTS package
+%% (C) 2010 Will Robertson
+%% License information appended
+%%
+\input docstrip.tex
+\keepsilent
+\preamble
+ ____________________________
+ The REALSCRIPTS package
+ (C) 2010 Will Robertson
+ License information appended
+
+\endpreamble
+\postamble
+
+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.
+
+\endpostamble
+\askforoverwritefalse
+\generate{\file{realscripts.sty}{\from{realscripts.dtx}{package}}}
+\endbatchfile
+%%
+%% 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.ins'.
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'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 131cfb3bad0..e99e47df432 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -271,7 +271,7 @@ my @TLP_working = qw(
psu-thesis ptptex punknova purifyeps pxfonts
qcm qobitree qstest qsymbols qtree quotmark
r_und_s randbild randtext rccol rcs rcs-multi rcsinfo
- recipe recipecard recycle
+ realscripts recipe recipecard recycle
refman refstyle regcount register relenc relsize resumemac revtex
rjlparshap rlepsf rmpage
robustcommand robustindex romande romannum rotating rotfloat rotpages
diff --git a/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc
index 30fd67f5820..ec5427a40bd 100644
--- a/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc
@@ -24,6 +24,7 @@ depend nath
depend ot-tableau
depend oubraces
depend proba
+depend realscripts
depend shuffle
depend statex2
depend stmaryrd
diff --git a/Master/tlpkg/tlpsrc/realscripts.tlpsrc b/Master/tlpkg/tlpsrc/realscripts.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/realscripts.tlpsrc