XeTeXASCII input (æ, ö)

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
Post Reply
jpeyton
Posts: 9
Joined: Thu Aug 20, 2009 9:43 pm

ASCII input (æ, ö)

Post by jpeyton »

When I use XeTeX, I noticed that non-ASCII Unicode is allowed to be input directly (for example, dashes, curly quotes, and even Greek or Chinese). However, simple ASCII symbols (such as æ and ö) need to be input with the TeX escape codes (\ae, \"o).

I find this unwieldy. Is there some way around this, so that I can type the ASCII directly?

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

ASCII input (æ, ö)

Post by phi »

Neither æ nor ö are ASCII characters. And every Unicode character works in documents compiled by XeTeX as long as the font supports it. So there has to be an error in your document. The following minimal example works fine:

Code: Select all

\documentclass{minimal}

\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}

\begin{document}

æ ö

\end{document}
jpeyton
Posts: 9
Joined: Thu Aug 20, 2009 9:43 pm

Re: ASCII input (æ, ö)

Post by jpeyton »

The ASCII codes are 230 (æ) and 246 (ö).

I think my problem may have been due to specifically marking the character encoding UTF8x in the preamble, something I have since taken out.

Thanks!
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

ASCII input (æ, ö)

Post by phi »

jpeyton wrote:The ASCII codes are 230 (æ) and 246 (ö).
ASCII includes no more than 128 characters.
jpeyton wrote:I think my problem may have been due to specifically marking the character encoding UTF8x in the preamble, something I have since taken out.
That's correct, you cannot use the inputenc package in combination with XeTeX.
Post Reply