15
$\begingroup$

I am familiar with typing:

escintsesc

escrealsesc

to produce:

enter image description here

(when typing inside a DisplayFormula cell).

How would one typeset a similar looking ℕ ?

I have tried \[DoubleStruckCapitalN]

but this produces a different looking result:

enter image description here

(ℕ (an N in "Blackboard Bold" font) is used to refer to the set of all natural numbers.)

$\endgroup$

3 Answers 3

18
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Suggested edit: :nnints: and :pints: need to be pluralized. $\endgroup$
    – Alan
    Commented Oct 14, 2021 at 16:08
5
$\begingroup$

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.

$\endgroup$
6
  • 1
    $\begingroup$ It does not look like :reals: and friends. $\endgroup$
    – Kuba
    Commented Jan 31, 2019 at 22:06
  • $\begingroup$ Are you on a Mac? I'm on Windows and they sure look the same to me when they are both either bold or regular. It really doesn't matter to me what anyone chooses to use. $\endgroup$
    – Bill Watts
    Commented Feb 1, 2019 at 8:23
  • $\begingroup$ I am on Windows 10: i.sstatic.net/VQ2PX.png $\endgroup$
    – Kuba
    Commented Feb 1, 2019 at 8:29
  • $\begingroup$ Wow. I don't have have a site to show you, and I don't know what is going on, but except for the last one which isn't bold, they all look identical to your reals. Its a bracket in front of the R in all cases, not an I with serif. I enlarged the cell to make sure. I just figured it out. Inputform is different, but change to traditional form, it looks like yours. $\endgroup$
    – Bill Watts
    Commented Feb 1, 2019 at 8:47
  • 1
    $\begingroup$ Pretty close. I have Traditional form as my standard output form which I guess is the cause of the confusion. its getting close to 3 am my time so I'm done for awhile $\endgroup$
    – Bill Watts
    Commented Feb 1, 2019 at 9:38
5
$\begingroup$

Building on Kuba's solution

Here is code for a shortcut

escnatsesc

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

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.