\documentclass{article} \usepackage{mathtools} \makeatletter \newcommand{\@distr}[2]{{\ooalign{$#1\phantom{#2}$\cr$\hidewidth\underbracket[0.3pt][1pt]{#1#2}\hidewidth$}}} \newcommand{\distr}[1]{\mathpalette{\@distr}{#1}} \makeatother \begin{document} \[ a_f\ a_{\distr{f}} \qquad \mathcal{L}\psi\ \mathcal{L}\distr{\psi} \] \end{document}