ble*_*fly 6 latex document internationalization texinfo
我已经用LaTeX格式将文档从英语翻译成挪威语,并且在使用挪威语特殊字符时,我收到错误
\usepackage[utf8x]{inputenc}
Run Code Online (Sandbox Code Playgroud)
尝试以PostScript/PDF/DVI格式显示挪威语(斯堪的纳维亚语)特殊字符
Package utf8x Error: MalformedUTF-8sequence.
Run Code Online (Sandbox Code Playgroud)
虽然这不起作用,但我尝试了另一种可能的解决方案:
\usepackage{ucs}
\usepackage[norsk]babel
Run Code Online (Sandbox Code Playgroud)
当我试图在Emacs中保存它时,我收到此消息:
These default coding systems were tried to encode text
in the buffer `lol.tex':
(utf-8-unix (905 . 4194277) (916 . 4194245) (945 . 4194278) (950
. 4194277) (954 . 4194296) (990 . 4194277) (1010 . 4194277) (1013
. 4194278) (1051 . 4194277) (1078 . 4194296) (1105 . 4194296))
However, each of them encountered characters it couldn't encode:
utf-8-unix cannot encode these: \345 \305 \346 \345 \370 \345 \345 \346 \345 \370 ...
Run Code Online (Sandbox Code Playgroud)
感谢Emacs我可以查看这些角色的属性,第一个告诉我:
character: \345 (4194277, #o17777745, #x3fffe5)
preferred charset: eight-bit (Raw bytes 128-255)
code point: 0xE5
syntax: w which means: word
buffer code: #xE5
file code: not encodable by coding system utf-8-unix
display: not encodable for terminal
Run Code Online (Sandbox Code Playgroud)
哪个不告诉我太多.当我尝试用texi2dvi --dvipdf filename.text构建它时,我得到了一个非常精细的PDF,都没有特殊的挪威字符.
当我即将保存Emacs时,还问我:"选择编码系统(默认原始文本):"然后输入utf-8来选择其编码系统.我也尝试选择默认的原始文本,看看我是否得到了一些不同的结果.但没什么.
最后我尝试了\ lstset {inputencoding = utf8x,extendedchars =\true} ...我试图谷歌解决这个问题的解决方案时遇到的代码.这给了我这个错误:未定义的控制序列.
所以基本上,我已经尝试了我能找到的每个编码选项,但没有任何作用.由于挪威语翻译必须在截止日期之前发布,因此我拼命想要完成这项工作.
作为附加信息,我可以补充说,我后来发现我的语言环境中只有en_US.UTF-8,所以我添加了nb_NO.UTF-8和nb_NO.ISO-8859-15并运行了locale-gen + reboot没有任何变化.
我希望我提供了足够的信息来获得一些帮助,有问题的人物是æøå.
显然,您的 emacs 很难将文件保存为 UTF-8(这没有多大意义,因为它应该能够表示使用该编码的所有字符)。您应该尝试使用另一个支持多种编码的编辑器将文件另存为 UTF-8。
虽然您无法以 UTF-8 保存文件,但 LaTeX 将无法正确读取它,除非您将当前文件编码指定为inputenc包参数。例如,您可能想尝试将文件按原样保存在 emacs 中,但\usepackage[latin1]{inputenc}如果 emacs 使用 *iso-8859-** 系列中的内容写入文件,则指定哪个应该可以解决问题。
| 归档时间: |
|
| 查看次数: |
3131 次 |
| 最近记录: |