[XeTeX] External font and xltxtra breaks \footnote in xelatex

Diederick C. Niehorster dcnieho at gmail.com
Thu Dec 24 03:45:05 CET 2009


Hi,

I have no time for testing it now, but one thing you might try:

xlxtra already loads fontspec and xunicode (in the right order) for
you, you so don't need to load those separately. So try and see if
only loading xlxtra solves the problem (see below).

Best,
Dee

----

\documentclass{article}
\usepackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[
ExternalLocation={/home/wn/.fonts/},
]{TimesRoman.ttf}
\begin{document}
test\footnote{footnote}
\end{document}

On Wed, Dec 23, 2009 at 8:29 PM, pi3orama <pi3orama at gmail.com> wrote:
> I use texlive 2009.
>
> If the main font is an external font, and xltxtra is loaded, the
> latex's \footnote command will generate error. For example:
>
>
> below tex file works well:
>
> \documentclass{article}
> \usepackage{fontspec}
> \defaultfontfeatures{Mapping=tex-text}
> \usepackage{xunicode}
> \usepackage{xltxtra}
> \setmainfont{Times Roman}
> \begin{document}
> test\footnote{footnote}
> \end{document}
>
> And this one is OK (load external font and remove the xltxtra package)
>
> \documentclass{article}
> \usepackage{fontspec}
> \defaultfontfeatures{Mapping=tex-text}
> \usepackage{xunicode}
> \setmainfont[
> ExternalLocation={/home/xxxx/.fonts/},
> ]{TimesRoman.ttf}
> \begin{document}
> test\footnote{footnote}
> \end{document}
>
> But this one cause an error (both use xltxtra and external font):
>
> \documentclass{article}
> \usepackage{fontspec}
> \defaultfontfeatures{Mapping=tex-text}
> \usepackage{xunicode}
> \usepackage{xltxtra}
> \setmainfont[
> ExternalLocation={/home/wn/.fonts/},
> ]{TimesRoman.ttf}
> \begin{document}
> test\footnote{footnote}
> \end{document}
>
>
>
>
> the error message is:
>
> ----------------------- message begin --------------------------
> /usr/local/texlive/2009/texmf-dist/tex/latex/base/article.cls
> Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
> (/usr/local/texlive/2009/texmf-dist/tex/latex/base/size10.clo))
> (/usr/local/texlive/2009/texmf-dist/tex/xelatex/fontspec/fontspec.sty
> (/usr/local/texlive/2009/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
> (/usr/local/texlive/2009/texmf-dist/tex/latex/tools/calc.sty)
> (/usr/local/texlive/2009/texmf-dist/tex/latex/xkeyval/xkeyval.sty
> (/usr/local/texlive/2009/texmf-dist/tex/generic/xkeyval/xkeyval.tex
> (/usr/local/texlive/2009/texmf-dist/tex/generic/xkeyval/keyval.tex)))
> (/usr/local/texlive/2009/texmf-dist/tex/latex/base/fontenc.sty
> (/usr/local/texlive/2009/texmf-dist/tex/xelatex/euenc/eu1enc.def)
> (/usr/local/texlive/2009/texmf-dist/tex/xelatex/euenc/eu1lmr.fd))
> fontspec.cfg loaded.
> (/usr/local/texlive/2009/texmf-dist/tex/xelatex/fontspec/fontspec.cfg))
> (/usr/local/texlive/2009/texmf-dist/tex/xelatex/xunicode/xunicode.sty)
> (/usr/local/texlive/2009/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty
> (/usr/local/texlive/2009/texmf-dist/tex/latex/metalogo/metalogo.sty
> (/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/graphicx.sty
> (/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/graphics.sty
> (/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/trig.sty)
> (/usr/local/texlive/2009/texmf-dist/tex/latex/latexconfig/graphics.cfg)
> (/usr/local/texlive/2009/texmf-dist/tex/xelatex/xetex-def/xetex.def))))
> (/usr/local/texlive/2009/texmf-dist/tex/latex/etex-pkg/etex.sty)
> (/usr/local/texlive/2009/texmf-dist/tex/latex/base/fixltx2e.sty))
> (./test.aux)kpathsea: Invalid fontname `TimesRoman.ttf/ICU:', contains
> ':'
>
> ! Font \zf at basefont=TimesRoman.ttf/ICU: at 10.0pt not loadable: Metric (TFM) fi
> le or installed font not found.
> \realsuperscript  ...y \endcsname " at \f at size pt
>                                                  \zf at set@font at type \ifzf at ic...
> l.11 test\footnote{
>                   footnote}
> ?
>
> ----------------------- message end --------------------------
>
> I believe this should be an bug in xltxtra. But I know little about
> low level tex and xetex so I am unable to fix it.
>


More information about the XeTeX mailing list