summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-05-23 17:40:57 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-05-23 17:40:57 +0000
commitdc707753592b6a174afce544ae7b97871c7f9730 (patch)
tree340bab0cfa3107f864f29962455683674fc45a53 /Master/texmf-dist/source/xelatex
parentcfc57c15bdc31423630e7097192c6ae61e45e19a (diff)
xltxra pseudo-update (new tds.zip)
git-svn-id: svn://tug.org/texlive/trunk@8307 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r--Master/texmf-dist/source/xelatex/xltxtra/xltxtra.dtx107
1 files changed, 57 insertions, 50 deletions
diff --git a/Master/texmf-dist/source/xelatex/xltxtra/xltxtra.dtx b/Master/texmf-dist/source/xelatex/xltxtra/xltxtra.dtx
index 75a07725878..c4163f4e813 100644
--- a/Master/texmf-dist/source/xelatex/xltxtra/xltxtra.dtx
+++ b/Master/texmf-dist/source/xelatex/xltxtra/xltxtra.dtx
@@ -4,7 +4,7 @@
%</internal>
%<*readme>
-------------------------
-THE XLTXTRA PACKAGE v0.3b
+THE XLTXTRA PACKAGE v0.3c
This package provides a few small features that
are useful for XeLaTeX.
@@ -133,7 +133,7 @@ This work consists of the file xltxtra.dtx
%
% These two macros have been redefined to take advantage, if possible, of actual superior or inferior glyphs in the main document font. This is very important for high-quality typesetting — compare this first example to the third; yes, they are the same font.
% \begin{quotation}\color{niceblue}
-% \fontspec{Hoefler Text}
+% \fontspec{Skia}
% |\textsuperscript | \textsuperscript{abcdefghijklmnopqrstuvwxyz1234567890}\par
% |\textsubscript | \textsubscript{abcdefghijklmnopqrstuvwxyz1234567890}
% \end{quotation}
@@ -146,7 +146,7 @@ This work consists of the file xltxtra.dtx
% \end{quotation}
% The original definitions are available in starred verions of the commands:
% \begin{quotation}\color{niceblue}
-% \fontspec{Hoefler Text}
+% \fontspec{Skia}
% |\textsuperscript* | \textsuperscript*{abcdefghijklmnopqrstuvwxyz1234567890}\par
% |\textsubscript* | \textsubscript*{abcdefghijklmnopqrstuvwxyz1234567890}
% \end{quotation}
@@ -219,14 +219,14 @@ This work consists of the file xltxtra.dtx
% \subsection{Vulgar fractions}
% The \cmd\vfrac\ command for setting `vulgar' fractions based on AAT or OpenType font features. Not really recommended for many purposes, depending on your text, but it's a good example of how to program such things using \pkg{fontspec}.
% \begin{example}
-% \fontspec{Hoefler Text}
-% AAT: \vfrac{123}{456}\par
+% \fontspec{Skia}
+% AAT: \vfrac{123}{456}\\
% \fontspec{Warnock Pro}
% ICU: \vfrac{123}{456}
% \end{example}
% \noindent (This can be achieved in regular \LaTeX\ with the \pkg{nicefrac} package, but don't believe its name: these fractions aren't nice!)
%
-% Only use it when you know it will work; no warnings are given if the font doesn't support it.
+% Only use it when you know it will work; no warnings are given if the font doesn't support the necessary features.
%
% \subsection{Named glyphs}
% Along the way somewhere, \XeTeX\ added support for selecting glyphs from a TrueType-based OpenType font based on their internal glyph name. Jonathan Kew posted the following definition as a nice interface to it.
@@ -249,7 +249,7 @@ This work consists of the file xltxtra.dtx
%
% \begin{macrocode}
\ProvidesPackage{xltxtra}
- [2007/09/01 v0.3b Improvements for the "XeLaTeX" format]
+ [2008/03/11 v0.3c Improvements for the "XeLaTeX" format]
% \end{macrocode}
%
% \changes{v0.3}{2007/05/29}{Added proper documentation.}
@@ -533,34 +533,38 @@ This work consists of the file xltxtra.dtx
% \begin{macrocode}
\DeclareRobustCommand*\realsubscript[1]{%
\begingroup
- \c@zf@script 1818326126\relax
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@set@font@type
- \ifzf@atsui
- \zf@make@aat@feature@string{10}{2}%
- \unless\ifx\@tempa\@empty
- {\addfontfeature{VerticalPosition=Inferior}#1}%
- \else
- \fakesubscript{#1}%
- \fi
- \fi
- \ifzf@icu
- \zf@check@ot@feat{+subs}%
- \if@tempswa
- {\addfontfeature{VerticalPosition=Inferior}#1}%
- \else
- \zf@check@ot@feat{+sinf}%
+ \ifcsname zf@family@fontdef\f@family\endcsname
+ \c@zf@script 1818326126\relax
+ \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+ \zf@set@font@type
+ \ifzf@icu
+ \zf@check@ot@feat{+subs}%
\if@tempswa
- {\addfontfeature{VerticalPosition=ScientificInferior}#1}%
+ {\addfontfeature{VerticalPosition=Inferior}#1}%
+ \else
+ \zf@check@ot@feat{+sinf}%
+ \if@tempswa
+ {\addfontfeature{VerticalPosition=ScientificInferior}#1}%
+ \else
+ \fakesubscript{#1}%
+ \fi
+ \fi
+ \else\ifzf@atsui
+ \zf@make@aat@feature@string{10}{2}%
+ \unless\ifx\@tempa\@empty
+ {\addfontfeature{VerticalPosition=Inferior}#1}%
\else
\fakesubscript{#1}%
\fi
- \fi
+ \fi\fi
+ \else
+ \fakesubscript{#1}%
\fi
\endgroup}
% \end{macrocode}
% \changes{v0.1}{2006/05/03}{Implemented.}
% \changes{v0.3}{2007/05/29}{Fixes to catch up with fontspec. Name change.}
+% \changes{v0.3c}{2008/03/02}{Fixed crash when used with a TFM font.}
% \end{macro}
%
% \begin{macro}{\realsuperscript}
@@ -568,29 +572,33 @@ This work consists of the file xltxtra.dtx
% \begin{macrocode}
\DeclareRobustCommand*\realsuperscript[1]{%
\begingroup
- \c@zf@script 1818326126\relax
- \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
- \zf@set@font@type
- \ifzf@atsui
- \zf@make@aat@feature@string{10}{1}%
- \unless\ifx\@tempa\@empty
- {\addfontfeature{VerticalPosition=Superior}#1}%
- \else
- \fakesuperscript{#1}%
- \fi
- \fi
- \ifzf@icu
- \zf@check@ot@feat{+sups}%
- \if@tempswa
- {\addfontfeature{VerticalPosition=Superior}#1}%
- \else
- \fakesuperscript{#1}%
- \fi
+ \ifcsname zf@family@fontdef\f@family\endcsname
+ \c@zf@script 1818326126\relax
+ \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
+ \zf@set@font@type
+ \ifzf@icu
+ \zf@check@ot@feat{+sups}%
+ \if@tempswa
+ {\addfontfeature{VerticalPosition=Superior}#1}%
+ \else
+ \fakesuperscript{#1}%
+ \fi
+ \else\ifzf@atsui
+ \zf@make@aat@feature@string{10}{1}%
+ \unless\ifx\@tempa\@empty
+ {\addfontfeature{VerticalPosition=Superior}#1}%
+ \else
+ \fakesuperscript{#1}%
+ \fi
+ \fi\fi
+ \else
+ \fakesuperscript{#1}%
\fi
\endgroup}
% \end{macrocode}
% \changes{v0.1}{2006/05/03}{Implemented.}
% \changes{v0.3}{2007/05/29}{Fixes to catch up with fontspec. Name change.}
+% \changes{v0.3c}{2008/03/02}{Fixed crash when used with a TFM font.}
% \end{macro}
%
% Patching footnotes:
@@ -613,16 +621,15 @@ This work consists of the file xltxtra.dtx
\c@zf@script 1818326126\relax
\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
\zf@set@font@type
- \ifzf@atsui
- {\addfontfeature{VerticalPosition=Superior}#1}%
- \textfractionsolidus
- {\addfontfeature{VerticalPosition=Inferior}#2}%
- \fi
\ifzf@icu
{\addfontfeature{VerticalPosition=Numerator}#1}%
\textfractionsolidus
{\addfontfeature{VerticalPosition=Denominator}#2}%
- \fi
+ \else\ifzf@atsui
+ {\addfontfeature{VerticalPosition=Superior}#1}%
+ \textfractionsolidus
+ {\addfontfeature{VerticalPosition=Inferior}#2}%
+ \fi\fi
\endgroup}
% \end{macrocode}
% \changes{v0.1}{2006/05/03}{Implemented.}