Latex/C2/Report-Writing/English: Author: Prof Kannan Moudgalya Date

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

5/14/2020 LaTeX/C2/Report-Writing/English - Script | Spoken-Tutorial

LaTeX/C2/Report-Writing/English
From Script | Spoken-Tutorial

Author: Prof Kannan Moudgalya

Date:

Original: 13 July 2007.

Revised: 14 June 2016

Keywords: report writing, video tutorial

Visual Cue Narration


Welcome to this spoken tutorial on Report Writing in LaTeX.

Show Slide 1 I am calling it “latek” and not “latex”.

My name is Kannan Moudgalya.

In this tutorial, we will learn how to write a document.

In particular,
Show Slide 2
How to use ‘report’ and ‘article’ class,
Learning Objectives How to create sections,
Automate the numbering of sections,
Create Table of contents and
How to create the title page.

I am creating this tutorial on our less than 10,000 Rupee laptop.

And I am using Ubuntu Linux, TeXworks, and LaTeX.

Show Slide 3 You can also use TeXworks on Windows or Mac - the method
is identical.
System Requirements

You can use LaTeX by itself, without TeXworks also.

You are welcome to use more expensive Linux computers also!

Show Slide 4 The prerequisites to learn this are the following:

Prerequisites 1. Spoken tutorials that introduce LaTeX


https://script.spoken-tutorial.org/index.php/LaTeX/C2/Report-Writing/English 1/7
5/14/2020 LaTeX/C2/Report-Writing/English - Script | Spoken-Tutorial

2. The file ‘report dot tex’


3. Knowledge of the side-by-side method, required to
practise this tutorial.

Information on all of the above are available on our


website, spoken tutorial dot org.

Let me go to the ‘TeXworks’ window.

I have already opened the file ‘report.tex’.


Open file report.tex

Use the initial version


Please download this file and practise along with me.

Point to 12pt, a4, article I am using 12pt as the font size, ‘a4 paper’ and ‘article’ class.
I am using the geometry package to set margins, through
Point to usepackage geometry
the usepackage command.
A reverse slash should come at the beginning of every
Point to reverse slash
command.
Although I will not say it explicitly, you should not forget to put
Point to reverse slash
the reverse slash.
Similarly, I will not explicitly mention braces, but you may have
Point to braces
to use them.
Please reproduce exactly what is done in the video.
The usepackage command has optional parameters inside
square brackets.
Point to usepackage
The name of the package is within braces.

I have set horizontal and vertical margins of 4.5 cm each.


Point to the top left hand corner Look at the top left hand corner of the ‘TexWorks’ window.
From the pull down menu >> In case ‘pdfLaTeX’ is not already chosen, please select it from
select pdfLaTeX’ the pull down menu.
Point to the green circle with an arrow To the left, there is a green circle with an arrow.
Click on the arrow Click the arrow and compile this file.
Point to the pdf We get the file ‘report.pdf’ shown on the right hand side.
Look at the titles - section, sub-section and sub-sub-section in
Point as per narration
the output file.
These are created using identical commands given in the source
file.
Observe the distinctive features of these section titles in the pdf
Point as per narration
file.
The sizes of these titles are created proportionately and
Point as per narration
automatically.
Also, the section title is the largest and the sub-sub-section title
Point as per narration
is the smallest.
Irrespective of blank lines in the source file, the output remains
the same.
Delete one line >> compile Let me delete one line here.

https://script.spoken-tutorial.org/index.php/LaTeX/C2/Report-Writing/English 2/7
5/14/2020 LaTeX/C2/Report-Writing/English - Script | Spoken-Tutorial

Compile.

There is no change here.

Let me now change the paper size to a5.

Change paper size a4 to a5


This will reduce the width of every line in the output.

Click on the green arrow Let me compile the text as we did before.
Let me magnify it by pressing control +, so that you can see the
Press Ctrl +
output clearly.
Bring it to the centre. Let me bring it to the centre.
Point to a5 For the rest of this tutorial, we will use the a5 paper only.
You are welcome to change it to a4.
Note that I did not save the file.

This is because ‘TexWorks’ saves the file automatically before


compilation.

Change 12pt to 10pt >> Click on the


Let us change the font to a smaller one of 10pt and compile.
green arrow
Hey, the font size has become smaller - should we be surprised?
But, proportional sizing and spacing remain the same.
Change 10pt to 12pt Let me change the font back to 12pt.
We will now discuss another important aspect of section titles.
It is the automatic generation of section numbers.
To illustrate this further, I will add a new section called
Before the first subsection
‘Inserted section’.
On compilation, it appears here with a correct number in
sequence.
Click on the green arrow
Thus, numbering also is automatically taken care of by LaTeX.

LaTeX creates table of contents through a file with extension


“toc”.
Let me add ‘table of contents’, one word, here.
Add \tableofcontents >>

Click on the green arrow


Compile.

The word ‘Contents’ appears in the output but nothing else.


Compile again Let me compile once again.
All the titles are now present in the table of contents along with
page numbers.
You have to compile it the third time to get correct page
Compile again
numbers.
Why three times?

Please see the assignment.

https://script.spoken-tutorial.org/index.php/LaTeX/C2/Report-Writing/English 3/7
5/14/2020 LaTeX/C2/Report-Writing/English - Script | Spoken-Tutorial

Just one word, ‘table of contents’, is what is needed.

Point to 'tableofcontents'
What an amazing capability in LaTeX!

This is achieved through a file with extension “toc”


that LaTeXmaintains.
This multi pass compilation procedure works with changes in
titles as well.
Change the title “Inserted section” to
Let me change the section title to ‘Modified section’.
“Modified section”
Compile Let me compile it. ‘Table of Contents’ does not change.
Compile again Let me compile it once more and solve this problem.
Now we have a modified section here.
We will create a title for this document.
Point to ‘begin document’. Let me do it here, just before ‘begin document’.
I will create a ‘title’.

‘Author’ information.

Type title, author, date, commands And the ‘date’ as follows.

So, I have added these three commands.

Order in which these come or the place where they come does
Point to the three commands
not matter.
Point to begin document But they should come before the begin document command.
Point to reverse slash Don’t forget the reverse slash in all the commands.
Point to double slash Double slash here means the next line.
Compile We compile it.
Point to the pdf file. There are no changes in the ‘pdf’ file.
The reason is that I have not told LaTeX what to do with this
information.
So, I add the ‘make title’ command, one word, just after
Add \maketitle after \begin document
the begin document.
Compile Let me compile it.
The title appears in the output, at the place where I put this
command.
Point to the pdf file.
Namely, at the beginning of the document.

We will now change the class of this document from 'article' to


Change 'article' to 'report'.
'report'.
Simultaneously, we define a chapter with this command:
Insert the following before first section:
Chapter First Chapter
“\chapter{First Chapter}”
Report style requires at least one chapter.

Compile Let us compile it and see the output.

https://script.spoken-tutorial.org/index.php/LaTeX/C2/Report-Writing/English 4/7
5/14/2020 LaTeX/C2/Report-Writing/English - Script | Spoken-Tutorial

Notice the changes in the output.


Point to the Title Title appears on a whole page that has no number.
Go to contents page Contents also appear on an entire page, with page number 1.
Please pause here and find out how many entries
in Contents are wrong.
Let us go to the next page.

Notice the way the chapter begins.


Go to the next page
How many distinguishing features can you identify?

You should find at least five.

Compile Let us compile it for the second time.


Observe that the Contents page now has the correct information.

Point to the pdf


The page numbers are correct now.

\chapter{New Chapter}
Let us add a chapter, called ‘New Chapter’.
before \end{document}

Compile Compile it.


Compile again Let me compile once again and see it coming in a new page.
\appendix before the newly created
Insert the command appendix before this new chapter.
chapter
Point to “Appendix” On compilation, you see the word “Appendix” appearing.
The chapter number is A.
Switch to next slide automatically Let us go to the slides now.
Let us summarise what we learnt in this tutorial.

Writing a document in LaTeX

Show Slide 5 Automatically creating chapter and section titles

Summary Automatic numbering

Table of contents and title page creation

Creating Appendix

Show slide 6 Let me give some assignments.


# A4 size paper This assignment is on a4 paper and letter paper.

Please pause the video, read the slide and do the assignment.

2. Font Size This assignment is on font size.


3. report.toc This is on ‘report dot toc’.
4. Number of compilations This is on number of compilations.
5. Table of Contents This is on the location of Table of Contents.
6. Chapter This assignment is on the use of the chapter command
in reportand article.
https://script.spoken-tutorial.org/index.php/LaTeX/C2/Report-Writing/English 5/7
5/14/2020 LaTeX/C2/Report-Writing/English - Script | Spoken-Tutorial

This assignment is on the effect of the appendix command in


7. Appendix in report
the report class.
This is the same as the previous assignment, but in the article
8. Appendix in article
class.
9. Geometry package This is on the geometry package.
10. Classes This assignment is on LaTeX classes, in general.
With this, we have come to the end of this tutorial.
This video summarises the Spoken Tutorial project.
About project slide
If you do not have bandwidth, you may download and watch it.

We conduct workshops using Spoken Tutorials.

Give certificates.
Workshop slide
Please contact us.

Do you have questions in THIS Spoken Tutorial?

Please visit this site.

Spoken Tutorial Forum slide Choose the minute and second where you have the question.

Explain your question briefly.

Someone from our team will answer them.

The Spoken Tutorial forum is for specific questions on

this tutorial.

Please do not post unrelated and general questions on them.


Slide for no cluttering
This will help reduce the clutter.

With less clutter, we can use these discussions as instructional

material.

For topics not covered in spoken tutorials, visit stack exchange at


this address.

This is a great place to get answers on LaTeX.


General questions
You may also have questions on our workshops, certificates, etc.

For this, get in touch with us at this email address.

Spoken Tutorial project is funded by NMEICT, MHRD,


Government of India.
Thanks for joining.
https://script.spoken-tutorial.org/index.php/LaTeX/C2/Report-Writing/English 6/7
5/14/2020 LaTeX/C2/Report-Writing/English - Script | Spoken-Tutorial

Goodbye.

https://script.spoken-tutorial.org/index.php/LaTeX/C2/Report-Writing/English 7/7

You might also like