Text Manipulation

At this point, you should know enough about creating a LaTeX document. It's time to polish it!

Fonts, Size and Styles (this section is not so important so I put it to a seperate page)

Commonly-used text styles

  • \textbf{} - make a text bold

  • \underline{} - To underline text

However, underline in a wrong way can cause some troubles:

Therefore, you can use the package ulem to solve this problem (this package also add some special underlining styles!)

It's reportedarrow-up-right that ulem can messed up with the default emphasis command.

  • \textit{} - To make a text italic

  • \emph{} - Emphasis the text. By default, this will make the text italic. However, if the text needing emphasizing contains too many italicized words, it will make the text normal.

Text Alignment

By default, paragraphs in LaTeX\LaTeX are fully justified. As a result, we have 3 environments to break this: center, flushleft, flushright.

New paragraph

In order to force-create a new paragraph, you can use the \par command. Another way is to leave an empty line.

Creating new line

You can use 2 back-slashes \\ to quickly create a new line. However, the indentation will not be reserved. If you want indentation for a new paragraph, refer to New paragraph.

If you want spaces between 2 paragraphs, you can use this syntax: \\[length]

  • \\[\baselineskip]will create a new paragraph with the gap equal to the height of one line.

Indentation

By default new paragraphs are usually indented by an amount controlled by a parameter called \parindent (the default value is 15pt) whose value can be set using the command \setlength. For example:

You can avoid the indentation by setting that value to 0pt or use \noindent at the beginning of the paragraph.

circle-info

By default LaTeX does not indent the first paragraph contained in a document section.

Last updated