GeneralHow to write vertical dashed line?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
bbasic
Posts: 7
Joined: Tue Jul 08, 2008 4:21 pm

How to write vertical dashed line?

Post by bbasic »

Hello. I want to write a vertical dashed line—it should look like \vdots, but with small vertical dashes instead of dots. Is there any package containing a symbol like that?

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

How to write vertical dashed line?

Post by Stefan Kottwitz »

Hi bbasic,

welcome to the board!
There's a package providing dashed lines in array: arydshln.

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to write vertical dashed line?

Post by localghost »

I'm not sure if it fits your ideas, but you could use the \textbrokenbar command from the textcomp package as suggested in the "Comprehensive LaTeX Symbol List". Perhaps this list contains other suitable symbols.


Best regards and welcome to the board
Thorsten¹
bbasic
Posts: 7
Joined: Tue Jul 08, 2008 4:21 pm

Re: How to write vertical dashed line?

Post by bbasic »

Stefan, thank you for your advice, but I know for arydshln and it doesn not fit my needs. I don't need dashed lines in array, only a symbol.

Localghost, you got correctly what I need. Thank you very much for \textbrokenbar command. It almost perfectly fits my needs. The only thing I would have changed is to have three "pieces" (instead of two)—and unfortunately, there is no symbol like that in textcomp package. I have also found \brokenvert in wasysym package, but it looks exactly as \textbrokenbar. Furthermore, \Cutline and \Kutline of marvosym package have three pieces, but they are horizontal (and I need vertical).

A workaround I have found is to use nccrules package. The command \dashrule[-0.6ex]{0.4}{3 1.5 3 1.5 3} then gives what I want. If nobody comes up with a simpler solution, I believe this will be useful to me and others with a similar need.

Once more, thank you both for help.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to write vertical dashed line?

Post by localghost »

bbasic wrote:[...] Furthermore, \Cutline and \Kutline of marvosym package have three pieces, but they are horizontal (and I need vertical). [...]
You can rotate this symbol with help of the graphicx package.

Code: Select all

\usepackage[11pt,a4paper]{article}
\usepackage{graphicx,marvosym}

\begin{document}
  Text \rotatebox{90}{\Kutline} Text
\end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

How to write vertical dashed line?

Post by Stefan Kottwitz »

Hi,

after I had read the first posting I had array or tabular lines in my thoughts somehow, that's why I mentioned arydshln.
It's not hard to build a vertical dashed line symbol yourself. Here's a solution just using amssymb and graphicx:

Code: Select all

\documentclass{article}
\usepackage{amssymb}
\usepackage{graphicx}
\makeatletter
\newcommand*\dashline{\rotatebox[origin=c]{90}{$\dabar@\dabar@\dabar@$}}
\makeatother
\begin{document}
Test\dashline Text
\end{document}
Stefan
LaTeX.org admin
bbasic
Posts: 7
Joined: Tue Jul 08, 2008 4:21 pm

Re: How to write vertical dashed line?

Post by bbasic »

Thank you both once more. Stefan's solution works just fine.
Post Reply