Line Spacing Latex Bibliography Cite

The default LaTeX formatting is fine and makes documents quite readable, but it can be changed if you need a different looking document. This article explains how to change the paragraph and line spacing.

[edit]Introduction

Changing the length of some specific elements my alter the looking of the entire document.

\documentclass{article}\usepackage[utf8]{inputenc}\usepackage[english]{babel}   \setlength{\parindent}{4em}\setlength{\parskip}{1em}\renewcommand{\baselinestretch}{2.0}   \begin{document} This is the first paragraph, contains some text to test the paragraph interlining, paragraph indentation and some other features. Also, is easy to see how new paragraphs are defined by simply entering a double blank space.   Hello, here is some text without a meaning. This text should show what a printed text will look like at this... \end{document}

In the previous example paragraphs are separated by a blank line in between them, this is quite easy and convenient. In this example the indentation at the first line of a paragraph, the line spacing and the paragraph spacing are manually set. These latter commands will be explained in more detail throughout the next sections.

  Open an example in ShareLaTeX

[edit]Starting a new paragraph

To start a new paragraph in LaTeX, as said before, you must leave a blank line in between. There's another way to start a new paragraph, look at the following snippet.

This is the text in first paragraph. This is the text in first paragraph. This is the text in first paragraph. \par This is the text in second paragraph. This is the text in second paragraph. This is the text in second paragraph.

As you can see, the command starts a new paragraph without the need of a blank line.

  Open an example in ShareLaTeX

[edit]Paragraph Indentation

By default, LaTeX does not indent the first paragraph of a section or a chapter. The size of the subsequent paragraph indents is determined by

\setlength{\parindent}{4em}   \begin{document} This is the text in first paragraph. This is the text in first paragraph. This is the text in first paragraph. \par This is the text in second paragraph. This is the text in second paragraph. This is the text in second paragraph.   This is another paragraph, contains some text to test the paragraph interlining, paragraph indentation and some other features. Also, is easy to see how new paragraphs are defined by simply entering a double blank space. ... \end{document}

The default length of this parameter is set by the document class used. It is possible to change the indent size. In the example, the first lines of each paragraph are indented 4em (an "em" equals the length of the "m" in the current font), this is accomplished by the command . It's recommended to put this command in the preamble of the document, but it can be set anywhere else.

If you want to create a non-indented paragraph, like the second one in the example, put the command at the beginning of it. If you want the whole document not to be indented, set the indentation length to zero with .

On the other side, if you want to indent a paragraph that is not indented you can use right above it. It should be noted that this command will only have an effect when \parindent is set to zero.

  Open an example in ShareLaTeX

[edit]Paragraph spacing

The length parameter that characterises the paragraph spacing is , this determines the space between a paragraph and the preceding text.

\documentclass{article}\usepackage[utf8]{inputenc}\usepackage[english]{babel}   \setlength{\parindent}{4em}\setlength{\parskip}{1em}   \begin{document} This is the text in first paragraph. This is the text in first paragraph. This is the text in first paragraph. \par This is the text in second paragraph...   \end{document}

In the example, the command sets the paragraph separation to 1em.

  Open an example in ShareLaTeX

[edit]Line spacing

There are three commands that control the line spacing, below an example redefining the length of

\documentclass{article}\usepackage[utf8]{inputenc}\usepackage[english]{babel}   \setlength{\parindent}{4em}\setlength{\parskip}{1em}\renewcommand{\baselinestretch}{1.5}   \begin{document} This is the text in first paragraph. This is the text in first paragraph. This is the text in first paragraph. \par This is the text in second paragraph... \end{document}

In the example above, scales the default interline space to 1.5 its default value. Of course that number can be set to any value.

As mentioned before, there are other two LaTeX lengths that may change the line spacing:

Is a length determining the minimum space between the bottom of two successive lines in a paragraph; it may be changed (in the preamble) by . Where value is set using any of the LaTeX units.
where value determine line spacing. This value is somewhat confusing, because:
Value Line spacing
1.0 single spacing
1.3 one-and-a-half spacing
1.6 double spacing

  Open an example in ShareLaTeX

[edit]Reference guide

Schematic presentation of lengths in a paragraph

  • \parindent, determining paragraph indentation
  • \parskip, determining space between paragraph and preceeding text

[edit]Further reading

For more information see:

Question: I would like to save some space in a LaTex document by reducing the space between references in bibliography section. How can I reduce line spacing of bibliography in LaTex?

You can use the package of LaTex. This package supports various citation formats (e.g., author-year and numerical citations). It also allows you to adjust the space between references.

To reduce line spacing in bibliography, simply put the following lines in the preamble of your LaTex document. This will shrink the line spacing in bibliography to 0pt.

\usepackage{natbib} \setlength{\bibsep}{0.0pt}

Note that using the package may change your citation format.

In that case, you can define the citation format explicitly using options as follows. This will produce citations with square bracket, sorted, and comma-separated styles.

\usepackage[square,sort,comma]{natbib} \setlength{\bibsep}{0.0pt}

If you encounter "Package natbib Error: Bibliography not compatible with author-year citations" message, add "numbers" option to get around that.

\usepackage[square,sort,comma,numbers]{natbib} \setlength{\bibsep}{0.0pt}

Subscribe to Ask Xmodulo

Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.


Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

Share this FAQ:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *