working with LaTex

Dezember 7, 2007

LaTex Logo

LaTex (pronounced La-Tech) is a document markup language and document preparation system for the TeX typesetting program.

I’ve been using it to write a paper for university so I’ll be sharing my knowledge that I gained so far here with you.

Let’s start with the basics, you will need a LaTex Editor to write your text in, because you cannot just write it in MS Word or OpenOffice Writer and compile it from there. Just to set the record straight, LaTex is a markup language, which uses commands to make your text look bold, coloured or any other text alignments you want to put it in.

The output of your LaTex document will be a .pdf file, as soon as you compile it. This usually does the editor for you. So make sure you have the Adobe Reader or any other tool that can open/read pdf documents installed, so you can actually read your finished document 😉

For instance, if you want to put your text in italics you need a command like \textit{your text in italics}. But more of that later!

Back to the LaTex Editor question, which one to choose? Well, first of all it depends on the operating system that you’re using. I’m using Linux (a unix based operating system) therefore I chose to use Kile (http://kile.sourceforge.net/).

If you’re using Windows, you might want to use these editors – as they’re all free software:

However, there are also multiplatform editors which should work on all operating systems. There’s a plugin for example for the Eclipse Editor, and even LaTex-Suite-Plugin for the popular Vim text editor.

Which editor you may choose, make sure you’re comfortable using it – this means it meets your needs and is not too complex to use. You’re better off to start lowkey, with a basic functionality.

So let’s get started:

Before you can look at the basic functions of the LaTex syntax you need to install a few packages, that enable you to choose from various style sets and templates. As well, if you want to write your text in german you’ll need a package for Umlaute ä,ö,ü, ß, etc..

Using Ubuntu there’s a fortunately a combination of basic packages, called «texlive-latex-base» or another package called „LaTeX recommended packages“ «texlive-latex-recommended» and last but not least „LaTeX supplementary packages“ can be found as «texlive-latex-extra». Other than that I didn’t install any additional packages.

It may depend on your editor or the operating system you’re using, most of the packages might have already been installed when installing the LaTex editor of your choice.

The basics:

To start a LaTex document you need the following syntax:

\begin{document} and \end{document} …..as you can see it’s pretty much like HTML or any other markup language. This indicates that the following document will be a LaTex document.

If you want to use chapters in your text, you can do so by using

\chapter{your chapter title} this has no „end“ tag….your text of the chapter goes below the chapter syntax.

Subchapters are called „section“ in LaTex, \section{subchapter}– which will make your document look like this:

1 Introduction
1.1 History of LaTex

To create a table of contents you simply put \tableofcontents into your document, usually at the beginning of the document.

You see, it’s very easy once you’ve figured out how to do it, and I promise the next time you’ll use LaTex it will save you a lot of time. Using LaTex puts your document/text actually in a more professional looking way.

\listoffigures acts the same way as the table of contents, it bascially collects all images/graphics that you have defined and included into your document and lists them with the caption and the page number.

\newpage says it all. It creates a new page – so if you want a certain text to begin on a new page, put \newpage where you want it to be. New Chapters automatically start on a new page, so there is no way to have the end of a chapter and a new chapter on the same page, just to save space. LaTex automatically begins a new page once you’ve defined it as a chapter.

\linebreak … breaks the line (doesn’t create a new paragraph)

Paragraphs can be realized by using \par{}

\begin{quote} Quote \end {quote} use this to quote someone

\cite{grundstockfsf} lets you cite someone verbatim that you can later use in your bibliography (bot more of that later on..)

\footnote[the current number of your footnote]{the text that should further explain your footnote}

Including graphics:

\begin{figure}[h] the parameter [h] let’s you place a graphic to a certain position
\centering you need this to align your graphic to the center.
\includegraphics[width=3.5cm,height=3.5cm,bb=0 0 26 26]{rect12155.png}
% rect12155.png: 300×300 pixel, 838dpi, 0.91×0.91 cm, bb=0 0 26 26
\caption{your caption text goes here}
\label{img:this image text will be shown when you hover the graphic with your mouse cursor}

% this command acts a comment…..which let’s you comment a certain command that you might not use anymore, but it could be of use later if you just want to test something without using this commented command.

Text decoration:

\textit{} lets you put a text in italics

\textbf{} displays your text in bold

\underline{} underlines your text

\textcolor{red}{your text here} displays your text in colour. e.g. red

\url{https://readthisaloud.wordpress.com} makes a link clickable in your pdf….

This is just a quick summary, which sums up the basic functions of LaTex. I might post another entry for the more advanced users that will go more into detail. But this should get you started for now.

If you think there’s something important missing, shoot me an email or drop me a comment!

3 Kommentare

  1. I am sure this piece of writing has touched all the internet viewers, its really really good
    article on building up new weblog.

  2. If some one desires to be updated with latest technologies then he must be go to see this site and be up to date daily.

  3. I got this web site from my friend who told me about this website and at the moment this time I am browsing this web page and reading very informative articles at this time.

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:


Du kommentierst mit Deinem WordPress.com-Konto. Abmelden /  Ändern )

Google Foto

Du kommentierst mit Deinem Google-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s

%d Bloggern gefällt das: