Latex help needed, about indentation

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

This discussion addresses automatic paragraph indentation in LaTeX documents. Users are advised against using "\\" to end paragraphs, as it only creates a line break and does not trigger indentation. Instead, leaving a blank line between paragraphs is the recommended method. For the first paragraph of a section, which does not indent by default, users can utilize the \usepackage{indentfirst} command to enable indentation globally or use \hspace{\parindent} for specific instances.

PREREQUISITES
  • Familiarity with LaTeX document structure
  • Understanding of paragraph formatting commands in LaTeX
  • Knowledge of LaTeX packages and their usage
  • Basic typesetting conventions in English
NEXT STEPS
  • Research the indentfirst package for global indentation settings in LaTeX
  • Learn about paragraph formatting commands in LaTeX, including \par and \hspace
  • Explore LaTeX documentation, specifically lshort.pdf, for comprehensive guidance on typesetting
  • Investigate typesetting conventions for different languages in LaTeX
USEFUL FOR

LaTeX users, document authors, and anyone looking to improve their typesetting skills in LaTeX documents.

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
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K