0% found this document useful (0 votes)
8 views

Lecture 7

Lecture 6

Uploaded by

mohamedwael5705
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Lecture 7

Lecture 6

Uploaded by

mohamedwael5705
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Dr.

Christina Gamal
Lecture 7
An Introduction to LATEX
 what is LATEX?
 Why LATEX?
 HOW does LATEX Work?
 Required Software.
 Writing your first LATEX on TexStudio
 Typesetting text
 Typesetting mathematics
 Using packages
 Latex is a document preparation system for high-quality
typesetting. It is most often used for medium-to-large
technical or scientific documents, but it can be used for
almost any form of publishing.

 Latex encourages authors not to worry too much about the


appearance of their documents but to concrete on getting
the right content. ‘what it is’, not ‘how it looks’
 Latex is a document preparation system for high-quality
typesetting. It is most often used for medium-to-large
technical or scientific documents, but it can be used for
almost any form of publishing.

 Latex encourages authors not to worry too much about the


appearance of their documents but to concrete on getting
the right content. ‘what it is’, not ‘how it looks’
 Small files
 Cross-platform
compatibility
 Easy to make templates
 Free
 You write your document in plain text with commands that describe its structure
and meaning
 The latex program processes your text and commands to produce a beautifully
formatted document
 Web-based:
 using your PC:  Overleaf
 Compiler: MIKTex (install first!)

 Editor: TeXStudio
 Latex file begin with \documentclass{class}
 Write the type of class such as: article, report, book
 Type your text between \begin{document} and
\end{document}.
 Commands start with a backslash \.
 Every document starts with a \documentclass{class}
command
 The argument in curly braces {} indicates the type of
document such as: article, report, book
 A percent sign % starts a comment
 Type your text between \begin{document} and
\end{document}.
 Words in latex are separated by one or more spaces.
Spaces, more than one space, in the source file is collapsed
in the output.
 Paragraphs are separated by one or more blank lines.
 Two backslash \\ to enter a new line.
 Use symbol ~ to make spaces between words

 Some common characters have special meanings in LATEX

 To write them in the output, you have to preceding them with a


backslash \.
 To write braces {} in latex, you have to preceding them with
a backslash \.
 Quotation marks: use a backtick ` on the left and an
apostrophe ´ on the right.
 To make the text bold, italic or underline, you have to select
the text then click on the B, I or U icons.

Bold
Italic

Underline
 The dollar signs $ are use them to mark mathematics in the
text.
 Always use dollar signs in pairs $ $ one to begin the
mathematics, and one to end it.

 To make ‘three dots’ use command \ldots


 use caret ˆ for superscripts and underscore _ for subscripts.

 Use curly braces {} to group superscripts and subscripts.

 There are commands for Greek letters and common notation.


 Equations could be displayed on its own line using
\beginequation and \endequation.

 Be careful: LATEX mostly ignores your spaces in mathematics, but it can’t handle blank lines in
equations — don’t put blank lines in your mathematics.

 To refer to equation in the text, use command \label{} inside the


equation and the command \ref{} in the text.
 The \begin and \end commands are used to create many
different environments.
 The itemize and enumerate environments generate lists.
 Sections in LaTeX are generated using the following
commands that are defined in the native article document
class:
 To get an unnumbered section, subsection, etc. add an
asterisk (*) at the end of the command, before the opening
curly brace.
 All of the commands and environments we’ve used so far
are built into LATEX.
 Packages are libraries of extra commands and
environments. There are thousands of freely available
packages.
 We have to load each of the packages we want to use with a
\usepackage command in the preamble.
 Example: amsmath from the American Mathematical
Society.
 The amsmath package provides unnumbered equations by
using equation*.
 The amsmath package provides align a sequence of equations
at the equals sign with the align* environment.

 An ampersand ‘&’ separates the left column (before the =) from


the right column (after the =).
 A double \\ starts a new line.

You might also like