Latex help needed, about indentation

  • Context: LaTeX 
  • Thread starter Thread starter fluidistic
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary

Discussion Overview

The discussion revolves around formatting paragraphs in LaTeX, specifically focusing on indentation practices when ending paragraphs and the behavior of the first paragraph in a section. Participants explore methods for achieving automatic indentation and clarify common misconceptions about paragraph breaks.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant suggests avoiding the use of "\\" for ending paragraphs, recommending instead to leave a blank line between paragraphs for automatic indentation.
  • Another participant clarifies that "\\" does not end a paragraph but creates a line break, and introduces the command "\par" as an alternative for ending paragraphs without a blank line.
  • A participant notes that the first paragraph of a section does not automatically get indented, regardless of the number of blank lines used before it, and mentions using "\hspace*{6 mm}" as a workaround.
  • Some participants explain that the lack of indentation for the first paragraph is intentional and aligns with standard typesetting conventions in English, while it may differ in other languages.
  • One participant suggests using the package "\usepackage{indentfirst}" to change the indentation behavior globally, while also recommending "\hspace{\parindent}" for case-by-case adjustments to match standard indentation sizes.

Areas of Agreement / Disagreement

Participants generally agree on the standard practices for paragraph indentation in LaTeX, but there are differing views on the necessity and methods for achieving indentation in the first paragraph of a section. The discussion remains unresolved regarding the best approach to handle this specific formatting issue.

Contextual Notes

Participants mention that the behavior of paragraph indentation may depend on document style and language conventions, which could affect the applicability of certain solutions.

fluidistic
Gold Member
Messages
3,932
Reaction score
283
Latex "help" needed, about indentation

Hello guys,
I am writing a document in latex. When I want to end a paragraph I use
Code:
\\
. However when I enter text after the "\\" as to start a new paragraph, there is no indentation.

I do not know how to make such indentations automatic.

I have found a manual way to do this for one line at a time, but this is very time-consuming so I would like to know an automatic way to do this.
I have used google but could not find a possible answer.

Thank you!
 
Physics news on Phys.org
Don't use\\. Just leave a blank line between the paragraphs.

Like this. If I do this in a LaTeX document, the word "Like" will be indented, unless you explicitly say that you don't want it to be by typing \noindent before it.
 
  • Like
Likes   Reactions: 1 person
Code:
\\

Does not end a paragraph. It forces a line break in the middle of a paragraph, and allows the line to stop before the right hand margin.

If you really want to end a paragraph without having a blank line in your input (e.g. when writing a macro definition) you can use
Code:
\par

But as Fredrik said, normally you just leave a blank line between paragraphs in your document.

This sort of question should be covered in any introduction to LaTeX. This is one of the better ones. You may already have it as part of your LaTeX installation - look for lshort.pdf. If not, download it here: http://www.ctan.org/tex-archive/info/lshort/english/
 
Thank you very much guys.

However it seems that the first paragraph of a section does not get indented. And this, regardless if I put 1, 2 or more blank lines prior to writing the text.
I had to use \hspace*{6 mm} for these first paragraphs.
 
yeah...that's on purpose. I can't readily find references, right now; but do some research on Writing Styles or Standards and you will see.
 
fluidistic said:
However it seems that the first paragraph of a section does not get indented. And this, regardless if I put 1, 2 or more blank lines prior to writing the text.
I had to use \hspace*{6 mm} for these first paragraphs.

As gsal said, that is intentional, because it is the standard convention for typesetting documents in English (but not in some other languages, e.g. Greek)

You can change it globally with
Code:
\usepackage{indentfirst}

If you want to do it on a case-by-case basis,
Code:
\hspace{\parindent}
is better than your "6mm" solution, because it is guaranteed to match the size of the other paragraph indentation if you change the document style, font size, etc.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K