0% found this document useful (0 votes)
4 views13 pages

Late XXX

The document outlines various LaTeX programs aimed at creating different types of documents, including simple articles, abstracts, title pages, certificates, tables, side-by-side figures, mathematical equations, and algorithms. Each program includes a specific aim, source code, and a sample output. The programs demonstrate the versatility of LaTeX for academic and professional document preparation.

Uploaded by

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

Late XXX

The document outlines various LaTeX programs aimed at creating different types of documents, including simple articles, abstracts, title pages, certificates, tables, side-by-side figures, mathematical equations, and algorithms. Each program includes a specific aim, source code, and a sample output. The programs demonstrate the versatility of LaTeX for academic and professional document preparation.

Uploaded by

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

Program 1:

AIM: Develop a LaTeX script to create a simple document that consists of 2 sections [Section1,
Section2], and a paragraph with dummy text in each section. And also include header [title of
document] and footer [institute name, page number] in the document.

Source code:

\documentclass{article}
\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[l]{header}
\fancyfoot[L]{Dept. of ISE, RNSIT}
\fancyfoot[R]{\thepage}
\pagestyle{fancy}
\begin{document}

\section{Section 1}
This is a paragraph of text in Section 1.

\section{Section 2}
This is another paragraph of text in Section 2.

\end{document}

Sample Output:

1
Program 2:
AIM: Develop a LaTeX script to create a document that displays the sample Abstract/Summary

\documentclass{article}
\begin{document}

\title{Sample Abstract}
\author{Author Name}
\date{}
\maketitle

\section*{Abstract}
This is a sample abstract.

\end{document}
Sample Output:

2
Program 3:
AIM: Develop a LaTeX script to create a simple title page of the VTU project Report [Use
suitable Logos and text formatting]
Source Code:
\documentclass{article}
\usepackage{graphicx} % for including images
\usepackage{geometry} % for setting page dimensions
\usepackage{setspace} % for setting line spacing

% Define page dimensions


\geometry{a4paper, margin=1in}

\begin{document}

\begin{titlepage}
\centering

% VTU Logo
\includegraphics[width=0.3\textwidth]{vtu_logo.png}
\vspace{0.5cm}

% Title
\textbf{\LARGE Project Report Title}
\vspace{1cm}

% Student Information
\textbf{By}\\
Your Name\\
USN: 1ABCD23\\
Branch: Information Science\\
\vspace{1cm}

% Guide Information
\textbf{Guide:}\\
Guide Name\\
Designation\\
Department of Information Science\\
\vspace{1.5cm}

% Institute Details
\textbf{Department of Information Science and Engineering}\\
College Name\\
Location\\
\vspace{1cm}

% Date
\textbf{Date: \today} % Use today's date
\end{titlepage}

\end{document}

3
Sample Output:

Program 4:
AIM: Develop a LaTeX script to create the Certificate Page of the Report [Use suitable
commands to leave the blank spaces for user entry]

Source Code:
\documentclass[a4paper]{article}
\usepackage{graphicx} % for including images
\usepackage{geometry} % for setting page dimensions
\usepackage{setspace} % for setting line spacing

% Define page dimensions


\geometry{margin=1in}

\begin{document}

\thispagestyle{empty} % Remove page number from the certificate page

% Title and Logo


\begin{center}
\includegraphics[width=0.3\textwidth]{vtu_logo.png} % University logo

4
\vspace{1cm}

\textbf{\Large Certificate of Completion}


\vspace{0.5cm}
\end{center}

% Certificate Text
\noindent
This is to certify that \underline{\hspace{6cm}} (Registration Number:
\underline{\hspace{4cm}}) has successfully completed the course on
\underline{\hspace{8cm}} conducted by the Department of \underline{\hspace{6cm}} at
\underline{\hspace{8cm}}.

\vspace{1cm}

% Date
\noindent
Date: \underline{\hspace{4cm}}

\vfill

% Signature
\begin{flushright}
\textbf{Signature:} \underline{\hspace{6cm}}
\end{flushright}

\end{document}

Sample Output:

5
Program 5 :
AIM: Develop a LaTeX script to create a document that contains the following table with proper labels.

Source Code:

\documentclass{article}
\usepackage{array} % for custom column formatting
\usepackage{booktabs} % for better table rules
\usepackage{caption} % for customizing table captions

\begin{document}

\section*{Student Performance Table}

\begin{table}[h]
\centering
\caption{Student Marks Summary}
\label{tab:student-marks}
\begin{tabular}{|c|c|l|c|c|c|}
\hline
\textbf{S.No} & \textbf{USN} & \textbf{Student Name} &
\textbf{Subject1} & \textbf{Subject2} & \textbf{Subject3} \\
\hline
1 & 4XX22XX001 & Name 1 & 79 & 60 & 90 \\
2 & 4XX22XX002 & Name 2 & 78 & 45 & 98 \\
3 & 4XX22XX003 & Name 3 & 36 & 75 & 59 \\
\hline
\end{tabular}
\end{table}

\end{document}

Sample Output:

6
Program 6:
AIM: Develop a LaTeX script to include the side-by-side graphics/pictures/figures in the
document by using the subgraph concept

Source Code:

\documentclass{article}
\usepackage{graphicx} % for including graphics
\usepackage{subcaption} % for subfigures

\begin{document}

\section{Side-by-Side Subfigures}

