1

I could not find a (no verbose) solution to differentiate new line from new paragraph.

As far as I know, \\ and \newline both insert a new line. But the first one is often not recommended.

A space line inserts a new paragraph.

To separate between paragraphs (and to facilitate the reading), I use the following code which gives a white space and indentation with a new paragraph.

\setlength{\parskip}{\baselineskip}%
\setlength{\parindent}{15pt}%

My problem arises when I want to go to a new line in the same paragraph without starting a new paragraph.

Here is a similar question but still no verbose solution: Separating some paragraphs with a blank line, and other paragraphs without a blank line?

Ideally, I am thinking in two white spaces for a new paragraph and one white space for a new line. Is it possible to code?

Stephen
  • 14,890
pinpss
  • 23
  • 2
    \\ and \newline are essentially the same thing and either are quite suitable for forcing a new line in a paragraph, it is just that it is not common to want to force such a newline but if that is what you need, \\ is fine. I am not sure what you mean by "white space for a new line" suggestion, normally white space makes an inter word space. – David Carlisle Feb 11 '21 at 20:40
  • what is wrong with egreg's answer there of using \bigskip in the places you want a skip and not using \bigskip where you do not want a skip? – David Carlisle Feb 11 '21 at 20:41
  • 2
    it is rather unusual to have both indent and vertical space, most publications use one or the other. – David Carlisle Feb 11 '21 at 20:45
  • As David says, \\ and \newline basically do the same thing in normal text. So most things that are said about \\ in normal text also hold for \newline. The advice not to use \\ is probably motivated by two things. On the one hand some people misuse it to end paragraphs. \\ does not end a paragraph and is not suitable to end a paragraph - it just generates a line break. On the other hand, one should not (have to) manually insert a line break within a paragraph. In traditional typesetting there is no further subdivision of a paragraph by (manual) new lines. ... – moewe Feb 12 '21 at 07:23
  • ... There are legitimate uses for \\ in normal text (for example to force a line break for better hyphenation), but those are usually one-offs. If you find yourself habitually and repeatedly using \\ in normal text, then you may want to look for alternatives to that approach. – moewe Feb 12 '21 at 07:28
  • 2
    See also \linebreak (justified). – John Kormylo Feb 12 '21 at 13:53

1 Answers1

2

\\ denotes a new line and <return><return> denotes a new paragraph, as each of these is only two characters it is hard to imagine a less verbose markup that distinguishes the two cases.

enter image description here

\documentclass{article}

\usepackage{parskip}

\begin{document}

line one line one line one line one\ line two line two line two line two line two\ line three line three line three line three

paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two paragraph two

paragraph three paragraph three paragraph three\ line two of paragraph three

\end{document}

David Carlisle
  • 757,742
  • I was thinking of something like for a new line and for a new paragraph. – pinpss Feb 11 '21 at 22:05
  • Also I wanted to avoid the \ . I have read some references that it'might lead to compilation errors: "\ is rather for ending lines in multiline environments, such as tabular, array, and matrices." https://latex.org/forum/viewtopic.php?t=26182 – pinpss Feb 11 '21 at 22:08
  • @bashlog <return> is equivalent to a space and that assumption is built in to almost the entire tex processing. It is possible to change that but making it equivalent to \\ would be very fragile and break in some package setups and would make your document likely to be broken by any editor that wraps long lines. It really has no advantage – David Carlisle Feb 11 '21 at 22:08
  • @bashlog no you are mistaken about \\ it is fully supported by latex (and vastly more robust than making the end of line character active and equivalent to \\) – David Carlisle Feb 11 '21 at 22:10
  • @bashlog as I suggested in the comment under your question the advice to avoid \\ in that latex.org page are suggestions to avoid forced line breaks not to avoid the \\ syntax. that advice is good, but if you need forced line breaks \\ is the correct markup. – David Carlisle Feb 11 '21 at 22:12
  • I will go with \ then. Thank you for the clarification. – pinpss Feb 11 '21 at 22:12