# Why mathcal{1} shows as infinity

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.

• \mathcal can only be used for uppercase letters Mar 7 '16 at 23:00
• Christian, I think \mathcal{1} should look like digit 1, rendered in a style/font similar to one used for \mathcal{} uppercase letters. Mar 7 '16 at 23:07
• that is not how the tex fonts work, each font only has 128 characters (even though tfm allows 256) and the alphabets and symbols are squeezed in wherever. the symbol font has an uppercase calligraphic alphabet in the ascii uppercase positions but all the math symbols are in the other slots, \mathcal just selects the symbol font so only produces caligraphic for uppercase letters. Mar 7 '16 at 23:11
• If there is any other command I can use to render 1 in a style/font similar to one used for \mathcal{} uppercase letters? Mar 7 '16 at 23:20
• most of the tex fonts with math caligraphic/script don't have digits, I just looked at cmsy,euscr,rsfs,calliga but if you find a font with the characters you want, it could be set up for tex use. Mar 7 '16 at 23:27

TL;DR: Use \mathds{1} with the dsfont 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):