LaTeX 显示(替换?显示?)右上方逗号(U+315)作为反引号/重音符(U+0060)

LaTeX 显示(替换?显示?)右上方逗号(U+315)作为反引号/重音符(U+0060)

我正在使用 Overleaf 编写 Lushootseed(一种母语)的语法,我需要使用符号 ƛ̕,它由 ƛ 和 ̕(组合变音符号)组成。我已经能够使用以下方法获取需要正确显示的其他字符(例如 š、ə 和 ƛ):

\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage[T1]{fontenc}
\usepackage{selinput}
\usepackage{tipa}
\usepackage{amssymb}

\SelectInputMappings{ % To define š and č
  scaron={š},
  ccaron={č},
}

\DeclareUnicodeCharacter{0259}{\textschwa} % To define schwa (ə)

我已使用这些工具来获取我需要工作的其他字符,并插入了这些字符以尝试添加 ̕:

\DeclareUnicodeCharacter{0315}{\char"0315}

但无论我如何尝试显示 ̕,它总是消失或显示为 `(反引号):

ʔəsƛ`ubil čəd代替ʔəsƛ̕ubil čəd

我该如何修复这个问题?如果我尝试ʔəsƛ`ubil čəd故意渲染它,它会吐出ʔəsƛ‘ubil čəd(另一个不同的字符!)。此外,在我尝试使用它的那一行上,Overleaf 会显示“错误字符代码 (789)”(789 是 ̕ 的数字)。

我对 LaTeX 不太了解,但我觉得这应该可行。我做错了什么?我还需要组合变音符号

答案1

经典 tex 是一个 8 位系统,因此字体最多有 256 个字符,您可以使用\DeclareUnicodeCharacter将插槽映射到 TeX 可以处理的内容来显示 Unicode 字符,例如将希腊字母映射到aLGR(希腊语)编码中,该编码在 ascii 插槽中有希腊字母。

但使用 Unicode TeX(例如 lualatex)和具有字符的字体更容易,这在 overleaf 上有效

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Noto Serif}
\begin{document}


I am using Overleaf to write a grammar of Lushootseed
(a native language) and I need to use the symbol ƛ̕, which is
composed of ƛ and ̕ (a combining diacritic).
I've been able to get other
 characters I need to display properly
(such as š, ə, and ƛ), using these methods:

\end{document}

在此处输入图片描述

只需选择路拉泰克斯作为左侧边栏菜单中的编译器。

相关内容