[XeTeX] tabular troubles
Stephen Moye
stephenmoye at mac.com
Tue Apr 12 15:09:46 CEST 2005
On Tuesday, April 12, 2005, at 09:00AM, Jonas Wellendorf <Jonas.Wellendorf at cms.uib.no> wrote:
>This one is fairly basic, I presume: How do I insert at table with the
>font specified by fontspec? I have tried to do as in the example below
>but the table is typeset with the wrong font. I can do the tables with
>the tabbing-environment instead, but I have the same problem with
>linguex.sty which I will be using a lot.
>
>Thank you,
>Jonas W.
>
>%&program=xelatex
>%&encoding=UTF-8 Unicode
>
>\documentclass[a4paper]{article}
>\usepackage{fontspec,xunicode}
>
>\begin{document}
>\fontspec{Hoefler Text}
>Why isn?t the table typeset with Hoefler?
>\begin{table}[htdp]
>\caption{default}
>\begin{center}
>\begin{tabular}{|c|c|c|}
>\hline
>Where & is & Hoefler?\\
>\hline
>\end{tabular}
>\end{center}
>\label{default}
>\end{table}%
>\end{document}
>
>
>_______________________________________________
>XeTeX mailing list
>postmaster at tug.org
>http://tug.org/mailman/listinfo/xetex
This sort of thing had me stumped for a bit as well.
The fix is to use \setromanfont{Hoefler Text} ***before*** \begin{document}, and to omit the \fontspec{Hoefler Text} that you have after \begin{document}. I tried you example and it now works perfectly. This is covered in the documentation.
Cheers.
Stephen Moye
More information about the XeTeX
mailing list