1

I have a beamer frame as shown below, and it produces something like the following: enter image description here

The point is that I want to do the following changes:

  1. I want all the upper nodes to be the same size, and same length as the below nodes.
  2. I want the text inside the nodes to be left aligned, e.g., $\pi_{t^*}$ is not aligned.
  3. I want the font to be smaller, so that I can fit 4 of these on horizontally (currently I have 2 as you can see).
  4. I want the nodes to have curved edges and be filled with color, e.g., like the following when I use tikzmarkin and tikzmarkend.

enter image description here

Any ideas how to achieve these?

\documentclass[xcolor=table,10pt,aspectratio=169]{beamer}
\usetheme{metropolis}

\usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[american]{babel} \usepackage{amsmath,amssymb,amsthm} \usepackage[beamer,customcolors]{hf-tikz} \usepackage{booktabs} % Tables \usepackage{tikz} \usetikzlibrary{ arrows, calc, chains, decorations, decorations.text, decorations.pathmorphing, matrix, overlay-beamer-styles, positioning, shapes, tikzmark }

\begin{document}

\begin{frame}{Intuition} \begin{center} \begin{tikzpicture}[every text node part/.style={align=center}] \node[draw, minimum size=1cm] (A) {$c_0 \gets \mathsf{Enc}(\mathsf{pk}0^{\mathsf{PKE}}, m_0)$\ $c_1 \gets \mathsf{Enc}(\mathsf{pk}_1^{\mathsf{PKE}}, m_0)$\ $\pi{t^} \gets \mathsf{Prover}(t^, x, w)$}; \node[draw, minimum size=1cm, below=0.1cm of A] (C) {$\mathsf{sk}{f, t} = iO(\text{PKey}[\mathsf{sk}_0^{\mathsf{PKE}}, t])$}; \node[draw, minimum size=1cm, right=1cm of A] (B) {$c_0 \gets \mathsf{Enc}(\mathsf{pk}_0^{\mathsf{PKE}}, m_0)$\ $c_1 \gets \mathsf{Enc}(\mathsf{pk}_1^{\mathsf{PKE}}, m_0)$\ $\pi{t^} \gets \mathsf{Sim}(t^, x)$}; \node[draw, minimum size=1cm, below=0.1cm of B] (D) {$\mathfs{sk}_{f, t} = iO(\text{PKey}[\mathfs{sk}_0^{\mathsf{PKE}}, t])$}; \end{tikzpicture} \end{center} \end{frame}

\end{document}

pixel
  • 1,357
  • 1
  • Use the same text width or minimum width for both nodes. Or Q107277. 2. align=left. For more control, use amsmath's alignedat or an array. 3. Simply use \small or any other size command. Either at the start of the tikzpicture, at the start of the text of the node or font=\small. 4. draw=green, fill=green!50, rounded corners.
  • – Qrrbrbirlbel Dec 09 '22 at 22:50
  • @Qrrbrbirlbel If you can write a complete answer with these I would be happy to accept. – pixel Dec 09 '22 at 23:02