Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

xelatex

27 views
Skip to first unread message

Bob Tennent

unread,
May 7, 2008, 4:39:19 PM5/7/08
to
I'd be grateful if someone could point me to a user-friendly guide on
how to *use* xelatex. When I saw a reference to

http://xml.web.cern.ch/XML/lgc2/xetexmain.pdf

I thought it might help, but it's almost completely useless for me,
containing pages and pages on font technology and writing systems,
and only 4 pages (on fontspec) at all relevant to an ordinary
English-speaking LaTeX user.

Bob T.

robert

unread,
May 7, 2008, 5:11:42 PM5/7/08
to
Bob Tennent <Bo...@cs.queensu.ca>:

> I'd be grateful if someone could point me to a user-friendly guide on
> how to *use* xelatex.

Depends on what you mean with 'how to use xelatex'. Installing? Running?
Using specific features?

--
robert

Joseph Wright

unread,
May 7, 2008, 5:19:32 PM5/7/08
to

I thought that for most people, using xelatex involved:
1) Get xetex installed
2) Use "xelatex" instead of "latex"
3) For font access, use fontspec

Isn't the whole point that, for the user, xelatex makes accessing
fonts easier for latex users?

Joseph Wright

Bob Tennent

unread,
May 7, 2008, 5:35:29 PM5/7/08
to

It's been installed using fc9 rpms. I can run it. But my experience
hasn't been good. Ligatures don't work consistently. "Three" comes out
as "ff ree". Accented characters come out properly if I use, for example,
\"{u}, but not if I use ü. Here's the relevant part of my preamble:

\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Minion Pro}
\usepackage{xunicode}
\usepackage{xltxtra}

I don't know whether I use

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

or not. If I leave out the Mapping option, `` quotes and --- em-dashes
don't work. Perhaps I should be looking at the fontspec documentation?

Bob T.


robert

unread,
May 8, 2008, 2:09:18 AM5/8/08
to
Bob Tennent <Bo...@cs.queensu.ca>:

> On 07 May 2008 21:11:42 GMT, robert wrote:
> > Bob Tennent <Bo...@cs.queensu.ca>:
> >> I'd be grateful if someone could point me to a user-friendly guide
> >> on how to *use* xelatex.
> >
> > Depends on what you mean with 'how to use xelatex'. Installing?
> > Running? Using specific features?
>
> It's been installed using fc9 rpms. I can run it. But my experience
> hasn't been good. Ligatures don't work consistently. "Three" comes out
> as "ff ree".

That sounds like perhaps your font is broken. Did you try with
other fonts?

> Accented characters come out properly if I use, for example, \"{u},
> but not if I use ü.

You are probably using latin1 as character encoding for your .tex files.
Don't. XeTeX assumes UTF-8 input.

This is, admittedly, not very well documented.

> Here's the relevant part of my preamble:
>
> \usepackage{fontspec}
> \setmainfont[Mapping=tex-text]{Minion Pro}
> \usepackage{xunicode}
> \usepackage{xltxtra}

Looks okay to me, and FWIW, works okay on my Mac as well. I use Minion
Pro extensively and don't have any ligature-issues like the one you're
describing.

Perhaps reading the XeTeX sheds some more light on how things work:
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=xetex_faq

--
robert

Ulrike Fischer

unread,
May 8, 2008, 3:16:00 AM5/8/08
to

1. Don't use inputenc or similar package.

2. Load xltxtra: it will load all other important packages like
fontspec, xunicode, ifxetex (and also graphicx).

3. Read the documentation of fontspec. If you want to use --- and 创 in
your input you should use [Mapping=tex-text].

4. You should have a recent version of the open type version of the
lm-fonts, and a recent version of the euenc-package.

5. You can load fontenc with option T1 and in certain cases in can be
useful. But I suggest that you leave it out for now. If you load
fontenc, load it before xltxtra (or fontspec). Also load all packages
that perhaps change the fontencoding (e.g. babel with option greek)
before xltxtra.

