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?
- 165
2 Answers
\\ 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.
- 37,330
-
I see. So
\\does not start a new paragraph after all. I now also understand why\\ \indentlooks just slightly different. Thanks to you, Sigur and Peter Grill. – Mr.H Jan 24 '13 at 01:31 -
2What is a feature of the editor? That an empty line produces a new paragraph? That’s all *TeX’s work. – Qrrbrbirlbel Jan 24 '13 at 01:50
-
1I think Sigur meant that most text-based editors do that for their text files (nl+cr). – NVaughan Jan 24 '13 at 02:13
-
can you delete the phrase about editors it's either wrong or I don't understand what you mean:) – David Carlisle Apr 29 '20 at 06:55
-
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.
- 757,742
-
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
.texfiles!). Bad yet web-friendly resources float to the top. – Merchako Apr 29 '20 at 00: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. – David Carlisle Apr 29 '20 at 06: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 '20 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. – David Carlisle Apr 29 '20 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 '20 at 20:38
\pardo what you want? – Peter Grill Jan 24 '13 at 01:22\\does not start a new paragraph, but issues a new line/line break. – Werner Jan 24 '13 at 01:41\\*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 http://www.personal.ceu.hu/tex/para.htm is about paragraphs and says rather different things. – egreg Jan 24 '13 at 16:03