0% found this document useful (0 votes)
30 views71 pages

1st Latex

The document outlines a syllabus for a technical writing course using LaTeX at GSSSIETW, Mysore, focusing on the basics of LaTeX for preparing technical reports. It includes an agenda covering document structure, classes, packages, and environments, as well as practical examples and exercises. The document emphasizes the advantages of LaTeX in document generation, particularly for large technical documents.

Uploaded by

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

1st Latex

The document outlines a syllabus for a technical writing course using LaTeX at GSSSIETW, Mysore, focusing on the basics of LaTeX for preparing technical reports. It includes an agenda covering document structure, classes, packages, and environments, as well as practical examples and exercises. The document emphasizes the advantages of LaTeX in document generation, particularly for large technical documents.

Uploaded by

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

“Technical Writing using

LaTeX”
Subject code: BCSL456D
Department of Information Science & Engineering
GSSSIETW, Mysore

May 3, 2025 1
Syllabus

May 3, 2025 2
May 3, 2025 3
Purpose of this Latex software

 To facilitate participants in making


use of LaTex for preparing
technical reports.
 Introducing basics of the LaTex
environment.

May 3, 2025 4
Agenda

 Introduction to LaTex
 Document Structure
 Document classes
 Packages
 Environments

May 3, 2025 5
To produce an output like this
PDF file

May 3, 2025 6
LaTex Program

Sample.tex
Input

Latex Software

Output

PDF file

May 3, 2025 7
LaTex Program
Sample.tex
\documentclass[12pt,a4paper]{article}
\usepackage{times}
\title{Introduction to Latex}
\author{Dr. Umadevi V}
\date{\today}
\begin{document} PDF file
\maketitle
My first LaTex document. Latex is a document
preparation system for the Text
typesetting………
\end{document}

May 3, 2025 8
Latex Software
 Offline Mode
Backend tool, MiKTex which processes Latex files.
Frontend tool, TeXmaker for creating and editing
Latex documents.
 Online Mode
https://www.overleaf.com/

May 3, 2025 9
Latex : Offline Mode – MikTex and TeXnicCenter

May 3, 2025 10
Latex : Online - www.overleaf.com

May 3, 2025 11
Installation
First Install MikTex
Downloading MikTex
https://miktex.org/download

Second Install TexnicCenter


Downloading TexnicCenter
https://www.texniccenter.org/download/

Those who are having difficulty in installing go for online mode Overleaf.
Login into Overleaf using your Google account.

May 3, 2025 12
Next we will see

What is Latex ?
Why we want to Learn Latex ?

May 3, 2025 13
What is LaTex ?
 LATEX is a text processing system.
 Base engine is ‘TEX’ (Donald Knuth, 1978)
developed for typesetting.
 LATEX focuses on document structure than
details.
 Has collection of defined commands to create
names and numbers for title, section, figures
etc.
 LaTeX is based on the idea that it is better to
leave document design to document designers,
and to let authors get on with writing
documents.

May 3, 2025 14
Why we want to learn LaTeX ?

 Very powerful control of document


generation, particularly large
technical documents.

 Minimizes the work of formatting,


numbering, and referencing.

May 3, 2025 15
Agenda

 Introduction to LaTex
 Document Structure
 Document classes
 Packages
 Environments

May 3, 2025 16
Document Structure
 LATEX document is a plain text file with
required commands and environments.
 The extension of the file is .tex
 All commands start with a ‘\’ Eg., \title, \
caption, \label, etc.

May 3, 2025 17
Document Structure
 LATEX document is a plain text file with
required commands and environments.
 The extension of the file is .tex
 All commands start with a ‘\’ Eg., \title, \
caption, \label, etc.
 A LATEX document starts with a declaration of
the document type by \documentclass{}

May 3, 2025 18
Document Structure
 LATEX document is a plain text file with
required commands and environments.
 The extension of the file is .tex
 All commands start with a ‘\’. Eg., \title, \
caption, \label, etc.
 A LATEX document starts with a declaration of
the document type by \documentclass{}
 The matter to type set are typed between \
begin{document} and
\end{document}

May 3, 2025 19
Agenda

 Introduction to LaTex
 Document Structure
 Document class
 Packages
 Environments

May 3, 2025 20
Syntax of \documentclass

\documentclass[…]{…}

Optional Arguments

Required Arguments

