6

Is it possible to apply patterns to \vrule like dotted?

\documentclass{article}

\newdimen\le\le=50pt
\def\A{\vrule depth0pt height 50pt width 1 \le}

\begin{document}
\A
\end{document}
  • 1
    See also tex.stackexchange.com/questions/12537/… – knut Feb 24 '14 at 19:45
  • do you want a horizontal or vertical row of dots? (your example shows vrule which starts a new paragraph and enters horizontal mode) – David Carlisle Feb 24 '14 at 19:55
  • @DavidCarlisle Doesn't matter. – Ricardo Cristian Ramirez Feb 24 '14 at 19:57
  • 1
    @RicardoCristianRamirez well the answers are rather different, either way you need \leaders for horizontal dashes there is an answer in the linked question (vertical version is similarchanging v/h appropriately) – David Carlisle Feb 24 '14 at 20:00
7

It is not too clear to me, which kind of dotted lines/areas are to be set. The following example generates a dotted area using \leaders (also \cleaders can be used):

\documentclass{article}

\newdimen\le\le=50pt

\newcommand*{\A}{%
  \leavevmode
  \leaders\vbox{%
    \leaders\vbox{%
      \kern.5\fontdimen3\font
      \hbox{.}%
      \kern.5\fontdimen3\font
    }\vskip50pt %
  }\hskip\le\null
}

\begin{document}
\A
\end{document}

Result

More about \leaders can be found in chapter 9 "Rules and Leaders" of "TeX by Topic" by Victor Eijkhout.

| improve this answer | |

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.