Building upon koleygr's code, here is a slightly different version using an array
instead of a tabular
and \phantom
to improve the alignment of the =
in the last column:
\documentclass{article}
\usepackage[margin=2cm]{geometry}
\begin{document}
\[
\renewcommand{\arraystretch}{1.5}
\begin{array}{|l|l|l|}
\hline
\multicolumn{1}{|c|}{Y^{2}B^{2}}
& \multicolumn{1}{c|}{Z^{2}\chi^{2}}
& \multicolumn{1}{c|}{X^{2}\lambda^{2}} \\ \hline
\mathcal{O}_{1} = \mathrm{wc}_{1}(\partial_{\mu}A_{\nu}-\partial_{\nu}A_{\mu})(\partial^{\mu}A^{\nu}-\partial^{\nu}A^{\mu}) & \mathcal{O}_{7}= \mathrm{wc}_{7}Z^{\mu\nu}Z_{\mu}(\phi^{\dagger}\phi)^{2}
& \mathcal{O}_{9\phantom{1}} = \gamma^{\mu}\gamma^{\nu}+\gamma^{\nu}\gamma^{\mu} \\
\hline
\mathcal{O}_{2} = \mathrm{wc}_{2} X^{\mu}X_{\mu}B^{\rho\sigma}B_{\rho\sigma}
& \mathcal{O}_{8} = \mathrm{wc}_{8}\bar{\psi}(i\gamma^{\mu}\partial_{\mu}-m)\psi-\frac{1}{4}F_{\mu\nu}F^{\mu\nu}
& \mathcal{O}_{10} = g^{\mu\nu} \\
\hline
\end{array}
\]
\end{document}
Update:
In order to increase the horizontal space between the text and a vertical line, you can adjust the value of \arraycolsep
to suit your needs. To change the vertical space between the text and a horizontal line, you could use \setcellgapes
from the makecell
package. The following MWE contains three somewhat exaggerated examples to show the effect of the two commands:
\documentclass{article}
\usepackage[margin=2cm]{geometry}
\usepackage{makecell}
\begin{document}
\[
\renewcommand{\arraycolsep}{10pt}
\setcellgapes{\arraycolsep}
\makegapedcells
\begin{array}{|l|l|l|}
\hline
\multicolumn{1}{|c|}{Y^{2}B^{2}}
& \multicolumn{1}{c|}{Z^{2}\chi^{2}}
& \multicolumn{1}{c|}{X^{2}\lambda^{2}} \\ \hline
\mathcal{O}_{1} = \mathrm{wc}_{1}(\partial_{\mu}A_{\nu}-\partial_{\nu}A_{\mu})(\partial^{\mu}A^{\nu}-\partial^{\nu}A^{\mu}) & \mathcal{O}_{7}= \mathrm{wc}_{7}Z^{\mu\nu}Z_{\mu}(\phi^{\dagger}\phi)^{2}
& \mathcal{O}_{9\phantom{1}} = \gamma^{\mu}\gamma^{\nu}+\gamma^{\nu}\gamma^{\mu} \\
\hline
\mathcal{O}_{2} = \mathrm{wc}_{2} X^{\mu}X_{\mu}B^{\rho\sigma}B_{\rho\sigma}
& \mathcal{O}_{8} = \mathrm{wc}_{8}\bar{\psi}(i\gamma^{\mu}\partial_{\mu}-m)\psi-\frac{1}{4}F_{\mu\nu}F^{\mu\nu}
& \mathcal{O}_{10} = g^{\mu\nu} \\
\hline
\end{array}
\]
\[
\renewcommand{\arraycolsep}{5pt}
\setcellgapes{20pt}
\makegapedcells
\begin{array}{|l|l|l|}
\hline
\multicolumn{1}{|c|}{Y^{2}B^{2}}
& \multicolumn{1}{c|}{Z^{2}\chi^{2}}
& \multicolumn{1}{c|}{X^{2}\lambda^{2}} \\ \hline
\mathcal{O}_{1} = \mathrm{wc}_{1}(\partial_{\mu}A_{\nu}-\partial_{\nu}A_{\mu})(\partial^{\mu}A^{\nu}-\partial^{\nu}A^{\mu}) & \mathcal{O}_{7}= \mathrm{wc}_{7}Z^{\mu\nu}Z_{\mu}(\phi^{\dagger}\phi)^{2}
& \mathcal{O}_{9\phantom{1}} = \gamma^{\mu}\gamma^{\nu}+\gamma^{\nu}\gamma^{\mu} \\
\hline
\mathcal{O}_{2} = \mathrm{wc}_{2} X^{\mu}X_{\mu}B^{\rho\sigma}B_{\rho\sigma}
& \mathcal{O}_{8} = \mathrm{wc}_{8}\bar{\psi}(i\gamma^{\mu}\partial_{\mu}-m)\psi-\frac{1}{4}F_{\mu\nu}F^{\mu\nu}
& \mathcal{O}_{10} = g^{\mu\nu} \\
\hline
\end{array}
\]
\[
\renewcommand{\arraycolsep}{20pt}
\setcellgapes{5pt}
\makegapedcells
\begin{array}{|l|l|l|}
\hline
\multicolumn{1}{|c|}{Y^{2}B^{2}}
& \multicolumn{1}{c|}{Z^{2}\chi^{2}}
& \multicolumn{1}{c|}{X^{2}\lambda^{2}} \\ \hline
\mathcal{O}_{1} = \mathrm{wc}_{1}(\partial_{\mu}A_{\nu}-\partial_{\nu}A_{\mu})(\partial^{\mu}A^{\nu}-\partial^{\nu}A^{\mu}) & \mathcal{O}_{7}= \mathrm{wc}_{7}Z^{\mu\nu}Z_{\mu}(\phi^{\dagger}\phi)^{2}
& \mathcal{O}_{9\phantom{1}} = \gamma^{\mu}\gamma^{\nu}+\gamma^{\nu}\gamma^{\mu} \\
\hline
\mathcal{O}_{2} = \mathrm{wc}_{2} X^{\mu}X_{\mu}B^{\rho\sigma}B_{\rho\sigma}
& \mathcal{O}_{8} = \mathrm{wc}_{8}\bar{\psi}(i\gamma^{\mu}\partial_{\mu}-m)\psi-\frac{1}{4}F_{\mu\nu}F^{\mu\nu}
& \mathcal{O}_{10} = g^{\mu\nu} \\
\hline
\end{array}
\]
\end{document}
geometry
, please also include the corresponding settings in your MWE. Currently, your table is quite wide and depending on the settings it ight be possible that it does not fit into the available space.