# Removing outer parenthesis in a diagram

When I try to remove the outer brackets in the following diagram, by removing the first occurrence of \begin{pmatrix} and the last occurrence of \end{pmatrix} I get the error misplaced alignment tab character &. I cannot see which tab character is causing the problem and why it is causing the problem. How can I remove the outer parentheses without incurring this problem, and preserving all other properties as is, except for perhaps making the gap between rows slightly smaller. I have used \\ \\ below, but this gap is too big, whilst \\ is too small.

\documentclass[11pt]{beamer}
\usepackage{pgfpages,amsmath,amssymb,mathtools,color, graphicx, amsfonts, braket}
\usepackage{subfig}
\usepackage{empheq}
\usepackage{multicol}
\usepackage{gb4e}

\begin{document}

\begin{frame}

$\begin{pmatrix}\begin{matrix} \begin{array}{c|c} \multicolumn{2}{c}{\cfrac{\ t \ }{\ e \to e \to t \ }} \end{array} \\ \\ \text{John} \\ \\ \cfrac{\ \operatorname{[\;]}\ }{\ saw\ } \end{matrix} & \begin{pmatrix} \begin{array}{c|c} \multicolumn{2}{c}{\cfrac{\ t \ }{\ e \to e \to t \ }} \end{array} & \begin{array}{c|c} \multicolumn{2}{c}{\cfrac{\ t \ }{\ e \to e \to t \ }} \end{array} \\ \\ \text{saw} & \text{Mary}\\ \\ \cfrac{\ \operatorname{[\;]}\ }{\ a\ } & \cfrac{\ \operatorname{[\;]}\ }{\ b\ } \end{pmatrix} \end{pmatrix}$

\end{frame}

\end{document}


Change pmatrix (which automatically add a pair of brackets) to matrix:

\documentclass[11pt]{beamer}
\usepackage{pgfpages,amsmath,amssymb,mathtools,color, graphicx, amsfonts, braket}
\usepackage{subfig}
\usepackage{empheq}
\usepackage{multicol}
\usepackage{gb4e}

\begin{document}

\begin{frame}

$\begin{matrix}\begin{matrix} \begin{array}{c|c} \multicolumn{2}{c}{\cfrac{\ t \ }{\ e \to e \to t \ }} \end{array} \\ \\ \text{John} \\ \\ \cfrac{\ \operatorname{[\;]}\ }{\ saw\ } \end{matrix} & \begin{pmatrix} \begin{array}{c|c} \multicolumn{2}{c}{\cfrac{\ t \ }{\ e \to e \to t \ }} \end{array} & \begin{array}{c|c} \multicolumn{2}{c}{\cfrac{\ t \ }{\ e \to e \to t \ }} \end{array} \\ \\ \text{saw} & \text{Mary}\\ \\ \cfrac{\ \operatorname{[\;]}\ }{\ a\ } & \cfrac{\ \operatorname{[\;]}\ }{\ b\ } \end{pmatrix} \end{matrix}$

\end{frame}

\end{document}


Avoid using double \\s. You always have \$]: \documentclass[11pt]{beamer} \usepackage{pgfpages,amsmath,amssymb,mathtools,color, graphicx, amsfonts, braket} \usepackage{subfig} \usetheme{Madrid} \usepackage{empheq} \usepackage{multicol} \usepackage{gb4e} \begin{document} \begin{frame} \[\begin{matrix}\begin{matrix} \begin{array}{c|c} \multicolumn{2}{c}{\cfrac{\ t \ }{\ e \to e \to t \ }} \end{array} \\[2ex] \text{John} \\ \cfrac{\ \operatorname{[\;]}\ }{\ saw\ } \end{matrix} & \begin{pmatrix} \begin{array}{c|c} \multicolumn{2}{c}{\cfrac{\ t \ }{\ e \to e \to t \ }} \end{array} & \begin{array}{c|c} \multicolumn{2}{c}{\cfrac{\ t \ }{\ e \to e \to t \ }} \end{array} \\[2ex] \text{saw} & \text{Mary}\\ \cfrac{\ \operatorname{[\;]}\ }{\ a\ } & \cfrac{\ \operatorname{[\;]}\ }{\ b\ } \end{pmatrix} \end{matrix}$

\end{frame}

\end{document}


• Brilliant. The other thing I wanted to know was how to get the space between each row slightly less. I had \ before and in the above it is \\ \. But this is slightly too big, whilst \ is too small. – user65526 Apr 12 '19 at 14:01
• I have edited my question slightly to incorporate this. – user65526 Apr 12 '19 at 14:04
• I've tried that but it doesn't produce enough space between the top two rows. Can I use 0.5ex? – user65526 Apr 12 '19 at 14:07
• @user65526 Look at my edited answer. I used the default spacing in the space between row 2 and row 3, but \\[2ex] between row 1 and row 2. In fact, you can add anything between [ and ], for example \\[1cm], even negative numbers can be added. – user156344 Apr 12 '19 at 14:08
• @user65526 Do you have any questions? – user156344 Apr 12 '19 at 14:19