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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply