General ⇒ How to write vertical dashed line?
How to write vertical dashed line?
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
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
How to write vertical dashed line?
welcome to the board!
There's a package providing dashed lines in array: arydshln.
Stefan
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to write vertical dashed line?
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: How to write vertical dashed line?
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.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to write vertical dashed line?
You can rotate this symbol with help of the graphicx package.bbasic wrote:[...] Furthermore, \Cutline and \Kutline of marvosym package have three pieces, but they are horizontal (and I need vertical). [...]
Code: Select all
\usepackage[11pt,a4paper]{article}
\usepackage{graphicx,marvosym}
\begin{document}
Text \rotatebox{90}{\Kutline} Text
\end{document}
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
How to write vertical dashed line?
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}