LaTeX

An art of academic Writing using LaTex

Agenda

  • Introduction

  • Why use LaTex?

  • Installation in Windows or Mac or Linux

  • Structure and hands on using Overleaf

  • Conclusion


Introduction

  • LaTeX is pronounced “lay-tech” or “lah-tech,” not “la-teks.”

  • 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.


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)!


Installation

Install the following 2 software in your system.

  • MiKTeX

Link to download- https://miktex.org/download

  • Texmaker 5.0.4 or later vesion

Link to download - https://www.xm1math.net/texmaker/download.html

  • Follow the installation tutorial video:

For Windows OS - https://www.youtube.com/watch?v=uKetjJTDSqk

For Mac OS - https://www.youtube.com/watch?v=MeeLtx_VcuI&t=174s


Installation Not Required: Overleaf

•Overleaf is a collaborative cloud-based LaTeX editor used for writing, editing and publishing scientific documents


•It is quite similar to google docx etc.


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


Let us Start with OverLeaf

Open: https://www.overleaf.com/

Login using Gmail

Create New Project

\documentclass{article}

\usepackage[utf8]{inputenc}

\title{Machine Learning for Healthcare }

\author{R.K. Mishra }

\date{July 2021}

\begin{document}

\maketitle

\section{Introduction}

\end{document}


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)


Creating a 4*3 Table


\begin{table}[h]

\caption{Summary of Conclusions from Diagnostic Tests}

\begin{tabular}{llll}

\hline

\hline

& Macropartisanship & Consumer Sentiment & Presidential Approval\\

\hline

Joint F test & $d=1$ & $d=1$ & $d=0$\\

VR test & $0<d\leq1$ & $d=1$ & $0<d\leq1$ \\

\hline

\end{tabular}

\end{table}


Example

\begin{document}

\title{Write title here}

\author{Ram Krishn Mishra and Author 2 \corauthref{cor1}}

\address{Department, BITS Pilani Dubai Campus, Dubai, UAE}

\corauth[cor1]{Corresponding author: email; Tel: +971-55-282 5679; Fax: 512-259-7395}

\date{\today}

\section{Introduction}

Latex is not a word processor. It encourage the authors to concentrate more on the content itself than the appearances. How the paragraph are created. How to end a line. How to provide in different lines.


% For new line, use \\ or \newline

Here, we can also discuss about the comments (Cnt T and Cnt U). How to comment and uncomment a line which will be very useful in debugging. Will also detail about the special characters or reserved characters.

% #$%^&_{}~\

How to provide subscript and superscript.\\

$a^{x}$ and $a_{x}$

How to provide horizontal and vertical spaces?

%\hspace{15pt} and \vspace{15pt}

How to use color text?

%\textcolor{blue}{Type in color}

How to chage font size at a particular place.

%{\tiny Tiny text}

%{\huge Huge text}

% similarly experiment with scriptsize, footnotesize, normalsize, large, Large, LARGE, huge, Huge etc

How to write in bold, italics, underline etc?

\textit{Type in italics}

\textbf{Type in bold}

\underline{Text in underline}

\underline{\textit{\textbf{Text in bold italics and underline}}}


Itemize

What is enumerate and itemize?

\begin{enumerate}

\item aaaa

\begin{enumerate}

\item [--] aaaa

\item [--] bbaa

\end{enumerate}

\item [--] aaaa

\item [--] bbaa

\item [$\ast$] bbbb

\end{enumerate}


%Also you can use

%\begin{itemize}

%\item aaaa

%\item bbaa

%\item bbbb

%\end{itemize}

%For pagebreak, \pagebreak

%For new page, \newpage


Equations

\section{Equations}

Use $Equation here$. The equation in \$ cannot be refereed in text. This is particularly used inside the text. Or we can use:

\begin{equation}

Write single equation here.

\end{equation}

% Note inside the begin equation, $$ will not be activated. Hence use only one.

% Try these commands inside the equation mode. \hat{x}, \tilde{x},\dot{x} begining. The can introduce to the symbol box of latex.

\begin{equation}

\hat{x}

\end{equation}


% Try these commands inside the equation mode. x^a, x_{b}, x^{ab}_c, \sum_{i=0}^{n},\frac{•}{•}, \frac{\partial}{\partial t}x, \frac{d}{dt}\dot{y} seperately.


\begin{equation}

\frac{d}{dt}\dot{y}

\label{ea}

\end{equation}


Also what happens if you add * in the equation? and its refered as Equation \ref{ea} and Equation \ref{et}


%%%%%%%%%%%% Practice equation %%%%%%%%%%%%%%%%%%%%%%%

\begin{equation}

ln A_{H}=-3.512+0.904 M_{w}-1.328ln\sqrt{r^2+\left[0.149.e^{(0.647 M_{w})}\right]^2}

\end{equation}


\begin{equation}

\sigma_{ln A_{H}}=

\begin{cases}

O_t= α_0+α_1 O_(t-1 )+ α_2 O_(t-2 )+ α_3 O_(t-p )+ β_1 V_(t-1) + β_2 V_(t-2) +⋯ β_3 V_(t-p)+ε_t

\end{cases}

\label{et}

\end{equation}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


All these are written inside begin and end equation. Try to explore more about equation array (eqnarray), vertical align (align).

Insert Figure

\section{Insert Figures}

How to include figures from an example.

% try the h (at same loc) ,t b, H (Puts at the same point), !t, !h, !b alignment.

\begin{figure}[!t]

\begin{center}

\includegraphics[width=0.8\columnwidth]{Figures/DEMANDS.pdf}

\end{center}

\caption{Demands.}

\label{fig:demands}

\end{figure}



Insert Table


\section{Create Table}

How to insert tables?

Two ways. \\

1. Direct way \\


\begin{center}

\begin{tabular}{|l|c|c|r|}

1 & 2 & 3 & 3 \\

5 & 6 & 7 & 3 \\ \hline

8 & 9 & 10 & 3 \\

\end{tabular}

\end{center}


2. Indirect way is to insert the table as image. For that we have to use the package graphicx


\begin{table}[h]

\begin{center}

\caption{Parameter matrix considered for the study} \includegraphics[width=1.0\columnwidth]{Tables/Prototype_model_Details.pdf}

\end{center}

\label{Tab1}

\end{table}



\bibliographystyle{ascelike}

\bibliography{REFBIB}

\end{document}