0% found this document useful (0 votes)
79 views42 pages

Latex Lab Manual - KNS

The document is a lab manual for the Technical Writing Using LaTeX course at KNS Institute of Technology for the academic year 2023-2024. It outlines the course objectives, program educational objectives, specific outcomes, and includes a series of experiments for students to develop LaTeX scripts for various documents and presentations. The manual aims to equip students with the skills necessary to effectively use LaTeX for technical writing and document preparation.

Uploaded by

jesyjeffl
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)
79 views42 pages

Latex Lab Manual - KNS

The document is a lab manual for the Technical Writing Using LaTeX course at KNS Institute of Technology for the academic year 2023-2024. It outlines the course objectives, program educational objectives, specific outcomes, and includes a series of experiments for students to develop LaTeX scripts for various documents and presentations. The manual aims to equip students with the skills necessary to effectively use LaTeX for technical writing and document preparation.

Uploaded by

jesyjeffl
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/ 42

Technical Writing Using Latex – (BCSL456D)

KNS INSTITUTE OF TECHNOLOGY


HEGDE NAGAR, TIRUMENAHALLI, KOGILU ROAD, BENGALURU – 64

DEPARTMENT OF COMPUTER SCIENCE ENGINEERING

IV SEMESTER | B.E

TECHNICAL WRITING USING LATEX LABORATORY (BCSL456B)

LAB MANUAL

Academic Year 2023 – 2024

Prepared by: Reviewed by:

Mohammed Farhan Dr. Sasi Kumar


ASSISTANT PROFESSOR Head of the Department of CSE.

DEPT. OF ISE, KNSIT KNSIT, Bangalore.

DEPT. OF CSE, 1
KNSIT
Technical Writing Using Latex – (BCSL456D)

Vision
Aim to become a leader in the field of education, training, and research in the Information

science C Engineering discipline.

Mission

1. To inculcate the leadership capabilities, ethical values C professional behavior to


face the Challenges in global market.
2. 2. To provide quality education in information science engineering by creating
nurturing Innovative and technologically steadfast learning environment.
3. Supporting and inducing life long learning.
4. Establish association and collaboration with organization of reputed for knowledge
Sharing and enhancing skills to unlease students creativity and innovation.

Program Educational Objectives (PEOs):

The Program Educational Objectives define future roles for which we are preparing our
students By studying four years of undergraduate engineering program. The major
objectives for the Department of Information Science at K.N.S Institute of Technology are:

PEO-1: Engage in professional practice to promote the development of innovative systems


and Optimized solutions for information science and engineering.

PEO-2: Excel as IT professional with proficiency in designing solutions to information


Engineering problems.

PEO-3: An ability to implement technology effectively on defined engineering needs with


Engineering community and with society at large.

PEO-4: Exhibit high standards of social and professional ethics, entrepreneurship and
leadership Qualities.

DEPT. OF CSE, 2
KNSIT
Technical Writing Using Latex – (BCSL456D)

Program Specific Outcomes [PSOs]:


PSO1: Apply appropriate information technology and adopt the appropriate methodology
to Make an organization or an individual to achieve its objectives and goals.

PSO2: Manage IT services for the organization and individual with its goals.

PSO3: Implement IT services that would perform tasks related to latest trends of
information Technology.

PSO 4: Explain the syntax, flow of the program and sub problems to obtain the
programmatic Solutions.

PSO 5: Inseminate Skills for successful carrier path for higher studies.

DEPT. OF CSE, 3
KNSIT
Technical Writing Using Latex – (BCSL456D)

Technical Writing using LaTeX Semester 4


Course Code BCSL456D CIE Marks 50
Teaching Hours/Week (L: T:P: S) 0:0:2:0 SEE Marks 50
Credits 01 Exam Hours 02
Examination type (SEE) Practical
Course objectives:
● To introduce the basic syntax and semantics of the LaTeX scripting language
● To understand the presentation of tables and figures in the document
● To illustrate the LaTeX syntax to represent the theorems and mathematical equations
● To make use of the libraries (Tikz, algorithm) to design the diagram and algorithms in the document

Sl.NO Experiments
1 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.

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

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

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

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

S.No USN Student Name Marks


Subject1 Subject2 Subject3
1 4XX22XX001 Name 1 89 60 90
2 4XX22XX002 Name 2 78 45 98
3 4XX22XX003 Name 3 67 55 59

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

DEPT. OF CSE, 4
KNSIT
Technical Writing Using Latex – (BCSL456D)

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

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

9 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

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

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


library

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

Course outcomes (Course Skill Set):


At the end of the course, the student will be able to:
● Apply basic LaTeX command to develop simple document
● Develop LaTeX script to present the tables and figures in the document
● Illustrate LaTeX script to present theorems and mathematical equations in the document
● Develop programs to generate the complete report with citations and a bibliography
● Illustrate the use of Tikz and algorithm libraries to design graphics and algorithms in the
document

DEPT. OF CSE, 5
KNSIT
Technical Writing Using Latex – (BCSL456D)

PAGE
S.NO EXPERIMENTS
NO

Develop a LaTeX script to create a simple document that consists of 2


sections [Section1, Section2], and a paragraph with dummy text in each
1. section. And also include header [title of document] and footer [institute 7
name, page number] in the document.

Develop a LaTeX script to create a document that displays the sample


2. 10
Abstract/Summary
Develop a LaTeX script to create a simple title page of the VTU project Report
3. [Use suitable Logos and text formatting]. 13

Develop a LaTeX script to create the Certificate Page of the Report [Use
4. 18
suitable commands to leave the blank spaces for user entry]
Develop a LaTeX script to create a document that contains the following table
5. 23
with proper labels.
Develop a LaTeX script to include the side-by-side graphics/pictures/figures
6. 25
in the document by using the subgraph concept
Develop a LaTeX script to create a document that consists of the following
7. two mathematical equations 27

Develop a LaTeX script to demonstrate the presentation of Numbered


8. 30
theorems, definitions, corollaries, and lemmas in the document
9. Develop a LaTeX script to create a document that consists of two
paragraphs with a minimum of 10citations in it and display the reference in 33
the section
10 Develop a LaTeX script to design a simple tree diagram or hierarchical
structure in the document withappropriate labels using the Tikz library 40

Develop a LaTeX script to present an algorithm in the document using


11. algorithm/algorithmic/algorithm2elibrary 43

12 Develop a LaTeX script to create a simple report and article by using 45


suitable commands and formats ofuser choice.

DEPT. OF CSE, 6
KNSIT
Technical Writing Using Latex – (BCSL456D)

PROGRAM 1

Simple Document

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.

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}

DEPT. OF CSE, 7
KNSIT
Technical Writing Using Latex – (BCSL456D)

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}

OUTPUT :

CLICK HERE

DEPT. OF CSE, 8
KNSIT
Technical Writing Using Latex – (BCSL456D)

DEPT. OF CSE, 9
KNSIT
Technical Writing Using Latex – (BCSL456D)

DEPT. OF CSE, 10
KNSIT
Technical Writing Using Latex – (BCSL456D)

PROGRAM 2

AIM: 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}

DEPT. OF CSE, 11
KNSIT
Technical Writing Using Latex – (BCSL456D)

%\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}

OUTPUT :

CLICK HERE

DEPT. OF CSE, 12
KNSIT
Technical Writing Using Latex – (BCSL456D)

DEPT. OF CSE, 13
KNSIT
Technical Writing Using Latex – (BCSL456D)

PROGRAM 3

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

LaTex Code:
\documentclass[12pt, a4paper]{report} % Document class with font size 12pt and paper size A4

\usepackage{graphicx} % Package to include images

\usepackage{geometry} % Package to customize page layout

\geometry{a4paper, total={170mm, 257mm}, left=20mm, right=20mm, top=30mm, bottom=30mm} %


Customizing page margins

