What is a satisfactory way to typeset ℕ in the Mathematica notebook?

With Ctrl+Shift+E you can check that :reals: produces TemplateBox[{}, "Reals"]. Then you can take a peek at its DisplayFunction with:

CurrentValue[{StyleDefinitions, "Reals"}]
{ TemplateBoxOptionsDisplayFunction -> (StyleBox["\[DoubleStruckCapitalR]", ShowSyntaxStyles -> False, 
     FontFamily -> "Times"] &), 
 TemplateBoxOptionsInterpretationFunction -> ("Reals" &), 
 TemplateBoxOptionsTooltip -> Automatic}

So the answer to your question is the FontFamily:

Style["\[DoubleStruckCapitalN]", FontFamily -> "Times"]

enter image description here


Update:

In addition to that it is worth mentioning PositiveIntegers, NonNegativeIngeters and all family of combinations of sign+domain.

So depending on context you can use :nnint: or :pint: for natural numbers:

enter image description here

Those TemplateBoxes have additional benefit, they have interpretation so while Style["\[DoubleStruckCapitalR]", FontFamily -> "Times"] looks nice, :reals: looks nice and represents Reals you can use with symbolic math.


This comes from the pallete.

esc dsN esc

You can always Bold it with ctrl-b.

Change to Traditional form with ctrl-shift-t to get the same as reals.


Building on Kuba's solution

Here is code for a shortcut

escnatsesc

CurrentValue[$FrontEnd, {InputAliases, "nats"}] = StyleBox["\[DoubleStruckCapitalN]", FontFamily -> "Times"];

enter image description here

Tags:

Formatting