开发者

Which packages for many unicode-characters?

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?


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.


You can manually edit .def files similarly to this https://bugzilla.redhat.com/show_bug.cgi?id=418981

For example this is only way how to enable LaTex for Latvian language as far as I know.

Just find you symbol (on Mac use "locate uni-1.def" to find where the package is located - to enable locate command http://osxdaily.com/2011/11/02/enable-and-use-the-locate-command-in-the-mac-os-x-terminal/ )

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