## LaTeX forum ⇒ Text Formatting ⇒ How can a get a dashed/dotted \textbar?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Maryse
Posts: 2
Joined: Fri Jul 11, 2014 1:09 pm

### How can a get a dashed/dotted \textbar?

Here is my problem: I'd like to add a dashed or dotted vertical line in my text.
I used the \textbar to add a solid line, but I also need to add dashed - or dotted, that will also do the trick! - vertical line in my text. Unfortunately, I can't find any way to do this! Do you have a solution in mind to solve this problem?
Thanks!
Maryse

Tags:

Johannes_B
Site Moderator
Posts: 4104
Joined: Thu Nov 01, 2012 4:08 pm
Is this needed in text or within a graphic or ...?
Can you prepare a minimal working example to show what you want? Maybe even a screenshot/hand-drawing?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Maryse
Posts: 2
Joined: Fri Jul 11, 2014 1:09 pm
I have attached the .pdf that I need so that you can have an idea.
This is needed in a table in fact. But this is not the lines/columns of the table itself that I want to be dashed. My problem is about some lines within the table.
As you'll see, I already have vertical lines - which I draw using $|$. But I need two of them to be dashed or dotted.
Maryse
Attachments
ex Latex.pdf

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm
You can use TikZ to define your own line:

\documentclass{scrartcl}\usepackage{tikz}\newcommand\myline[1][]{%   \,\tikz[baseline]\draw[very thick,#1](0,-\dp\strutbox)--(0,\ht\strutbox);\,%}\begin{document}Text\myline Text\myline[dashed]Text\myline[dotted]\end{document}

myline.png (2.62 KiB) Viewed 4249 times

Best regards
Elke