Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am looking for a way to draw a symbol to indicate a bus/multiple wires. I have seen (though I am unable to google reference pictures) schematics with a wire that has a diagonal line (45°) across it, next to which is a number. The number indicates the number of actual wires represented by the line. I figured this would be a good job for tikz circuits, however I have not found a defined shape for that (neither in the circuit library nor in the tikz symbols), thus I don't know how to define such a symbol(I don't feel that I have the time to work into the pgf basics of defining a shape that I then can define as a tikz-circuitlib element).

Am I missing something that is already there/available or could I get some pointers for a quickstart tod define this one shape?

Here a quick doodle of what I imagine(1 wire representing an 8 bit bus):

A wire indicating a 8-bit bus

edit: I actually found one reference, however this is of little value: see the second entry for bus under the misc section (i do not care abour the arrows at the endof the path): http://www.rapidtables.com/electric/electrical_symbols.htm

share|improve this question

1 Answer 1

Not being a tikz user, I have no idea if a symbol that would be suitable for inline text can be incorporated into your tikz solution (i.e., whether it has to be rotatable, etc.). But if a plain symbol would work, I created the \Bussymbol command below, that takes the associated number as an argument. The dimensions and relative placement of the strokes can all be changed to suit. If the symbol as I have formulated it is not useful, perhaps the component \BusWidth that I grabbed from the milstd package could otherwise be employed.

\documentclass{article}
\usepackage{milstd}
\usepackage{scalerel}
\begin{document}
\newcommand\Bussymbol[1]{%
  \scalerel*{$\BusWidth$}{\rule[1ex]{1ex}{0.5ex}}\rule{-0.81ex}{0ex}%
  \rule[-2ex]{.2ex}{2.5em}\rule{.7ex}{0ex}{\sffamily\scriptsize#1}%
}
\Bussymbol{8}
\end{document}

enter image description here

share|improve this answer
    
+1 for the effort, however there is a reason why I fancy a criciut tikz symbol: if used in the cricuit lib, tikz will rotate it (and the labels if you wish) for you, it scales well, and you have anchors. Furthermore it is connected for you if zou want to integrate the symbol into a network. –  ted May 14 '13 at 13:49
    
Understood. As I mentioned in the solution, the \BusWidth symbol is the diagonal slash, which could be used to cross either a vertical line or a horizontal line. Perhaps one familiar with the workings of tikz could adapt that property to incorporate it into a tikz symbol. –  Steven B. Segletes May 14 '13 at 14:01
    
I will have to do so and post my results here. To incorporate this into tikz one has to (or at least it is common practice) use pgf commands, which are the foundation of tikz but at the moment a level below my understanding. I hoped to get some help with that but now I will read through the manual for one simple line. At least it is an easy shape to draw :p. –  ted May 14 '13 at 14:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.