3

I would like to create two boxes next to each other horizontally, each containing text. I'd like the border to be black and the background white.

enter image description here

Here's my attempt at reproducing it

\documentclass{article}
\usepackage{tcolorbox}
\usepackage{amsmath,mathtools}

\begin{document}
\begin{center}
{\tcbox{Modals}=\tcbox{Helping verbs} }
\end{center}
\[\fbox{\mbox{Modals}}=\fbox{\mbox{Helping verbs}}\]

\end{document}

which produces

enter image description here

Educ
  • 4,362

1 Answers1

5

You are better to define your own command:

\documentclass{article}
\usepackage{tcolorbox}

\newtcbox{\mybox}{
  colback=white,% background color
  on line,% don't add line breaks
  before upper=\vphantom{Ay},% ensure constant height
}

\begin{document}
\[
\mybox{Modals}=\mybox{Helping verbs}
\]

\end{document}

enter image description here

egreg
  • 1,121,712