Welcome to Information Literacy II Good morning! Lecture will start - - PowerPoint PPT Presentation

welcome to information literacy ii good morning
SMART_READER_LITE
LIVE PREVIEW

Welcome to Information Literacy II Good morning! Lecture will start - - PowerPoint PPT Presentation

Welcome to Information Literacy II Good morning! Lecture will start at 10:45 (let's wait for everyone). If you have any question, please ask in the chat. Note that lecture will be recorded. Please write your name there:


slide-1
SLIDE 1

Welcome to Information Literacy II Good morning!

  • Lecture will start at 10:45 (let's wait for everyone).
  • If you have any question, please ask in the chat.
  • Note that lecture will be recorded.
  • Please write your name there:

https://forms.gle/GQ6mEjGHxJZhAXH66

slide-2
SLIDE 2

Lecture 4 – Introduction to LaTeX

Final lecture on Python Matplotlib

Information Literacy II – EN(IL2) Course

slide-3
SLIDE 3

Today

What and why Latex? Overleaf Introduction to Latex

  • Basic commands
  • Structure of the document
  • Mathematical expressions

Homework #2

slide-4
SLIDE 4

LaTeX

A document preparation system developed by L. Lamport based on the TeX system created by D. Knuth. Takes a document created using the Latex markup language and converts into a format suitable for printing (typically PDF). Free software.

slide-5
SLIDE 5

Latex (cont)

Powerful support for mathematical formulas and diagrams, citations, cross-references, footnote, bibliographies, etc. Commonly used by publishers for preparation of books and academic journals. Flexible programming environment for creating new commands, environments, packages, etc.

slide-6
SLIDE 6

Using Latex on your own computer

Main Latex website: https://www.latex-project.org/ On MacOS: Install MacTeX: http://www.tug.org/mactex/ On Windows: Install MiKTeX: https://miktex.org/

Both distributions contain a complete system (including editor) Plenty of documentation online  Easy to find help!

slide-7
SLIDE 7

A few more links

The Not So Short Introduction to LATEX 2ε https://tobi.oetiker.ch/lshort/lshort.pdf Wikibook on Latex https://en.wikibooks.org/wiki/LaTeX Possible to use Latex online (without installing anything) e.g. https://www.overleaf.com/

slide-8
SLIDE 8

Latex vs. Word

Advantage of Latex:

  • Portable: can be used on any computer
  • Stable: old documents can still be read
  • Standard in Academic world
  • Easier to use but only after some time 

Drawback of Latex:

  • Not WYSIWYG
  • Not so common outside of university
  • May be more difficult at the beginning
slide-9
SLIDE 9

Latex – General Idea

Focus on the content Do not focus on the design/layout  Latex will choose automatically the best design How to use Latex:

1 – Write a source file “report.tex” 2 – Compile using Latex 2’ – Fix the errors and compile again 3 – Check the result, typically “report.pdf”

slide-10
SLIDE 10

Overleaf (Web App)

slide-11
SLIDE 11

Overleaf – Registration

Option 2 Option 1

slide-12
SLIDE 12

Overleaf – Example Project

1 2

slide-13
SLIDE 13

Overleaf – Interface

Source file

This is what you will write

Output file

This is what you will obtain

slide-14
SLIDE 14

Overleaf – Blank Project

slide-15
SLIDE 15

Latex Introduction

slide-16
SLIDE 16

Latex – First Example

Always start with \documentclass[…]{…} Latex commands use backslash: \commandname {…} is for mandatory arguments […] is for optional arguments Use the \title{…}, \author{…}, and \date{…} to give title, author, and date The main content of the document is between the \begin{document} and \end{document} commands The command \maketitle creates the top of the document

\documentclass{article} \title{My first Latex document} \author{Francois Bonnet} \begin{document} \maketitle This is my first document written in

  • Latex. It seems complex but as we will

see, it is not so difficult to write good documents using Latex! \end{document}

example1.tex

slide-17
SLIDE 17

Latex – First Example

\documentclass{article} \title{My first Latex document} \author{Francois Bonnet} \begin{document} \maketitle This is my first document written in

  • Latex. It seems complex but as we will

see, it is not so difficult to write good documents using Latex! \end{document}

example1.tex

slide-18
SLIDE 18

Latex – Document structure

Use the commands \section{…} and \subsection{…}to structure your document. Use an empty line to start a new paragraph. Automatic numbering of sections and subsections Try subsubsection or subsubsubsection or …

... \begin{document} \section{How to use matplotlib} I describe here how to use matplotlib \section{How to use \LaTeX} I describe here how to use LaTeX. I will first explain history of Latex, then some basic commands, then ... New paragraph starts after an empty line. \subsection{History} Bla bla bla bla \subsection{Basic commands} Bla bla bla bla \subsection{Something else} \end{document}

slide-19
SLIDE 19

Latex – List

The itemize environment can be used to create a list of items. To create numbered list, one should use the enumerate environment. Try enumerate on your computer. Try nested lists on your computer.

... \begin{document} There are three main OS: \begin{itemize} \item macOS \item Linux \item Windows \end{itemize} There are three main OS: \begin{enumerate} \item macOS \item Linux \item Windows \end{enumerate} \end{document}

slide-20
SLIDE 20

Latex – Math expressions

Inline mathematical expression appears between $...$ Use the `` and '' for quotes. Do not use the “ (double quotation mark) Note also the \ldots command that produces … Display mode is activated using \[ … \] and should be used for more complex formulas

... \begin{document} It is very easy to write ``complex'' mathematical

  • expressions. You can write Greek letters; for

example $\alpha$, $\beta$, $\gamma$, $\Gamma$, \ldots It is also possible to write some mathematical terms: $\sqrt{256} = 16$ or $x_1 + x_2 + x_3$ or $(x+y)(x-y) = x^2 - y^2$. If you need bigger formula, you can use the display mode as follow: \[ \sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6} \] \end{document}

slide-21
SLIDE 21

Homework #2

Create a simple Latex document that contains:

  • A title and your name (as author)
  • The mathematical expression on the right,

including the parenthesis and the +/- sign. (you can look for help online)

  • A short text explaining the previous equation.

Download the two files from Overleaf: ‘homework2.tex’ and ‘homework2.pdf’. Compress them in ‘homework2.zip’. Submit via OCW-i the compressed file before July 27 (23:50).