Technical Writing using LaTeX – BCM456D

In this blog post, you will find solutions for the Technical Writing using LaTeX (BCM456D) course work for the IV semester of VTU university. To follow along, you will need to have up a machine running any flavour of GNU/Linux OS. We recommend using the Texmaker LaTeX editor for this lab. Alternatively you can create a account on Overleaf and run these solutions online in your browser. The solutions have been tested on Ubuntu 22.04 OS. You can find the lab syllabus on the university’s website or here below.

All these solutions have been maintained at the following git repository shown below. If you want to contribute send me a PR.

https://gitlab.com/lab_manuals/current/iv-semester/bcs456d_technical_writing_using_latex

Installation

To install the LaTeX typesetting system on Ubuntu 22.04 systems, run the following command which installs all the packages required.

$ sudo apt install texlive-full

Next we will install the LaTeX editor. There are several editors available but Texmaker is the best in my opinion. You can again install it via the following command.

$ sudo apt install texmaker

This is how the TexMaker editor looks after launching it.

For Windows and other systems, you can get LaTeX editing environment set up by referring to this page.

https://www.latex-project.org/get

If you want to run latex from your browser, you can create a account on Overleaf and run these solutions online in your browser.

After getting the necessary development environment setup, Now lets focus on the solutions. You can go to the appropriate programs by clicking on the links below.


Question 1

Simple Document

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.

Latex Code


\documentclass[12pt,a4paper]{article}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{fancyhdr}
\begin{document}
% Set the page style to "fancy"...
\pagestyle{fancy}
\title{GNU Project}

\fancyhf{} % clear existing header/footer entries
% We don't need to specify the O coordinate
\fancyhead{} % clear all header fields
\fancyhead[R]{GNU Project}
\fancyfoot{}  % clear all footer fields
\fancyfoot[LO,CE]{Siddaganga Institute of Technology}

\fancyfoot[R]{\thepage}
\maketitle




\section{What is GNU?}
GNU is an operating system that is free software—that is, it respects users' freedom. The GNU operating system consists of GNU packages (programs specifically released by the GNU Project) as well as free software released by third parties. The development of GNU made it possible to use a computer without software that would trample your freedom.

\section{More about GNU}
GNU is a Unix-like operating system. That means it is a collection of many programs: applications, libraries, developer tools, even games. The development of GNU, started in January 1984, is known as the GNU Project. Many of the programs in GNU are released under the auspices of the GNU Project; those we call GNU packages. \\

The name "GNU" is a recursive acronym for "GNU's Not Unix." "GNU" is pronounced g'noo, as one syllable, like saying "grew" but replacing the r with n. \\

The program in a Unix-like system that allocates machine resources and talks to the hardware is called the "kernel." GNU is typically used with a kernel called Linux. This combination is the GNU/Linux operating system. GNU/Linux is used by millions, though many call it "Linux" by mistake.

\section{What is the Free Software Movement?}
The free software movement campaigns to win for the users of computing the freedom that comes from free software. Free software puts its users in control of their own computing. Nonfree software puts its users under the power of the software's developer. \\

\section{What is Free Software?}
\textbf{Free software means the users have the freedom to run, copy, distribute, study, change and improve the software.}

Free software is a matter of liberty, not price. To understand the concept, you should think of "free" as in "free speech," not as in "free beer". More precisely, free software means users of a program have the four essential freedoms:

\begin{itemize}
\item The freedom to run the program as you wish, for any purpose (freedom 0).
\item The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.
\item The freedom to redistribute copies so you can help others (freedom 2).
\item The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.

Developments in technology and network use have made these freedoms even more important now than they were in 1983. Nowadays the free software movement goes far beyond developing the GNU system. 

\end{itemize}


\end{document}

The below video shows the step by step process of how to code the above program.

Output


Question 2

Abstract/Summary

Develop a LaTeX script to create a document that displays the sample Abstract/Summary

LaTeX Code

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=3cm,right=3cm,top=2cm,bottom=2cm]{geometry}
%\usepackage{lipsum}

\begin{document}
\thispagestyle{plain}

\begin{center}
    \Large
    \textbf{Thesis Title}
        
    \vspace{0.4cm}
    \large
    Thesis Subtitle
        
    \vspace{0.4cm}
    \textbf{Author Name}
       
    \vspace{0.9cm}
    \textbf{Abstract}
\end{center}
%\lipsum[1]

News has become an important medium for everyone to stay aware and updated with the latest happenings in the world. It is important to note that in recent times with the rise in social media the amount of fake news has surged to dangerous levels. Fake news causes a lot of economic and social problems. It also gets difficult to trace back the source of fake news and hold someone accountable in order to curb it down. It is important to have a mechanism which evicts out fake news and contains only authentic news.

Fake news causes a lot of economic and social problems. It also gets difficult to trace back the source of fake news and hold someone accountable in order to curb it down. It is important to have a mechanism whichevicts out fake news and contains only authentic news. With digitization, there has been a drastic increase in the usage of some of the popular social media sites such as Twitter, Facebook, Yahoo, YouTube as a medium of spreading news. There is very little check on the spreading of fake news. Accountability, in terms of how authentic the news is, is very less.

Our project aims to create a platform that runs on a blockchain network. News based media will be shared across this network. The origin of data and every user interaction will be recorded and get updated in the decentralized ledger and since it is in the blockchain, it remains immutable and nearly immune to any cyber threat.

The platform will be highly intuitive and interactive for users to browse through different sections of news. Users can view articles, blogs, headlines and other news-based content. Users can also push their own content on the network. The platform also allows the users to manually rate a piece of news based on its authenticity.
\end{document}

The below video shows the step by step process of how to code the above program.

Output


Question 3

Title page of the VTU Project Report

Develop a LaTeX script to create a simple title page of the VTU project Report [Use suitable Logos and text formatting]

LaTeX Code

This Project Title page has been composed using two tex files. FrontPage.tex contains the layout setting and Title.texcontains the content information.

FrontPage.tex

%This template was written by Prabodh C P

% Memoir is more versatile than other document classes like article, report, book etc,
\documentclass[11pt,a4paper,oneside]{memoir}

% To handle image, like scaling
\usepackage{graphicx}
\usepackage[english]{babel}

% Used for modifying page layout
\usepackage[a4paper,right=1in]{geometry}

% For referencing contents,figure,table...
\usepackage[hidelinks]{hyperref}

% For including source code
\usepackage{listings}

% For using text colors
\usepackage{color}

% To attach pdf files
\usepackage{pdfpages}

% Document starts here
\begin{document}

\newlength{\toptafiddle}
\newlength{\bottafiddle}
\definecolor{therablue}{RGB}{41, 134, 230}

\include{Title} % Include Title Page, (i.e. title.tex)

% Page layout according to VTU specification
% Right: 1.25in, Left: 1in, Top & Bottom: 0.75in in each page

\setlength{\oddsidemargin}{0.25in} % Left side margin {1in by default + 0.25in}

% Header specification
\setlength{\headheight}{\onelineskip}
\setlength{\headsep}{6pt}
\setlength{\topmargin}{-0.25in}

% Footer specification
\setlength{\footskip}{\onelineskip}
\setlength{\footnotesep}{\onelineskip}

% A4 paper height = 11.69in
% thus 11.69in - 9.67in - 1in (top + header) is approx 0.75in left for bottom
\setlength{\textheight}{9.67in}

\brokenpenalty=10000 % Disallow page breaks at hyphens

\OnehalfSpacing % Line Spacing set to 1.5

%\pagenumbering{roman}

%\include{Certificate}

\pagestyle{plain}

\end{document}

Title.tex

%This template was written by Prabodh C P

\begin{titlingpage}

\thispagestyle{empty}
\centering

\setlength{\toptafiddle}{1in}
\setlength{\bottafiddle}{1in}

\vspace*{-0.75in}
\enlargethispage{\toptafiddle}

\begin{LARGE}
\textbf{Siddaganga Institute of Technology, Tumakuru}\\
\end{LARGE}

\begin{small}

(An Autonomous institution affiliated to Visvesvaraya Technological University, Belagavi,\\ Approved by AICTE, New Delhi, Accredited by NAAC and ISO 9001:2015 certified)
\end{small}

\begin{figure}[h]
    \centering
    \includegraphics[height=4cm]{images/vtu.png}
\end{figure}

\vfill
\Huge{\textbf{\textcolor{therablue}{Employee Emotion Detection}}}\\
\Large{\textbf{Keeping Your Employees Happy}}
\vfill

\begin{small}
A project report submitted to \\Visvesvaraya Technological University. Belgaum, Karnataka \\
\textit{in the partial fulfillment of the requirements for the award of degree of} \\
\end{small}
\begin{normalsize}
\textbf{\textit{Bachelor of Engineering }} \\
in \\
\textbf{\textit{Computer Science and Engineering}} \\
by \\
\end{normalsize}
\vfill
\begin{tabular}{ccc}
\textbf{Student-1 }&  & \textbf{1SI12CS001}\\
\textbf{Student-2 }&  & \textbf{1SI12CS002}\\
\textbf{Student-3 }&  & \textbf{1SI12CS003}\\
\textbf{Student-4 }&  & \textbf{1SI12CS004}\\
\end{tabular}
\vfill

{\normalsize under the guidance of}\\
\Large{\textbf{Prof. ABC}}\\
Assistant Professor\\
\vfill
\begin{figure}[h]
    \centering
    \includegraphics[height=3.7cm]{images/sit.png}
\end{figure}

\textbf{Department of Computer Science \& Engineering}\\
{\normalsize (Program Accredited by NBA)} \\
\textbf{Siddaganga Institute of Technology}\\

\begin{normalsize}
B.H Road, Tumakuru-572 103, Karnataka, India.\\
Web : www.sit.ac.in \\
\end{normalsize}

\textbf{June, 2024}
\end{titlingpage}

Output


For those who are interested to see and understand how to typeset your entire project report in LaTeX you can refer to the following video on YouTube.

Question 4

Certificate Page

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

LaTeX Code

This Project Title page has been composed using two tex files. FrontPage.tex contains the layout setting and Certificate.texcontains the content information.

FrontPage.tex

%This template was written by Prabodh C P

% Memoir is more versatile than other document classes like article, report, book etc,
\documentclass[11pt,a4paper,oneside]{memoir}

% To handle image, like scaling
\usepackage{graphicx}
\usepackage[english]{babel}

% Used for modifying page layout
\usepackage[a4paper,right=1in]{geometry}

% For referencing contents,figure,table...
\usepackage[hidelinks]{hyperref}

% For including source code
\usepackage{listings}

% For using text colors
\usepackage{color}

% To attach pdf files
\usepackage{pdfpages}

% Document starts here
\begin{document}

\newlength{\toptafiddle}
\newlength{\bottafiddle}
\definecolor{therablue}{RGB}{41, 134, 230}

%\include{Title} % Include Title Page, (i.e. title.tex)

% Page layout according to VTU specification
% Right: 1.25in, Left: 1in, Top & Bottom: 0.75in in each page

\setlength{\oddsidemargin}{0.25in} % Left side margin {1in by default + 0.25in}

% Header specification
\setlength{\headheight}{\onelineskip}
\setlength{\headsep}{6pt}
\setlength{\topmargin}{-0.25in}

% Footer specification
\setlength{\footskip}{\onelineskip}
\setlength{\footnotesep}{\onelineskip}

% A4 paper height = 11.69in
% thus 11.69in - 9.67in - 1in (top + header) is approx 0.75in left for bottom
\setlength{\textheight}{9.67in}

\brokenpenalty=10000 % Disallow page breaks at hyphens

\OnehalfSpacing % Line Spacing set to 1.5

%\pagenumbering{roman}

\include{Certificate}

\pagestyle{plain}

\end{document}

Certificate.tex

%This template was written by Prabodh C P
\thispagestyle{empty}

\setlength{\toptafiddle}{1in}
\setlength{\bottafiddle}{1in}

\vspace*{-0.75in}
\enlargethispage{\toptafiddle}

\begin{center}

\begin{Large}
\textbf{Department of Computer Science and Engineering} \\
\end{Large}

\begin{Large}
\textbf{Siddaganga Institute of Technology, Tumakuru}\\
\end{Large}

%\hspace{0.1cm}\\
\begin{small}

(An Autonomous institution affiliated to Visvesvaraya Technological University, Belagavi,\\ Approved by AICTE, New Delhi, Accredited by NAAC and ISO 9001:2015 certified)
\end{small}
\vspace{0.2cm}

\begin{figure}[h]
    \centering
    \includegraphics[height=4cm]{images/vtu.png}
    \hspace{0.1\textwidth}
    \includegraphics[height=3.7cm]{images/sit.png}
\end{figure}

\Huge{Certificate}
\end{center}

\begin{large}
This is to certify that the Project Report entitled 
\textbf{"My Wonderful Project"} 
is a bonafide work carried out by 
\textbf{Student-1(1SI23CS001)}, 
\textbf{Student-2(1SI23CS002)}, 
\textbf{Student-3(1SI23CS003)} 
and 
\textbf{Student-4(1SI23CS004)} 
in the partial fulfillment of the requirement for the award of 
the degree of Bachelor of Engineering in Computer Science and Engineering, 
Visvesvaraya Technological University, Belagavi during the year 20XX-XX. 
It is certified that all corrections/suggestions indicated for the internal 
assessment have been incorporated in the report.The project report has been 
approved as it satisfies the academic requirements in respect of project 
work prescribed for the Bachelor of Engineering Degree.
\end{large}
\vfill
\vfill
\vfill

\begin{table}[h!]
\centering
\begin{tabular}{cccccccccc}
.................................&&&&&&&&& .................................\\
\textbf{{\footnotesize Guide}} &&&&&&&&&\textbf{{\footnotesize Group Convener}}\\
\textbf{Prof. John Doe}&&&&&&&&& \textbf{Dr. John Doe} \\
\textbf{{\footnotesize Asst. Professor}} &&&&&&&&& \textbf{{\footnotesize Professor}}\\
\textbf{{\footnotesize Dept of CSE, SIT}} &&&&&&&&& \textbf{{\footnotesize Dept of CSE, SIT}}\\
\\
\\
.................................&&&&&&&&& .................................\\
\textbf{Dr. John Doe} &&&&&&&&&  \textbf{Dr. John Doe} \\ 
\textbf{{\footnotesize Professor and Head}} &&&&&&&&&  \textbf{{\footnotesize Principal}} \\
\textbf{{\footnotesize Dept of CSE, SIT}} &&&&&&&&&  \textbf{{\footnotesize SIT, Tumakuru}}\\

\end{tabular} 

\end{table}
Name of the Examiners	\hfill	Signature with Date
\begin{small}
\begin{enumerate}
\item Prof.
\item Prof.
\end{enumerate}
\end{small}

Output


Question 5

Tables in LaTeX

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

LaTeX Code

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{multirow}
\begin{document}

\begin{center}
\begin{Large}
\textbf{Table Demo}
\end{Large}
\end{center}

\section*{Marks Table}

\begin{tabular}{|c|c|c|c|c|c|}
\hline 
\multirow{2}{*}{S.No} & \multirow{2}{*}{USN} & \multirow{2}{*}{Student Name} & \multicolumn{3}{c|}{Marks} \\ 
\cline{4-6} 
 &  &  & Subject1 & Subject2 & Subject3 \\ 
\hline 
1 & 4XX22XX001 & Name 1 & 88 & 77 & 97 \\ 
\hline 
2 & 4XX22XX002 & Name 2 & 74 & 78 & 66 \\ 
\hline 
3 & 4XX22XX003 & Name 3 & 88 & 82 & 79 \\ 
\hline 
\end{tabular} 

\end{document}

Output


Question 6

Subgraph Concept

Develop a LaTeX script to include the side-by-side graphics/pictures/figures in the document by using the subgraph concept.

LaTeX Code

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}

\section*{Subfigure Demo} 


\begin{figure}[h]
     \centering
     \begin{subfigure}[b]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{graph1.png} 
         \caption{$y=x$}
         \label{fig:y equals x}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{graph2.png}
         \caption{$y=3\sin x$}
         \label{fig:three sin x}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.3\textwidth}
         \centering
         \includegraphics[width=\textwidth]{graph3.png}
         \caption{$y=5/x$}
         \label{fig:five over x}
     \end{subfigure}
        \caption{Three simple graphs arranged side-by-side}
        \label{fig:three graphs}
\end{figure}

\end{document}

Output


Question 7

Mathematical Equations in LaTeX

Develop a LaTeX script to create a document that consists of the following two mathematical equations

LaTeX Code

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,nccmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}

\begin{center}
\Large{\textbf{Equations in \LaTeX}}
\end{center}

\section*{Equation 1}

%\begin{eqnarray}
%x = \frac{-b \pm \sqrt{b^{2}-4ac}}{2a} \\
%= \frac{-2 \pm \sqrt{2^{2}-4*(1)*(-8)}}{2*1} 
%\end{eqnarray}

\begin{fleqn}
\[
x = \frac{-b \pm \sqrt{b^{2}-4ac}}{2a}
\]

\[
= \frac{-2 \pm \sqrt{2^{2}-4*(1)*(-8)}}{2*1}
\]

\[
= \frac{-2 \pm \sqrt{4+32}}{2}
\]
\end{fleqn}


\section*{Equation 2}

\begin{fleqn}
\[
\varphi^{\lambda}_{\sigma}A_{t} = \sum_{\pi \in C_{t}} sgn(\pi)\varphi^{\lambda}_{\sigma}\varphi^{\lambda}_{\pi}
\]

\[
= \sum_{\tau \in C_{\sigma t}} sgn(\sigma^{-1}\tau\sigma)\varphi^{\lambda}_{\sigma}\varphi^{\lambda}_{\sigma^{-1}\tau\sigma}
\]

