2

I am trying to create diagrams like the ones in the photo below. I created the following:

\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{multicols}{2}

\begin{subequations}
\begin{empheq}[left=\empheqbiglparen, right=\empheqbigrparen]{align*}
&e &{e \to e \to t}& &e\\
&\text{John} &\text{saw}& &\text{Mary}\\
&j &saw& &m\\
\end{empheq}
\end{subequations}

\begin{subequations}
\begin{empheq}{align*}
&t\\
&\text{John saw Mary}\\
&saw(j, m)\\
\end{empheq}
\end{subequations}

\end{multicols}

\end{frame}

\end{document}

How can I get the equality sign to appear as in the photo? How can I get parenthesis to occur around "saw John" (as they appear around "saw Elliott" in the photo) and how can I create a small amount of space between the parenthesis and the expression it encloses? How can vertically align the expressions as they are in the photo (so that the expressions in the top and bottom rows align with the middle of the words in the middle row? Also, how can I regulate the size of these diagrams, so that they are smaller? Diagram

user65526
  • 845

1 Answers1

1

Use a single math display:

\documentclass[11pt]{beamer}
\usetheme{Madrid} 

\begin{document}

\begin{frame}

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

\end{frame}

\end{document}

enter image description here

If you want the double parentheses

\documentclass[11pt]{beamer}
\usetheme{Madrid} 

\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}

enter image description here

egreg
  • 1,121,712