0% found this document useful (0 votes)
10 views15 pages

LaTeX LAB

The document contains a series of exercises focused on using LaTeX for various formatting tasks, including line spacing, document alignment, page numbering styles, bibliography management, figures, tables, and equations. Each exercise includes a specific aim, code examples, and confirms successful results. The exercises are dated and sequentially numbered, showcasing different aspects of document preparation in LaTeX.

Uploaded by

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

LaTeX LAB

The document contains a series of exercises focused on using LaTeX for various formatting tasks, including line spacing, document alignment, page numbering styles, bibliography management, figures, tables, and equations. Each exercise includes a specific aim, code examples, and confirms successful results. The exercises are dated and sequentially numbered, showcasing different aspects of document preparation in LaTeX.

Uploaded by

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

EX.

NO: 1
DATE: 22-01-2024
1.Basic Operations : Line Spacing ,intent,no intent,including space after dot, single quote
and double quote,dashes.

AIM:- To find line Spacing ,intent,no intent,including space after dot, single quote and
double quote,dashes.

font size of 12 pt and a line spacing of 1.5 lines.

\documentclass{article}
\usepackage{lipsum}

\linespread{1.5} %regulate line spacing


\newcommand{\normalsize}{\fontsize{12pt}{0}\selectfont}

\begin{document}
\lipsum[0]
\end{document}
EX.NO: 2
DATE: 29-01-2024

2.Working with sample document (including centre alignment for title,.75cm after
title,nointent for content, right alignment for displaying the content writer details).

AIM:- To Working with sample document


EX.NO: 3
DATE: 01-02-2024
3. Handing different Styles and Forts in documents.

AIM:- In Latex Handing different Styles and Forts in documents.

CODE:-