May 3, 2025 21
Syntax of \documentclass

\documentclass[…]{…}

Optional Arguments

Required Arguments

Paper size, font size, two columns,


Optional Arguments draft or a final version, style of
formula numbering….

May 3, 2025 22
Syntax of \documentclass

\documentclass[…]{…}

Optional Arguments

Required Arguments

Paper size, font size, two columns,


Optional Arguments draft or a final version, style of
formula numbering….
Required Arguments book, report, article, letter, slides

May 3, 2025 23
Options for article documentclass

Category Default Other Options


Body text point size 10pt 11pt, 12pt
Paper size 8.5in x 11in a4paper, a5paper,
b5paper,legalpaper,
executivepaper
Orientation Portrait Landscape
Columns One column Two column
Displayed equations Centered Flush left

May 3, 2025 24
LaTex: Simple Example

\documentclass{article}
Input \begin{document}
Sample.tex My first LaTex document.
\end{document}
Output

PDF file

May 3, 2025 25
LaTex Example

Sample.tex
Input

TeXnicCenter

Output

PDF file

May 3, 2025 26
Source code of your first LaTeX document

Sample.tex

\documentclass{article}
\begin{document}
My first LaTex document.
\end{document}

May 3, 2025 Latex for Research Documentation, BMSCE 27


LaTex Platform - On Windows

Backend tool, MiKTex which processes Latex files.


Frontend tool, TeXnicCenter for creating and editing Latex
documents.

\documentclass{article}
Input \begin{document}
Sample.tex My first LaTex document.
\end{document}

TeXnicCenter Tool
May 3, 2025 Latex for Research Documentation, BMSCE 28
Practice
 Steps to Create and Compile your first
latex document
 Press Start -> All Programs ->
TexnicCenter

May 3, 2025 Latex for Research Documentation, BMSCE 29


Practice
 Steps to Create and Compile your first
latex document
 Press Start -> All Programs ->
TexnicCenter
 Click menu item
File -> Open -> File -> Select the file
sample.tex

May 3, 2025 Latex for Research Documentation, BMSCE 30


Steps to Create and Compile your first latex
document (contd …)

 To build
Press the keys Ctrl-F7

 To build and view output


Press the keys Ctrl-Shift-F5

May 3, 2025 Latex for Research Documentation, BMSCE 31


To produce an output like this

May 3, 2025 32
Next we will Learn
What is the Latex command to insert
•Author name
•Date
•Title
into the document.

May 3, 2025 33
Answer

A document will have: Title of the document,


Name of the author and Date of creation

 \title{Your Title} will assign a title for the document.


 \author{Your Name} will assign the name of author
to the document.
 \date{any date} will assign a date to the document.
Use \today to insert today’s date.
Use all of them before \begin{document} in your
document
 Use \maketitle immediately after \begin{document}

May 3, 2025 34
LaTex Program: Practice
Sample.tex
\documentclass[12pt,a4paper]{article}
\usepackage{times}
\title{Introduction to Latex}
\author{Dr. Umadevi V}
\date{\today}
\begin{document} PDF file
\maketitle
My first LaTex document. Latex is a document
preparation system for the Text
typesetting………
\end{document} PDF file

May 3, 2025 35
Question
Among the following identify which one is the correct order
of commands
a. \maketitle \begin{document} \end{document}
b. \begin{document} \maketitle \end{document}
c. \begin{document} \end{document} \maketitle

May 3, 2025 36
Answer
Among the following identify which one is the correct order
of commands
a. \maketitle \begin{document} \end{document}
b. \begin{document} \maketitle \end{document}
c. \begin{document} \end{document} \maketitle

May 3, 2025 37
Question: Identify missing line of code

Sample.tex

May 3, 2025 38
Question: Identify missing line of code

Sample.tex Correct Code

May 3, 2025 39
Question: Identify error in this code
Sample.tex

May 3, 2025 40
Question: Identify error in this code
Correct Code

May 3, 2025 41
Agenda

 Introduction to LaTex
 Document Structure
 Document classes
 Packages
 Environments

May 3, 2025 42
Packages
 LaTeX "packages" serve the same function
as libraries for programming languages.
 A package contains a set of commands that
are not built into the core of LaTeX, but
useful for special purposes.
 There exist hundreds of packages.
 To load a package, add a \
usepackage{package name} instruction in
the area between the \documentclass
and \begin{document}

