LaTeX 中的冰岛语、utf8 和 utf8x [英] Icelandic, utf8 and utf8x in LaTeX

查看:26
本文介绍了LaTeX 中的冰岛语、utf8 和 utf8x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,utf8utf8x有什么区别

usepackage[utf8]{inputenc}
usepackage[utf8x]{inputenc}

什么时候在 LaTeX 中使用?

when used in LaTeX?

其次,用 LaTeX 写冰岛语文章需要哪些包?我发现:

Secondly, what packages are required when writing an article in Icelandic using LaTeX? I found:

usepackage[icelandic]{babel}
usepackage[T1]{fontenc}
usepackage[utf8x]{inputenc}

经过一番试验,但我感觉代码的某些部分可能是多余的.甚至还有前面提到的包,里面的代码

after experimenting a bit but I have a feeling some part of the code may be redundant. And even with them the aforementioned packages, the code inside

egin{lstlisting}
...
end{lstlisting}

在 Ubuntu 中通过 pdflatex 输出时不会以冰岛语字符呈现,尽管它可以在我朋友的计算机上运行(他正在运行 Debian).缺少什么?

isn't rendered with Icelandic characters when outputted through pdflatex in Ubuntu, although it works on my friend's computer (who's running Debian). What's missing?

推荐答案

[UTF8] 得到 LaTeX 团队的支持",涵盖了相当特定/有限的 unicode 输入字符范围.它只定义那些已知可用于当前字体编码的符号.

[UTF8] is "supported" by the LaTeX team and covers a fairly specific/limited range of unicode input characters. It only defines those symbols that are known to be available with the current font encoding.

[UTF8x],AFAIK,不再受支持,但涵盖了更广泛的输入符号.我建议仅在 [UTF8] 不能满足您的需要时尝试它.

[UTF8x], AFAIK, is no longer supported, but covers a much broader range of input symbols. I would recommend only trying it if [UTF8] doesn't do what you need.

其次,listings 包(以及大多数其他进行字符扫描的相关包)不支持 UTF8 输入.(如果它在朋友的机器上工作,他们必须改用 8 位输入编码.)listingsutf8 包为 lstinputlisting 提供了与 UTF8 兼容的替代品,但不适用于主 lstlisting 环境.不过,在这里使用 XeLaTeX 可能会对您有所帮助.

Secondly, the listings package (and most other related packages that do character scanning) does not support UTF8 input. (If it's working on a friend's machine they must be using an 8-bit input encoding instead.) The listingsutf8 package provides a UTF8-compatible replacement for lstinputlisting but not for the main lstlisting environment. Using XeLaTeX might help you here, however.

这篇关于LaTeX 中的冰岛语、utf8 和 utf8x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