I typically create new commands for every capital letter in \mathsf, \mathbb, and \mathcal.

# Sans-serif capital letters

# Bold math capital letters

Is it possible to do this automatically in a for loop?

  • yes you could but is \Abb really easier than \mathbb A or (even) \bb A which just needs \let\bb\mathbb Sep 20, 2023 at 15:54
  • 1
    Maybe you need an editor with better autocomplete …
    – cabohah
    Sep 20, 2023 at 15:56
  • 1
    don't you get an error for \newcommand{\Bbb}{\mathbb{B}} ? Sep 20, 2023 at 16:41
  • 1
    only if you ignore big red circles with an error count. @Werner Sep 20, 2023 at 16:46
  • 1
    never ignore errors, after any error if you scroll past it, any generated pdf is at best a debugging aid, not usable. \Bbb is an old command to access blackboard bold, kept for compatibility, if you redefine it you break any code (perhaps in a package) that is using it, so it is up to you to check, I can't tell you if it breaks anything in your document @Physics_Student Sep 20, 2023 at 23:08

1 Answer 1


I wouldn't do this but

enter image description here

\let\Bbb\relax% sigh
{\int_step_inline:nnn {`A} {`Z} 
  \char_generate:nn{##1}{12}#1}{\cs:w math#1\cs_end


$ \Qbb + \Zsf $


Not the answer you're looking for? Browse other questions tagged .