无法插入某些阿拉伯字符

无法插入某些阿拉伯字符

我想插入一些阿拉伯字符,但是我不能,我收到此错误:

! Package inputenc Error: Unicode char ﴾ (U+FD3F)

我试过了\DeclareUnicodeCharacter\usepackage[utf8x]{inputenc}但还是不起作用。

以下是一个例子:

\documentclass[12pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[arabic]{babel}
\usepackage[LAE,LFE]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{ucs}

\begin{document}
\end{document}

我使用 TeXLive 发行版。

TeX 3.14159265 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Copyright 2015 D.E. Knuth.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.

答案1

通过查找字体图表_阿拉伯语.pdf或文件texmf-dist/tex/latex/cmap/lae.cmap,似乎这个字符=U+FD3E 华丽左括号5D在位置 (hex) = (octal)处编码135。因此我们可以使用\DeclareUnicodeCharacter{FD3E}{\char"5D}或(使用包newunicodechar\newunicodechar{﴾}{\char"5D}}

\documentclass[12pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\DeclareUnicodeCharacter{FD3E}{\char"5D\relax}
\usepackage[arabic]{babel}
\usepackage[LAE,LFE]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{ucs}

\begin{document}
\end{document}

排版

当然,它应该已经可以工作了,但我不知道为什么它不工作。我个人觉得使用 XeTeX/LuaTeX 排版非拉丁文脚本比处理所有这些问题更简单。

相关内容