1

The following code

\documentclass{scrartcl}
\usepackage{mathtools}
\DeclarePairedDelimiterX\innerp[2]{\left(}{\right)}{#1 \delimsize\vert \mathopen{}#2}
\DeclarePairedDelimiterX{\dualp}[2]{\langle}{\rangle}{#1\, , \mathopen{}#2}
\begin{document}
%
\[
    \innerp{a}{b}
\]
%
%
\[
    \dualp{a}{b}
\]
%
\end{document}

Gives the following error code:

./mwe.tex:8: Missing { inserted.
<to be read again> 
                   \left 
l.8     \innerp{a}{b}

I have just replaced the \langle by \left( and the \rangle by \right) . So I am wondering what is wrong.

4
  • 2
    \left and \right are wrong. Just use ( and ).
    – campa
    Commented May 3, 2021 at 11:59
  • As campa mentions \left/right has no relevancy here as they are applied automatically via \innerp*. Tip if you use \delimsize\lvert instead, then you don't need the \mathopen.
    – daleif
    Commented May 3, 2021 at 12:26
  • @daleif Do you think this might be a duplicate of tex.stackexchange.com/q/368641/82917? It's not quite literal, but similar (BTW has this really ever worked?)
    – campa
    Commented May 3, 2021 at 12:42
  • @campa I think it is a duplicate of that. If {\left(} ... has ever worked it would have been a very long time ago. I do not recall it ever being a supported feature.
    – daleif
    Commented May 3, 2021 at 12:45

0

You must log in to answer this question.

Browse other questions tagged .