可以用心來點綴你的 Is 嗎?

可以用心來點綴你的 Is 嗎?

我想知道是否可以用幾乎相同的字母替換預設乳膠字體中的數學模式 i,但 i 上的點是一個小心形。例如:

在此輸入影像描述

謝謝你!

答案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}

在此輸入影像描述

巨集如何運作?首先,一些數學調色盤技巧有四個參數:

  1. 像往常一樣當前的數學風格
  2. 要排版的字母,所以\imath或者\jmath
  3. 心形前面的(數學)緊排
  4. 組合後的數學緊鄰,以補償因未考慮而導致的心形突出\hidewidth

我在裡面做了一個\vbox\ialign徹底顛覆了內心。

最後,心臟是一個粗體,\heartsuit採用適當的數學風格,進行仿射變換,應用減少和剪切。

也許各種參數還需要更多的實驗。

答案2

在此輸入影像描述

\documentclass{article}
\begin{document}
$2\pi{\mathop{{}\imath}\limits^{\scriptscriptstyle\heartsuit}}$
\end{document}

答案3

姆韋

\documentclass{article}
\usepackage{amsmath,graphicx}
\newcommand\iheart[1][\imath]{%
#1\kern-.2em\rlap{%
\raisebox{1.2ex}[0pt][0pt]{%
\rotatebox{-15}{%
\resizebox{.5ex}{.5ex}{\ensuremath{\heartsuit}}}}}\kern.2em} 
\begin{document}
\Huge  \[ 2\pi ii\iheart ii  =  2\pi\iheart[\jmath] \]
\end{document}

相關內容