I need to put text and values inside a dashed box for focus purposes. within a paragraph, I have tested this Dashed box environment it's not my need

I want it like this way

enter image description here

  • 4
    Possible duplicate of Dashed box environment – bmv Mar 21 '18 at 13:15
  • @bmv my SIr I said in a paragraph, I have already tried that Dashed box environment – azdoud Mar 21 '18 at 13:53

You can do it with TikZ:



\newcommand\dboxed[1]{\tikz [baseline=(boxed word.base)] \node (boxed word) [draw, rectangle, dashed, line cap=round] {#1};}


This is a \dboxed{Test} sentence.


output of the mwe


Another solution based in Thomas F. Sturm answer to Dashed box environment. I've just adapted his solution into a tcbox.


    on line,
    frame hidden,
    interior hidden,
    sharp corners,


This is a \dbox{test} with \dbox{tcolorbox}.

enter image description here

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.