GeneralHelp with Fonts

LaTeX specific issues not fitting into one of the other forums of this category.
reclusesm
Posts: 7
Joined: Sat Oct 02, 2010 7:35 am

Help with Fonts

Post by reclusesm »

Hi everyone!

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!
Last edited by reclusesm on Sun Oct 03, 2010 1:33 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Help with Fonts

Post by localghost »

A more careful look at the forum index would have shown you that we have sub-forums for »Fonts & Character Sets« as well as »XeTeX«. So there would have been two possible places.

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
reclusesm
Posts: 7
Joined: Sat Oct 02, 2010 7:35 am

Re: Help with Fonts

Post by reclusesm »

Thanks for your reply, and sorry once again; I'll make sure to look more carefully next time.

Yes, I have tried that, but it tells me that the xparse is not found in the package repository. Any suggestions?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Help with Fonts

Post by localghost »

reclusesm wrote:[…] Yes, I have tried that, but it tells me that the xparse is not found in the package repository. […]
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.
Attachments
Repository synchronization in the MiKTeX Package Manager (Admin).
Repository synchronization in the MiKTeX Package Manager (Admin).
MPM(Admin)-Repository-Synchronize.png (47.99 KiB) Viewed 4655 times
reclusesm
Posts: 7
Joined: Sat Oct 02, 2010 7:35 am

Re: Help with Fonts

Post by reclusesm »

Thanks again for the reply.

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...
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Help with Fonts

Post by frabjous »

Please provide a minimal working example of the code generating the errors.
reclusesm
Posts: 7
Joined: Sat Oct 02, 2010 7:35 am

Help with Fonts

Post by reclusesm »

Code: Select all

\documentclass{article}

\usepackage{xltxtra, fontspec}
\setmainfont{Arial}

\begin{document}

\end{document}
The error is on line 4 (undefined control sequence). By the way, I've tried using only one of the packages, but I still get the same error.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Help with Fonts

Post by frabjous »

I can't see what the problem could be for you; the code provided works fine for me. (Well, it doesn't provide any output, but that's only because there's nothing in it.)

Can you upload the resulting .log file here?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Help with Fonts

Post by localghost »

You have to compile with XeLaTeX instead of (PDF)LaTeX. I'm quite sure you used the latter one because with that I can comprehend the error.
reclusesm
Posts: 7
Joined: Sat Oct 02, 2010 7:35 am

Help with Fonts

Post by reclusesm »

That's very odd...perhaps I installed fontspec/xltxtra wrong?

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}
                       
?
EDIT
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...
Post Reply