I am using \mathcal{T}
to denote types in my paper. For unit type I want to use something like \mathcal{1}
but for some reason it renders as infinity symbol. How can I get a number 1 in mathcal
font.
[Tex/LaTex] Why mathcal{1} shows as infinity
mathcal
Best Answer
TL;DR: Use
\mathds{1}
with thedsfont
package instead of\mathcal{1}
.I have previously used
$\mathcal{1}_{bla}$
for indicator variables that are 1 if and only if "bla" holds true. This worked fine in IEEE templates:But broke in another KOMA-based template, where it also just showed the infinity symbol. As mentioned in the comments,
\mathcal
is only properly defined for capital letters.A simple solution for me was to use the
dsfont
package (\usepackage{dsfont}
in preamble), which allows the desired styling with\mathds{1}_{bla}
. The result looks like this (different equation than above but similar styling of the indicator variable):