May 3, 2025 43
List of few Packages

Package Name Significance


amsmath It contains the advanced math
extensions for LaTeX.
color It adds support for colored text.
graphicx To manage figures.
setspace Lets you change line spacing.
Enumitem A package to customize the three basic
lists (enumerate, itemize and
description).
times Times New Roman font style

May 3, 2025 44
Using Packages

Package times change the font to Times New


Roman.

Example:
\documentclass[12pt,a4paper]
{article}
\usepackage{times}
\begin{document}
My first LaTex document.
\end{document}

May 3, 2025 45
Next we will learn

Inserting into the Body of Document


Sectioning
Text formatting

May 3, 2025 46
To produce an output like this

May 3, 2025 47
Sectioning

 \section{section name} These will be


numbered:
 \subsection{subsection name}
1.
 \subsubsection{subsubsection name} 1.1.
1.1.1.

Ex: 1. Introduction
• Use
\section{section name}\label{section-label}

\section{Introduction}\label{intro}

to define a label to a section.

• To cross refer a section or subsection having label ‘section-label’ Use \


ref{section-label} at the appropriate place.

May 3, 2025 48
Cross Referring a Section - Example
Latex Code
\section{Introduction}
Complex equations are described in
section \ref{CE}.

\section{Text Formatting}

\subsection{Fontsize}

\subsection{Text Justification}

\section{Mathematical Equations}
\subsection{Simple Equations}
\subsection{Complex Equations}\label{CE}

May 3, 2025 49
Cross Referring a Section - Example
Latex Code Output
\section{Introduction}
Complex equations are described in
section \ref{CE}.

\section{Text Formatting}

\subsection{Fontsize}

\subsection{Text Justification}

\section{Mathematical Equations}
\subsection{Simple Equations}
\subsection{Complex Equations}\label{CE}

May 3, 2025 50
Next we will Practice

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.

May 3, 2025 51
Header and Footer
Package for Header and Footer
\usepackage{fancyhdr}

\fancypagestyle{}
i.empty: Both header and footer are cleared
ii.Plain: Header is clear, but the footer contains the page number in the center.
iii.Headings: Footer is blank, header displays information according to document class
(e.g., section name) and page number top right.
iv.myheadings: Page number is top right, and it is possible to control the rest of the
header.

May 3, 2025 52
Program1
\documentclass{article}
\usepackage{authoraftertitle}
\usepackage{fancyhdr}
\fancypagestyle{plain}{
\fancyhead{} %Clear Exisiting Header/footer enteries
\fancyhead[C]{Artificial Intelligence}
\fancyfoot{}
\fancyfoot[C]{GSSS, Mysuru}
\fancyfoot[R]{\thepage} %To insert page number
}
\title{Large language Models}
\begin{document}
\maketitle
\section{Introduction to LLMs}
Large language models (LLMs) are a category of foundation models trained \
section{How large language models work}
LLMs operate by leveraging deep learning techniques and vast amounts of textual
data.
\end{document}

May 3, 2025 53
To Do
Modify Program1 to add the following sections and subsections

1 Introduction to LLMs

2 How large language models work


2.1 Training
2.2 Fine-tuning
2.3 Prompt-tuning
3 Large language models use cases
3.1 Information retrieval
3.2 Natural Language Processing
3.2.2 Sentiment analysis
3.2.3 Speech Processing
4 Benefits of Large Language Models

May 3, 2025 54
To produce an output like this

May 3, 2025 55
Text Formatting
 Use \textit{text} to produce italicized text
 Use \textbf{text} to produce bold-faced text
 Changing the Fontsize locally
 \begin{small} text \end{small}
 \begin{tiny} text \end{tiny}
 \begin{large} text \end{large}
 \begin{Large} text \end{Large}
 \begin{huge} text \end{huge}
 \begin{Huge} text \end{Huge}
 Text Justification
 \begin{center} text \end{center}
 \begin{flushleft} text \end{flushleft}
 \begin{flushright} text \end{flushright}

May 3, 2025 56
Program

May 3, 2025 57
Fixed-length spaces
To insert a fixed-length space, use:
\hspace{length}
\vspace{length}

\hspace stands for horizontal space,


\vspace for vertical space.

If such a space should be kept even if it falls at the end or


the start of a line, use \hspace* instead.
If the space should be preserved at the top or at the
bottom of a page, use the starred version of the command, \
vspace*

May 3, 2025 58
Next we will Practice
2. Develop a LaTeX script to create a document that displays
the sample Abstract/Summary

May 3, 2025 59
Program2
\documentclass{article}
\usepackage{ragged2e}
\title{\textbf{Abstract}}
\date{}
\begin{document}
\maketitle
\thispagestyle{empty}
\justify{LLMs are redefining an increasing…………..}
\vspace{4mm}
\justify{LLMs also excel in………...}
\vspace{4mm}
\justify{Moreover, they contribute to accessibility by assisting individuals with
disabilities, including text-to-speech applications and generating content in accessible
formats. From healthcare to finance, LLMs are transforming industries by streamlining
processes, improving customer experiences and enabling more efficient and data-
driven decision making.}
\end{document}

May 3, 2025 60
LATEX Commands forspacing, line breaking and
page breaking

Command Effect
\newpage starts a new page at that point
\pagebreak starts a new page after the current line
\newline ends a line without justifying it.
\linebreak ends a line and justifies it, i.e., stretches the
spacing between words so the line extends to
the right margin.
\hspace produces a horizontal space of given size
\vspace produces vertical space of given size
\smallskip creates a little extra vertical space between
paragraphs.
\medskip creates medium extra vertical space between
paragraphs
\bigskip creates large extra vertical space between
paragraphs
May 3, 2025 61
Next we will Practice
3. Develop a LaTeX script to create a simple title page of the
VTU project Report [Use suitable Logos and text formatting]

May 3, 2025 62
Agenda

 Introduction to LaTex
 Document Structure
 Document classes and
packages
 Environments

May 3, 2025 63
Environments

The environments in a LATEX document are


 Equations
 Tables
 Lists
 Figures

May 3, 2025 64
Next We Will Learn

How to insert Figures into the


document.

May 3, 2025 65
Figures
 \usepackage{graphicx}
 To include a figure in your document:
\begin{figure}[position] \centering
\includegrapics[size]{figure file name}
\caption{figure caption}\label{figure-label}
\end{figure}

May 3, 2025 66
Figures
 \usepackage{graphicx}
 To include a figure in your document:
\begin{figure}[position] \centering
\includegrapics[size]{figure file name}
\caption{figure caption}\label{figure-label}
\end{figure}
Eg. \begin{figure}[h]\centering
\includegraphics[width=3in]
{graph1.png}
\caption{My First Figure}\
label{fig:graph1}
\end{figure} Output

Figure 1: My First Figure


May 3, 2025 67
Figures
 Referencing figure
Simulations results are given in figure \ref{fig:graph1}.
Will give you
Simulations results are given in figure 1.
 Scaling Figures
 \includegraphics[scale=0.5]{graph1.png}
 Setting Width and Height
 \includegraphics[height=2in]{graph1.png}
 \includegraphics[width=6cm]{graph1.png}
 Rotating Figures
 \includegraphics[angle=45]{graph1.png}

May 3, 2025 68
Prorgram3
\documentclass[a4paper, 12pt]{report}
\usepackage{graphicx}
\usepackage{xcolor}
\begin{document}
\include{FrontPage-VTU}
\end{document}

May 3, 2025 69
FrontPage-VTU.tex
\thispagestyle{empty}
\begin{center}
\textbf{\large Building Conversational AI Enabled Chatbots}
\end{center}
\vspace{18mm}
\begin{center}
\begin{small}
A Project Report\\ Submitted for the Award of the Degree\\ of\\ Bachelor of
Engineering\\ in\\ Computer Science and Engineering\\ by\\ \vspace{.5cm} \
textbf{Aditya P}\\ IV SEM\\ \vspace{.3cm} Under the guidance of\\ \vspace{.5cm} \
textbf{Dr.Manjunath Kumar B H}\\ Professor, HoD\\ SJC INSTITUTE OF TECHNOLOGY\\
Visvesvaraya Technological University, Belgavi.\\
\end{small} \vspace{10mm}
\centerline{\includegraphics[scale=.6]{vtu_logo}}
\vspace{20mm} Department of Computer Science and Engineering\\
SJC INSTITUTE OF TECHNOLOGY\\
Visvesvaraya Technological University, Belgavi.\\
April 2024\\
\end{center}

May 3, 2025 70
Thanks for Listening

May 3, 2025 71

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