![类似 Kashida 的希伯来语排版](https://linux22.com/image/303073/%E7%B1%BB%E4%BC%BC%20Kashida%20%E7%9A%84%E5%B8%8C%E4%BC%AF%E6%9D%A5%E8%AF%AD%E6%8E%92%E7%89%88.png)
答案1
老式的方法,不依赖jalt
或渲染器:
(1)以 lamed 为例,针对特定的大小和特定的字体,将字形排版为独立的 pdf。
\documentclass[12pt]{standalone}
\usepackage{fontspec}
\setmainfont[Script=Hebrew]{FreeSerif}\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguages{hebrew}
\begin{document}
{\texthebrew{ﬥ}}
\end{document}
(2)然后,用graphicx
包(或者adjustbox
,它的扩展)includegraphics{}
再拉回三次,trim
将 pdf / glyph 分成三个部分:左,中,右。
(3)最后,将中间的数字乘以若干倍。
(顶行:字体中的窄字形和宽字形)
(中间一行:宽字形分为三部分)
(下行:中间部分相乘)
\documentclass[12pt]{article}
%\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{fontspec}
\setmainfont[Script=Hebrew]{FreeSerif}\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguages{hebrew}
\newcommand\lleft{\includegraphics[trim=0pt 0pt 6pt -2pt,clip]{lamedw}}
\newcommand\lmid{\includegraphics[clip,trim=0.15em 0em 0.3em 0em]{lamedw}}
\newcommand\lright{\adjincludegraphics[clip,trim=0.4em 0em 0em 0em]{lamedw}}
\begin{document}
\texthebrew{ﬥ}\texthebrew{ל}
\includegraphics[trim=0pt 0pt 6pt -2pt,clip]{lamedw}
\includegraphics[clip,trim=0.15em 0em 0.3em 0em]{lamedw}
\adjincludegraphics[clip,trim=0.4em 0em 0em 0em]{lamedw}
\texthebrew{ﬥ}
\lleft\lmid\lright \lleft\lmid\lmid\lmid\lright
\lleft\lmid\lmid\lmid\lmid\lmid\lmid\lright
\end{document}
编辑后添加:
为其他内容添加代码片段可能是值得的,以节省用户的输入,因为字形之间的修剪可能略有不同。
该代码以循环方式完成。
在序言中:
\newcommand\hleft{\includegraphics[trim=0pt 0pt 6pt -2pt,clip]{hew}}
\newcommand\hmid{\includegraphics[clip,trim=0.16em 0em 0.3em 0em]{hew}}
\newcommand\hright{\adjincludegraphics[clip,trim=0.4em 0em -0.10em 0em]{hew}}
\newcommand\dleft{\includegraphics[trim=0pt 0pt 6pt -2pt,clip]{daletw}}
\newcommand\dmid{\includegraphics[clip,trim=0.16em 0em 0.3em 0em]{daletw}}
\newcommand\dright{\adjincludegraphics[clip,trim=0.4em 0em -0.10em 0em]{daletw}}
\newcommand\kleft{\includegraphics[trim=0pt 0pt 6pt -2pt,clip]{kafw}}
\newcommand\kmid{\includegraphics[clip,trim=0.16em 0em 0.3em 0em]{kafw}}
\newcommand\kright{\adjincludegraphics[clip,trim=0.4em 0em -0.10em 0em]{kafw}}
\newcommand\mleft{\includegraphics[trim=0pt 0pt 6pt -2pt,clip]{memw}}
\newcommand\mmid{\includegraphics[clip,trim=0.16em 0em 0.3em 0em]{memw}}
\newcommand\mright{\adjincludegraphics[clip,trim=0.4em 0em -0.10em 0em]{memw}}
\newcommand\rleft{\includegraphics[trim=0pt 0pt 6pt -2pt,clip]{reshw}}
\newcommand\rmid{\includegraphics[clip,trim=0.16em 0em 0.3em 0em]{reshw}}
\newcommand\rright{\adjincludegraphics[clip,trim=0.4em 0em -0.10em 0em]{reshw}}
\newcommand\tleft{\includegraphics[trim=0pt 0pt 6pt -2pt,clip]{tavw}}
\newcommand\tmid{\includegraphics[clip,trim=0.18em 0em 0.3em 0em]{tavw}}
\newcommand\tright{\adjincludegraphics[clip,trim=0.4em 0em -0.10em 0em]{tavw}}
在文档中:
\texthebrew{ﬢ}\texthebrew{ד}
\dleft\
\dmid\
\dright\
\texthebrew{ﬢ}
\dleft\dmid\dright \dleft\dmid\dmid\dmid\dright
\dleft\dmid\dmid\dmid\dmid\dmid\dmid\dright
\texthebrew{ﬣ}\texthebrew{ה}
\hleft\
\hmid\
\hright\
\texthebrew{ﬣ}
\hleft\hmid\hright \hleft\hmid\hmid\hmid\hright
\hleft\hmid\hmid\hmid\hmid\hmid\hmid\hright
\texthebrew{ﬤ}\texthebrew{כ}
\kleft\
\kmid\
\kright\
\texthebrew{ﬤ}
\kleft\kmid\kright \kleft\kmid\kmid\kmid\kright
\kleft\kmid\kmid\kmid\kmid\kmid\kmid\kright
\texthebrew{ﬦ}\texthebrew{ם}
\mleft\
\mmid\
\mright\
\texthebrew{ﬦ}
\mleft\mmid\mright \mleft\mmid\mmid\mmid\mright
\mleft\mmid\mmid\mmid\mmid\mmid\mmid\mright
\texthebrew{ﬧ}\texthebrew{ר}
\rleft\
\rmid\
\rright\
\texthebrew{ﬧ}
\rleft\rmid\rright \rleft\rmid\rmid\rmid\rright
\rleft\rmid\rmid\rmid\rmid\rmid\rmid\rright
\texthebrew{ﬨ}\texthebrew{ת}
\tleft\
\tmid\
\tright\
\texthebrew{ﬨ}
\tleft\tmid\tright \tleft\tmid\tmid\tmid\tright
\tleft\tmid\tmid\tmid\tmid\tmid\tmid\tright
这使得 alef 及其对角线成为一个特殊情况。