I need to do a dotted frame, something this one: enter image description here

Is it possible to do?

  • 1
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Jun 23 '15 at 8:40

You can use TikZ:




        \node[draw,dotted] {My text};



Zooming in your example picture reveals that you might wish a “dashed” instead of a “dotted” frame. In this case, just replace dotted with dashed:



EDITED to improve box corners. I use dot \cleaders to make the dots. The optional argument to \dotbox controls the dot spacing of the box border.

I added the 3rd example, in case the gray frame in the OP's image is actually part of the desired box, rather than just the clip field from the photo editor.

\newcommand\tdotfill{\cleaders\hbox to \replength{\smash{.}}\hfill}
      print *, 'Hello World'



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.