6. If your xetex is old (version < .997) you should use
xelatex --output-driver="xdvipdfmx" foo.

7. Delete all driver options like dvips, dvipdfmx, pdftex etc from your
document. Then check carefully in the log that your packages load the
correct drivers. A current hyperref should load hdvipdfm.def, graphicx
should load xetex.def.

8. geometry needs a recent xetex specific geometry.cfg (from march 2008)
to work properly. Then \usepackage[dvips]{geometry} should work fine
with pdflatex, xelatex and latex+dvips.


--
Ulrike Fischer

Ulrike Fischer

unread,
May 8, 2008, 3:31:58 AM5/8/08
to
Am Thu, 8 May 2008 09:16:00 +0200 schrieb Ulrike Fischer:

> Am 7 May 2008 20:39:19 GMT schrieb Bob Tennent:
>
>> I'd be grateful if someone could point me to a user-friendly guide on
>> how to *use* xelatex. When I saw a reference to
>>
>> http://xml.web.cern.ch/XML/lgc2/xetexmain.pdf
>>
>> I thought it might help, but it's almost completely useless for me,
>> containing pages and pages on font technology and writing systems,
>> and only 4 pages (on fontspec) at all relevant to an ordinary
>> English-speaking LaTeX user.

I forgot:

9. Save your document in utf-8. If you can't do it, you will have to
declare at the start of each file the encoding e.g. for a windows
ansinew with

\XeTeXinputencoding cp1252

--
Ulrike Fischer

Christof Winter

unread,
May 8, 2008, 5:48:17 AM5/8/08
to

Which UTF-8 editor do you use for that in Windows? Emacs?

Thanks, Christof

Ulrike Fischer

unread,
May 8, 2008, 6:32:21 AM5/8/08
to
Am Thu, 08 May 2008 11:48:17 +0200 schrieb Christof Winter:


>> 9. Save your document in utf-8. If you can't do it, you will have to
>> declare at the start of each file the encoding e.g. for a windows
>> ansinew with
>>
>> \XeTeXinputencoding cp1252
>>
>
> Which UTF-8 editor do you use for that in Windows? Emacs?

I use mainly winedt. As long as the document is restricted to the
ansinew charset winedt can save and read the files as utf-8.

If the need arise (larger charset) I sometimes also use emacs.

As far as I know texmaker and winshell offer some unicode support but I
never tried them.

--
Ulrike Fischer

Bob Tennent

unread,
May 8, 2008, 7:45:04 AM5/8/08
to
On Thu, 8 May 2008 09:31:58 +0200, Ulrike Fischer wrote:

>>> I'd be grateful if someone could point me to a user-friendly guide on
>>> how to *use* xelatex.
>
> 9. Save your document in utf-8. If you can't do it, you will have to
> declare at the start of each file the encoding e.g. for a windows
> ansinew with
>
> \XeTeXinputencoding cp1252

Thanks. That helped.

Anyone know how to get vim to save in utf-8? In the meantime, I used

\XeTeXinputencoding latin1

and it seemed to work, except in bold or bold-italic text, where
ligatures still don't work (using either Minion Pro or Latin Modern).

How does one specify the Mapping=tex-text option for the default Latin
Modern font? \setmainfont[Mapping=tex-text]{lmroman10} or similar
doesn't work.

Bob T.


Ulrike Fischer

unread,
May 8, 2008, 7:58:08 AM5/8/08
to
Am 8 May 2008 11:45:04 GMT schrieb Bob Tennent:

> and it seemed to work, except in bold or bold-italic text, where
> ligatures still don't work (using either Minion Pro or Latin Modern).

Make a minimal example.

>
> How does one specify the Mapping=tex-text option for the default Latin
> Modern font? \setmainfont[Mapping=tex-text]{lmroman10} or similar
> doesn't work.

With a recent version of euenc it should be enabled by default.

With a recent version of the lm-fonts the following should work too:

