This question is a follow on from Diagrams in subequations
I am trying to produce diagrams like those in the picture below. In particular, the top part of this style of diagram (above the word "everyone") I have tried to reproduce. I came up with this:
\documentclass[11pt]{beamer}
\usepackage{pgfpages,amsmath,amssymb,mathtools,color, graphicx, amsfonts, braket}
\usepackage{subfig}
\usetheme{Madrid}
\usepackage{empheq}
\usepackage{multicol}
\begin{document}
\begin{frame}
\[
\left(
\begin{array}{c|c}
A & B\\
\hline
A & B\\
\hline
C
\end{array}
\right)
\]
\end{frame}
\end{document}
However, as you can see, the letter C does not occur below the vertical line, and the vertical line extends too far. How can I rectify this?
Edit:
In response to comments below, I would say first that my question is worth asking, since the format of the particular diagrams I was asking about are somewhat different from the format of the diagrams in Using multicolumn in latex. Moreover, it is not transparent for a beginner user of Latex, how one might adapt the information in that question to produce diagrams of the form I wish to produce.
In any case, even if that question is relevant to my question, I still have an additional problem, not mentioned in Using multicolumn in latex below to my question. This was the suggestion that I use \multicolumn{2}{c}{C}. Doing this I managed to produce:
\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}{clc}
A & B\\
\hline
A & B\\
\hline
\multicolumn{2}{c}{C}
\end{array}
\]
\end{frame}
\end{document}
However, note that the vertical line of the diagram disappears. How can I insert the vertical line?
\multicolumn{2}{c}{C}. – Bernard Apr 10 '19 at 08:26arrayand add something like\setlength{\extrarowheight}{2pt}. – Bernard Apr 10 '19 at 08:31clcbutc|c. – Apr 10 '19 at 08:58