LaTeX LAB
LaTeX LAB
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.
\documentclass{article}
\usepackage{lipsum}
\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).
CODE:-
\documentclass{article}
\usepackage[x11names]{xcolor}
\newcommand{\code}[1]{{\color{blue}\texttt{#1}}}
\begin{document}
\code{int main}
\end{document}
OUTPUT:-
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
\vspace{0.8cm}
\includegraphics[width=0.4\textwidth]{university}
\Large
Department Name\\
University Name\\
Country\\
Date
\end{center}
\end{titlepage}
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...
\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:-
EX.NO: 6
DATE: 08-02-2024
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}
% bibliography
\printbibliography
\end{document}
OUTPUT:-
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:-
\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:-
\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:-
\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:-
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}
\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:-
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:-