Latex

From bio-physics-wiki

Jump to: navigation, search

Download the latest MiKTeX version at [1]

I use Texmaker as GUI [2]


Minimal Latex Document

\documentclass[11pt, onecolumn, a4paper]{article}
\begin{document}
 minimal latex template
\end{document}

Additional Latex Packages

You can load additional latex packages with the command \usepackage{packagename}. If the package is not installed Texmaker will ask you to download it when you click PDFLaTex.

  • With \usepackage{fancyhdr} you can add a header or footnote to you document by including the code

\pagestyle{fancy} \lhead{} %left header \chead{} %center header \rhead{} %right header \lfoot{} \cfoot{} \rfoot{\thepage} %includes the page number to footnote

  • If you use mathematical forumlas include the package

\usepackage{amsmath}

  • The package 'amssymb' provides you with a range of useful symbols amssymbols (\usepackage{amssymb})
\documentclass[11pt, onecolumn, a4paper]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
 \begin{align}
 \eta_{int}=\frac{ \overline{\langle P^2 \rangle - \langle P \rangle^2}}{ \left( \overline{\langle P \rangle} \right)^2}
 \end{align} \\
 \mathbb{N}, \rightleftarrows
\end{document}
  • Use \usepackage[a4paper, left=2.5cm, right=2.5cm, top=3cm, bottom=3.5cm]{geometry} to determine borders of your pages
  • If you want to include pictures you need \usepackage{graphicx} and the code
\begin{figure}[p]
   \centering
   \includegraphics[width=0.8\textwidth]{image.png}
   \caption{Awesome Image}
   \tag{1}
\end{figure}

Copy the pictures in the same folder as you latex document. Sometimes the picture position is adjusted automatically; usually you want to determine the position yourslef. The package \usepackage{float} forces the picture position to where you want it - just change \begin{figure}[H].

  • Language packages \usepackage[english]{babel}
  • Change your font so sans serif with \renewcommand*\familydefault{\sfdefault}