Latex Course: To Create First Latex Document 1
Latex Course: To Create First Latex Document 1
1. https://youtu.be/UaLVP_q5ksM
Code
\documentclass{article}
\title{LaTeX Document}
\author{Firuza}
\date{\today}
\begin{document}
\maketitle
hello this is my first document in LaTeX
\end{document}
2. \documentclass{book}
\title{Mass}
\author{Wikipedia, the free encyclopedia}
\date{\today}
\begin{document}
\maketitle
Topic 1: Introduction / Session: Section levels and ToC ( LaTeX Code in the Session )
2. \documentclass{book}
\title{LaTeX Document}
\author{Wikipedia \\ Collated by Firuza}
\date{\today}
\begin{document}
\maketitle
\tableofcontents
\chapter{Overview}
\section{Overall Description}
\section{Introduction}
\paragraph{}
Dhansak is a popular Indian dish, originating among the Parsi
Zoroastrian community.[1] It combines elements of Persian and Gujarati
cuisine. Dhansak is made by cooking mutton or goat meat with a mixture of
lentils and vegetables. This is served with caramelised brown rice, which is
rice cooked in caramel water to give it a typical taste and colour. The dal
cooked with mutton and vegetables served with brown rice, altogether is
called dhansak.
\subsection{Purpose}
\subsection{Scope}
\end{document}
Extra Reading Material
Bookmark this page
Special Characters
Special characters like ! @ * ( ) - + = ? [ ] / can be written as is in the document.
Unlike them, there are certain characters which need to be written with an escape
character (\), else they either throw an error or do not display the way we want. Some of
them are $ & % _ { } # which are thus are written as \$ \& \% \_ \{ \} \#
Dashes
2. En dash (\textendash) is mostly used when specifying range of pages, years, etc.
E.g. pages 5 -- 7 explain XYZ
Quotes
Single and double quotes in a document are usually written
using '...' and "..." respectively. LaTeX, on the other hand, denotes different
characters for representing the opening and closing of quotes. ` symbol (usually present
before the Number 1 key on a standard keyboard) represents the opening of quotes
while ' represents the closing of quotes.
\begin{landscape}
...
\end{landscape}
Topic: Topic 2: Styling Pages / Session: Paper size and Margins (LaTeX Code
in the Session)
\documentclass{book}
\usepackage[a4paper, inner=2in, outer=1in]{geometry}
\begin{document}
\chapter{Overview}
\section{title}
\end{document}
Enhanced Article
\documentclass{book}
\usepackage[inner=1.25in, outer=1in, top=1in, bottom=1in]{geometry}
\title{Mass}
\author{Wikipedia, the free encyclopedia}
\date{2019}
\begin{document}
\maketitle
\chapter*{Preface}
\paragraph{}
\tableofcontents
\chapter{Phenomena}
\paragraph{}
\chapter{Units of mass}
\paragraph{}
Figure: images/220px-SIbaseunit.png
Table: Newtonian Mass
\section{Newton's Canonball}
\paragraph{}
Figure: images/Universalgravitationalmass.png
Figure: images/CavendishExperiment.png
\subsection{Cavendish Experiment}
\subsection{Definitions of terms}
Table: Cavendish terms
\section{Inertial Mass}
\paragraph{}
Figure: images/rollercoaster.jpg
\end{document}
Topic: Topic 2: Styling Pages / Session: Page Styles (Header and footer)
(LaTeX Code in the Session)
\documentclass{book}
\begin{document}
\pagenumbering{roman}
\tableofcontents
\chapter{Overview}
\pagenumbering{arabic}
\setcounter{page}{1}
% \pagestyle{empty}
\section{title}
\chapter{Annexure}
\pagenumbering{Alph}
\setcounter{page}{1}
Apart from the usual page style that we use, LaTeX gives us a facility to customize the
page using 'fancyhdr' package. To style the page, one must write \pagestyle{fancy}.
Given below are the commands for setting header and footer.
Document Information
Some document information like section name, chapter name, the total number of pages,
etc. one might need to mention in the header and footer. These are given below along
with their LaTeX commands.
LaTeX Code
\documentclass{article}
% Packages
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{lastpage}
% Define Header
\lhead{\today}
\chead{}
\rhead{Draft}
% Define Footer
\lfoot{Firuza, Nagesh}
\cfoot{Sample.pdf}
\rfoot{Page \thepage of \pageref{LastPage}}
\begin{document}
Some random content. Just copy paste some text over here so that the
document spans more than 1 page. This will give a clear picture.
\end{document}
Fancy Page Style
Apart from the usual page style that we use, LaTeX gives us a facility to customize the
page using 'fancyhdr' package. To style the page, one must write \pagestyle{fancy}.
Given below are the commands for setting header and footer.
Document Information
Some document information like section name, chapter name, the total number of pages,
etc. one might need to mention in the header and footer. These are given below along
with their LaTeX commands.
LaTeX Code
\documentclass{article}
% Packages
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{lastpage}
% Define Header
\lhead{\today}
\chead{}
\rhead{Draft}
% Define Footer
\lfoot{Firuza, Nagesh}
\cfoot{Sample.pdf}
\rfoot{Page \thepage of \pageref{LastPage}}
\begin{document}
Some random content. Just copy paste some text over here so that the
document spans more than 1 page. This will give a clear picture.
\end{document}
LaTeX Code
\documentclass{article}
% Packages
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{lastpage}
% Define Header
\lhead{\today}
\chead{}
\rhead{Draft}
% Define Footer
\lfoot{Firuza, Nagesh}
\cfoot{Sample.pdf}
\rfoot{Page \thepage of \pageref{LastPage}}
\begin{document}
Some random content. Just copy paste some text over here so that the
document spans more than 1 page. This will give a clear picture.
\end{document