introduction to l a t ex
play

Introduction to L A T EX A Quick Crash Course Amin Mesbah 15 - PowerPoint PPT Presentation

Introduction to L A T EX A Quick Crash Course Amin Mesbah 15 April, 2016 A T What is L EX? A document typesetting markup language A tool that can save you a lot of time Commonly used to write research papers, but useful for many other


  1. Introduction to L A T EX A Quick Crash Course Amin Mesbah 15 April, 2016

  2. A T What is L EX? A document typesetting markup language A tool that can save you a lot of time Commonly used to write research papers, but useful for many other things too (resumes, calendars, posters, books, letters, notes, this slideshow...)

  3. Setup Windows: MiKTeX Mac: MacTeX Linux: apt-get install texlive Online: Overleaf ShareLatex

  4. Using Overleaf Go to overleaf.com and click ”Create a New Paper”. Then click ”Source”

  5. ”Hello, World!” Making our first L A T EX document A L A T EX document has two main parts (called environments): Preamble Environment Set up the rules for how your document will look Document Environment The place where you write your document

  6. The Code for helloworld.tex Making our first L A T EX document % t h i s i s our preamble \ documentclass [11 pt ] { a r t i c l e } % t h i s i s our document environment \ begin { document } Hello , world ! \ end { document }

  7. Let’s add a Title! Making our first L A T EX document \ documentclass [11 pt ] { a r t i c l e } % t i t l e i n f o r m a t i o n goes here : \ t i t l e { Hello , World ! } \ author { your name goes here } \ date {\ today } \ begin { document } % t i t l e gets made here : \ m a k e t i t l e Hello , world ! \ end { document }

  8. Adding Graphics from Mathematica Making our first L A T EX document First add the graphicx package in your documents preamble: \ usepackage { graphicx } Then add the following code to your document’s body: % i n c l u d e a p i c t u r e shrunk to h a l f i t s s i z e \ i n c l u d e g r a p h i c s [ s c a l e =0.5] { mathematicapic }

  9. Adding a table Making our first L A T EX document \ begin { c en t er } % c en te r the t a b l e % t a b u l a r environment makes t a b l e s % {| l | l | | r |} makes three columns with borders % adjacent c e l l s are separated by ’& ’ % ’ \ hli ne ’ makes a h o r i z o n t a l l i n e % ’ \\ ’ ends a row \ begin { t a b u l a r }{| l | l | | r |} \ h l i n e a1 & b1 & c1 \\ a2 & b2 & c2 \\ a3 & b3 & c3 \\ \ h l i n e a4 & b4 & c4 \\ \ h l i n e \ end { t a b u l a r }

  10. The Math Environment L A T EX was originally designed to make it easy to write nice looking mathematical notation. If you want to write math, use the amsmath package. Since math formulas need to look different than normal text, they go in their own special math environment.

  11. Adding Math Making our first L A T EX document First add the amsmath package in your document’s preamble: \ usepackage { amsmath } Then add the following code to your document’s body: \ s e c t i o n { I n l i n e Math } % Here we use \ ( and \ ) to w r i t e math i n l i n e with normal t e x t . One of the t r i g o n o m e t r i c sum i d e n t i t i e s i s \ ( \ sin ( x ) + \ sin ( y ) = 2 \ sin ( \ f r a c { x+y }{ 2 } ) \ cos ( \ f r a c { x − y }{ 2 } ) \ ) . \ s e c t i o n { Separate Math } % Here we use \ [ and \ ] to w r i t e math s ep a ra t e from normal t e x t . \ [ \ f o r a l l x \ in X, \ quad \ e x i s t s y \ leq \ epsilon \ ] \ s u b s e c t i o n { Product Rule } % Here we use both techniques I f \ ( f \ ) and \ ( g \ ) are d i f f e r e n t i a b l e at \ ( x \ ) , then \ [ \ f r a c { d }{ dx } ( f ( x ) g ( x ) ) = f ’ ( x ) g ( x ) + f ( x )g ’ ( x ) \ ]

  12. A More Advanced Example Start a new project and load basic-example.tex from the examples folder Look at the code. There are some things we’ve already covered, and some other things we haven’t.

  13. Resources Learning L A T EXtakes time. These resources will help: Templates! More Templates! Even More Templates! L A T EX Wikibook A quick introduction Mini Tutorial Question and Answer Community Google is your friend: How do I make an integral symbol in latex?

  14. A T Links to L EXdocuments All the example documents used in this presentation can be found on overleaf at the following links. Feel free to use them as templates for your own projects! This Slideshow Code Snippets for Hellow World Basic Example Lab Report Example Math Notes Example MLA Essay Example

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend