I was wondering if it is possible to replace just the mathmode i from the default latex font with nearly the same letter, but where the dot on the i is a small heart. For example:
Thank you!
Why not also 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}
How do the macros work? First off, some mathpalette trickery to have four arguments:
\imath
and \jmath
\hidewidth
I make a \vbox
with \ialign
inside it that oversets the heart to the letter.
Finally, the heart is a bold \heartsuit
in the suitable math style subject to an affine transformation that applies reduction and shearing.
Maybe some more experiments are needed for the various parameters.
\documentclass{article}
\begin{document}
$2\pi{\mathop{{}\imath}\limits^{\scriptscriptstyle\heartsuit}}$
\end{document}
\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}
$
in the argument of \resizebox
.
O
on p. 29 of typofonts.com/LATIN_PALEOGRAPHY.pdfo
s rather thani
s?