You are on page 1of 6

NARULA INSTITUTE OF TECHNOLOGY

81, NILGUNG ROAD, AGARPARA, KOLKTA-700109

Workshop on
A
“L T E X: The Documentation Tool”

A bit about how LaTeX works:


LaTeX is not like a word processor. You create LaTeX documents by first creating a text file, called the LaTeX source, which contains
your document text mixed in with commands that instruct LaTeX how you will want the text to appear. To produce the final document, you must
have LaTeX build it based on the source. If the source is free of errors, LaTeX uses it to create a second file, usually a PDF, which is your final,
fully-formatted document.

Exercise – 1
The simplest LaTeX source:

\documentclass{article}
\begin{document}
My Name is sumanta kundu
\end{document}

Exercise – 2
The simplest LaTeX source with title:

\documentclass[12pt, a4paper]{article}
\title{A \LaTeX{} Document}
\author {sumanta kundu \\ Narula Institute Of Technology}
\date{\today}
\begin{document}
\maketitle \end{document}

Exercise – 3
The simplest LaTeX source with Footnote:

\documentclass[12pt, a4paper]{article}
\title{A \LaTeX{} Document}
\author {sumanta kundu \\ Narula Institute Of Technoloy}
\date{\today}
\begin{document}
\maketitle
Footnotes\footnote{A note at the page bottom.} are essential in the \LaTeX forum\footnote{No idea why!}.
\end{document}

4
with section:
Exercise –
The simplest LaTeX source

\begin{document}
\section*{name}
\section{name}
\end{document}

Exercise – 5
The simplest LaTeX source with section and subsection:

\begin{document}
\section{Dividing the document}
\subsection{Example}
In this example, we show how subsections and subsubsections are produced (there are no subsubsubsections). Note how the subsections are
numbered.
\subsubsection{Subexample}
Did you note that subsubsections are not numbered? This is so in the \texttt{book} and \texttt{report} classes. In the \texttt{article} class
they too have numbers. (Can you figure out why?)
\paragraph{Note}
Paragraphs and subparagraphs do not have numbers. And they have \textit{run-in} headings.
Though named ‘‘paragraph’’ we can have several paragraphs of text within this.
\subparagraph{Subnote}
Subparagraphs have an additional indentation too.
And they can also contain more than one paragraph of text.
\end{document}

Exercise – 6
The simplest LaTeX source with chapter, section and subsection:

\begin{document}
\chapter{The Document}
\section{Dividing the document}
\subsection{Example}
In this example, we show how subsections and subsubsections are produced (there are no subsubsubsections). Note how the subsections are
numbered.
\subsubsection{Subexample}
Did you note that subsubsections are not numbered? This is so in the \texttt{book} and \texttt{report} classes. In the \texttt{article} class
they too have numbers. (Can you figure out why?)

7
with table of contents:

\documentclass[11pt]{report}
Exercise –
The simplest LaTeX source
\setcounter{tocdepth}{5}
\begin{document}
\tableofcontents
\chapter{Dummy chapter}
\section{Dummy section}
\subsection{Dummy subsection}
\subsubsection{Dummy subsubsection}
\paragraph{Dummy paragraph}
\end{document}

Exercise – 8
The simplest LaTeX source with subscripts and superscripts:

\documentclass[12pt, a4paper]{article}
\usepackage{amsmath}
\begin{document}
We also can make subscripts $A_{x}$, $A_{xy}$ and superscripts, $e^x$, $e^{x^2}$, and $e^{a^b}$.
\end{document}

Exercise – 9
The simplest LaTeX source with special symbols:

\begin{document}
It is almost as easy as $\pi$. See how easy it is to make special symbols such as $\alpha$, $\beta$, $\gamma$, $\delta$, $\sin x$, $\hbar$,
$\lambda$, $\ldots$ \end{document}

Exercise – 10
The simplest LaTeX source with inline and displayed mathematical terms:

