I need to box part of an equation, but I need the frame to be open one side. In the following MWE I would need the left part of the equation not to have the right frame of the box and the right part of the equation not to have the left frame of the box.
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
This is my equation $\boxed{q_1^{\ast}}=\dfrac{26-2\cdot 1 -4\cdot 2}{2\cdot 1}=\boxed{8}$
\end{document}
Best Answer
The following MWE provides
\lboxed
and\rboxed
which are truncated\fbox
es. Technically, this is identical to\fbox
only with the right/left\vrule
removed (the definition of\fbox
is taken fromlatex.ltx
). It also provides\llboxed
and\rrboxed
which arearray
-style boxes with the required side stripped of its vertical rule.