\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.4\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-a} %
Include first image
\caption{Subfigure A}
\label{fig:subfig-a}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.4\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-b} %
Include second image
\caption{Subfigure B}
\label{fig:subfig-b}
\end{subfigure}
\caption{Two Side-by-Side Subfigures}
\label{fig:side-by-side}
\end{figure}

\end{document}
Sample Output:

7
Program 7:
AIM: Develop a LaTeX script to create a document that consists of the following two
mathematical equations

Source Code:
\documentclass{article}
\usepackage{amsmath} % This package is required for the 'aligned' environment
\begin{document}
\title{Mathematical Equations}
\date{}
\maketitle \[
\begin{aligned} % Use the 'align' environment to align equations properly % Left side: equations ab out
'x' \begin{split}
x &= \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \\
&= \frac{-2 \pm \sqrt{2^2 - 4 \cdot 1 \cdot (-8)}}{2 \cdot 1} \\
&= \frac{-2 \pm \sqrt{4 + 32}}{2} \end{split}
\quad \quad \quad & % Right side: equations about 'phi_{\sigma}^{\lambda} A_t'
\begin{split}
\varphi_{\sigma}^{\lambda} A_{t} &= \sum_{\pi \in C_{t}} \operatorname{sgn}(\pi)
\varphi_{\sigma}^{\lambda} \varphi_{\pi}^{\lambda} \notag \\
&= \sum_{\tau \in C_{\sigma t}} \operatorname{sgn}(\pi^{-1} \tau \sigma)
\varphi_{\sigma}^{\lambda} \varphi_{\pi^{-1} \tau \sigma}^{\lambda} \notag \\
&= A_{\sigma t} \varphi_{\sigma}^{\lambda} \end{split} \end{aligned}
\]
\end{document}

Sample Output:

8
Program 8:
AIM: Develop a LaTeX script to demonstrate the presentation of Numbered theorems,
definitions, corollaries, and lemmas in the document
Source code:
\documentclass{article}
\usepackage{amsthm}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}[theorem]{Definition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}

\begin{document}

\section{Mathematical Results}

\begin{theorem}
This is a theorem statement.
\end{theorem}

\begin{definition}
This is a theorem statement
\end{definition}

\begin{corollary}
This is a theorem statement
\end{corollary}

\begin{lemma}
This is a theorem statement
\end{lemma}

\begin{theorem}[Fundamental Theorem of Arithmetic]


Every positive integer greater than 1 can be uniquely factorized into prime factors.
\end{theorem}
\label{thm:fundamental}

As stated in Theorem \ref{thm:fundamental}, every positive integer greater than


1 can be uniquely factorized into prime factors.

\end{document}
Sample Output:

9
Program 9:
AIM: Develop a LaTeX script to create a document that consists of two paragraphs with a
minimum of 10 citations in it and display the reference in the section

.tex file
\documentclass{article}
\usepackage{cite} % Use cite instead of natbib for IEEE style

\begin{document}

\title{Document that Consists of Two Paragraphs with a Minimum of 10 Citations and Displaying the References}
\date{}
\maketitle

\paragraph{Paragraph 1}
Paragraph 1 has the details of \cite{(Article code), (Article code), (Article code)}, and also \cite{author4, author5}.

\paragraph{Paragraph 2}
Paragraph 2 has the details of \cite{(Article code), (Article code), (Article code)}, and also \cite{author9,
author10}.

\bibliographystyle{IEEEtran} % IEEE bibliography style


\bibliography{bib file name} % assumes your .bib file is named references.bib

\end{document}

.bib file
Copy and past from website

Sample Output:

10
Program 10:
AIM: Develop a LaTeX script to design a simple tree diagram or hierarchical structure in the
document with appropriate labels using the Tikz library
Source Code:
\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[
level 1/.style={level distance=1.5cm, sibling distance=4cm},
level 2/.style={level distance=1.5cm, sibling distance=2cm},
level 3/.style={level distance=1.5cm, sibling distance=1.5cm}
]

\node {Root}
child { node {Child 1}
child { node {Grandchild 1} }
child { node {Grandchild 2} }
}
child { node {Child 2}
child { node {Grandchild 3} }
child { node {Grandchild 4} }
}
child { node {Child 3}
child { node {Grandchild 5} }
child { node {Grandchild 6} }
};

\end{tikzpicture}

\end{document}
Sample Output:

11
Program 11:
AIM: Develop a LaTeX script to present an algorithm in the document using
algorithm/algorithmic/algorithm2e Library
Source Code:

\documentclass{article}
\usepackage[ruled, linesnumbered]{algorithm2e}

\begin{document}

\begin{algorithm}[H]
\SetAlgoLined
\SetKwFunction{LinearSearch}{LinearSearch}
\SetKwProg{Fn}{Function}{:}{}
\Fn{\LinearSearch{$arr, n, key$}}{
\For{$i \gets 0$ \KwTo $n-1$}{
\If{$arr[i] = key$}{
\KwRet $i$\;
}
}
\KwRet $-1$\;
}
\caption{Linear Search Algorithm}
\label{algo:linearsearch}
\end{algorithm}

\end{document}
Sample Output:

Program 12:
12
AIM: Develop a LaTeX script to create a simple report and article by using suitable commands
and formats of user Choice.
Source Code:
\documentclass{article}

\title{Sample Report}
\author{Author Name}
\date{\today}

\begin{document}

\maketitle

\section{Introduction}

This is the introduction section of the report.

\section{Methodology}

Here we explain the methodology used.

\section{Results}

The results of our study are presented here.

\section{Conclusion}

In conclusion, we summarize our findings.

\end{document}
Sample Output:

13

You might also like