26 January 2010 0 Comments

LaTeX Template Explained

Just a short template with some packages included:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
\documentclass[a4paper,12pt]{article}

% let's use some nice packages
\usepackage{times}
\usepackage{amssymb}
\usepackage{amsmath
}
% set all margins to 2.5 cm
\usepackage[margin=2.5cm]{geometry}
% for fancy and easy modification of header and footer
\usepackage{fancyhdr}
% include hyperlinks in pdf file
\usepackage{hyperref}
% decide if run PdfTeX or LaTeX
\ifx\pdfoutput\undefined
% we are running LaTeX, not pdflatex
\usepackage{graphicx}
\else
% we are running pdflatex, so convert .eps files to .pdf
\usepackage[pdftex]{graphicx}
\usepackage{epstopdf
}
\fi

% also include colors
\usepackage{color}
% define bottom line of paper, for DRAFT option
\usepackage{prelim2e}\usepackage[none,bottom]{draftcopy}
\draftcopyName{preprint / }{1.2}
\renewcommand{\PrelimWords
}{Draft%
-- contact: user@mail.yoursite.com -- www.yoursite.com}

% define a path for your images
\graphicspath{{.},{../images/},,{../../images/}{../../anotherdir/}}

% define a new command
\newcommand{\mylab}[1]{\label{#1}}

\title{Your Title}
\author{Your Name}
\date{\today}

\begin{document
}
% show the title, author and date
\maketitle

% article's abstract
\begin{abstract}
body of abstract
\end{abstract}

\section{Section Name}
\subsection{Subsection Name
}

% include the bibliography but using bibtex
\bibliographystyle{plain}
\bibliography{bibfile1,bibfile2,bibfile3}

\end{document
}

[credit to Vioan.ro]

Tags: ,