
答案1
答案2
這是在 LuaLaTeX 中使用 Unicode 的另一個解決方案:
\documentclass{article}
\tracinglostchars=2
\usepackage[nil]{babel}
\babelprovide[import,main,onchar=ids fonts]{amharic}
\babelprovide[onchar=ids fonts]{english}
\usepackage{unicode-math}
\defaultfontfeatures{ Scale=MatchLowercase,
Ligatures=TeX,
Renderer=Harfbuzz }
\babelfont{rm}
{STIX Two Text}
% Noto fonts vailable at: https://www.google.com/get/noto/#serif-ethi
\babelfont[amharic]{rm}
{Noto Serif Ethiopic}
% Set up sans-serif and monospace fonts here, if needed.
\setmathfont{STIX Two Math}
\babeltags{amharic=amharic}
\babeltags{english=english}
\newcommand\matham[1]{\mathop{\text{\rmfamily\upshape\textamharic{#1}}}}
\newcommand\mathbfam[1]{\mathop{\text{\rmfamily\bfseries\upshape\textamharic{#1}}}}
\begin{document}
\[ \int_{\matham{አለምነህ}}^{\matham{አባስ}} = \matham{አባስ}
\]
\end{document}
[
據我所知,這個範例是無稽之談,但它將作為如何在數學模式下排版埃塞俄比亞語單字的範例。我添加了兩個新命令,\mathbfam
,它以粗體直立埃塞俄比亞文本字體排版,以及\matham
,它以與周圍文本相同的粗細進行排版,因此大多數時候會以常規粗細顯示,但如果在粗體標題中使用則為粗體。
您似乎想要使用整個單詞,而不是單個字母或音節。因此,這兩個指令都在其參數周圍放置了空格,例如運算子 log、sin 或 max。如果你想寫的話,這可能不太方便\matham{አለምነህ}{} \cdot {\matham{አባስ}
。將各個字母組合在一起,例如斧頭+經過,\mathop
改成\mathord
。