LaTeX indicator function

I always struggle to write an indicator function in Latex. You know, the 1 with a double bar, for instance in ๐Ÿ™_A(x). For letters like N, a simple \mathbb{N} gives a nice โ„•, but \mathbb{1} gives a weird looking character that is definitely not a double-struck 1. The best way I found is to import the dsfont package and use \mathds{1}: \usepackage{dsfont} \mathds{1} Itโ€™s also possible to import the bbm package and use \mathbbm{1}, but I donโ€™t recommend this option as it uses a bitmapped font for the ๐Ÿ™ character....

September 21, 2023

LaTeX: left arrow to sample an element uniformly at random

Here is a command to draw a left arrow with a dollar sign. It is commonly used to denote a variable assignment uniformly at random from a given set. LaTeX notation to sample a random elementLaTeX notation to sample a random element $\alpha \overset{{\scriptscriptstyle\$}}{\leftarrow} \mathbb{G}$ Some people use the letter R instead of the dollar sign $. Here are a few variants: LaTeX notation to sample a random element (variants)LaTeX notation to sample a random element (variants)...

April 14, 2021