\setmainfont[SmallCapsFont={* Caps},
Mapping=tex-text]{Latin Modern Roman}
\setsansfont[Mapping=tex-text]{Latin Modern Sans}
\setmonofont[SmallCapsFont={* Caps}]{Latin Modern Mono}


--
Ulrike Fischer

Bob Tennent

unread,
May 8, 2008, 9:04:59 AM5/8/08
to
On Thu, 8 May 2008 13:58:08 +0200, Ulrike Fischer wrote:
> Am 8 May 2008 11:45:04 GMT schrieb Bob Tennent:
>
>> and it seemed to work, except in bold or bold-italic text, where
>> ligatures still don't work (using either Minion Pro or Latin Modern).
>
> Make a minimal example.

Using current lm and euenc, Latin Modern works fine. But Minion Pro
does not (in bold variants). Minimal example:

\documentclass{minimal}


\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Minion Pro}
\usepackage{xunicode}
\usepackage{xltxtra}

\XeTeXinputencoding latin1

\newcommand{\test}{-- --- \"{u} ü Three ff fi fl ffi ffl }

\begin{document}

\test

\textbf{\test}

\textit{\test}

\textbf{\textit{\test}}

\end{document}

The Minion otfs are copied from Adobe/Reader8/Resource/Font.

Bob T.

robert

unread,
May 8, 2008, 9:15:10 AM5/8/08
to
Bob Tennent <Bo...@cs.queensu.ca>:

> Anyone know how to get vim to save in utf-8?

:set fileencoding=utf8

--
robert

Ulrike Fischer

unread,
May 8, 2008, 9:30:02 AM5/8/08
to
Am 8 May 2008 13:04:59 GMT schrieb Bob Tennent:

> Using current lm and euenc, Latin Modern works fine. But Minion Pro
> does not (in bold variants). Minimal example:
>
> \documentclass{minimal}
> \usepackage{fontspec}
> \setmainfont[Mapping=tex-text]{Minion Pro}
> \usepackage{xunicode}
> \usepackage{xltxtra}

xltxtra is enough:

\XeTeXinputencoding latin1
\documentclass{minimal}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Minion Pro}


Your example works fine for.
Send the log-file of your example.

Also run xelatex with the option

--output-driver="xdvipdfmx -v"

(or even -vv)

This will give you some information about the fonts used.

In my case the following are used:

Font/MinionPro-BoldIt.otf"...
(CID:C:/Programme/Adobe/Acrobat
7.0/Resource/Font/MinionPro-Regular.otf[CIDFontT
ype0])(CID:C:/Programme/Adobe/Acrobat
7.0/Resource/Font/MinionPro-Bold.otf[CIDFo
ntType0])(CID:C:/Programme/Adobe/Acrobat
7.0/Resource/Font/MinionPro-It.otf[CIDF
ontType0])(CID:C:/Programme/Adobe/Acrobat
7.0/Resource/Font/MinionPro-BoldIt.otf
[CIDFontType0])

--
Ulrike Fischer

Bob Tennent

unread,
May 8, 2008, 10:17:48 AM5/8/08
to
On Thu, 8 May 2008 15:30:02 +0200, Ulrike Fischer wrote:
> Am 8 May 2008 13:04:59 GMT schrieb Bob Tennent:

>> Using current lm and euenc, Latin Modern works fine. But Minion Pro
>> does not (in bold variants).
>>
> \XeTeXinputencoding latin1
> \documentclass{minimal}
> \usepackage{xltxtra}
> \setmainfont[Mapping=tex-text]{Minion Pro}
>
> Also run xelatex with the option
>
> --output-driver="xdvipdfmx -v"

The problem was that there were ttf versions of the fonts in another
directory which fontconfig chose in lieu of the otf versions. Perhaps
the log file should by default list which font files are used.

Thanks.

Bob T.

Bob Tennent

unread,
May 8, 2008, 10:36:14 AM5/8/08
to