\[
= A_{\sigma t} \varphi^{\lambda}_{\sigma}
\]

\end{fleqn}
\end{document}

Output


Question 8

Numbered theorems, definitions, corollaries and lemmas

Develop a LaTeX script to demonstrate the presentation of Numbered theorems, definitions, corollaries, and lemmas in the document.

LaTeX Code

\documentclass{article}
\usepackage[english]{babel}
\usepackage{amsthm}

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

\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]

\begin{document}
\section{Numbered theorems, definitions, corollaries and lemmas}
Theorems can easily be defined:

\begin{theorem}
Let \(f\) be a function whose derivative exists in every point, then \(f\) is 
a continuous function.
\end{theorem}

\begin{theorem}[Pythagorean theorem]
\label{pythagorean}
This is a theorem about right triangles and can be summarised in the next 
equation 
\[ x^2 + y^2 = z^2 \]
\end{theorem}

And a consequence of theorem \ref{pythagorean} is the statement in the next 
corollary.

\begin{corollary}
There's no right rectangle whose sides measure 3cm, 4cm, and 6cm.
\end{corollary}

You can reference theorems such as \ref{pythagorean} when a label is assigned.

\begin{lemma}
Given two line segments whose lengths are \(a\) and \(b\) respectively there is a 
real number \(r\) such that \(b=ra\).
\end{lemma}

\begin{definition}[Absolute value function] 
The absolute value function can be specified as a two-part definition as follows: \\
$
|x| =
\left\{
	\begin{array}{ll}
		x  & \mbox{if } x \geq 0 \\
		-x & \mbox{if } x < 0
	\end{array}
\right.
$
\end{definition}

\end{document}

Output


Question 9

References in LaTeX

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

LaTeX Code

For including references we need to first create a ref.bib file in the proper BibTeX format. which is as shown below. Depending on the kind of reference you have to maintain the structure as shown in example.

ref.bib

@ARTICLE{oilindustry,  
author={Ngoenriang, Napat and Turner, Stephen John and Niyato, Dusit and Supittayapornpong, Sucha},  
journal={IEEE Internet of Things Journal},
title={Joint UAV-Placement and Data Delivery in Aerial Inspection under Uncertainties}, year={2021},
volume={},
number={},
pages={1-1},
doi={10.1109/JIOT.2021.3113713}}


@ARTICLE{uavservice,
author={Qu, Yuben and Dai, Haipeng and Wang, Haichao and Dong, Chao and Wu, Fan and Guo, Song and Wu, Qihui},  journal={IEEE Journal on Selected Areas in Communications},
title={Service Provisioning for UAV-Enabled Mobile Edge Computing},
year={2021},
volume={39},
number={11}, 
pages={3287-3305},
doi={10.1109/JSAC.2021.3088660}
}

@misc{cplex,
  author = {IBM},
  title = {IBM CPLEX Optimizer},
  howpublished = "\url{https://www.ibm.com/in-en/analytics/cplex-optimizer}",
  year = {2021}, 
  note = "[Online; accessed 3-Feb-2022]"
}

@misc{rsome,
  author = {NSU},
  title = {RSOME},
  howpublished = "\url{https://xiongpengnus.github.io/rsome/}",
  year = {2021}, 
  note = "[Online; accessed 3-Feb-2022]"
}

@INPROCEEDINGS{hardtoshare,
  author={He, Ting and Khamfroush, Hana and Wang, Shiqiang and La Porta, Tom and Stein, Sebastian},
  booktitle={IEEE 38th International Conference on Distributed Computing Systems (ICDCS)},
  title={It's Hard to Share: Joint Service Placement and Request Scheduling in Edge Clouds with Sharable and Non-Sharable Resources},      year={2018},
  volume={},
  number={},
  pages={365-375},
  doi={10.1109/ICDCS.2018.00044}
}

@INPROCEEDINGS{multicell,
  author={Poularakis, Konstantinos and Llorca, Jaime and Tulino, Antonia M. and Taylor, Ian and Tassiulas, Leandros},
  booktitle={IEEE Conference on Computer Communications (INFOCOM)},
  title={Joint Service Placement and Request Routing in Multi-cell Mobile Edge Computing Networks},
  year={2019},
  volume={},
  number={},
  pages={10-18},
  doi={10.1109/INFOCOM.2019.8737385}
}

@ARTICLE{bandwidth,
  author={Poularakis, Konstantinos and Llorca, Jaime and Tulino, Antonia M. and Taylor, Ian},
  journal={IEEE/ACM Transactions on Networking},
  title={Service Placement and Request Routing in MEC Networks With Storage, Computation, and Communication Constraints},
  year={2020},
  volume={28},
  number={3},
  pages={1047-1060},
  doi={10.1109/TNET.2020.2980175}
}

@INPROCEEDINGS{dataintensive,
  author={Farhadi, Vajiheh and Mehmeti, Fidan and He, Ting and Porta, Tom La and Khamfroush, Hana and Wang, Shiqiang and Chan, Kevin S},       
   booktitle={IEEE Conference on Computer Communications(INFOCOM)},
   title={Service Placement and Request Scheduling for Data-intensive Applications in Edge Clouds},
   year={2019},
   volume={},
   number={},
   pages={1279-1287},
  doi={10.1109/INFOCOM.2019.8737368}
}

@ARTICLE{resource,
author={Ahmed, Shakil and Chowdhury, Mostafa Zaman and Sabuj, Saifur Rahman and Alam, Md Imtiajul and Jang, Yeong Min},  journal={IEEE Access},   title={Energy-Efficient UAV Relaying Robust Resource Allocation in Uncertain Adversarial Networks},   year={2021},  volume={9},  number={},  pages={59920-59934},  doi={10.1109/ACCESS.2021.3073015}}

@ARTICLE{resource2,  author={Yang, Zhaohui and Pan, Cunhua and Wang, Kezhi and Shikh-Bahaei, Mohammad},  journal={IEEE Transactions on Wireless Communications},   title={Energy Efficient Resource Allocation in UAV-Enabled Mobile Edge Computing Networks},   year={2019},  volume={18},  number={9},  pages={4576-4589},  doi={10.1109/TWC.2019.2927313}}


@ARTICLE{offload,  author={Apostolopoulos, Pavlos Athanasios and Fragkos, Georgios and Tsiropoulou, Eirini Eleni and Papavassiliou, Symeon},  journal={IEEE Transactions on Mobile Computing},   title={Data Offloading in UAV-assisted Multi-access Edge Computing Systems under Resource Uncertainty},   year={2021},  volume={},  number={},  pages={1-1},  doi={10.1109/TMC.2021.3069911}}

@INPROCEEDINGS{offload2,  author={Zhou, Fuhui and Wu, Yongpeng and Sun, Haijian and Chu, Zheng},  booktitle={2018 IEEE International Conference on Communications (ICC)},   title={UAV-Enabled Mobile Edge Computing: Offloading Optimization and Trajectory Design},   year={2018},  volume={},  number={},  pages={1-6},  doi={10.1109/ICC.2018.8422277}}

@ARTICLE{trajectory,  author={Wang, Kai and Zhang, Xiao and Duan, Lingjie and Tie, Jun},  journal={IEEE Transactions on Mobile Computing},   title={Multi-UAV Cooperative Trajectory for Servicing Dynamic Demands and Charging Battery},   year={2021},  volume={},  number={},  pages={1-1},  doi={10.1109/TMC.2021.3110299}}

@article{edgeuncertainty,
author = {Xu, Xiaolong and Cao, Hao and Geng, Qingfan and Liu, Xihua and Dai, Fei and Wang, Chuanjian},
title = {Dynamic resource provisioning for workflow scheduling under uncertainty in edge computing environment},
journal = {Concurrency and Computation: Practice and Experience},
volume = {n/a},
number = {n/a},
pages = {e5674},
keywords = {edge computing, SDN, uncertainty, workflow scheduling},
doi = {https://doi.org/10.1002/cpe.5674}
}

@ARTICLE{edgeuav,  author={Qu, Yuben and Dai, Haipeng and Wang, Haichao and Dong, Chao and Wu, Fan and Guo, Song and Wu, Qihui},  journal={IEEE Journal on Selected Areas in Communications},   title={Service Provisioning for UAV-Enabled Mobile Edge Computing},   year={2021},  volume={39},  number={11},  pages={3287-3305},  doi={10.1109/JSAC.2021.3088660}}

@inproceedings{mobility,
  title={UAV 3D Mobility Model Oriented to Dynamic and Uncertain Environment},
  author={Na Wang and Nan Di and Fei Dai and Fangxin Liu},
  booktitle={ICA3PP},
  year={2018}
}

@ARTICLE{robust,  author={Li, Bo and He, Qiang and Cui, Guangming and Xia, Xiaoyu and Chen, Feifei and Jin, Hai and Yang, Yun},  journal={IEEE Transactions on Services Computing},   title={READ: Robustness-oriented Edge Application Deployment in Edge Computing Environment},   year={2020},  volume={},  number={},  pages={1-1},  doi={10.1109/TSC.2020.3015316}}

Next we will write the .tex file main.tex which includes paragraphs and wherever citations/references are needed use the /cite tag with the appropriate reference identifier.

main.tex

% Use Overleaf online editor for accurate results

\documentclass{article}
\usepackage{graphicx} % Required for inserting images


\begin{document}

\begin{center}
    \Large{\textbf{References Demo}}
\end{center}

\section{Introduction}
%\section{Related Work}

For disaster management, uncertainty handling is the main key problem. But, in Joint Service deployment and Requests Allocation~(JSR) domain, research work mainly uses the approaches such as deterministic optimization \cite{hardtoshare, multicell, bandwidth}, Lyapunov optimization \cite{dataintensive}, stochastic optimization, replication of services to achieve high reliability, and forecasting of user requests using machine learning without considering uncertainty. In deterministic optimization \cite{edgeuav}, request demand is known before the run. However, in online optimization, time is divided into slots and performs optimization per slot basis, which does not consider uncertain demand. Even if we used any probability distribution to model demand, it does not provide the correct model/pattern to define the uncertain data \cite{edgeuncertainty}. Using a replication approach to achieve high availability also incurs extra resource cost \cite{robust}. Using the forecasting method also, we can not predict the impact of uncertain events on the requests, which may lead to under-provisioning/over-provisioning resources to process the required tasks \cite{rsome}.

\section{Experiment Setup and Performance Parameters}
To demonstrate the efficiency of the proposed approaches, we will simulate the scenario for an urban site affected by any natural calamity \cite{oilindustry}. To implement optimization models, we will use the IBM Cplex Optimizer tool \cite{cplex}.

\bibliographystyle{IEEEtran}
\bibliography{ref}
\end{document}

Output


Question 10

Tikz library

Develop a LaTeX script to design a simple tree diagram or hierarchical structure in the document with appropriate labels using the Tikz library

LaTeX Code

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{center}
\Large{\textbf{Hierarchy of Linux distributions}}
\end{center}

\begin{figure}[h]
    \centering


\begin{tikzpicture} [every node/.style = {shape=rectangle, rounded corners, draw, align=center}]
  \path [draw,thick,-]
    node (root)[red] {GNU/Linux}
    [sibling distance=45mm, level distance=25mm]
    child {node [cyan] {Debian} 
    [sibling distance=25mm, level distance=25mm]
    	child { node [cyan] {Ubuntu} }
    	child { node [cyan] {Linux Mint} }
%    	child { node {Elementary} }
    }
    child {node [magenta] {RedHat}
    [sibling distance=25mm, level distance=25mm]
    	child { node [magenta] {Fedora} }
    	child { node [magenta] {OpenSuse} }    
    }
    child {node [blue] {Arch}
	[sibling distance=25mm, level distance=25mm] 
		child { node [blue]{Manjaro} }
		child { node [blue]{EndeavourOS} }   
    };


\end{tikzpicture}
 \caption{GNU/Linux Operating System Family}
\end{figure}

\pagebreak

\begin{center}
\Large{\textbf{SUV Cars}}

\end{center}

\begin{figure}[h]
    \centering

\begin{tikzpicture} [every node/.style = {shape=rectangle, rounded corners, draw, align=center}]
  \path [draw,thick,-]
  	[grow=-45]
    node (root)[red] {SUV}
    [sibling distance=45mm, level distance=25mm]
    
    child {node [cyan] {Tata} 
    [sibling distance=25mm, level distance=25mm]
    	child { node [cyan] {Nexon} }
    	child { node [cyan] {Punch} }
%    	child { node {Elementary} }
    }
    child {node [magenta] {Volkswagen}
    [sibling distance=25mm, level distance=25mm]
    	child { node [magenta] {Taigun} }
    	child { node [magenta] {Virtus} }    
    }
    child {node [blue] {Maruti}
	[sibling distance=25mm, level distance=25mm] 
		child { node [blue]{Brezza} }
		child { node [blue]{Vitara} }   
    };


\end{tikzpicture}
 \caption{Car Brands Hierarchy}
\end{figure}

\end{document}

Output


Question 11

Algorithms in LaTeX

Develop a LaTeX script to present an algorithm in the document using algorithm/algorithmic/algorithm2e library.

LaTeX Code

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{algorithm2e}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}

\section*{Floyd's Algorithm}
Algorithm to find solution to All-Pairs Shortest-Paths Problem

\SetKwComment{Comment}{// }{ }

\vspace{1cm}
	\begin{algorithm}[H]
        \caption{Floyd(W [1..n, 1..n])}
      \SetAlgoLined
        \DontPrintSemicolon
        \KwIn{The weight matrix W of a graph having vertices [1..n]}
        \KwOut{The distance matrix D of the shortest paths' lengths between every pair of vertices [1..n]}
        $D$ $\gets$ $W$ \Comment*[r]{initially copy the weight matrix into distance matrix}
        \For{$k \gets 1$ to $n$}{
        	\For{$i \gets 1$ to $n$}{
        		\For{$j \gets 1$ to $n$}{
        			$D[i,j]$ $\gets min\lbrace D[i,j], D[i,k] + D[k,j]\rbrace$
        		}
        	}
        }
        \Return{$D$}\;

	\end{algorithm}
\end{document}

Output


Question 12

Simple Report

Develop a LaTeX script to create a simple report and article by using suitable commands and formats of user choice.

LaTeX Code

\documentclass[6pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[left=3cm,right=3cm,top=2cm,bottom=2cm]{geometry}
\author{Lekhaka}
\title{Varadhi}
\begin{document}

\maketitle
\chapter{Free Software}
\section*{What is Free Software?}
"\textbf{Free software}" means software that respects users' freedom and community. Roughly, it means that \textbf{the users have the freedom to run, copy, distribute, study, change and improve the software}. Thus, "free software" is a matter of liberty, not price. To understand the concept, you should think of "\textit{free}" as in "\textit{free speech}," not as in "\textit{free beer}." We sometimes call it "\textbf{libre software}," borrowing the French or Spanish word for "free" as in freedom, to show we do not mean the software is gratis.

You may have paid money to get copies of a free program, or you may have obtained copies at no charge. But regardless of how you got your copies, you always have the freedom to copy and change the software, even to sell copies.

We campaign for these freedoms because everyone deserves them. With these freedoms, the users (both individually and collectively) control the program and what it does for them. When users don't control the program, we call it a "\textit{nonfree}" or "\textit{proprietary}" program. The nonfree program controls the users, and the developer controls the program; this makes the program an instrument of unjust power.

"\emph{Open source}" is something different: it has a very different philosophy based on different values. Its practical definition is different too, but nearly all open source programs are in fact free. 

\section*{The Free Software Definition}
The free software definition presents the criteria for whether a particular software program qualifies as free software. \\
\textbf{The four essential freedoms}		\\

A program is free software if the program's users have the four essential freedoms:	\\
\begin{itemize}
\item The freedom to run the program as you wish, for any purpose (freedom 0).
\item The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.
\item The freedom to redistribute copies so you can help others (freedom 2).
\item The freedom to distribute copies of your modified versions to others (freedom 3). 

\end{itemize}


By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. \\

A program is free software if it gives users adequately all of these freedoms. Otherwise, it is nonfree. While we can distinguish various nonfree distribution schemes in terms of how far they fall short of being free, we consider them all equally unethical.


\chapter{Listing Environment}

\begin{small}
\section*{Unordered lists}

\subsection*{Groceries List}
\begin{itemize}
	\item Eggs
	\item Milk
	\item Biscuits
	\item Rice
\end{itemize}	

\subsection*{Football Teams}

\begin{itemize}
	\item English Premier League
	\begin{itemize}
		\item Manchester United
		\item Liverpool
	\end{itemize}
	
	\item La Liga
	\begin{itemize}
		\item Barcelona
		\item Real Madrid
	\end{itemize}	

	\item Bundesliga
	\begin{itemize}
		\item Bayern Munich
		\item Borussia Dortmund
	\end{itemize}	
\end{itemize}

\section*{Ordered lists}
\subsection*{ICC WTC Rankings}
\begin{enumerate}
\item India
\item Australia
\item New Zealand
\end{enumerate}

\subsection*{Countries ranked by Market Cap}
\begin{enumerate}
	\item Asia
	\begin{enumerate}
		\item China
		\item Japan
		\item India
	\end{enumerate}

	\item Europe
	\begin{enumerate}
		\item United Kingdom
		\item France
		\item Germany
	\end{enumerate}

\end{enumerate}
\end{small}


\end{document}

Output


If you are also looking for other Lab Manuals, head over to my following blog :

Prabodh C P is a faculty in the Dept of CSE SIT, Tumkur and also currently a Research Scholar pursuing PhD in IIT Hyderabad. He conducts online classes for C, C++, Python. For more info call +919392302100

Leave a Reply

Your email address will not be published. Required fields are marked *