Page LayoutVertical dashed Line

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Arnymenos
Posts: 1
Joined: Sat Jan 07, 2012 12:07 am

Vertical dashed Line

Post by Arnymenos »

I want a vertical dashed line, the height being the height of the current line. Thus a direct counterpart to \vline. Currently, I'm using a workaround with the "arydshln" package:

Code: Select all

\begin{tabular}{c:c}
a & b
\end{tabular}
I was hoping for a more direct solution, along the lines of the following example, just with the "1cm" filled in automatically.

Code: Select all

\def\vdashline[1]{
  \vbox to #1 {
    \xleaders\vbox{\hrule height 4pt width 0.02cm\vskip 2pt plus 1fill}\vfill
  }
}

a\vdashline{1cm}b
(Also, the above code does not handle the ends of the line correctly.)

Any advice (besides "stick with arydshln")?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply