将德语 Unicode 引号重新定义为德语 LaTeX 引号

将德语 Unicode 引号重新定义为德语 LaTeX 引号

在写德语文本时,如果想使用

"`correct"'

引号。

作为NEO 2,我在键盘上得到了上述代码生成的引号:

“正确的”

我听说你可以用 LaTeX 重新定义任何字符。当我搜索如何做到这一点时,我能找到的最接近的答案是这个答案。但我甚至不能编译答案所述的代码:

ERROR: Missing number, treated as zero.

--- TeX said ---
<to be read again> 

l.4 \catcode`\á
                 =\active
--- HELP ---
This is usually caused by a LaTeX command expecting but not finding
either a number or a length as an argument. You may have omitted an
argument, or a square bracket in the text may have been mistaken for
the beginning of an optional argument. This error is also caused by
putting \protect in front of either a length command or a command such
as \value that produces a number.

由于无法尝试,我无法弄清楚如何使引号功能发挥作用。那么它是如何做到的呢?

答案1

假设你使用 UTF-8 输入

\DeclareUnicodeCharacter{201E}{\glqq}
\DeclareUnicodeCharacter{201C}{\grqq}

相关内容