# [Tex/LaTex] How to draw a box around this

alignatboxes

MWE:

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage[margin=3cm]{geometry}
\begin{document}
\paragraph*{Problem 1}
This problem can be modelled as a clamped-free cantilever with a point load at the end. Thus, the following boundary conditions can be assigned:
\begin{alignat}{2}
\underline{\emph{Clamped end:}}& &\underline{\emph{Free end:}}&\nonumber \\
\end{alignat}
The boundary condition concerning the shear force at $x=L$ is a matter of taste, since there is a discontinuity in the shear force in this point.
\end{document}


Producing this:

I would like a box similar to the one produced by \boxed{} around all the boundary conditions stated (including the underlined text). I've looked around on similar questions but it always seems like a special solution for that particular problem – what's the easiest way to do this?

It's a simple application of empheq

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath,empheq}
\usepackage[margin=3cm]{geometry}
\begin{document}
\paragraph*{Problem 1}
This problem can be modelled as a clamped-free cantilever with a point load at the end. Thus, the following boundary conditions can be assigned:
\begin{empheq}[box=\fbox]{alignat=2}
\underline{\emph{Clamped end:}}& &\underline{\emph{Free end:}}&\nonumber \\
The boundary condition concerning the shear force at $x=L$ is a matter of taste, since there is a discontinuity in the shear force in this point.