6

This page says that \\ starts a new paragraph. However, it does not end up looking the same as inserting an empty line in my source code (which I have always used to define paragraphs), which also indents the new line. The latter describes the visual effect I am looking for, but since I am typing out a conversation (which means a lot of indented newlines), I hope to find a more elegant command for this, so I don't have to fill my source code with empty lines or \\ \indent everywhere. Is there such a command?

6
  • 1
    Welcome to TeX.SE. Does \par do what you want? Jan 24, 2013 at 1:22
  • Now that's what I was looking for. Thanks! I'm sure I've seen it before, but writing papers I got so used to the empty line I must have forgotten about its existence. Also, I noticed this gives the exact same visual effect as an empty line. {\\ indent} leaves just a little less room between the lines. Good to know. Thanks again.
    – Mr.H
    Jan 24, 2013 at 1:25
  • The reference is ambiguous. `\` does not start a new paragraph, but issues a new line/line break.
    – Werner
    Jan 24, 2013 at 1:41
  • 3
    @Mr.H I’m afraid that web site might not be the best of resources in general. It’s definitely not up-to-date, as the screen shots indicate, next to a link to a LaTeX 2.09 file, references to outdated program versions ... As introductory lecture, I recommend The Not So Short Introduction to LaTeX2ε, more are listed in What is the best book to start learning LaTeX? and LaTeX Introductions in languages other than English.
    – doncherry
    Jan 24, 2013 at 1:50
  • 1
    @Mr.H The second bullet in that page, telling that \\* starts a new line but not a new paragraph is nonsense: it is a new line command with no intervening page break. The following description tells about \\ tells something nearer to the truth. The page personal.ceu.hu/tex/para.htm is about paragraphs and says rather different things.
    – egreg
    Jan 24, 2013 at 16:03

2 Answers 2

8

\\ produces a line break. \par produces a new paragraph. Inserting empty line between two lines produces a new paragraph.

Furthermore, \\ does not justify the last line before. If you want so you can use \linebreak.

5
  • I see. So \\ does not start a new paragraph after all. I now also understand why \\ \indent looks just slightly different. Thanks to you, Sigur and Peter Grill.
    – Mr.H
    Jan 24, 2013 at 1:31
  • 2
    What is a feature of the editor? That an empty line produces a new paragraph? That’s all *TeX’s work. Jan 24, 2013 at 1:50
  • 1
    I think Sigur meant that most text-based editors do that for their text files (nl+cr).
    – NVaughan
    Jan 24, 2013 at 2:13
  • can you delete the phrase about editors it's either wrong or I don't understand what you mean:) Apr 29, 2020 at 6:55
  • @DavidCarlisle, done! Thanks.
    – Sigur
    Apr 29, 2020 at 11:52
8

The page that you refer to is simply incorrect, you should not believe everything you read on the internet. The standard way to end a paragraph in TeX is to use a blank line, the command sequence \par is also available but not usually needed in documents, it is more useful in code sections.

If you are typesetting a structured text such as a dialog or poem etc, it usually helps to use more focussed markup than just using blank lines and paragraphs. For example

\begin{dialog}
\item[Mr. H] How do you make a paragraph?
\item[Random Website] Use \verb|\\|.
\item[Sigur] Use a blank line or \verb|\par|
\item[David] You may want to use a list structure rather than paragraphs.
\end{dialog}

It's a feature of a markup system like LaTeX that you can choose the markup you want independently from how you want the result to be typeset. A simple implementation of the above would be

\newenvironment{dialog}{\description}{\enddescription}

But other definitions could produce other layouts from the same input.

5
  • This is super condescending. Of course OP doesn't believe everything he reads on the internet. That's why he's asking here. Reliable LaTeX documentation is hard to search for because most of it is locked inside SEO-unfriendly PDFs (and even .tex files!). Bad yet web-friendly resources float to the top.
    – Merchako
    Apr 29, 2020 at 0:07
  • @Merchako not sure why you object to this wording it's just a common phrase not at all intended as condescending. Also this answer is correct unlike the accepted answer. I'll leave a comment under the other answer. Apr 29, 2020 at 6:53
  • I'm sorry, @David Carlisle. That was too strong of me. I should have simply suggested that you rephrase the idiom. (Though I would stand by the assertion that just because it's a common phrase doesn't mean that it's okay.) I was angry at my code last night, and I gave you worse than you deserved.
    – Merchako
    Apr 29, 2020 at 17:57
  • @Merchako no harm done, caused me to look at this old question, and get Sigur to fix his answer:-) (Given that the OP started the question by referencing an online tutorial that was wrong, I don't see anything wrong with the wording here) It's a completely standard harmless phrase google turns up over hundred thousand hits for it not to mention dozens of images. Apr 29, 2020 at 18:03
  • Thanks, @David Carlisle. I don't necessarily have issues with the phrase per se, but in the context of learning about LaTeX, it can be hard to know what to trust. Some of the easiest-to-find resources are the least trustworthy or up-to-date. It's been very frustrating trying to search for documentation. (Compare with how we have MDN Web Docs to learn about HTML/CSS.) That's why I come here, and StackExchange is on the internet, too!
    – Merchako
    Apr 29, 2020 at 20:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .