summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
blob: 4b271817da0f0451a0890972794123778a0112b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
% \iffalse
%<*internal>
\begingroup
\input l3docstrip.tex\relax
\keepsilent
\usedir{tex/latex/fontspec}
\let\MetaPrefix\relax
\preamble
------------------------------------------------
The FONTSPEC package for XeLaTeX/LuaLaTeX
(C)  2004--2017  Will Robertson and Khaled Hosny
License information appended.
------------------------------------------------
\endpreamble
\postamble
------------------------------------------------
Copyright 2004--2017 Will Robertson <will.robertson@latex-project.org>
Copyright 2009--2013   Khaled Hosny <khaledhosny@eglug.org>

Distributable under the LaTeX Project Public License, version 1.3c or higher.
The latest version of this license is at: http://www.latex-project.org/lppl.txt

This work is "maintained" by Will Robertson.
It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
------------------------------------------------
\endpostamble
\askforoverwritefalse
\def\MetaPrefix{-- }
\generate{\file{fontspec.lua}{\from{fontspec.dtx}{lua}\from{fontspec-lua.dtx}{lua}}}
\let\MetaPrefix\DoubleperCent
\ifx\FontspecDebug\undefined\def\FSDEBUG{}\else\def\FSDEBUG{,debug}\fi

\generate{\file{fontspec.sty}{
  \from{fontspec.dtx}{fontspec,load\FSDEBUG}
}}

\gdef\FONTSPECDTX{
  \DTX{fontspec.dtx}
  \DTX{fontspec-vars.dtx}
  \DTX{fontspec-msg.dtx}
  \DTX{fontspec-opening.dtx}
  \DTX{fontspec-fontload.dtx}
  \DTX{fontspec-interfaces.dtx}
  \DTX{fontspec-user.dtx}
  \DTX{fontspec-api.dtx}
  \DTX{fontspec-internal.dtx}
  \DTX{fontspec-opentype.dtx}
  \DTX{fontspec-graphite.dtx}
  \DTX{fontspec-keyval.dtx}
  \DTX{fontspec-feat-opentype.dtx}
  \DTX{fontspec-scripts.dtx}
  \DTX{fontspec-lang.dtx}
  \DTX{fontspec-feat-aat.dtx}
  \DTX{fontspec-enc.dtx}
  \DTX{fontspec-math.dtx}
  \DTX{fontspec-closing.dtx}
  \DTX{fontspec-xfss.dtx}
  \DTX{fontspec-patches.dtx}
}

\def\DTX#1{\from{#1}{fontspec,XE,xetexx\FSDEBUG}}
\generate{\file{fontspec-xetex.sty}{\FONTSPECDTX}}

\def\DTX#1{\from{#1}{fontspec,LU,luatex\FSDEBUG}}
\generate{\file{fontspec-luatex.sty}{\FONTSPECDTX}}

\def\tmpa{plain}
\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
\endgroup
%</internal>
%<*fontspec>
\RequirePackage{expl3}
\RequirePackage{xparse}
%</fontspec>
%<*driver>
\ProvidesExplFile{fontspec.dtx}
%</driver>
%<fontspec&!xetexx&!luatex>\ProvidesExplPackage{fontspec}%
%<fontspec&xetexx>\ProvidesExplPackage{fontspec-xetex}%
%<fontspec&luatex>\ProvidesExplPackage{fontspec-luatex}%
%<*fontspec>
  {2017/09/22}{2.6e}{Font selection for XeLaTeX and LuaLaTeX}
%</fontspec>
%<lua>fontspec          = fontspec or {}
%<lua>local fontspec    = fontspec
%<lua>fontspec.module   = {
%<lua>    name          = "fontspec",
%<lua>    version       = "2.6e",
%<lua>    date          = "2017/09/27",
%<lua>    description   = "Font selection for XeLaTeX and LuaLaTeX",
%<lua>    author        = "Khaled Hosny, Philipp Gesang, Will Robertson",
%<lua>    copyright     = "Khaled Hosny, Philipp Gesang, Will Robertson",
%<lua>    license       = "LPPL"
%<lua>}
%
%<*driver>
\ExplSyntaxOff
\providecommand\ENDDOCUMENT{}
\input{fontspec-doc.tex}
\StopEventually{}
\part{Implementation}
\def\DTX#1{\DocInput{#1}}
\FONTSPECDTX
\clearpage
\PrintChanges
\clearpage
\setcounter{IndexColumns}{2}
\PrintIndex
\Finale
\end{document}
%</driver>
% \fi
%
% \section{Loading}
%
% The \textsf{expl3} module is \texttt{fontspec}.
%    \begin{macrocode}
%<@@=fontspec>
%    \end{macrocode}
%
% Check engine and load specific modules.
% For Lua\TeX, load \pkg{luaotfload}.
%    \begin{macrocode}
%<*load>
\sys_if_engine_luatex:T
  { \RequirePackage{luaotfload}
    \directlua{require("fontspec")}
    \RequirePackageWithOptions{fontspec-luatex} \endinput }
\sys_if_engine_xetex:T
  { \RequirePackageWithOptions{fontspec-xetex}  \endinput }
%    \end{macrocode}
% If not one of the above, error:
%    \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".
 }
\msg_fatal:nn {fontspec} {cannot-use-pdftex}
\endinput
%</load>
%    \end{macrocode}
\endinput