This page answers frequently asked questions and lists recommended literature and some external sites.
Tex Stackexchange
The LaTeX Companion (book)
LaTeX Graphics Companion (book)
The Not So Short Introduction to LaTeX
Frequently Asked Questions (FAQ)
The following sections contains questions and answers to common LaTeX related problems.
Bibliography is not shown
I’ve run BibTeX but my bibliography does not show! Why?
This complication is often due to a mix of BibTeX and the package, biblatex. Biblatex defaults to Biber (modern BibTeX replacement) as backend, and if you use BibTeX you must configure biblatex accordingly to process the correct bibliography files. Add the backend argument to the biblatex usepackage line in your preamble (as in the following).
\usepackage[backend=bibtex]{biblatex}
We do recommend Biber as backend. To change the backend in Texmaker, goto preferences and edit the line bibtex %
to biber %
.
Bibliography style
Why does X bibliography style not work with biblatex?
You have probably tried to use a BibTeX-only style. Fear not! biblatex offers traditional styles that mimic the old ones. E.g. unsrt
is called trad-unsrt
.
You can read more about these traditional styles in the biblatex-trad
documentation.
Equations from Word to LaTeX
How do I transform a Word equation to LaTeX code?
Use the program TeXAide, which is able to save equations to LaTeX. TeXAide is a version of Equation Editor.
Continuing footnotes
How do I make the footnotes continue instead of being reset after each chapter?
Include the package remreset
in the preamble \usepackage{remreset}
and write
\makeatletter
\@removefromreset{footnote}{chapter}
\makeatother
From Word to LaTeX
How do I convert a Word document to LaTeX?
One way is the slaveway: copy all text from the Word document into a LaTeX document, and then formatting the LaTeX document. Another solution is to use Word2TeX which can convert the document for you. But Word2TeX generates alot of naive code, witch you eventually have to clean.
Frontpage
How do I make a frontpage?
Here is a example of how to make your own frontpage.
\thispagestyle{empty} % Clears the pagestyle (removes page number)
\hspace{6cm}
\vspace{6cm}
\begin{center} % Center content
\textbf{\Huge {Titel}\\
\vspace{1cm}
\huge{Subtitle}}
\end{center}
\vspace{3cm}
\begin{center}
\Large{\textbf{Name1, student number1 \\ Name2, student number2}}
\end{center}
\vspace{6.0cm}
Course number and name\\
Supervised by ...\\
Department of ...\\
Technical University of Denmark\\
\today
\thispagestyle{empty}
Pagesize
How do I change the pagesize?
The standard margins are set to ensure that the page is easy to read, but if you for some reason want to change the margins, take a look at this example:
\usepackage[top=3cm,
bottom=3cm,
left=4cm,
right=5cm]{geometry}
Where the numbers represent the size of the margins.
Although in most cases you will be using \usepackage{fullpage}
Cooperation – marks in the text
How do I make marks in the text to show my partner what I have changed?
I this case Word has a better tool to do this, namely the “Track Changes” tool. You could use this tool by copying the LaTeX document into Word and turn on “Track Changes”. Then make the changes and sent this to your partner.
Another solution (the LaTeX-way) is to use some of LaTeX’s graphical tools:
- Strikethrough:
\sout{word}
(remember\usepackage{ulem}
) - Underline:
\uline{word}
- Margin notes:
\marginpar{word}
A third solution and maby the most convenient is to use a version control system such as CVS (Concurrent Version System) or SVN (Subversion). By using a version system all changes committet to the system will be stored, and you will always be able to se the difference between to versions or fallback to a erlier version. By the way Emacs has a strong integration with CVS.
Linespacing
How do I change the linespacing?
Use the package setspace.sty
and use, i.e., \onehalfspacing
.
Counters
What is a counter?
All references in LaTeX is made by using counters. By references we mean numbering of chapters, footnotes, equations etc. Each of these references has a name by witch you can alter the way that particulary counter works. For instance you can change the depth in witch the tableofcontents-counter counts: \setcounter{tocdepth}{2}
will only count the chapters and sections, and not subsections (report-class).
It is also possible to change a given counter with the command \addtocounter{counter}{value}
. Note that it is possible to use negative numbers as the value, if you want decrease a counter. Read more about counters at NASA!
Tables
How do I make (advanced) tables?
The standard tables can do the job in most cases, but can sometimes be nessesary to create more advanced tables. Take a look at tabularx
and supertabular-packages or the UK-TeX FAQ.
Advanced verbatim
Is there a more advanced version of the
verbatim
package?
Verbatim is used for printing sourcecode or other text that LaTeX should not translate. Thus printing the text the it is written.
An example:
\begin{verbatim}
\chapter{this will not insert a chapter, this will insert the exact line}
\end{verbatim}
Minted is a modern package that introduces syntax highlighting using an external Python script, Pygmentize, to process the code in a minted
environment.
\begin{minted}{ruby}
def hello_world
puts 'Hello world!'
end
\end{minted}
Don’t forget to load minted with \usepackage{minted}
. The TeX engine must be started with shell-escaping (\write18
) enabled for this package to work.
GNUplot
What is GNUplot?
GNUplot is a program for working with graphics.Take a look at these links links: gnuplot.info, GBUplot manual, GNUplot tutorial, Introduction to GNUplot, Download GNUplot for Windows.
Cygwin
What is Cygwin?
Cygwin is a way to run Unix-applications on Windows.
Xfig
What is Xfig?
Xfig is an application for drawing vectorbased figures. See our Xfig tutorial for more information.
GIMP
What is The GIMP?
GIMP is a free and open source application for editing images similar to Adobe Photoshop.