\begin{document}
Inline $x=\frac{1+y}{1+2z^2}$
Displayed $$x=\frac{1+y}{1+2z^2}$$
Another example $$\int_0^\infty e^{-x^2} dx=\frac{\sqrt{\pi}}{2}$$
Fraction
$$ \frac{1}{\displaystyle 1+
\frac{1}{\displaystyle 2+
\frac{1}{\displaystyle 3+x}}} +
\frac{1}{1+\frac{1}{2+\frac{1}{3+x}}} $$
\end{document}

11
with equation:

\begin{document}
Exercise –
The simplest LaTeX source
\section{Equations}
Let us see how easy it is to write equations.
\begin{equation}
\Delta =\sum_{i=1}^N w_i (x_i - \bar{x})^2.
\end{equation}
It is a good idea to number equations, but we can have a equation without a number by writing
\begin{equation}
P(x) = \frac{x - a}{b - a}, \nonumber
\end{equation} and
\begin{equation}
g = \frac{1}{2} \sqrt{2\pi}. \nonumber
\end{equation}
\end{document}

Exercise – 12
The simplest LaTeX source with equation and label:

\begin{document}
\begin{equation} x=y+3 \label{eq:xdef}
\end{equation}
In equation (\ref{eq:xdef}) we saw $\dots$
\end{document}

Exercise – 13
The simplest LaTeX source with equation array:

\begin{document} \begin{eqnarray}
y &=& x^4 + 4 \nonumber \\
&=& (x^2+2)^2 -4x^2 \nonumber \\
&\le& (x^2+2)^2
\end{eqnarray} \begin{eqnarray*} y
&=& x^4 + 4 \\
&=& (x^2+2)^2 -4x^2 \\
&\le& (x^2+2)^2
\end{eqnarray*}
\end{document}

14
with enumerate:

\begin{document}
In the classical \emph{syllogism}
\begin{enumerate}
Exercise –
The simplest LaTeX source
\item All men are mortal.\label{pre1}
\item Socrates is a man.\label{pre2}
\item So Socrates is a mortal.\label{con}
\end{enumerate}
Statements (\ref{pre1}) and (\ref{pre2}) are the \emph{premises} and statement (\ref{con}) is the conclusion.
\end{document}

Exercise – 15
The simplest LaTeX source with itemize:

\begin{document}
One should keep the following in mind when using \TeX
\begin{itemize}
\item \TeX\ is a typesetting language and not a word processor
\item \TeX\ is a program and and not an application
\item Theres is no meaning in comparing \TeX\ to a word processor, since the design purposes are different
\end{itemize}
Being a program, \TeX\ offers a high degree of flexibility.
\end{document}

Exercise – 16
The simplest LaTeX source with table:

\documentclass[12pt, a4paper]{article}
\begin{document}
\begin{center}
\begin{tabular}{ |c|c|c|c| }
\hline
col1 & col2 & col3 \\
\hline
col1 & col2 & col3 \\
\hline
col1 & col2 & col3 \\
\hline
\end{tabular}
\end{center}
\end{document}

17
with Figure:

\documentclass{article}
\usepackage{graphicx}
Exercise –
The simplest LaTeX source
\begin{document}
\begin{figure}
\centering
\includegraphics[width=3.0in]{ifet}
\caption{Simulation Results}
\label{simulationfigure}
\end{figure} \end{document}

Exercise – 18
The simplest LaTeX source with Figure:

\documentclass[12pt]{article}
\usepackage{amssymb}
\begin{document}
\title{A \LaTeX{} Document}
\author {T. Soupramanien \\ IFET College of Engineering}
\date{\today}
\maketitle

\begin{abstract}
Text of abstract
\end{abstract}

\section{Introduction} \label{Intro}
LaTeX is not like a word processor. You create LaTeX documents by first creating a text file, called the LaTeX source \cite{AAA}, which contains
your document text mixed in with commands that instruct LaTeX how you will want the text to appear.

\begin{thebibliography}{00}
\bibitem{AAA} C. Ramachandran, T. Soupramanien, {\it Estimate on the second Hankel determinant for generalised Srivastava linear operator
whose derivative has a positive real part} International Journal of Math. Analysis,
Vol. 9, 2015, 917 - 926
\end{thebibliography}
\end{document}

You might also like