General ⇒ Help with Fonts
Help with Fonts
I'm not sure if this is the right sub-forum, so I do apologize if this isn't the right one.
I'm having difficulty using system fonts with XeLaTeX. I've tried installing fontspec and xltxtra, but it keeps on telling me that the file "xparse.sty" is missing. Any ideas?
Thanks!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Help with Fonts
Just install the missing package with the package manager of your LaTeX Distribution. At least one of the mentioned package has some dependencies.
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Help with Fonts
Yes, I have tried that, but it tells me that the xparse is not found in the package repository. Any suggestions?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Help with Fonts
It could be helpful if you name your LaTeX distribution. But »package repository« sounds like a MiKTeX system. If so, start the MiKTeX Package Manager (Admin) and synchronize the database as shown in the attachment. The »xparse« package is part of the xpackages bundle.reclusesm wrote:[…] Yes, I have tried that, but it tells me that the xparse is not found in the package repository. […]
- Attachments
-
- Repository synchronization in the MiKTeX Package Manager (Admin).
- MPM(Admin)-Repository-Synchronize.png (47.99 KiB) Viewed 4739 times
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Help with Fonts
I'm using TexLive 2010-Basic, compiling with XeLaTeX, with TeXShop (Mac).
I did install the xpackages bundle with tlmgr successfully. Now when I try to load xltxtra and fontspec, it doesn't give me an error, but as soon as I try to use any command associated with those two packages (e.g. \setmainfont{Arial}) it tells me "undefined control sequence."
Interestingly enough, if i misspell the font name (\setmainfont{Ariala}), it just tells me that it can't find the font, and doesn't complain about the command not being defined...
Help with Fonts
Help with Fonts
Code: Select all
\documentclass{article}
\usepackage{xltxtra, fontspec}
\setmainfont{Arial}
\begin{document}
\end{document}
Re: Help with Fonts
Can you upload the resulting .log file here?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Help with Fonts
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Help with Fonts
I'm sure I'm using XeLaTeX...in fact, when I try to use LaTeX it tells me that XeTeX is required to compile the document. It is producing a .pdf though (when I remove the command).
I've attached the log file. Also, here's the output:
Code: Select all
This is XeTeX, Version 3.1415926-2.2-0.9997.4 (TeX Live 2010)
entering extended mode
(./Untitled.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ba
sque, danish, dutch, finnish, french, german, ngerman, swissgerman, hungarian,
italian, bokmal, nynorsk, polish, portuguese, spanish, swedish, loaded.
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2010basic/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty
(/usr/local/texlive/2010basic/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/expl3.sty
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3names.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3basics.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3expan.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3tl.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3intexpr.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3quark.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3seq.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3toks.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3int.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3prg.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3clist.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3token.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3prop.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3msg.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3io.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3skip.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3box.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3keyval.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3keys.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3precom.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3xref.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3file.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3fp.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/expl3/l3luatex.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/tools/calc.sty))
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/xpackages/xbase/xparse.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/generic/kastrup/binhex.tex)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2010basic/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2010basic/texmf-dist/tex/generic/xkeyval/keyval.tex)))
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/fontspec/fontspec-patches.st
y (/usr/local/texlive/2010basic/texmf-dist/tex/latex/base/fixltx2e.sty))
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/local/texlive/2010basic
./Untitled.tex:4: LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.4 \setmainfont{Arial}
? /texmf-dist/tex/latex/euenc/eu1lmr.fd))
fontspec.cfg loaded.
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/fontspec/fontspec.cfg))
(/usr/local/texlive/2010basic/texmf-dist/tex/xelatex/xunicode/xunicode.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/metalogo/metalogo.sty
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2010basic/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2010basic/texmf-dist/tex/xelatex/xetex-def/xetex.def)))))
./Untitled.tex:4: Undefined control sequence.
\fontspec_declare_shape:nnnn ...t }}\tl_if_eq:xxT
{#3}{\itdefault }{\use:x {...
l.4 \setmainfont{Arial}
?
When I get the error displayed on the console, if I type 's' (which I believe is a command to "skip" the error), it works and displays my text in the desired font, but it also displays a bunch of gibberish...