\boxed{
\begin{align*}
x &= 1 \\
y &= 1
\end{align*}
}
obviamente não funciona/compila..
\begin{framed}
\begin{align*}
x &= 1 \\
y &= 1
\end{align*}
\end{framed}
tipo de trabalho, mas ficará feio porque a caixa é desnecessariamente grande.
Responder1
Use o trio de marreta amsmath
: empheq
e tcolorbox
:
\documentclass[14pt,a4paper,headlines=6,headinclude=true]{scrartcl}
\usepackage{empheq}
\usepackage[theorems,skins]{tcolorbox}
\newtcbox{\mybox}[1][]{nobeforeafter,math upper,tcbox raise base,
enhanced jigsaw,arc=0pt,boxrule=0.5pt,boxsep=0pt,left=2pt,right=2pt,top=2pt,bottom=2pt,colback=white,colframe=black,
#1}
\begin{document}
\begin{empheq}[box=\mybox]{align*}
x &= 1 \\
y &= 1
\end{empheq}
\end{document}
Ajuste left
, right
etc conforme adequado, são margens para a caixa.
Responder2
Try this:
\documentclass{article}
\usepackage{empheq}
\newcommand\exactfbox[1]{\fbox{\hskip1em#1\hskip1em}}
\begin{document}
\begin{empheq}[box=\exactfbox]{align*}
x &= 1 \\
y &= 1
\end{empheq}
\end{document}