4

To indicate that two lines - or line segments - I want to typeset two slash characters. I used $\overline{AB} \slash\slash \overline{CD}$. The space between the slash characters is too much, though. I could use a thin negative space command \!. I would like to know what is the typical code to do this.

egreg
  • 1,121,712
user74973
  • 4,071
  • Does \parallel work? – Manuel Jul 09 '15 at 21:29
  • @Manuel I wanted the lines slanted - like the slash character. (In many geometry books, the symbol is two vertical lines just as you would get using \parallel.) – user74973 Jul 09 '15 at 21:32
  • 1
    I would use \parallel and then redefine that command so that it looks different. In any case, you should change your username to something more telling than user666. – Manuel Jul 09 '15 at 21:34
  • @touhami No, I mean that I would use \parallel and then change the definition. $\vect{AB} \parallel \vect{CD}$ is better than $\overline{AB} \mathrel{\slash\!\slash} \overline{CD}$ in my opinion; better to use symbolic names. – Manuel Jul 09 '15 at 21:41
  • 3
    Does http://tex.stackexchange.com/questions/37912/how-to-draw-the-parallel-circuits-sign help? If you use my answer, you have to change \mathbin into \mathrel, as the symbol you're looking for is a relation. – egreg Jul 09 '15 at 21:44
  • 2
    You have the \parallelslant and \nparallelslant in the fourier package, and \varparallel and \nvarparallel in thets/px` fonts. Even if you don't use these fonts, you can define the individual characters as new math binary relation symbols. – Bernard Jul 09 '15 at 23:06
  • 1
    stmaryrd has \sslash and the same name is used in unicode-math. – Andrew Swann Jul 10 '15 at 06:07
  • @egreg Yes, \newcommand{\parallelsum}{\mathbin{\!/\mkern-5mu/\!}} gives a nice display for the symbol of parallel lines. I think that the negative thin space \! commands bring the slash closer to the pair of letters before and after the symbol. I remember that \mathbin tells LaTeX to regard what is being typeset as a binary symbol for spacing. You already have \!, though. What does \mkern-5mu do? – user74973 Jul 10 '15 at 13:03
  • 1
    @user74973 \mkern-5mu is responsible for setting the two slashes closer to one another. In my experiment for that application, also removing some space on either side semeed necessary. – egreg Jul 10 '15 at 13:13
  • @egreg How does \mkern and mu compare? (I did not find \mkern in the manual. I seem to recall that there are 2mu between a character and a binary relation symbol.) I thought that \mkern is smaller than mu. I suppose that the distance between the slash characters is the difference between \mkern and 5mu. – user74973 Jul 10 '15 at 13:39
  • @user74973 18mu make a quad in the symbol font. The usual space between a symbol and a binary relation is 5mu (stretchable to 10mu); between a symbol and a binary operation is 4mu (stretchable to 6mu and shrinkable to zero); \! is a negative space of 3mu. – egreg Jul 10 '15 at 13:43

1 Answers1

6

To summarise the comments, this symbol is provided by a number of packages:

  • \sslash from stmaryrd and unicode-math
  • \parallelslant from `fourier
  • \varparallel from ts/px fonts

or one can build a macro

\newcommand{\parallelsum}{\mathrel{/\mkern-5mu/}}
Andrew Swann
  • 95,762