0% found this document useful (0 votes)
123 views23 pages

Patna University PHD Coursework Lecture4

The document provides an introduction to LaTeX, including what it is, why it is used, how to install it on Windows and Mac systems, and examples of basic document structure and commands for formatting text, citations, images, equations, and more.

Uploaded by

ANURAG RAKESH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views23 pages

Patna University PHD Coursework Lecture4

The document provides an introduction to LaTeX, including what it is, why it is used, how to install it on Windows and Mac systems, and examples of basic document structure and commands for formatting text, citations, images, equations, and more.

Uploaded by

ANURAG RAKESH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Introduction to LaTeX

Course: Ph.D. Course Work

Dr. Sanjay Kumar


Assistant Professor
Department of Physics
Patna University
What is LaTeX

● LaTeX is pronounced “lay-tech”.

● LaTeX is a document preparation system for high-quality


typesetting.

● LaTeX is most often used to produce technical or scientific


documents, but it can be used for almost any form of
publishing.

The users can add tables, flow charts, diagrams and much more
through available LaTeX codes. After the compilation of the
LaTeX code, it generates a PDF file, which can then be viewed in
any PDF viewer on the system.
Why use LaTeX ?

● Designed by academics and easily accommodates academic


use.
● Professionally crafted predefined layouts make a document
really look as if “printed.”
● Mathematical symbols and equations are easily integrated.
● Even complex structures such as footnotes, references, table
of contents, and bibliographies can be generated easily.
● Forces author to focus on logical instead of aesthetic
structure of a document.
● Creates more beautiful documents.
● Portable, compatible, flexible, versatile, and cheap (or free)!
Installing LaTeX

In Windows

MiKTeX (Open source)
– MiKTeX is a typesetting system for the Windows.
– Download from www.miktex.org for free
As a part of MiKTeX you have TeXworks as an editor to edit
your LaTeX files.
Other text editors:

WinEdt
– WinEdt is a text editor.
– WinEdt creates the source file (.tex and others).
– Download from www.winedt.com for free for 30 days.
– WinEdt costs $30.
Installing LaTeX

Other text editors
– There are other text editors.
– Winshell for free (http://www.winshell.de/)
– Scientific Workplace

Combination of LaTeX and Mathematics program

Does a good job of calculating and graphing, very user friendly, but
expensive


In Mac

TexShop
– Download for free http://www.uoregon.edu/~koch/texshop/
– Includes everything!
Examples
Basic Document Structure

The format of a document is pretty simple.
– In the preamble

Documentclass

Packages
– In the front matter

Title/author
– In the body

Contents
– In the back matter

bibliography
In the Preamble

You specify your document class.
– Document classes: letter, article, report, book,
slides(beamer, prosper)

\documentclass[12pt]{article}
• Backslash – at the beginning of text markup command
– Packages: numerous packages are available

\usepackage[margin=1in]{geometry}

\usepackage{setspace}

\usepackage{harvard}
In the Front Matter

\begin{document}

\title{}

\author{}

\maketitle

\begin{abstract}

\end{abstract}

\pagebreak
In the Body

To begin a new section

\section{}
– Similarly, \subsection{}, \subsubsection{},
\subsubsubsection{}
– LaTeX does automatic numbering. If you don’t like it,
use section*{}

\emph{}, \textbf{}

\singlespacing, \doublespacing, \onehalfspacing

\centering or \begin{centering} & \end{centering}
Footnotes/Quotes/Equations

\footnote{}

\begin{quote} & \end{quote}

` ’, `` ’’ for quatations

Mathematical Equations
– Math always in between $ & $

Alternatively, \begin{equation} & \end{equation}
– $ 1+4=5 $
– \frac{}{}, \sqrt{}, \sum_{k=1}^{n}
– ^{}, _{}
– \greek letters (e.g. \alpha or \Alpha)
– WinEdt also provides click and type functions.
Inserting Images
Images are essential elements in most of the scientific documents. LaTeX
provides several options to handle images and make them look exactly
what you need.
Changing the image size and rotating the picture

\includegraphics[scale=1.5]{overleaf-logo}

\includegraphics[width=5cm, height=4cm]
{overleaf-logo}

\includegraphics[width=\textwidth]{universe}

\includegraphics[scale=1.2, angle=45]{overleaf-
logo}
Citations

\cite{bibtexkey}, citeyear{bibtexkey}

It is more convenient to create a bibliography
file, called bibtex file(.bib) and use it as
needed.

WinEdt is capable of creating a bib file, but
there are more convenient tools out there.

JabRef (http://jabref.sourceforge.net/)
Online Platform for Latex
https://www.overleaf.com/
Thanks for the attention!

You might also like