Barre fret number

Hello! Is there a simple way to add a fret number to a barre? Thank you very much!

Not natively, as far as I know, but there is an excellent workaround here.

Thank you!