5

Here is an MWE to obtain a calligraphic P (which is not supported by texgyrepagella, under Unicode-math) with the extra command \setmathfont[range=\symcal]{Asana Math}:

\documentclass{article}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{unicode-math}

\setmathfont{texgyrepagella-math.otf}
\setmathfont[range=\symcal]{Asana Math}

\begin{document}
    $\mathcal{P}$
 
\end{document}

I want that my unicode-math documents have access to the calligraphic mathcal P as in this Proof Wiki, for that is the standard power set symbol.

How may it be accomplished?

0

3 Answers 3

6

First off, there is no “standard” power set symbol. The ProofWiki page you cite says at most what some symbols should be used for in ProofWiki. They seem to fancy Knuth's CM Symbols shapes.

For instance, they say 𝒪 is used for big-O notation, but this is generally not true and most of the sources I know use simply O. Whether you use ℬ for the basis of a topology or for whatever else is up to the author/publisher to decide. And, personally, I've never used ℛ for a relation.

You find the power set denoted by 𝒫, but also by a fancy calligraphic variant, or simply by P. Just make it clear at the outset what notation you are using.

This said, I know of no Unicode math font that decided to borrow Knuth's calligraphic, so I can propose a simple solution, namely to load the font yourself. I anyway concur that the calligraphic alphabet offered by TeX Gyre Pagella is unsightly.

\documentclass{article}

\usepackage{amsmath}
%\usepackage{amsfonts}% not with unicode-math
\usepackage{unicode-math}

\DeclareMathAlphabet{\CMcal}{OMS}{cmsy}{m}{n}
\SetMathAlphabet{\CMcal}{bold}{OMS}{cmsy}{b}{n}
\DeclareMathAlphabet{\CMbfcal}{OMS}{cmsy}{b}{n}

\setmainfont{TeX Gyre Pagella}
\setmathfont{texgyrepagella-math.otf}
\setmathfont{NewCMMath-Book.otf}[range={cal,bfcal}]
\setmathfont{texgyrepagella-math.otf}[range=]

\newcommand{\pow}{\CMcal{P}}

\begin{document}

$\mathcal{P}$ $\CMcal{P}$

$\pow(X)$
 
\end{document}

output

Do use a command, so you're free to change the associated symbol at any time.

You can get as many shapes of the calligraphic P as are available.

\documentclass{article}

\usepackage{amsmath}
\usepackage{unicode-math}

% for Computer Modern calligraphic
\DeclareMathAlphabet{\CMcal}{OMS}{cmsy}{m}{n}
\SetMathAlphabet{\CMcal}{bold}{OMS}{cmsy}{b}{n}
\DeclareMathAlphabet{\CMbfcal}{OMS}{cmsy}{b}{n}

\setmainfont{TeX Gyre Pagella}

% the main math font
\setmathfont{texgyrepagella-math.otf}
% a decent mathcal font
\setmathfont{NewCMMath-Book.otf}[range={cal,bfcal}]
% restore the font dimensions
\setmathfont{texgyrepagella-math.otf}[range=]

\newfontfamily{\aaaa}{Latin Modern Math}[Scale=MatchUppercase]
\newfontfamily{\bbbb}{STIX Two Math}[Scale=MatchUppercase]
\newfontfamily{\cccc}{TeX Gyre DejaVu Math}[Scale=MatchUppercase]
\newfontfamily{\dddd}{Concrete Math}[Scale=MatchUppercase]

\newcommand{\pow}{\CMcal{P}}

% for testing
\newcommand{\fancyp}[1]{\text{#1\symbol{"1D4AB}}}

\begin{document}

$\mathcal{P}$ $\CMcal{P}$

$\pow(X)$

$\fancyp{\aaaa}+\fancyp{\bbbb}+\fancyp{\cccc}+\fancyp{\dddd}$
 
\end{document}

enter image description here

9
  • Which amsxxx should be retained under unicode-math, and which should be excluded? I believe amsthm should be retained, and amssym should not. Commented Aug 3 at 17:03
  • 1
    @FrodeAlfsonBjørdal amsthm has nothing to do with math symbols, so it's completely independent of unicode-math. Surely you don't want to load amsfonts or amssymb.
    – egreg
    Commented Aug 3 at 17:07
  • The Proof-Wiki P was considered standard fare for the power set symbol by a couple of famous mathematicians in an exchange on MathOverflow, a few years ago, and Ken Kunen used it in his set theory book. I do not know how prevalent it was or is. It was not used in Principia Mathamatica, or by Gödel, methinks. Be that as it may, we should think as Cantor who stated that Das Wesen der Mathematik liegt in ihrer Freiheit. Commented Aug 3 at 17:23
  • @FrodeAlfsonBjørdal I can't check now my copies of Mendelson and Bell-Machover, but I'm pretty sure neither uses that symbol.
    – egreg
    Commented Aug 3 at 17:31
  • I looked on page 181 in the 2nd edition of Mendelson's Introduction to Mathematical Logic, 1979, which is in my possession, and he does not use the Proof Wiki P. Commented Aug 3 at 18:21
5

Choose the font whose script alphabet you like the best, and load that as \mathcal. Concrete Math contains one that’s close to the reference you gave:

\documentclass{article}

\usepackage{unicode-math}

\setmathfont{texgyrepagella-math.otf}
\setmathfont{Concrete Math}[range={cal, bfcal}, Scale=MatchUppercase]

\begin{document}
    $\mathcal{P}$
 
\end{document}

Concrete Math sample

But Euler Script (by Hermann Zapf, who also designed Palatino, of which both Pagella and Asana are clones) is another classic one. You can get it from Euler Math.

1

But TeX Gyre Pagella does provide a calligraphic P. You can use any calligraphic P to denote a power set.

\documentclass{article}

\usepackage{pagella-otf}

\begin{document}
    We denote the power set of \(X\) by \(\mathcal{P}(X)\).
\end{document}

pagella_calligraphic_p

You must log in to answer this question.

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