LaTeX forum ⇒ Text FormattingHow 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?

Postby Maryse » Fri Jul 11, 2014 1:16 pm

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:

User avatar
Johannes_B
Site Moderator
Posts: 4104
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Jul 11, 2014 1:28 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

Postby Maryse » Fri Jul 11, 2014 1:47 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
(43.33 KiB) Downloaded 190 times

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm

Postby esdd » Fri Jul 11, 2014 3:26 pm

You can use TikZ to define your own line:

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


myline.png
myline.png (2.62 KiB) Viewed 4249 times

Best regards
Elke


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 3 guests