答案1
為什麼不也是j?
\documentclass{article}
\usepackage{amsmath}
\usepackage{l3draw}
\makeatletter
\NewDocumentCommand{\iheart}{}{\mathord{\mathpalette\iheart@{\imath{7}{1}}}}
\NewDocumentCommand{\jheart}{}{\mathord{\mathpalette\iheart@{\jmath{12}{2}}}}
\newcommand{\iheart@}[2]{\iheart@@#1#2}
\newcommand{\iheart@@}[4]{%
\vbox{\m@th\offinterlineskip
\sbox\z@{$\mkern1mu$}%
\ialign{##\cr\hidewidth\smallheart@{#1}{#3}\hidewidth\cr\noalign{\kern\wd\z@}\cr$#1#2$\cr}%
}%
\mkern#4mu
}
\ExplSyntaxOn
\cs_new_protected:Npn \smallheart@ #1 #2
{
\draw_begin:
\draw_transform_matrix_absolute:nnnn { 0.4 } { 0 } { 0.2 } { 0.3 }
\draw_path_moveto:n { 0cm, 0cm }
\hbox_set:Nn \l_tmpa_box { \boldmath$#1\mkern#2mu\heartsuit$ }
\draw_box_use:N \l_tmpa_box
\draw_end:
}
\ExplSyntaxOff
\makeatother
\begin{document}
$2\pi\iheart_{\jheart}+\jheart$
\end{document}
巨集如何運作?首先,一些數學調色盤技巧有四個參數:
- 像往常一樣當前的數學風格
- 要排版的字母,所以
\imath
或者\jmath
- 心形前面的(數學)緊排
- 組合後的數學緊鄰,以補償因未考慮而導致的心形突出
\hidewidth
我在裡面做了一個\vbox
,\ialign
徹底顛覆了內心。
最後,心臟是一個粗體,\heartsuit
採用適當的數學風格,進行仿射變換,應用減少和剪切。
也許各種參數還需要更多的實驗。