summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-07-16 17:14:02 +0000
committerKarl Berry <karl@freefriends.org>2007-07-16 17:14:02 +0000
commitf098a3f19cc6d5414b65f0c3b0777f034741ba88 (patch)
tree83d8b1af5d4ee33176a09f3229dce40dbc2a1b58 /Master/texmf-dist/source
parentcdc057d0c6bc289fb757b60024ada53615e5ff4e (diff)
fontspec update (20jun07)
git-svn-id: svn://tug.org/texlive/trunk@4633 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/xelatex/fontspec/fontspec.dtx317
-rw-r--r--Master/texmf-dist/source/xelatex/fontspec/fontspec.ins3
2 files changed, 215 insertions, 105 deletions
diff --git a/Master/texmf-dist/source/xelatex/fontspec/fontspec.dtx b/Master/texmf-dist/source/xelatex/fontspec/fontspec.dtx
index c0c27dc42ba..d75c8b9b7bf 100644
--- a/Master/texmf-dist/source/xelatex/fontspec/fontspec.dtx
+++ b/Master/texmf-dist/source/xelatex/fontspec/fontspec.dtx
@@ -1,24 +1,77 @@
-% \iffalse meta-comment
-%
-%!TEX encoding = UTF-8 Unicode
-%
-% Copyright 2005 by Will Robertson <wspr81@gmail.com>
-%
-% 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 fontspec.dtx
-% and the derived files fontspec.sty,
-% fontspec.ins,
-% and fontspec.pdf.
+% \iffalse
+%<*internal>
+\iffalse
+%</internal>
+%<*readme>
+--------------------------
+THE FONTSPEC PACKAGE v1.14
+
+The fontspec package only works with XeTeX,
+a unicode capable TeX-variant. It provides
+an automatic and unified interface for loading
+fonts in LaTeX. XeTeX allows a direct interface
+to system-installed fonts, so no manual font
+installation is required.
+
+This package also provides access to the large
+number of font features available with AAT and
+OpenType fonts, including upper and lower case
+numbers, proportional and monospaced numbers,
+swash letters, vulgar fractions, ligature
+control, and many others.
+
+It also provides an interface to set the XeTeX
+font mappings, font colour, relative font
+scaling, inter-word space scaling, and more.
+
+------------------------
+SUMMARY OF USER COMMANDS
+
+Font families may be selected individually with the command
+ \fontspec[<font options>]{<font name>}
+
+Commands for selecting fonts efficiently can be created with
+ \newfontfamily\myfamily[<font options>]{<font name>}
+ \newfontface\myfont[<font options>]{<font name>}
+
+Default document fonts are selected with
+ \setmainfont[<font options>]{<font name>}
+ \setsansfont[<font options>]{<font name>}
+ \setmonofont[<font options>]{<font name>}
+
+Fonts to be used in maths are defined with
+ \setmathrm[<font options>]{<font name>}
+ \setmathsf[<font options>]{<font name>}
+ \setmathtt[<font options>]{<font name>}
+ \setboldmathrm[<font options>]{<font name>}
+
+Features to be used for every subsequently defined font are specified with
+ \defaultfontfeatures{<default font options>}
+
+Features may be added to the font currently in use with
+ \addfontfeatures{<font options to add>}
+ \addfontfeature{<...>} does the same thing
+
+Features not provided for out of the box may be defined with
+ \newAATfeature{<feature tag>}{<feature code>}{<selector code>}
+ \newICUfeature{<feature tag>}{[+|-]<4 letter feature string>}
+ \newfontfeature{<feature tag>}{<arbitrary XeTeX font options>}
+
+Features can be renamed and feature options can be renamed with
+ \aliasfontfeature{<current feature>}{<new feature>}
+ \aliasfontfeatureoption{<feature>}{<current option>}{<new option>}
+
+--------------
+Will Robertson
+2004--2007
+%</readme>
+%<*internal>
+\fi
+%</internal>
%
-%<*internalbatchfile>
+%<*internal>
\begingroup
-%</internalbatchfile>
+%</internal>
%<*batchfile>
\input docstrip.tex
\keepsilent
@@ -27,7 +80,7 @@
________________________________
The fontspec package for XeLaTeX
- (C) 2004--2006 Will Robertson
+ (C) 2004--2007 Will Robertson
License information appended.
@@ -35,7 +88,7 @@
\endpreamble
\postamble
-Copyright 2005-2006 by Will Robertson <wspr81@gmail.com>
+Copyright 2004--2007 by Will Robertson <wspr81@gmail.com>
Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -44,22 +97,27 @@ 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 fontspec.dtx
- and the derived files fontspec.sty and fontspec.pdf.
+This work consists of this file fontspec.dtx
+ and the derived files fontspec.sty,
+ fontspec.cfg,
+ fontspec.ins,
+ fontspec-example.ltx,
+ and fontspec.pdf.
\endpostamble
\askforoverwritefalse
\generate{\file{fontspec.sty}{\from{fontspec.dtx}{fontspec}}}
-\generate{\file{fontspec-doc-style.sty}{\from{fontspec.dtx}{doc-style}}}
-\nopreamble\nopostamble
\generate{\file{fontspec.cfg}{\from{fontspec.dtx}{cfg}}}
-\generate{\file{fontspec.ins}{\from{fontspec.dtx}{batchfile}}}
\generate{\file{fontspec-example.ltx}{\from{fontspec.dtx}{example}}}
%</batchfile>
%<batchfile>\endbatchfile
-%<*internalbatchfile>
+%<*internal>
+\generate{\file{fontspec.ins}{\from{fontspec.dtx}{batchfile}}}
+\nopreamble\nopostamble
+\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}}
+\generate{\file{fontspec-doc-style.sty}{\from{fontspec.dtx}{doc-style}}}
\endgroup
-%</internalbatchfile>
+%</internal>
%
%<*driver>
\documentclass{ltxdoc}
@@ -77,7 +135,7 @@ This work consists of the file fontspec.dtx
%
%<*fontspec>
\ProvidesPackage{fontspec}
- [2006/12/24 v1.13 Advanced font selection for XeLaTeX]
+ [2007/06/20 v1.14 Advanced font selection for XeLaTeX]
%</fontspec>
%
% \fi
@@ -135,6 +193,14 @@ This work consists of the file fontspec.dtx
% at least that fonts should load correctly, but hyphenation and other matters
% aren't guaranteed.
%
+% The rest of this section documents \pkg{fontspec}'s package options, which are (briefly):
+% \begin{description}[nolistsep,font=\ttfamily]
+% \item [cm-default] Don't load the Latin Modern fonts;
+% \item [no-math] Don't change any maths fonts;
+% \item [no-config] Don't load \pkg{fontspec.cfg}; and,
+% \item [quiet] Output \pkg{fontspec} warnings in the log file rather than the console output.
+% \end{description}
+%
% \subsubsection{Latin Modern defaults}
% \pkg{fontspec} defines a new \LaTeX\ font encoding for its purposes to allow
% the Latin Modern fonts to be used by default \new{v1.12}. This has three implications:
@@ -148,6 +214,12 @@ This work consists of the file fontspec.dtx
% option if you don't have the Latin Modern fonts installed or you (Mac-specifically)
% want to use the `default \TeX\ font' without using the |xdvipdfmx| driver.
%
+% \subsubsection{Maths `fiddling'}
+% \new{v1.14}
+% By default, \pkg{fontspec} adjusts \LaTeX's default maths setup in order to maintain the correct Computer Modern symbols when the roman font changes. However, it will attempt to avoid doing this if another maths font package is loaded (such as \pkg{mathpazo} or my upcoming \pkg{unicode-math} package).
+%
+% If you find that it is incorrectly changing the maths font when it should be leaving well enough alone, apply the |[no-math]| package option to manually suppress its maths font.
+%
% \subsubsection{Configuration}
% If you wish to customise any part of the \pkg{fontspec} interface (see later
% in this manual, \vref{sec:newfeatures} and~\ref{sec:aliasfontfeature}),
@@ -156,31 +228,22 @@ This work consists of the file fontspec.dtx
% which will be automatically loaded if it is found by \XeTeX. Either place it
% in the same folder as the main document for isolated cases, or in a location that
% \XeTeX\ searches by default, \eg, \url{~/Library/texmf/xelatex/}.
-% The package option \texttt{[noconfig]} will suppress this behaviour
+% The package option |[no-config]| will suppress this behaviour
% under all circumstances.
+% \warn{v1.14}{Used to be \texttt{[noconfig]}, which still works.}
%
% \subsubsection{Warnings}\label{sec:quiet-warnings}
% This package can give many warnings that can be
% harmless if you know what you're doing.
-% Use the \texttt{[quiet]} package option to write
+% Use the |[quiet]| package option to write
% these warnings to the transcript (\texttt{.log}) file instead.
%
-% \subsection{Warning}
-% I still consider this package to be experimental, so I'm not
-% ensuring backwards compatibility at all costs. I don't want to weigh
-% the package down with old ways of doing things, so unfortunately
-% this will mean that some old documents will need to be modified in
-% order to compile correctly after future updates.
-% It'll be worth it in the long run,
-% but you can curse at my lack of foresight as much as you wish in the
-% meantime.
-%
-% Such things, and some other comments, are noted in the margin like
-% this~\warn{v1.6}{An example warning!}, with a red arrow if the
+% \subsection{About this manual}
+% \warn{v1.6}{An example warning!}
+% In the unfortunate case that I need to make backwards incompatible changes (you're probably pretty safe these days), such things, and some other comments, are noted in the margin of this document as shown here, with a red star if the
% change is relevant to the current release of the package. (New features
% are denoted similarly in blue.)
%
-% \subsection{About this manual}
% This document has been typeset with \XeTeX\ using a variety of fonts
% to display various features that the package supports. You will not
% be able to typeset the documentation if you do not have all of these
@@ -348,6 +411,8 @@ This work consists of the file fontspec.dtx
% successful. (Actually, it is \emph{only} \pkg{euler} that is the
% problem.)
%
+% Note that you may find that loading some maths packages won't be as smooth as you expect since \pkg{fontspec} (and \XeTeX\ in general) breaks many of the assumptions of \TeX\ as to where maths characters and accents can be found. Contact me if you have troubles, but I can't guarantee to be able to fix any incompatibilities. The Lucida and Euler maths fonts (the latter loaded with \pkg{euler} rather than \pkg{eulervm}) should be fine; for all others keep an eye out for problems.
+%
% \DescribeMacro{\setmathrm} \DescribeMacro{\setboldmathrm}
% \DescribeMacro{\setmathsf} \DescribeMacro{\setmathtt}
% However, the default text fonts may not necessarily be the ones you
@@ -1681,6 +1746,7 @@ This work consists of the file fontspec.dtx
% \begin{macrocode}
\newif\if@zf@configfile
\newif\if@zf@euenc
+\newif\if@zf@math
% \end{macrocode}
% \paragraph{Counters}
% \begin{macrocode}
@@ -1691,8 +1757,10 @@ This work consists of the file fontspec.dtx
% \end{macrocode}
% \pkg{fontspec} shorthands:
% \begin{macrocode}
-\newcommand\zf@PackageError[2]{\PackageError{fontspec}{#1}{#2}}
-\newcommand\zf@PackageWarning[1]{\PackageWarning{fontspec}{#1}}
+\def\zf@nl{^^J\space\space\space\space}
+\newcommand\zf@PackageError[2]{\PackageError{fontspec}{{\zf@nl #1}^^J}{#2}}
+\newcommand\zf@PackageWarning[1]{%
+ \PackageWarning{fontspec}{\zf@nl #1^^JThis warning occured}}
\newcommand\zf@PackageInfo[1]{\PackageInfo{fontspec}{#1}}
% \end{macrocode}
%
@@ -1716,14 +1784,17 @@ This work consists of the file fontspec.dtx
% \begin{macrocode}
\DeclareOption{cm-default}{\@zf@euencfalse}
\DeclareOption{lm-default}{\@zf@euenctrue}
+\DeclareOption{math}{\@zf@mathtrue}
+\DeclareOption{no-math}{\@zf@mathfalse}
\DeclareOption{config}{\@zf@configfiletrue}
+\DeclareOption{no-config}{\@zf@configfilefalse}
\DeclareOption{noconfig}{\@zf@configfilefalse}
\DeclareOption{quiet}{\let\zf@PackageWarning\zf@PackageInfo}
-\ExecuteOptions{config,lm-default}
+\ExecuteOptions{config,lm-default,math}
\ProcessOptions*
% \end{macrocode}
% \changes{v1.12}{2006/10/24}{Package option for disabling the EU1 encoding.}
-% Only proceed if it is \XeTeX\ that is doing the typesetting.
+% Only proceed if it is \XeTeX\ that is doing the typesetting:
% \begin{macrocode}
\RequirePackage{ifxetex}
\RequireXeTeX
@@ -1747,7 +1818,9 @@ This work consists of the file fontspec.dtx
% \begin{macrocode}
\if@zf@euenc
\def\zf@enc{EU1}
- \RequirePackage{lmodern}
+ \renewcommand{\rmdefault}{lmr}
+ \renewcommand{\sfdefault}{lmss}
+ \renewcommand{\ttdefault}{lmtt}
\RequirePackage[\zf@enc]{fontenc}
\else
\def\zf@enc{U}
@@ -1945,16 +2018,22 @@ This work consists of the file fontspec.dtx
% often typed this instead when adding only a single font feature.
% \begin{macrocode}
\newcommand*\addfontfeatures[1]{%
- \begingroup
- \let\zf@default@options\@empty
- \edef\@tempa{%
- \noexpand\zf@fontspec
- {\csname zf@family@options\f@family\endcsname,#1}%
- {\csname zf@family@fontname\f@family\endcsname}}%
- \@tempa
- \endgroup
- \fontfamily\zf@family\selectfont
- \ignorespaces}
+ \ifcsname zf@family@fontdef\f@family\endcsname
+ \begingroup
+ \let\zf@default@options\@empty
+ \edef\@tempa{%
+ \noexpand\zf@fontspec
+ {\csname zf@family@options\f@family\endcsname,#1}%
+ {\csname zf@family@fontname\f@family\endcsname}}%
+ \@tempa
+ \endgroup
+ \fontfamily\zf@family\selectfont
+ \expandafter\ignorespaces
+ \else
+ \zf@PackageWarning{%
+ \protect\addfontfeature (s) ignored;\zf@nl
+ it cannot be used with a font that wasn't selected by fontspec.}%
+ \fi}
\let\addfontfeature\addfontfeatures
% \end{macrocode}
% \changes{v1.5}{2004/11/29}{Implemented.}
@@ -2079,8 +2158,9 @@ This work consists of the file fontspec.dtx
\xdef\zf@family@long{\zf@family@long+lang=#1}%
\xdef\zf@pre@ff{\zf@pre@ff language=#2,}%
\else
- \zf@PackageWarning{Font \fontname\zf@basefont does not contain
- language '#1' for script '\zf@script@name'}%
+ \zf@PackageWarning{%
+ Font \fontname\zf@basefont does not contain
+ language '#1' for script '\zf@script@name'}%
\fi}}
% \end{macrocode}
% \changes{v1.9}{2006/02/12}{Implemented.}
@@ -2180,7 +2260,7 @@ This work consists of the file fontspec.dtx
% \cs{addfontfeatures}.
% \begin{macrocode}
\unless\ifcsname zf@family@fontname\zf@family\endcsname
- \zf@PackageInfo{Defining font family for "#2"
+ \zf@PackageInfo{Defining font family for '#2'
with options [\zf@default@options #1]}%
\gdef@cx{zf@family@fontname\zf@family}{\zf@fontname}%
\gdef@cx{zf@family@options\zf@family}{\zf@default@options #1}%
@@ -2406,8 +2486,7 @@ This work consists of the file fontspec.dtx
% Default code, above, sets things up for no optical size fonts or features.
% On the other hand, loop through \feat{SizeFeatures} arguments, which
% are of the form
-%
-% {\centering |SizeFeatures={{<one>},{<two>},{<three>}}|.\par}
+% {\par\centering |SizeFeatures={{<one>},{<two>},{<three>}}|.\par}
% \begin{macrocode}
\@for\zf@this@size:=\zf@size@feat\do{%
\let\zf@size\@empty
@@ -2429,7 +2508,7 @@ This work consists of the file fontspec.dtx
% character and interword spacing.
% \begin{macrocode}
\edef\@tempa{\noexpand
- \DeclareFontShape{\zf@enc}{\zf@family}{#2}{#3}%
+ \DeclareFontShape{\zf@enc}{\zf@family}{#2}{#3}
{\zf@font@str}{\zf@adjust}}%
\@tempa
% \end{macrocode}
@@ -2513,9 +2592,9 @@ This work consists of the file fontspec.dtx
\let\zf@it@feat \@empty
\let\zf@bfit@feat \@empty
\let\zf@sc@feat \@empty
- \let\zf@size\@empty
- \let\zf@size@feat\@empty
- \let\zf@size@fnt\@empty
+ \let\zf@size \@empty
+ \let\zf@size@feat \@empty
+ \let\zf@size@fnt \@empty
\c@zf@script 1818326126\relax
\def\zf@script@name{Latin}%
\c@zf@language 0\relax
@@ -2580,13 +2659,13 @@ This work consists of the file fontspec.dtx
\ifx\@tempa\@empty
\zf@PackageWarning{%
'\XKV@tfam=\XKV@tkey' feature not supported
- for AAT font '\fontname\zf@basefont'}%
+ for AAT font \fontname\zf@basefont}%
\else
\zf@make@aat@feature@string{#1}{#2}%
\ifx\@tempa\@empty
\zf@PackageWarning{%
- AAT feature '\XKV@tfam=\XKV@tkey'
- (#1,#2) not available in font '\fontname\zf@basefont'}%
+ AAT feature '\XKV@tfam=\XKV@tkey' (#1,#2) not available\zf@nl
+ in font \fontname\zf@basefont}%
\else
\zf@update@family{+#1,#2}%
\zf@update@ff\@tempa
@@ -2601,7 +2680,7 @@ This work consists of the file fontspec.dtx
\ifx\@tempa\@empty
\zf@PackageWarning{%
'\XKV@tfam=\XKV@tkey' feature not supported
- for ICU font '\fontname\zf@basefont'}%
+ for ICU font \fontname\zf@basefont}%
\else
\expandafter\zf@check@ot@feat\expandafter{\@tempa}%
\if@tempswa
@@ -2610,8 +2689,10 @@ This work consists of the file fontspec.dtx
\else
\zf@PackageWarning{%
OpenType feature '\XKV@tfam=\XKV@tkey' (#3)
- not available in font \fontname\zf@basefont, script
- '\zf@script@name', language '\zf@language@name'}%
+ not available\zf@nl
+ for font \fontname\zf@basefont, \zf@nl
+ with script '\zf@script@name',\zf@nl
+ and language '\zf@language@name'.}%
\fi
\fi
\fi}
@@ -2649,7 +2730,7 @@ This work consists of the file fontspec.dtx
% This macro iterates through families to map one key to another,
% regardless of which family it's contained within.
% \begin{macrocode}
-\newcommand*\multi@alias@key[2]{
+\newcommand*\multi@alias@key[2]{%
\key@ifundefined[zf]{preparse}{#1}
{\key@ifundefined[zf]{options}{#1}
{\zf@PackageError{The feature #1 doesn't appear to be defined}
@@ -2674,7 +2755,7 @@ This work consists of the file fontspec.dtx
% \end{macrocode}
% For exclusive selectors, it's easy; just grab the string:
% \begin{macrocode}
- \ifnum\XeTeXisexclusivefeature\zf@basefont #1 > 0
+ \ifnum\XeTeXisexclusivefeature\zf@basefont #1>0
\edef\@tempb{\XeTeXselectorname\zf@basefont #1 #2}%
% \end{macrocode}
% For \emph{non}-exclusive selectors, it's a little more complex.
@@ -2696,11 +2777,11 @@ This work consists of the file fontspec.dtx
\edef\@tempb{!\@tempb}%
\fi
\fi
+ \fi
% \end{macrocode}
% Finally, save out the complete feature string in \cmd\@tempa.
% If the selector doesn't exist, re-initialise the feature string to empty.
% \begin{macrocode}
- \fi
\unless\ifx\@tempb\@empty
\edef\@tempa{\@tempa=\@tempb}%
\else
@@ -2754,6 +2835,7 @@ This work consists of the file fontspec.dtx
\expandafter\zf@iv@strnum@i\@gobble#1 \@nil}
% \end{macrocode}
% \changes{v1.9}{2005/12/24}{Implemented.}
+% TODO: convert to \cmd\numexpr
% \end{macro}
% \end{macro}
%
@@ -2982,9 +3064,7 @@ This work consists of the file fontspec.dtx
% paragraph{Features varying by size}
% \begin{macrocode}
\define@key[zf]{preparse}{SizeFeatures}{%
- \unless\ifzf@firsttime
- \def\zf@size@feat{#1}%
- \fi
+ \unless\ifzf@firsttime\def\zf@size@feat{#1}\fi
\zf@update@family{sizefeat:\zap@space #1 \@empty}}
% \end{macrocode}
%
@@ -2992,7 +3072,7 @@ This work consists of the file fontspec.dtx
\define@key[zf]{sizing}{Size}{\def\zf@size{#1}}
\define@key[zf]{sizing}{Font}{\def\zf@size@fnt{#1}}
% \end{macrocode}
-% \changes{v1.13}{2006/11/12}{\feat{SizeFeatures}: Beginnings of support for different font features for different font sizes, required by \pkg{unimath}.}
+% \changes{v1.13}{2006/11/12}{\feat{SizeFeatures}: Beginnings of support for different font features for different font sizes, required by \pkg{unicode-math}.}
%
%
% \subsubsection{Font-independent features}
@@ -3128,15 +3208,15 @@ This work consists of the file fontspec.dtx
\zf@PackageError
{\fontname\zf@basefont\space doesn't appear to have the glyph corresponding to #1.}
{You can't hyphenate with a character that's not available!}
- \fi}
+ \fi}%
\else
{\zf@basefont\ifnum\XeTeXcharglyph#1 > 0
\g@addto@macro\zf@adjust{\hyphenchar\font#1\relax}%
\else
\zf@PackageError
{\fontname\zf@basefont\space doesn't appear to have the glyph corresponding to #1.}
- {You can't hyphenate with a character that's not available!}
- \fi}
+ {You can't hyphenate with a character that's not available!}%
+ \fi}%
\fi
\fi}
\def\zf@check@one@char#1#2\zf@@{\def\@tempb{#2}}
@@ -3632,8 +3712,9 @@ This work consists of the file fontspec.dtx
\xdef\zf@family@long{\zf@family@long+lang=Turkish}%
\xdef\zf@pre@ff{\zf@pre@ff language=TUR,}%
\else
- \zf@PackageWarning{Font \fontname\zf@basefont does not contain
- language '#1' for script '\zf@script@name'}%
+ \zf@PackageWarning{Language '#1' not available\zf@nl
+ for font \fontname\zf@basefont\zf@nl
+ with script '\zf@script@name'.}%
\fi
\fi}
% \end{macrocode}
@@ -3718,7 +3799,7 @@ This work consists of the file fontspec.dtx
% can only define maths fonts in the preamble, otherwise I'd run this
% code whenever \cs{setmainfont} and friends was run.
%
-% \begin{macro}{\AtBeginDocument}
+% \begin{macro}{\zf@math}
% \changes{v1.4}{2004/11/25}{Selects the default \cs{mathXX} fonts.}
% \changes{v1.5a}{2004/12/03}{Added fix for Computer Modern maths.}
% \changes{v1.6}{2005/02/25}{Removed mathtime support since XeTeX
@@ -3747,7 +3828,7 @@ This work consists of the file fontspec.dtx
% \begin{macrocode}
\@ifpackageloaded{euler}{\zf@package@euler@loadedtrue}
{\zf@package@euler@loadedfalse}
-\AtBeginDocument{%
+\def\zf@math{%
\let\zf@font@warning\@font@warning
\let\@font@warning\@font@info
\@ifpackageloaded{euler}{%
@@ -3755,9 +3836,9 @@ This work consists of the file fontspec.dtx
\zf@math@eulertrue
\else
\zf@PackageError{The euler package must be loaded BEFORE fontspec}
- {fontspec only overwrites euler's attempt to \MessageBreak
- define the maths text fonts if fontspec is \MessageBreak
- loaded after euler. Type <return> to proceed\MessageBreak
+ {fontspec only overwrites euler's attempt to ^^J
+ define the maths text fonts if fontspec is ^^J
+ loaded after euler. Type <return> to proceed ^^J
with incorrect \protect\mathit, \protect\mathbf, etc}
\fi}{}
\@ifpackageloaded{lucbmath}{\zf@math@lucidatrue}{}
@@ -3901,6 +3982,41 @@ This work consists of the file fontspec.dtx
% \end{macrocode}
% \changes{v1.9}{2006/01/31}{Suppresses harmless maths font encoding warnings.}
% \end{macro}
+% \begin{macro}{\zf@math@maybe}
+% We're a little less sophisticated about not executing the \cmd\zf@maths\ macro if various other maths font packages are loaded. This list is based on the wonderful `\LaTeX Font Catalogue': \url{http://www.tug.dk/FontCatalogue/mathfonts.html}. I'm sure there are more I've missed. Do the \TeX\ Gyre fonts have maths support yet?
+%
+% Untested: would |\unless\ifnum\Gamma=28672\relax\@zf@mathfalse\fi| be a better test?
+% This needs more cooperation with euler and lucida, I think.
+% \begin{macrocode}
+\def\zf@math@maybe{%
+ \@ifpackageloaded{anttor}{\ifx\define@antt@mathversions a\@zf@mathfalse\fi}{}
+ \@ifpackageloaded{arev}{\@zf@mathfalse}{}
+ \@ifpackageloaded{eulervm}{\@zf@mathfalse}{}
+ \@ifpackageloaded{mathdesign}{\@zf@mathfalse}{}
+ \@ifpackageloaded{concmath}{\@zf@mathfalse}{}
+ \@ifpackageloaded{cmbright}{\@zf@mathfalse}{}
+ \@ifpackageloaded{mathesf}{\@zf@mathfalse}{}
+ \@ifpackageloaded{gfsartemisia}{\@zf@mathfalse}{}
+ \@ifpackageloaded{gfsneohellenic}{\@zf@mathfalse}{}
+ \@ifpackageloaded{iwona}{\ifx\define@iwona@mathversions a\@zf@mathfalse\fi}{}
+ \@ifpackageloaded{kpfonts}{\@zf@mathfalse}{}
+ \@ifpackageloaded{kmath}{\@zf@mathfalse}{}
+ \@ifpackageloaded{kurier}{\ifx\define@kurier@mathversions a\@zf@mathfalse\fi}{}
+ \@ifpackageloaded{fouriernc}{\@zf@mathfalse}{}
+ \@ifpackageloaded{fourier}{\@zf@mathfalse}{}
+ \@ifpackageloaded{mathpazo}{\@zf@mathfalse}{}
+ \@ifpackageloaded{mathptmx}{\@zf@mathfalse}{}
+ \@ifpackageloaded{MinionPro}{\@zf@mathfalse}{}
+ \@ifpackageloaded{unicode-math}{\@zf@mathfalse}{}
+ \if@zf@math
+ \zf@PackageWarning{Adjusting the maths setup (use [no-math] to avoid this).}
+ \zf@math
+ \fi}
+\AtBeginDocument{\zf@math@maybe}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsection{Finishing up}
% Now we just want to set up loading the \texttt{.cfg} file, if it exists.
% \begin{macrocode}
@@ -3911,6 +4027,7 @@ This work consists of the file fontspec.dtx
\fi
% \end{macrocode}
% \changes{v1.9}{2006/01/31}{Package options \opt{(no)config}, \opt{quiet} implemented.}
+%
% The end! Thanks for coming.
%
% \iffalse
@@ -4154,20 +4271,16 @@ Please see the documentation for font feature explanation and further package ni
%% Sidenotes:
\newcommand\warn[2]{%
\edef\thisversion{#1}%
- \ifhmode\unskip~\fi{\ifx\thisversion\fileversion\color{red}\fi
- $\leftarrow$}%
- \marginpar{\raggedleft
+ \leavevmode\unskip\null\marginpar{\raggedleft
\small%
- {\ifx\thisversion\fileversion\color{red}\fi$\rightarrow$}%
- \,{\notefont #1:~#2}}}
+ {\ifx\thisversion\fileversion\color{red}\fi$\star$}%
+ \,{\notefont #1:~#2}}\ignorespaces}
-\newcommand\new[1]{%
- \edef\thisversion{#1}%
- \ifhmode\unskip~\fi{\ifx\thisversion\fileversion\color{blue}\else\color[gray]{0.5}\fi
- $\leftarrow$}%
- \marginpar{\raggedleft
+\newcommand\new[2][New!]{%
+ \edef\thisversion{#2}%
+ \leavevmode\unskip\null\marginpar{\raggedleft
\small\ifx\thisversion\fileversion\color{blue}\else\color[gray]{0.5}\fi
- $\rightarrow$\,{\notefont #1:~New!}}}
+ $\star$\,{\notefont #2:~#1}}\ignorespaces}
%% Sidenote font
\newfontfamily\notefont[Scale=MatchLowercase]{Optima}
diff --git a/Master/texmf-dist/source/xelatex/fontspec/fontspec.ins b/Master/texmf-dist/source/xelatex/fontspec/fontspec.ins
index 5c1b85d3b87..be2494bd03b 100644
--- a/Master/texmf-dist/source/xelatex/fontspec/fontspec.ins
+++ b/Master/texmf-dist/source/xelatex/fontspec/fontspec.ins
@@ -27,9 +27,6 @@ This work consists of the file fontspec.dtx
\endpostamble
\askforoverwritefalse
\generate{\file{fontspec.sty}{\from{fontspec.dtx}{fontspec}}}
-\generate{\file{fontspec-doc-style.sty}{\from{fontspec.dtx}{doc-style}}}
-\nopreamble\nopostamble
\generate{\file{fontspec.cfg}{\from{fontspec.dtx}{cfg}}}
-\generate{\file{fontspec.ins}{\from{fontspec.dtx}{batchfile}}}
\generate{\file{fontspec-example.ltx}{\from{fontspec.dtx}{example}}}
\endbatchfile