Thanks. It seems this has to be issued while editing, not just added to
~/.vimrc.

Bob T.

Ulrike Fischer

unread,
May 8, 2008, 10:58:18 AM5/8/08
to
Am 8 May 2008 14:17:48 GMT schrieb Bob Tennent:


> The problem was that there were ttf versions of the fonts in another
> directory which fontconfig chose in lieu of the otf versions. Perhaps
> the log file should by default list which font files are used.

Make a feature request:

http://sourceforge.net/projects/xetex/

--
Ulrike Fischer

robert

unread,
May 8, 2008, 11:21:12 AM5/8/08
to
Bob Tennent <Bo...@cs.queensu.ca>:

Perhaps something you include resets that option, if I specify it in my
~/.vimrc it sticks (Vi IMproved 7.0)

--
robert

Rowland McDonnell

unread,
May 8, 2008, 3:50:54 PM5/8/08
to
Joseph Wright <joseph...@morningstar2.co.uk> wrote:

It doesn't.

What xelatex does is provide a framework to permit founts to be used
without needing the usual set of TeX and LaTeX fount support files (more
or less). This means you don't need to go through the fontinst
process.

But xelatex on its own doesn't permit an end user to use a `new' fount,
not in any practical sense.

The fontspec package does provide what a user needs to make it practical
for a normal end user to get some of the benefits that xelatex was
written to enable - but xelatex on its own doesn't provide those
benefits itself and the fontspec package documentation is incomplete, so
an end user has to do individual research into fount technologies and
terminology and computer investigative tools in order to have access to
what's available.

But!

The thing is, if an end user is *using* a font in LaTeX, it's already
been set up for use.

So actually, it's easier for an end user to use A.N. Other `available
fount' in LaTeX than it is to use such a fount with xelatex, 'cos an
`available fount' in LaTeX is restricted to `those which are already set
up', while `available fount' in xelatex means `pretty much any fount
installed on your computer'.

xelatex permits the use of a fount that's not been set up using
traditional methods, but since you have to look things up and do some
research of your own to find out how to use whatever font features might
exist in any given fount even if you are aided by fontspec, I can't say
xelatex makes it easier for the end user to *use* a font. It makes
setting up much much easier[1] for sure - but that's not quite the same
thing.

Rowland.

[1] By at least two or three orders of magnitude, at a rough guess.
From personal experience.

--
Remove the animal for email address: rowland....@dog.physics.org
Sorry - the spam got to me
http://www.mag-uk.org http://www.bmf.co.uk
UK biker? Join MAG and the BMF and stop the Eurocrats banning biking

Rowland McDonnell

unread,
May 8, 2008, 3:50:53 PM5/8/08
to
Bob Tennent <Bo...@cs.queensu.ca> wrote:

Look at the fontspec package docs.

Rowland.

Bob Tennent

unread,
May 8, 2008, 4:19:57 PM5/8/08
to

There are three relevant settings: encoding, fileencoding, and
fileencodings. I don't have sufficient interest to figure out the
complex interactions among these settings. The case I was dealing with
involved a file originally in latin1 that had to be converted to utf8
during editing, rather than a new file.

Bob T.

Christian Ebert

unread,
May 8, 2008, 5:38:05 PM5/8/08
to
* Bob Tennent on Thursday, May 08, 2008:

:w ++enc=utf-8

See also

:help ++

c
--
_B A U S T E L L E N_ lesen! --->> <http://www.blacktrash.org/baustellen.html>

Aditya Mahajan

unread,
May 8, 2008, 11:23:56 PM5/8/08
to
On Thu, 8 May 2008, Bob Tennent wrote:

> Anyone know how to get vim to save in utf-8? In the meantime, I used

set encoding=utf-8
set fileencodings="utf-8,default,latin1"

Also see :he encoding and :he fileencodings

Aditya

Rowland of The BNP

unread,
May 16, 2008, 10:54:23 AM5/16/08
to

Cunt. Just testing.

0 new messages