Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Latex help needed, about indentation

Tags:
  1. Mar 4, 2014 #1

    fluidistic

    User Avatar
    Gold Member

    Latex "help" needed, about indentation

    Hello guys,
    I am writing a document in latex. When I want to end a paragraph I use
    Code (Text):
    \\
    . 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!
     
  2. jcsd
  3. Mar 5, 2014 #2

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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.
     
  4. Mar 5, 2014 #3

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    Code (Text):

    \\
     
    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 (Text):

    \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/
     
  5. Mar 5, 2014 #4

    fluidistic

    User Avatar
    Gold Member

    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.
     
  6. Mar 6, 2014 #5
    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.
     
  7. Mar 6, 2014 #6

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    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 (Text):

    \usepackage{indentfirst}
     
    If you want to do it on a case-by-case basis,
    Code (Text):

    \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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Latex help needed, about indentation
  1. No indenting in latex? (Replies: 2)

  2. Latex help needed (Replies: 4)

Loading...