Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Jeroen Buijs.

Similar presentations


Presentation on theme: "Introduction to Jeroen Buijs."— Presentation transcript:

1 Introduction to Jeroen Buijs

2 Contents Today Next What is LaTeX? What do we need?
Our first example: The Nature LaTeX template Writing articles in Latex Basic commands References Figures Tables Math, Chemistry and Life Sciences Next Presentations in LaTeX Posters in LaTeX Installation of stand-alone version

3 What is (La)TeX? TeX is essentially a Markup Language
(like HTML, XML and RTF) TeX written in 70´s TEX is a typesetting language written by Donald Knuth. Plain TEX easy for simple documents (without equations, chapters etc). Otherwise very tricky. LaTeX is an extension of TeX Macro packages to make TeX easier to use

4 Latex vs. Word Processors
WYSIWYG - WYMIWYG High typeset quality Easy to include formulas & references Source file format is not bounded to a particular OS or platform Implementations exist for all platforms (DOS, Windows, Unix,..) Free Steep learning curve Requires compilation

5 How to make a document Writer only makes source
compiler document Writer only makes source Software creates document

6 How to make a document source compiler document
Several good LaTeX editors exist, e.g. TeXniccenter, (Windows only) TeXstudio, (“all major OS”) TeXmaker, (Linux, MacOSx, Windows)

7 How to make a document source compiler document
The set of programs that makes it possible to compile TeX and LaTeX documents is called a TEX distribution. There are many (La)TeX distributions available for different operating systems. The most commonly used ones are Windows proTeXt, (includes MikTeX & TeXstudio)) MixTeX, Mac: MacTeX, Unix/GNU/Linux: TeX Live,

8 How to make a document source compiler document
TeX distributions come with different programs to obtain different output formats. We will use pdflatex to create pdf documents

9 How to make a document source compiler document Stand-alone version
Online editors & compilers: WriteLaTeX, ShareLaTeX: Graphical interface combining WISYWIG with WYSIWYM: Exercise 1: Create an account on ShareLaTeX Create a new article intended for Nature In the Menu, make sure to select pdflatex and a spell checker Compile and reflect on the relation source – final document Where do you spell check your document?

10 The main file: XXX.tex The main file contains a preamble and a document environment The preamble defines the class (and overall style) of your document by defining the document class tells the compiler which packages including all kinds of extra (style) definitions you will use contains your own definitions and commands The document environment Starts with \begin{document}, ends with \end{document} Contains the contents of your document There are other files involved as well. In this case: A file defining the bibliography style (XXX.bst) A file containing the content of the references (XXX.bib)

11 The main file: XXX.tex Exercise 2: Change the title.
Change to two authors and add names. Compile and download the PDF. To learn more on packages and commands, let’s build our own article from scratch using the standard article class Excellent reference for all “basic stuff”: The not so short introduction to LaTeX 2e And if you’re stuck? Google! Link to paper: Exercise 3: Using the standard article class, use (Share)LaTeX to create a pdf containing page 1 of the article “Recent insights into Candida albicans biofilm resistance mechanisms” by Mathé and Van Dijck.

12 References Choose a bibliography style. For this journal, we use the chicago bibstyle. Add this file to your project: Create a bib file that will contain your references and add the first reference in BibTeX format, e.g. by using TeXMeD Tell TeX to include the references at the end of the document in the right style Include the natbib package Insert a \bibliograhystyle and \bibliography command Add the citation in the tekst using the \cite command

13 Figures The package graphicx can be used to include various graphic formats (like pdf, jpg, png) Figures are typically added as floats by the \begin{figure} … \end{figure} environment In a multicol environment, floats are not allowed to float. We can use the float package and the option [H] to do so…: Preamble: \usepackage{graphicx,float} In the document: \begin{figure}[H] \centering \includegraphics[width=0.9\linewidth]{qBasePlus_example} \caption{qBasePlus} \label{fig:qbp} \end{figure}

14 Figures Always use vector based graphic formats if possible.
Easiest way is to convert them all to pdf Exercise 4a: Add the figure qBasePlus_Example.pdf to your article. First use the blindtext package to add some extra text before and after the picture. Add a cross reference to the figure in your text.

15 Figures Or even better: let’s create our own graph from the raw data.
We use the packages pgfplots and tikz to do this. We don’t want to overload our main file, so we’ll put the figure in a seperate tex-file using the standalone document class, and include it afterwards. Exercise 4b: Create a new file qbpfig.tex and use ybar (pgfplots package) to recreate the figure. Use the \includestandalone command of the standalone package to include the figure in your article.

16 Figures Possible result: Advantages:
The font and style are the same as those of your text. You can choose the most appropriate way to represent your data Take a look here to get an idea of the strength of this package:

17 Tables To include tables, we can use table floats and the tabular environment. For complex tables, you can use spreadsheet-to-latex converters, e.g. Excel2LaTeX, Exercise 4c: Add a table to your article. If you want, install and use a spreadsheet converter. Alternatively, you can use an online LaTeX table generator.

18 Math, Chemistry & Bio stuff
LaTeX is very good in typesetting mathematical and chemical formulas. For ‘complexer’ mathematics, use the amsmath package. For chemical formulas, use the chemfig package There also exist some bio-related packages, like: texshade, for displaying the key changes in DNA textopo, to draw transmembrane proteins from a SwissProt file Exercise 5: (choose what you like) Add a Michaelis-Menten (or some other) equation to your article. Add the 2D formula for ethenol to your article. Check out one of the life science packages

19 Presentations in LaTeX
Note: There is a lot of discussion, even within the LaTeX community, About the use of LaTeX for making presentations – although very good Results can be obtained for scientific presentations, some argue that It’s to cumbersome to produce good results without visual software… The best way to create presentations in LaTeX, is by using the beamer class Example!


Download ppt "Introduction to Jeroen Buijs."

Similar presentations


Ads by Google