I usually define some command of the kind
\newcommand{\paren}[#1]{\left(#1\right)}
to make the use of parentheses more agile. Now, if in the body of my document I do this
\begin{align}
z = \paren{y\\+z}
\end{align}
I get a long list of complaints on the last line of the align environment, while I would expect the same output as for the following code,
\begin{align}
z = \left(y\\+z\right)
\end{align}
Anybody can let me know how to make this sort of parentheses commands robust over line breaks?
\documentclass{article}
\usepackage{amsmath}
\newcommand{\paren}[1]{\left(#1\right)}
\begin{document}
% This works, but I don't like it.
\begin{align}
z = \left(y\right.\\
\left.+z\right)
\end{align}
% This is lovely, but does not work.
%\begin{align}
%z = \paren{y\\+z}
%\end{align}
% No complaints, of course, if the line break is removed
\begin{align}
z = \paren{y+z}
\end{align}
\end{document}
\left...\rightevery time is a bad idea. For one, it is unbreakable. Plus\left(\\\right)hides\\fromalign, so it will never work. I'd say that in general such an approach is not worth it. – daleif Jan 13 '15 at 09:41\\in between your parentheses, you have to end the first line by\right.and start the next line with\left.– LaRiFaRi Jan 13 '15 at 09:41\left A \right. \\ \left. B \rightapproach may be faulty too, ifAandBare not the same size. Manually scaling fences that are to be broken is almost always better. – daleif Jan 13 '15 at 09:44yby\frac{1}{2}and you will see the problem with the approach – daleif Jan 13 '15 at 09:46\left(and\right)everywhere. – Mico Jan 13 '15 at 09:48&or\\from envs likealign. It might be doable. But as mentioned, I do not think it is worth ot, it will also make the code much less readable. – daleif Jan 13 '15 at 09:55\begin{align} z = \left(y\\+z\right) \end{align}is ok, which it is not. – Jan 26 '16 at 21:23