latex - Latex Lines - latex tutorial



What is Latex Lines ?

  • There are numerous LaTeX commands to manipulate lines.
  • Some have to do with line placement; others have to do with margins and breaking lines.

Breaking lines:

  • Use a double backslash to break a line in a specific place.

Example:

    • Twas brillig, and the slithy toves \\
    • Did gyre and gimble in the wabe; \\
    • All mimsy were the borogoves, \\
    • And the mome raths outgrabe.
  • Note that the above must be in the flushleft environment to prevent LaTeX from indenting the first line as if it were a paragraph
  • Modify the file break.tex to take out the backslashes, and preview it to see the result.
  • Then add back the backslashes, only this time add one to the last line as well.

Centering Lines:

  • To center lines, LaTeX has a center environment. In the following example, the lines between the \begin{center} and the \end{center} commands will be centered.
    • Alice felt that in that case she really {\em ought}
    • to listen to it, so she sat down, and said
    • ``Thank you'' rather sadly.
    • \begin{center ``In winter, when the fields are white,
    • I sing this song for your delight --
    • \end{center}
    • only I don't sing it,'' he added, as an
    • explanation.
  • Notice in the formatted document that the poetic lines are centered, but they don't break to create two separate lines more like the input file text.
  • Use the file poem.tex as a skeleton to create a document which is like the one above, but with the line breaks done correctly.


Related Searches to Latex Lines