# LaTeX How to determine leaving space after \

1. May 26, 2017

### mech-eng

Would you explain when the space should be left when backslash, \, is used?

For example some codes using backslash.
\ \displaystyle a=\frac{dv}{dt} \ : This one works good because there is space between the first two backslashes.

But if the space between the first backslash is removed the code does not work
$\\displaystyle a= \frac{dv}{dt} \$

And there should be a space between the last backslash and the last numbersign pair, $. Would you please explan this? Thank you. Last edited: May 26, 2017 2. May 26, 2017 ### DrClaude ### Staff: Mentor \ is what is known as an escape character. In the example where it doesn't work, you have \\, which corresponds to a newline, and \# which produces #, so that the closing$ is not present.

3. May 26, 2017

### mech-eng

$\ \displaystyle a=\frac{dv}{dt} \$

$\\displaystyle a= \frac{dv}{dt} \$

Here that square does not appear.

Thank you.

4. May 26, 2017

### Staff: Mentor

Because you left a space between \ and #.

5. May 26, 2017

### mech-eng

Sorry for my being amateur, but to understand this answer will take some time for me and the questions might cause some new ones. This means you might get tired.

What if double \\ corresponds to a new line? I do not know this case. You might give me a link explaning this basic programming step, \\, so that I could learn by reading.

P.S: I cannot access wikipedia because of some political reasons but I migth try google cache.

Thank you.

6. May 26, 2017

### mech-eng

7. May 26, 2017

### Staff: Mentor

You seem to have found some links on your own. But this is language specific, so lets stick to LaTeX. One a \ appears in LaTeX, what happens depends on what immediately follows it.