\thispagestyle{empty} % Suppressing page numbers for the title page

\begin{document}

\begin{titlepage} % Starting the title page environment

\begin{center} % Centering content

% University Details

\textbf{{\large VISVESVARAYA TECHNOLOGICAL UNIVERSITY}}\\

{\normalsize Jnana Sangama, Belgaum-590018}\\

\vspace{0.3in}

\includegraphics[scale=0.2]{vtu.jpg}\\

\vspace{0.3in}

% Title and Project Details

\textbf{A PROJECT REPORT} \\

ON \\

\vspace{0.2in}

\textbf{{\large "Create Report Format Using LaTeX"}}\\

\vspace{0.1in}

{\small Submitted in partial fulfillment of the requirements for the Fourth Semester
degree of

DEPT. OF CSE, 14
KNSIT
Technical Writing Using Latex – (BCSL456D)

Bachelor of Engineering in Information Science Engineering of Visvesvaraya Technological

University, Belagavi}\\

\vspace{0.1in}

\textbf{BACHELOR OF ENGINEERING\\IN\\INFORMATION SCIENCE AND


ENGINEERING}\\

\vspace{0.2in}

% Student Details

Submitted by\\

\vspace{0.08in}

\begin{tabular}{ll}

\textbf{1KN22IS001} C \textbf{AFNAN ULLA}\\

\textbf{1KN22IS011} C \textbf{HUSNA TAJ}\\

\textbf{1KN22IS021} C \textbf{MAHMOODA FIRDOSE}\\

\textbf{1KN22IS031} C \textbf{N SHILPA}\\

\end{tabular}

\vspace{0.2in}

% Guide Details

\textbf{Under the Guidance of}\\

PROF. Rashmi Purad\\

Asst. Professor Department of ISE\\

\vspace{0.2in}

% College Details

\includegraphics[scale=0.4]{kns.png}\\

\vspace{0.01in}

{\small DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING}\\

\vspace{0.1in}

\textbf{KNS INSTITUTE OF TECHNOLOGY}\\

{\small NAAC accredited Approved by AICTE, New Delhi, Affiliated to VTU, Belagavi,
Opp Tirumenahalli Cross, Bengaluru -560064}\\

DEPT. OF CSE, 15
KNSIT
Technical Writing Using Latex – (BCSL456D)

\vspace{0.1in}

{\small 2023-2024}\\

\end{center} % Ending the center environment

\end{titlepage} % Ending the title page environment

\end{document}

OUTPUT :

CLICK HERE

DEPT. OF CSE, 16
KNSIT
Technical Writing Using Latex – (BCSL456D)

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]

LaTex Code:
\documentclass[12pt, a4paper]{report}

\usepackage{graphicx}

\usepackage{geometry}

\geometry{a4paper, total={170mm, 257mm}, left=20mm, right=20mm, top=20mm, bottom=20mm}

\thispagestyle{empty}

\begin{document}

\begin{titlepage}

\begin{center}

\textbf{{\large VISVESVARAYA TECHNOLOGICAL UNIVERSITY}}\\

{\normalsize Jnana Sangama, Belgaum-590018}\\

\vspace{0.5in}

\includegraphics[scale=0.1]{vtu-logo.png}\\

\vspace{0.5in}

\textbf{CERTIFICATE}\\

\vspace{0.3in}

This is to certify that \\

\vspace{0.2in}

\underline{\hspace{10cm}}\\

\vspace{0.2in}

(Name of the student)\\

\vspace{0.2in}

bearing University Seat Number \\

\vspace{0.2in}

DEPT. OF CSE, 17
KNSIT
Technical Writing Using Latex – (BCSL456D)

\underline{\hspace{10cm}}\\

\vspace{0.2in}

has satisfactorily completed the project work entitled \\

\vspace{0.2in}

\underline{\hspace{10cm}}\\

\vspace{0.2in}

(Title of the project)\\

\vspace{0.2in}

towards the partial fulfillment of the requirements for the award of the degree of\\

\vspace{0.2in}

\textbf{BACHELOR OF ENGINEERING\\IN\\COMPUTER SCIENCE AND


ENGINEERING}\\

\vspace{0.5in}

\textbf{Guide} \hspace{3.5in} \textbf{Head of the Department}\\

\vspace{0.3in}

\underline{\hspace{6cm}} \hspace{1.5in} \underline{\hspace{6cm}}\\

\vspace{0.1in}

\textbf{(Guide's Name)} \hspace{2.7in} \textbf{(HOD's Name)}\\

\vspace{0.1in}

\textbf{(Guide's Designation)} \hspace{2in} \textbf{(HOD's Designation)}\\

\vspace{0.1in}

\textbf{(Department of CSE)} \hspace{2.1in} \textbf{(Department of CSE)}\\

\vspace{0.1in}

\textbf{[College Name]}\\

\vspace{0.1in}

\textbf{[Location]}\\

\vspace{0.1in}

\textbf{[Month Year]} % Replace with current month and year

\end{center}

DEPT. OF CSE, 18
KNSIT
Technical Writing Using Latex – (BCSL456D)

\end{titlepage}

\end{document}

OUTPUT

CLICK HERE

DEPT. OF CSE, 19
KNSIT
Technical Writing Using Latex – (BCSL456D)

PROGRAM 5

AIM: Develop a LaTeX script to create a document that contains the following table with
proper labels.
S.No USN Student Name Marks
Subject1 Subject2 Subject3
1 4XX22XX001 Name 1 89 60 90
2 4XX22XX002 Name 2 78 45 98
3 4XX22XX003 Name 3 67 55 59

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} C \multirow{2}{*}{USN} C \multirow{2}{*}{Student Name} C \multicolumn{3}{c|}{Marks} \\

DEPT. OF CSE, 20
KNSIT
Technical Writing Using Latex – (BCSL456D)

\cline{4-6}

C C C Subject1 C Subject2 C Subject3 \\

\hline

1 C 4XX22XX001 C Name 1 C 88 C 77 C 97 \\

\hline

2 C 4XX22XX002 C Name 2 C 74 C 78 C 66 \\

\hline

3 C 4XX22XX003 C Name 3 C 88 C 82 C 79 \\

\hline

\end{tabular}

\end{document}

OUTPUT

CLICK HERE

DEPT. OF CSE, 21
KNSIT
Technical Writing Using Latex – (BCSL456D)

PROGRAM 6

AIM: 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}

DEPT. OF CSE, 22
KNSIT
Technical Writing Using Latex – (BCSL456D)

\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

CLICK HERE

DEPT. OF CSE, 23
KNSIT
Technical Writing Using Latex – (BCSL456D)

PROGRAM 7

AIM : 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}

DEPT. OF CSE, 24
KNSIT
Technical Writing Using Latex – (BCSL456D)

\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

CLICK HERE

DEPT. OF CSE, 25
KNSIT
Technical Writing Using Latex – (BCSL456D)

DEPT. OF CSE, 26
KNSIT
Technical Writing Using Latex – (BCSL456D)

PROGRAM 8

AIM : 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}

DEPT. OF CSE, 27
KNSIT
Technical Writing Using Latex – (BCSL456D)

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 C \mbox{if } x \geq 0 \\

-x C \mbox{if } x < 0

\end{array}

\right.

\end{definition}

\end{document}

OUTPUT

CLICK HERE

DEPT. OF CSE, 28
KNSIT
Technical Writing Using Latex – (BCSL456D)

DEPT. OF CSE, 29
KNSIT
Technical Writing Using Latex – (BCSL456D)

PROGRAM G

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.

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{kosachev2012spsecific,

title={The specifics of Russian soft power},

author={Kosachev, Konstantin},

journal={Russia in Global Affairs},

volume={7},

number={3},

pages={1--11},

year={2012},

publisher={Фонд исследований мировой политики}

@article{sergunin2015understanding,

title={Understanding Russia's soft power strategy},

author={Sergunin, Alexander and Karabeshkin, Leonid},

journal={Politics},

volume={35},

number={3-4},

pages={347--363},

year={2015},

DEPT. OF CSE, 30
KNSIT
Technical Writing Using Latex – (BCSL456D)

publisher={SAGE Publications Sage UK: London, England}

@article{kiseleva2015russia,

title={Russia's soft power discourse: identity, status and the attraction of power},

author={Kiseleva, Yulia},

journal={Politics},

volume={35},

number={3-4},

pages={316--329},

year={2015},

publisher={SAGE Publications Sage UK: London, England}

@book{bohomolov2012ghost,

title={A ghost in the mirror: Russian soft power in Ukraine},

author={Bohomolov, Oleksandr and Lytvynenko, Oleksandr Valeri{\u\i}}ovych},

year={2012},

publisher={Chatham House London}

@article{hill2006moscow,

title={Moscow discovers soft power},

author={Hill, Fiona},

journal={Current History},

volume={105},

number={693},

pages={341--347},

year={2006},

publisher={University of California Press}

DEPT. OF CSE, 31
KNSIT
Technical Writing Using Latex – (BCSL456D)

@article{dufrene2002atomic,

title={Atomic force microscopy, a powerful tool in microbiology},

author={Dufr{\^e}ne, Yves F},

journal={Journal of bacteriology},

volume={184},

number={19},

pages={5205--5213},

year={2002},

publisher={Am Soc Microbiol}

@article{engel1999atomic,

title={Atomic force microscopy: a powerful tool to observe biomolecules at work},

author={Engel, Andreas and Lyubchenko, Yuri and M{\"u}ller, Daniel},

journal={Trends in cell biology},

volume={9},

number={2},

pages={77--80},

year={1999},

publisher={Elsevier}

@article{franz2008atomic,

title={Atomic force microscopy: a versatile tool for studying cell morphology, adhesion and
mechanics},

author={Franz, CM and Puech, P-H},

journal={Cellular and Molecular Bioengineering},

volume={1},

pages={289--300},

year={2008},

publisher={Springer}

DEPT. OF CSE, 32
KNSIT
Technical Writing Using Latex – (BCSL456D)

@article{marrese2017atomic,

title={Atomic force microscopy: a powerful tool to address scaffold design in tissue engineering},

author={Marrese, Marica and Guarino, Vincenzo and Ambrosio, Luigi},

journal={Journal of functional biomaterials},

volume={8},

number={1},

pages={7},

year={2017},

publisher={MDPI}

@article{altman2015noncontact,

title={Noncontact atomic force microscopy: an emerging tool for fundamental catalysis research},

author={Altman, Eric I and Baykara, Mehmet Z and Schwarz, Udo D},

journal={Accounts of Chemical Research},

volume={48},

number={9},

pages={2640--2648},

year={2015},

publisher={ACS Publications}

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
\documentclass{article}

\usepackage{cite}

\begin{document}

DEPT. OF CSE, 33
KNSIT
Technical Writing Using Latex – (BCSL456D)

\title{Sample Document with Citations}

\author{}

\date{}

\maketitle

\section{Emerging Powers in International Politics}

he 21st century is marked by an increased attention to the appeal and positive image of a country as
instruments of influence in the international arena\cite{bohomolov2012ghost}. There has appeared the
concept of soft power, whose author, U.S\cite{sergunin2015understanding}. political scientist Joseph Nye
described it as “the ability to get what you want through attraction rather than coercion or
payments\cite{hill2006moscow}.” A nation’s image secures attractiveness and trust in a country, playing a
crucial role as the key soft power component\cite{kiseleva2015russia}. Therefore, the efforts of states along
this line relate not so much to the sphere of culture and information as to
geopolitics\cite{kosachev2012spsecific}.

\section{Atomic Force Microscopy, a Powerful Tool in Microbiology}

Understanding the functions of microbial cell surfaces requires knowledge of their structural and physical
properties\cite{dufrene2002atomic}. Electron microscopy has long been recognized as a key technique in
microbiology to elucidate cell surface ultra structure\cite{engel1999atomic}. An exciting achievement has
been the development of cryotechniques which allow high-resolution imaging of cell structures in conditions
close to the native state\cite{franz2008atomic}. Yet direct observation in aqueous solution remained
impossible.Because of the small size of microorganisms, the physical properties of their surfaces have been
difficult to study\cite{marrese2017atomic}. Quantitative and qualitative information on physical properties
can be obtained by electron microscopy techniques, X-ray photoelectron spectroscopy, infrared
spectroscopy, contact angle, and electrophoretic mobility measurements\cite{altman2015noncontact}.

\bibliographystyle{plain}

\bibliography{references}

\end{document}

OUTPUT

CLICK HERE

DEPT. OF CSE, 34
KNSIT
Technical Writing Using Latex – (BCSL456D)

DEPT. OF CSE, 35
KNSIT
Technical Writing Using Latex – (BCSL456D)

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

LaTex Code :
\documentclass{article}

\usepackage{tikz}

\begin{document}

\centering

% Define styles for nodes

\tikzstyle{level 1}=[level distance=4cm, sibling distance=6cm]

\tikzstyle{level 2}=[level distance=4cm, sibling distance=3cm]

% Begin TikZ picture

\begin{tikzpicture}[grow=down, sloped]

% Root node

\node {Root}

% First child

child {

node {Child 1} % First child node

child {

node {Subchild 1} % Subchild node

child {

node {Subchild 2} % Subchild node

% Second child

child {

DEPT. OF CSE, 36
KNSIT
Technical Writing Using Latex – (BCSL456D)

node {Child 2} % Second child node

child {

node {Subchild 1} % Subchild node

child {

node {Subchild 2} % Subchild node

};

\end{tikzpicture}

\end{document}

OUTPUT

CLICK HERE

DEPT. OF CSE, 37
KNSIT
Technical Writing Using Latex – (BCSL456D)

PROGRAM 11

AIM : Develop a LaTeX script to present an algorithm in the document using


algorithm/algorithmic/algorithm2e library

LaTex Code :
\documentclass{article}

\usepackage{algorithm}

\usepackage{algpseudocode}

\begin{document}

\begin{algorithm}

\caption{Bubble Sort}

\begin{algorithmic}[1]

\Procedure{BubbleSort}{$A, n$}

\For{$i \gets 0$ to $n-1$}

\For{$j \gets 0$ to $n-1-i$}

\If{$A[j] > A[j+1]$}

\State Swap $A[j]$ and $A[j+1]$

\EndIf

\EndFor

\EndFor

\EndProcedure

\end{algorithmic}

\end{algorithm}

\end{document}

DEPT. OF CSE, 38
KNSIT
Technical Writing Using Latex – (BCSL456D)

OUTPUT

CLICK HERE

DEPT. OF CSE, 39
KNSIT
Technical Writing Using Latex – (BCSL456D)

PROGRAM 12

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

LaTex Code:
\documentclass{report}

\title{Simple Report}

\author{PROF. Rashmi Purad}

\date{}

\begin{document}

\maketitle

\tableofcontents

\chapter{Introduction}

\textbf{Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type
and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of
Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like
Aldus PageMaker including versions of Lorem Ipsum.}

\chapter{Methods}

\textbf{Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type
and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of
Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like
Aldus PageMaker including versions of Lorem Ipsum.}

\chapter{Conclusion}

\textbf{Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type
and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of
Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like
Aldus PageMaker including versions of Lorem Ipsum.}

DEPT. OF CSE, 40
KNSIT
Technical Writing Using Latex – (BCSL456D)

\end{document}

OUTPUT

CLICK HERE

DEPT. OF CSE, 41
KNSIT
Technical Writing Using Latex – (BCSL456D)

DEPT. OF CSE, 42
KNSIT

You might also like