# A semi-rectangle frame

I was wondering how it is possible to enclose a block of text or a word in a semi-rectangle frame. For clarity, I attach a picture in which a word: solution's frames are the subject of the question.

One possibility without too fancy packages.

\documentclass{article}
\usepackage{amsmath,tabularx}
\begin{document}
\begin{tabularx}{\linewidth}{|p{3cm}>{\centering}X}
\cline{1-1}
\emph{Solution}: & $\displaystyle\int\limits_0^6\pi\,f(y)\,\mathrm{d}y$
\end{tabularx}
\end{document}


• Nice. You could wrap this into an environment for easier use: \newenvironment{solution}[1][Solution]{\tabularx{\linewidth}{|p{3cm}>{\centering}X}\cline{1-1} \textit{#1}:&}{\endtabularx} and then \begin{solution} $\displaystyle\int\limits_0^6\pi\,f(y)\,\mathrm{d}y$ \end{solution} – Andrew Feb 14 '18 at 22:01
• @Andrew Thanks for pointing this out! I completely agree. The question is if my proposal is what the OP is looking for. – marmot Feb 14 '18 at 22:03