2

I use macro \DeclarePairedDelimiterX to define a domain symbol $\mathbb{D}_f$ of map f. However, the Overleaf compiler refuses to accept it as valid.

\DeclarePairedDelimiterX{\domain}[1]{\mathds{D}}{}{{}_{#1}}

Error:

You need to enclose all mathematical expressions and symbols with special markers. These special markers create a ‘math mode’.
Use $...$ for inline math mode, and \[...\]or one of the mathematical environments (e.g. equation) for display math mode.

This applies to symbols such as subscripts ( _ ), integrals ( \int ), Greek letters ( \alpha, \beta, \delta ) and modifiers (\vec{x}, \tilde{x}).
3
  • you have tagged amsmath but that does not define \DeclarePairedDelimiterX. The arguments for left and right need to be dimiters that work with \left..\right you can not use \mathds{D} Commented Aug 21, 2022 at 14:23
  • do you want \newcommand\domain[1]{\mathds{D}_{#1}} ? Commented Aug 21, 2022 at 14:25
  • Oh, I see. May you portrait this answer as post's?
    – Bruno Lobo
    Commented Aug 21, 2022 at 14:26

1 Answer 1

4

The arguments for left and right need to be delimiters that work with
\left..\right you can not use \mathds{D} as left delimiter.

I suspect you want

\newcommand\domain[1]{\mathds{D}_{#1}}


$\domain{f}$

You must log in to answer this question.

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