How to compile properly a document using fontspec package?
Example code (15.1. XeTeX @ LaTeX-wikibooks.pdf)
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}
\begin{document}
Lorem ipsum...
\end{document}
Result with $latex fontspec.tex
This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
%&-line parsing enabled.
entering extended mode
(./fontspec.tex
LaTeX2e <2005/12/01
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar
abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la
tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, romanian, rus
sian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish, ukenglis
h, ukrainian, uppersorbian, welsh, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo)) (./fontspec.sty
(/usr/share/texmf/tex/latex/expl3/expl3.sty
(/usr/share/texmf/tex/latex/expl3/l3names.sty)
(/usr/share/texmf/tex/latex/etex-pkg/etex.sty)
(/usr/share/texmf/tex/latex/expl3/l3basics.sty)
(/usr/share/texmf/tex/latex/expl3/l3expan.sty)
(/usr/share/texmf/tex/latex/expl3/l3tl.sty)
(/usr/share/texmf/tex/latex/expl3/l3intexpr.sty)
(/usr/share/texmf/tex/latex/expl3/l3quark.sty)
(/usr/share/texmf/tex/latex/expl3/l3seq.sty
! Undefined control sequence.
l.129 \int_new:N
\g_seq_nesting_depth_int
?
Result with $lualatex fontspec.tex
This is LuaTeX, Version snapshot-0.25.4-2009102410 (Web2C 7.5.7)
(fontspec.tex>
LaTeX2e <2005/12/01>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar
abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la
tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, romanian, rus
sian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish, ukenglis
h, ukrainian, uppersorbian, welsh, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo)) (fontspec.sty
(/usr/share/texmf/tex/latex/expl3/expl3.sty
(/usr/share/texmf/tex/latex/expl3/l3names.sty
(/usr/share/texmf/tex/generic/oberdiek/luatex.sty
(/usr/share/texmf/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texmf/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texmf/tex/latex/etex-pkg/etex.sty)
(/usr/share/texmf/tex/generic/oberdiek/luatex-loader.sty
(/usr/share/texmf/scripts/oberdiek/oberdiek.luatex.lua)))
(/usr/share/texmf/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texmf/scripts/oberdiek/oberdiek.pdftexcmds.lua)))
(/usr/share/texmf/tex/latex/expl3/l3basics.sty)
(/usr/share/texmf/tex/latex/expl3/l3expan.sty)
(/usr/share/texmf/tex/latex/expl3/l3tl.sty)
(/usr/share/texmf/tex/latex/expl3/l3intexpr.sty)
(/usr/share/texmf/tex/latex/expl3/l3quark.sty)
(/usr/share/texmf/tex/latex/expl3/l3seq.sty
! Undefined control sequence.
l.129 \int_new:N
\g_seq_nesting_depth_int
?
Result with $xelatex fontspec.tex
This is XeTeXk, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7)
%&-line parsing enabled.
entering extended mode
(./fontspec0.tex
LaTeX2e <2005/12/01>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar
abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la
tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, romanian, rus
sian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish, ukenglis
h, ukrainian, uppersorbian, welsh, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo)) (./fontspec.sty
(/usr/share/texmf/tex/xelatex/expl3/expl3.sty
(/usr/share/texmf/tex/xelatex/expl3/l3names.sty>
! Package l3names Error: Required primitive not found: \pdfstrcmp.>
See the l3names package documentation for explanation.>
Type H <return> for immediate help.>
...>
l.121 }>
Second example (#2:3 Test F-autofake @ fontspec/fontspec-testsuite.pdf)
\documentclass{testsuite}
\usepackage{fontspec}
\begin{document}
\Large
\def\text{ABC \textit{ABC} \textbf{ABC}
\textbf{\textit{ABC}}\\}
\fontspec{Inconsolata}
\fontspec[AutoFakeSlant]{Inconsolata}
\fontspec[AutoFakeBold]{Inconsolata}
\fontspec[AutoFakeSlant,AutoFakeBold]
{Inconsolata}
\fontspec[AutoFakeSlant=0.4]{Inconsolata}
\fontspec[AutoFakeBold=5]{Inconsolata}
\fontspec[AutoFakeSlant=0.4,AutoFakeBold=5]
{Inconsolata}
\end{document}
Result with $latex/lualatex/xelatex fontspec1.tex
This is XeTeXk, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7)
%&-line parsing enabled.
entering extended mode
(./fontspec1.tex
LaTeX2e <2005/12/01>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar
abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la
tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, romanian, rus
sian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish, ukenglis
h, ukrainian, uppersorbian, welsh, loaded.>
! LaTeX Error: File `testsuite.cls' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)
Enter file name:
(./fontspec.sty (/usr/share/texmf/tex/latex/expl3/expl3.sty
(/usr/share/texmf/tex/latex/expl3/l3names.sty)
(/usr/share/texmf/tex/latex/etex-pkg/etex.sty)
(/usr/share/texmf/tex/latex/expl3/l3basics.sty)
(/usr/share/texmf/tex/latex/expl3/l3expan.sty)
(/usr/share/texmf/tex/latex/expl3/l3tl.sty)
(/usr/share/texmf/tex/latex/expl3/l3intexpr.sty)
(/usr/share/texmf/tex/latex/expl3/l3quark.sty)
(/usr/share/texmf/tex/latex/expl3/l3seq.sty
! Undefined control sequence.
l.129 \int_new:N
\g_seq_nesting_depth_int
?
Please, may you tell me what is the problem here?
<pre>here :-) – Joseph Wright♦ Aug 5 '12 at 17:55fontspecpackage. – jon Aug 5 '12 at 18:26foo.stywhich loads 'payload'foo.tex. Often seen with packages that work with plain TeX as well as with LaTeX. – Joseph Wright♦ Aug 5 '12 at 18:35