3

Need to align a "fbox", when exceeds the text area.

MWE:

\documentclass{article}

\begin{document}

Blah \fbox{Text within box in horizontal line} Blah ...

Blah \fbox{Text within box in horizontal line breaking if exceeds text area} Blah ... 

\end{document}

While using \fbox, getting output like below:

enter image description here

Required output: enter image description here

  • Welcome to TeX.SX! A \fbox does not provide linebreaks, but a \parbox` will do, however, it doesn't have a frame – user31729 Oct 16 '15 at 7:44
  • related tex.stackexchange.com/questions/5959/… – touhami Oct 16 '15 at 7:50
  • Thanks, parbox require width and treat as separate box not align with my required output. – Malathi Oct 16 '15 at 8:09
  • 1
    can we achieve this without using [tikz] package... – Malathi Oct 16 '15 at 8:10

Your Answer

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

Browse other questions tagged or ask your own question.