tags:

views:

307

answers:

1

I'm trying to create a LaTeX document with as many as Unicode characters as possible. My header is as follows:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\pagestyle{empty}
\usepackage{textcomp} 
\usepackage[T1]{fontenc}
\begin{document}

The Unicode characters which follow in the document-body are in the form of

\unichar{xyz}

where xyz stands for an integer, e.g. 97 (for "a").

The problem is: for many integers the script's not compiling with an error message as:

! Package ucs Error: Unknown Unicode character 79297 = U+135C1,
(ucs)                possibly declared in uni-309.def.
(ucs)                Type H to see if it is available with options.

Which packages should I add to the header to make the file compile with as many characters as possible?

+4  A: 

As far as I remember the utf8x package is merely a hack to allow for some Unicode "support". Basically it was a giant lookup table translating individual character sequences to LaTeX's expectations.

You should really use Xe(La)?TeX for such things which was designed with Unicode in mind. The old TeX still suffers from it's 1970's heritage in this respect.

ETA: From the package's documentation:

This bundle provides the ucs package, and utf8x.def, together with a large number of support files.

The utf8x.def definition file for use with inputenc covers a wider range of Unicode characters than does utf8.def in the LaTeX distribution. The ucs package provides facilities for efficient use of large sets of Unicode characters.

Since you're already using both packages I guess you're out of luck then with plain LaTeX.

Joey