I am using the Springer nature latex template: https://www.overleaf.com/latex/templates/springer-nature-latex-template/gsvvftmrppwq.
\usepackage{amsmath, amsfonts, dsfont}
\usepackage{blindtext}
\usepackage{xcolor}
\usepackage{mathtools}
\usepackage{comment}
\usepackage{amsthm}
\usepackage{algorithm, algpseudocode}
\usepackage{caption, subcaption}
\usepackage[export]{adjustbox}
\usepackage{multirow}
\usepackage{graphicx}
\graphicspath{{images/}}
\usepackage{xr}
\usepackage{subfiles}
\newcommand{\E}{\mathbb{E}}
\newcommand{\p}{\mathbb{P}}
\newcommand{\Reals}{\mathbb{R}}
Unfortunately, I am getting the the error message ./sn-article.tex:75: LaTeX Error: Command \p already defined. Or name \end... illegal, see p.192 of the manual.
However, if I call $\p$ or \p, I get ./sn-article.tex:193: Missing $ inserted. <inserted text> .
Thanks!
\Eis supposed to represent the expectations operator, it would be better to define it via\DeclareMathOperator{\E}{\mathbb{E}}. Here, I use "better" in the sense of improved spacing around the glyph that's generated by\mathbb{E}. – Mico Jan 24 '23 at 03:05\pis undefined. Instead, it says that\p(and its argument) must be executed in math mode. – Mico Jan 24 '23 at 04:31