Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Just few days ago I decided to give XeLaTeX a try for its wonderful use of system fonts.

I read a bit on the net about "fundamental lines" to change (I come from LaTeX) which basically boil down to (and correct me if I'm wrong!)

\usepackage{fontspec}
\setmainfont{<whatever>}

Now this yields very ugly math fonts. I wanted to use "Asana Math" via

\usepackage{unicode-math}
\setmathfont{Asana-Math}

but then this happens

! fontspec error: "font-not-found"! The font "Asana-Math" cannot be found.!! <etc.>

I'm using Mac OS X 10.7 with the latest TeX Live distribution (I even ran TeX Live Utility to update anything "updatable" to make sure) and as editor TeX Studio. But I want to underline that this same error happens using the Terminal with

xelatex [-shell-restricted] <filename>.tex

I am "sure" the fonts are installed, at least Tex Live Utility says so. The issues presents even with this MWE

\documentclass[10pt,a4paper]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont{Ubuntu}
\setmathfont{Asana-Math}

\begin{document}
Formula
\begin{equation}
    \sum_0^\infty 1/x^n = \frac{1}{x-1}
\end{equation}
\end{document}

Thank you in advance!

P.S.: I am reluctant to call the above MWE. It is not! It'a M inimal N ot W orking E xample!

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

You need the file extension (this is always the safest way to load a font in any case)

\setmathfont{Asana-Math.otf}
share|improve this answer
    
Thanks, this solved the problem! –  Marcello Massaro Nov 27 '12 at 20:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.