With pdflatex I often used \left( and \right)
to scale the parenthesis of a function as in
\[\exp\left(\frac{a}{b}\right) \]
But this method was not perfect, because
- the code is difficult to read
- there were problems with spacing
- and problems with superscripts
Is there a modern solution in LuaLaTeX for this? Is there a reason why we do not write
\exp[bigg]{ \frac{a}{b} }
and define a good function with parenthesis?
This could be done for example with DeclarePairedDelimiter from mathtools.

\expto use round parentheses. In the real world, that seems to be too restrictive. There is nothing stopping you from creating your own command for the exponential and other functions, though. – Harald Hanche-Olsen Apr 25 '19 at 10:03\DeclarePairedDelimiter, but on second reading, I think you are talking about the basic syntax for math, not whatever constructs people might build on top of it for their own use. Am I correct? – Harald Hanche-Olsen Apr 25 '19 at 10:05\absfor\lvert...\rvertin my documents, but the answer with\mexpI already find too much. I doubt that it will add a lot in terms of efficiency in the long run. – Henri Menke Apr 25 '19 at 10:36\DeclarePairedDelimiter\parens()and similar for other delimiters, though, not because it saves typing (it doesn't), but because it is easier to adjust the sizing of the parentheses in one place rather than two. And for curly braces it is useful because my editor will not match\{and\}the way it does ordinary delimiters. – Harald Hanche-Olsen Apr 25 '19 at 12:11