我正在处理一个高棉语(Khmer)文字项目,他们希望 \nd 带有下划线。问题在于,意为“主”的那个词的第一个字母有很深的下行笔画(descender)。如果下划线放得足够低以位于下行笔画下方,那么它离大部分文本就太远了,尤其是在 \nd 用于没有下行笔画的单词时更是如此。实际上,我简化了这个问题,因为从视觉上看“第一个字母”实际上是字符串中的第 4 个字符,这是由于高棉语 Unicode 重排序规则的特性所致。
\nd ប៉្រ័ះ ប៊កកាតយ័\nd*
为了简单起见,我用英语代替,并使用 changes.txt 将
\nd god Yahweh\nd* 更改为
god\zul\u0332\zul*\nd\ Yahweh\nd*。
\zul 样式会减小字号并将拉伸(stretch)设置为 200%,以便单个 \u0332 字符能完美地给“god”中的“o”和“d”加上下划线,同时跳过“g”。
“Yahweh”前面的 "\ "(斜杠加空格)使 \nd 给“god”和“Yahweh”之间的空格加上下划线,所以一切都运行得非常完美——直到我遇到了一个使用 \p^95 标记缩小的段落,这似乎将我的 \zul 样式的拉伸重置为 100%,导致只有“god”的最后一个字母带有下划线。
理想的情况是有一个复选框,可以让下划线在所有下行笔画处断开,但快速搜索让我相信这在 TeX 中并不是一件简单的事情。
我觉得我在 49 英里前就走错了路,我正在寻找其他建议。
我怎样才能为单词 ប៉្រ័ះ ប៊កកាតយ័ 制作一个漂亮的下划线——并且也能适用于单词 អាញ់?
I’m working with a Khmer script project in which they want \nd to be underlined. The trouble is that the first letter of the word meaning “lord” has a deep descender. If the underline is placed low enough to be below the descender then it’s just too far from the majority of the text, especially in cases where \nd is used on a word without a descender. I’m actually simplifying the problem, since the “first letter” visually is actually the 4th character in the string, due to the beauty of Khmer Unicode re-ordering rules.
\nd ប៉្រ័ះ ប៊កកាតយ័\nd*
Substituting English to keep it simple, I used changes.txt to change
\nd god Yahweh\nd* to
god\zul\u0332\zul*\nd\ Yahweh\nd*.
The \zul style reduces the font size and sets stretch to 200% so that the single \u0332 character nicely underlines both the “o” and “d” of “god”, while skipping the “g”.
The "\ " (slash space) before “Yahweh” causes \nd to underline the space between “god” and “Yahweh”, so it all worked beautifully—until I got to a paragraph which I’d shrunk using the \p^95 notation, which seems to reset to 100% the stretch on my \zul style, leaving only the last letter of “god” underlined.
Ideal would be a check box to cause underlining to dropout at all descenders, but a quick search leads me to believe that this is not a simple thing in TeX.
I feel like I took a wrong turn 49 miles ago and I’m looking for some other suggestions.
How can I make a nice underline of the words ប៉្រ័ះ ប៊កកាតយ័ — and something that will also work for the word អាញ់?
机器翻译自 English 显示原文