summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-09 23:44:31 +0000
committerKarl Berry <karl@freefriends.org>2017-11-09 23:44:31 +0000
commitd58e09051eed105b7c4b93a513e0fd02ae2dfd4b (patch)
treeaa46d20a14160b1e582040da11625b63fb269bd8 /Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
parent99faba785d6e66859a2b9ab1d49e7f3c0db491af (diff)
fontspec (9nov17)
git-svn-id: svn://tug.org/texlive/trunk@45732 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx')
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx53
1 files changed, 39 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
index 910d407c02e..d3cacc4c6b4 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
@@ -1,36 +1,59 @@
%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
%
-% \section{Loading}
+% \section{The \texttt{fontspec.sty} loading file}
%
-% The \textsf{expl3} module is \texttt{fontspec}.
+% Before we begin, for the rest of the package we use the \texttt{@@} \textsf{expl3}
+% module syntax with module name `\texttt{fontspec}'.
% \begin{macrocode}
%<@@=fontspec>
% \end{macrocode}
+% The \texttt{fontspec.sty} file is simply set up to load the appropriate
+% \texttt{fontspec-xetex.sty} or \texttt{fontspec-luatex.sty} file.
+% This is performed by the following code.
%
-% Check engine and load specific modules.
-% For Lua\TeX, load \pkg{luaotfload}.
% \begin{macrocode}
%<*load>
+% \end{macrocode}
+%
+% \paragraph{\LuaLaTeX}
+% \begin{macrocode}
\sys_if_engine_luatex:T
- { \RequirePackage{luaotfload}
+ {
+ \RequirePackage{luaotfload}
\directlua{require("fontspec")}
- \RequirePackageWithOptions{fontspec-luatex} \endinput }
+ \RequirePackageWithOptions{fontspec-luatex}
+ \endinput
+ }
+% \end{macrocode}
+%
+% \paragraph{\XeLaTeX}
+% \begin{macrocode}
\sys_if_engine_xetex:T
- { \RequirePackageWithOptions{fontspec-xetex} \endinput }
+ {
+ \RequirePackageWithOptions{fontspec-xetex}
+ \endinput
+ }
% \end{macrocode}
-% If not one of the above, error:
+%
+% \paragraph{Other}
+% If not one of the above, error and exit.
% \begin{macrocode}
\msg_new:nnn {fontspec} {cannot-use-pdftex}
- {
- The~ fontspec~ package~ requires~ either~ XeTeX~ or~ LuaTeX.\\\\
- You~ must~ change~ your~ typesetting~ engine~ to,~ e.g.,~ "xelatex"~ or~ "lualatex" instead~ of~ plain~ "latex"~ or~ "pdflatex".
- }
+ {
+ The~ fontspec~ package~ requires~ either~ XeTeX~ or~ LuaTeX.\\\\
+ You~ must~ change~ your~ typesetting~ engine~ to,~ e.g.,~
+ "xelatex"~ or~ "lualatex" instead~ of~ "latex"~ or~ "pdflatex".
+ }
\msg_fatal:nn {fontspec} {cannot-use-pdftex}
+% \end{macrocode}
+%
+% \paragraph{Closing}
+% That's the end of the \texttt{fontspec.sty} file.
+% \begin{macrocode}
\endinput
%</load>
% \end{macrocode}
-
\endinput
% /©
@@ -38,7 +61,9 @@
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2013 Khaled Hosny
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
% ------------------------------------------------
% This package is free software and may be redistributed and/or modified under
% the conditions of the LaTeX Project Public License, version 1.3c or higher