\documentclass{article}
\usepackage[x11names]{xcolor}
\newcommand{\code}[1]{{\color{blue}\texttt{#1}}}
\begin{document}
\code{int main}
\end{document}

OUTPUT:-

RESULT :- We obtain the result Successfully.


EX.NO: 4
DATE: 02-02-2024

4. Handling different page numbering styles ( alphabets,roman,Arabic). Page style,set the


length of ,print the title and author details.line in the pages.

AIM:- Handling different page numbering styles ( alphabets,roman,Arabic). Page style,set the
length of ,print the title and author details.line in the pages.

CODE:-

\documentclass{article}
\begin{document}
% Insert a table of contents
\tableofcontents
\newpage
\section{Uppercase Roman}
\pagenumbering{Roman}% Capital 'R': uppercase Roman numerals
\blindtext[1]
\newpage
\section{Lowercase Roman} % lowercase Roman numerals
\pagenumbering{roman}
\blindtext[1]
\newpage
\section{Arabic numbers}
\pagenumbering{arabic} % Arabic/Indic page numbers
\blindtext[1]
\newpage
\section{Lowercase alphabetic}
\pagenumbering{alph} % Lowercase alphabetic page "numbers"
\blindtext[1]
\newpage
\section{Uppercase alphabetic}
\pagenumbering{Alph} % Uppercase alphabetic page "numbers"
\blindtext[1]
\end{document}

\begin{titlepage}
\begin{center}
\vspace*{1cm}
\Huge
\textbf{Thesis Title}

\vspace{0.5cm}
\LARGE
Thesis Subtitle
\vspace{1.5cm}

\textbf{Author Name}

\vfill

A thesis presented for the degree of\\


Doctor of Philosophy

\vspace{0.8cm}

\includegraphics[width=0.4\textwidth]{university}

\Large
Department Name\\
University Name\\
Country\\
Date

\end{center}
\end{titlepage}

RESULT :- We obtain the result Successfully.

EX.NO: 5
DATE: 05-02-2024

5.Working with documents: display table of contents, list of figures, list of tables, different
height gleves ( capter,section,subsection,paragraph),list of items.

AIM:- Working with documents: display table of contents, list of figures, list of tables,
different height gleves ( capter,section,subsection,paragraph),list of items.

EX:A

\documentclass{article}

\usepackage{graphicx}
\usepackage{array}
\graphicspath{ {./images/} }

\renewcommand{\listfigurename}{List of plots}
\renewcommand{\listtablename}{Tables}
\begin{document}
\thispagestyle{empty}
\listoffigures
\listoftables
\clearpage
\pagenumbering{arabic}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortisfacilisis...

The universe is immense and it seems to be homogeneous,


in a large scale, everywhere we look at.

\includegraphics{C:/Users/admin/Desktop/car.jpg}
There's a picture of a galaxy above
\end{document}
OUTPUT:-

EX:B
\documentclass{article}
\usepackage{blindtext}
\begin{document}
\tableofcontents
\listoffigures
\section{Wombat}
\blindtext
\section{Alpaca}
\blindtext
\begin{figure}
\caption{This is a caption for a non-existing image}
\end{figure}
\section*{Not in ToC}
\end{document}

OUTPUT:-

RESULT :- We obtain the result Successfully.

EX.NO: 6
DATE: 08-02-2024

6. Working with Bibliography.


AIM:- In Latex Working with Bibliography.
CODE:-

EX: A
\documentclass{article}
% for choosing the proper font encoding
\usepackage[T1]{fontenc}
% for proper encoding
\usepackage[utf8]{inputenc}
% enhanced font Latin Modern
\usepackage{lmodern}
% multi-language support
\usepackage[english]{babel}
% for inline and display quotations.
\usepackage[autostyle]{csquotes}

% set the default 4 inches margin to be 1 inch


\usepackage{fullpage}
% for colorful link
\usepackage[ocgcolorlinks,pdfusetitle]{hyperref}
% for doi link
\usepackage{doi}
%
\usepackage{filecontents}
\begin{filecontents}{bib}
@article{black1973poa,
title = {The pricing of options and corporate liabilities},
author = {Fishcer Black and Myron Scholes},
doi = {10.1086/260062},
journal = {Journal of Political Economy},
number = 3,
pages = {637--654},
publisher = {UChicago Press},
volume = 81,
year = 1973,
}
\end{filecontents}
% for back reference in bibliography
\usepackage[style=alphabetic,citestyle=alphabetic,backend=biber,backref=true]{biblatex}
\addbibresource{bib}
\DeclareFieldFormat[inbook]{citetitle}{#1}
\DeclareFieldFormat[inbook]{title}{#1}
\begin{document}
\title{Bibliographies with biber and biblatex}
\author{Frank the Giant Bunny}
\date{August 27, 2014}
\maketitle

Nunc auctor nunc in nisi suscipit tempus \cite{black1973poa}.

% bibliography
\printbibliography
\end{document}

OUTPUT:-

RESULT :- We obtain the result Successfully.


EX.NO: 7
DATE: 09-02-2024

7. Working with Figures.

AIM:- In Latex Working with Figures.

CODE:-

\documentclass{article}
\usepackage{float}
\usepackage{graphicx}
\begin{document}
\begin{figure}[H]
\centering
\includegraphics[scale=1.5]{C:/Users/Admin/Desktop/car.jpg}
\end{figure}
\end{document}
OUTPUT:-

RESULT :- We obtain the result Successfully.


EX.NO: 8
DATE: 12-02-2024

8.Working with simple form of tables.


AIM:- In Latex Working with simple form of tables.
CODE:-

\documentclass{article}
\begin{document}
\begin{table}[h!]
\begin{center}
\caption{Your first table.}
\label{tab:table1}
\begin{tabular}{l|c|r} % <-- Alignments: 1st column left, 2nd middle and 3rd right, with
vertical lines in between
\textbf{Value 1} & \textbf{Value 2} & \textbf{Value 3}\\
$\alpha$ & $\beta$ & $\gamma$ \\
\hline
1 & 1110.1 & a\\
2 & 10.1 & b\\
3 & 23.113231 & c\\
\end{tabular}
\end{center}
\end{table}
\end{document}

OUTPUT:-

RESULT :- We obtain the result Successfully.


EX.NO: 9
DATE: 15-02-2024

9.Working with Table multiple columns.


AIM:- In Latex Working with Table multiple columns.
CODE:-
EX: A
\documentclass{article}
\usepackage{blindtext}
\usepackage{multicol}
\setlength{\columnsep}{1cm}
\title{Second multicols Demo}
\author{Overleaf}
\date{April 2021}

\begin{document}
\maketitle

\begin{multicols}{2}
[
\section{First Section}
All human things are subject to decay. And when fate summons,
Monarchs must obey.
]
\blindtext\blindtext
\end{multicols}

\end{document}
OUTPUT:-

RESULT :- We obtain the result Successfully.


EX:B

\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{tabular}{ |p{3cm}||p{3cm}|p{3cm}|p{3cm}| }
\hline
\multicolumn{4}{|c|}{Country List} \\
\hline
Country Name or Area Name& ISO ALPHA 2 Code &ISO ALPHA 3 Code&ISO numeric
Code\\
\hline
Afghanistan & AF &AFG& 004\\
Aland Islands& AX & ALA &248\\
Albania &AL & ALB& 008\\
Algeria &DZ & DZA& 012\\
American Samoa& AS & ASM&016\\
Andorra& AD & AND &020\\
Angola& AO & AGO&024\\
\hline
\end{tabular}
\end{document}
OUTPUT:-

RESULT :- We obtain the result Successfully.


EX.NO: 10
DATE: 16-02-2024

10.Working with Equations.


AIM:- In Latex Working with Equations.
CODE:-

EX:A

\documentclass{article}
\begin{document}

\noindent Standard \LaTeX{} practice is to write inline math by enclosing it between \verb|\
(...\)|:

\begin{quote}
In physics, the mass-energy equivalence is stated
by the equation \(E=mc^2\), discovered in 1905 by Albert Einstein.
\end{quote}

\noindent Instead if writing (enclosing) inline math between \verb|\(...\)| you can use \texttt{\
$...\$} to achieve the same result:

\begin{quote}
In physics, the mass-energy equivalence is stated
by the equation $E=mc^2$, discovered in 1905 by Albert Einstein.
\end{quote}

\noindent Or, you can use \verb|\begin{math}...\end{math}|:

\begin{quote}
In physics, the mass-energy equivalence is stated
by the equation \begin{math}E=mc^2\end{math}, discovered in 1905 by Albert Einstein.
\end{quote}
\end{document}

OUTPUT:-

RESULT :- We obtain the result Successfully.


\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\label{eq:sedov}
R(t)= A \left(\frac{E_0}{\rho_0}\right)^{1/5}t^{2/5}
\end{equation}
\end{document}

OUTPUT:-

EX:B
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
f(x) &= x^2\\
g(x) &= \frac{1}{x}\\
F(x) &= \int^a_b \frac{1}{3}x^3
\end{align*}
\end{document}

OUTPUT:-

RESULT :- We obtain the result Successfully.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy