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.

\emph{Solution}: & $\displaystyle\int\limits_0^6\pi\,f(y)\,\mathrm{d}y$

enter image description here

  • 1
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.