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:

enter image description here

Thank you!

  • 8
    Is Valentine's day approaching again? Time flies ...
    – gernot
    Apr 22 at 9:59
  • 3
    @gernot Check out the Visigothic O on p. 29 of typofonts.com/LATIN_PALEOGRAPHY.pdf
    – Thérèse
    Apr 22 at 16:16
  • @gernot But with os rather than is?
    – cfr
    Apr 23 at 0:14
  • @cfr Yes, sure. Different time, different culture, different letter. 500 years from now it will be the letter M, as most scientists agree.
    – gernot
    Apr 23 at 7:46

3 Answers 3


Why not also j?



\cs_new_protected:Npn \smallheart@ #1 #2
  \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




enter image description here

How do the macros work? First off, some mathpalette trickery to have four arguments:

  1. the current math style, as usual
  2. the letter to be typeset, so either \imath and \jmath
  3. the (math) kern in front of the heart
  4. the math kern after the combination, to compense for the protrusion of the heart which is not taken into account because of \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.

  • 5
    Thanks! I was going to ask for j as well, but I wasn't sure if that would be too much of a hassle! You're a tex wizard!
    – Infimum
    Apr 22 at 19:41

enter image description here



\Huge  \[ 2\pi ii\iheart ii  =  2\pi\iheart[\jmath] \]
  • I get quite a lot of errors with this code. You are missing the $ in the argument of \resizebox.
    – campa
    Apr 23 at 9:12
  • 1
    @campa. Oh, sorry, yes, it fail miserably with pdlatex and xelatex for this reason, but it works as is with lualatex (bug or feature? haha).
    – Fran
    Apr 23 at 9:23
  • Added \ensuremath for engine compatibility
    – Fran
    Apr 23 at 9:33
  • Oh, didn't think of trying with luatex. Interesting...
    – campa
    Apr 23 at 10:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .