I want to draw a box (no rounded corners, keep it simple ^^) around one or multiple words. There are two special things: 1) the box should support line break and 2) the box should not cover multiple lines. I added a figure to make my requirements more clear. I tested fbox
and all its derivates, but all of them create a paragraph for the framed word. Thank you!
[Tex/LaTex] Create box around text without creating a paragraph and with line breaking
boxesframedmdframed
Related Question
- [Tex/LaTex] Drawing boxes around words
- [Tex/LaTex] How to make one minipage the same size as another
- [Tex/LaTex] Creating uniformly sized boxes around text
- [Tex/LaTex] Multi-line box around a sentence in a paragraph
- [Tex/LaTex] Rounded box around placeholder text that supports line breaking
- [Tex/LaTex] Framed paragraph with double-line frame
- [Tex/LaTex] Tight box around text using mdframed
Best Answer
A variation of
this answer
to Highlighting arbitrary chunks of text connected to quotes in margins - Can this be done in TeX/LaTeX? . The boxed text can spann multiple lines, and hyphenation is allowed but no page breaks are allowed:Simply use
\MarkText{text...}
; the thicknes of the rules used for the frame can be changed using\LineWidth
(default value=0.4pt
).