2

Suppose I have a diagram of this form:

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

\begin{document}


\begin{frame}


\[
\begin{pmatrix}
\begin{matrix} e \\ \text{John} \\ j \end{matrix} &
\begin{pmatrix}
e \to e \to t      & e \\
\text{saw}         & \text{Mary}\\
\operatorname{saw} & m
\end{pmatrix}
\end{pmatrix}
=
\begin{matrix}
t\\
\text{John saw Mary}\\
\operatorname{saw}(j, m)\\
\end{matrix}
\]

\end{frame}
\end{document}

Suppose I want to insert the following diagram where the first e is in the diagram above (at the top left hand corner of that diagram, or suppose I want to insert it at any place in the top row of the above diagram)

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

\begin{document}


\begin{frame}

\[
\begin{array}{c|c}
 A & B\\
  \hline
  A & B\\
  \hline
 \multicolumn{2}{c}{C}
  \end{array}
\]

\end{frame}

\end{document}

How can I do this? I tried to literally copy and paste the second diagram into the first diagram, but this produced the error 'bad math environment delimiter'.

  • 2
    Just replace the e with the part from \begin{array} to \end{array} (inclusive). – egreg Apr 10 at 9:52
  • @CarLaTeX Done. – egreg Apr 21 at 13:01
2

You just paste the array:

\documentclass{beamer}
\usetheme{Madrid} 

\begin{document}

\begin{frame}

\[
\begin{pmatrix}
\begin{matrix} e \\ \text{John} \\ j \end{matrix} &
\begin{pmatrix}
\begin{array}{c|c}
 A & B\\
  \hline
  A & B\\
  \hline
 \multicolumn{2}{c}{C}
  \end{array}
 \to e \to t      & e \\
\text{saw}         & \text{Mary}\\
\operatorname{saw} & m
\end{pmatrix}
\end{pmatrix}
=
\begin{matrix}
t\\
\text{John saw Mary}\\
\operatorname{saw}(j, m)\\
\end{matrix}
\]

\end{frame}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.