LaTeX/C2/Report-Writing/English
Author: Prof Kannan Moudgalya
Date:
- Original: 13 July 2007.
- Revised: 14 June 2016
Keywords: report writing, video tutorial
|
|
Show Slide 1 | Welcome to this spoken tutorial on Report Writing in LaTeX.
I am calling it “latek” and not “latex”. My name is Kannan Moudgalya. |
Show Slide 2
Learning Objectives |
In this tutorial, we will learn how to write a document.
In particular,
|
Show Slide 3
System Requirements |
I am creating this tutorial on our less than 10,000 Rupee laptop.
And I am using Ubuntu Linux, TeXworks, and LaTeX.
|
Show Slide 4
Prerequisites |
The prerequisites to learn this are the following:
Let me go to the ‘TeXworks’ window. |
Open file report.tex
Use the initial version |
I have already opened the file ‘report.tex’.
|
Point to 12pt, a4, article | I am using 12pt as the font size, ‘a4 paper’ and ‘article’ class. |
Point to usepackage geometry | I am using the geometry package to set margins, through the usepackage command. |
Point to reverse slash | A reverse slash should come at the beginning of every command. |
Point to reverse slash | Although I will not say it explicitly, you should not forget to put the reverse slash. |
Point to braces | Similarly, I will not explicitly mention braces, but you may have to use them. |
Please reproduce exactly what is done in the video. | |
Point to usepackage | The usepackage command has optional parameters inside square brackets.
|
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 >> select pdfLaTeX’ | In case ‘pdfLaTeX’ is not already chosen, please select it from 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. |
Point as per narration | Look at the titles - section, sub-section and sub-sub-section in the output file. |
These are created using identical commands given in the source file. | |
Point as per narration | Observe the distinctive features of these section titles in the pdf file. |
Point as per narration | The sizes of these titles are created proportionately and automatically. |
Point as per narration | Also, the section title is the largest and the sub-sub-section title 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.
Compile. There is no change here. |
Change paper size a4 to a5 | Let me now change the paper size to a5.
|
Click on the green arrow | Let me compile the text as we did before. |
Press Ctrl + | Let me magnify it by pressing control +, so that you can see the 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.
| |
Change 12pt to 10pt >> Click on the green arrow | Let us change the font to a smaller one of 10pt and compile. |
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. | |
Before the first subsection | To illustrate this further, I will add a new section called ‘Inserted section’. |
Click on the green arrow | On compilation, it appears here with a correct number in sequence.
Thus, numbering also is automatically taken care of by LaTeX. |
LaTeX creates table of contents through a file with extension “toc”. | |
Add \tableofcontents >>
Click on the green arrow |
Let me add ‘table of contents’, one word, here.
|
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. | |
Compile again | You have to compile it the third time to get correct page numbers. |
Why three times?
| |
Point to 'tableofcontents' | Just one word, ‘table of contents’, is what is needed.
|
This is achieved through a file with extension “toc” that LaTeX maintains. | |
This multi pass compilation procedure works with changes in titles as well. | |
Change the title “Inserted section” to “Modified section” | Let me change the section title to ‘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’. |
Type title, author, date, commands | I will create a ‘title’.
‘Author’ information. And the ‘date’ as follows.
|
Point to the three commands | Order in which these come or the place where they come does 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. | |
Add \maketitle after \begin document | So, I add the ‘make title’ command, one word, just after the begin document. |
Compile | Let me compile it. |
Point to the pdf file. | The title appears in the output, at the place where I put this command.
|
Change 'article' to 'report'. | We will now change the class of this document from 'article' to 'report'. |
Insert the following before first section:
“\chapter{First Chapter}” |
Simultaneously, we define a chapter with this command:
Chapter First Chapter Report style requires at least one chapter. |
Compile | Let us compile it and see the output. |
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. | |
Go to the next page | Let us go to the next page.
Notice the way the chapter begins. How many distinguishing features can you identify? You should find at least five. |
Compile | Let us compile it for the second time. |
Point to the pdf | Observe that the Contents page now has the correct information.
|
\chapter{New Chapter}
before \end{document} |
Let us add a chapter, called ‘New Chapter’. |
Compile | Compile it. |
Compile again | Let me compile once again and see it coming in a new page. |
\appendix before the newly created chapter | Insert the command appendix before this new 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. |
Show Slide 5
Summary |
Let us summarise what we learnt in this tutorial.
Writing a document in LaTeX Automatically creating chapter and section titles 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 report and article. |
7. Appendix in report | This assignment is on the effect of the appendix command in the report class. |
8. Appendix in article | This is the same as the previous assignment, but in the 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. | |
About project slide | This video summarises the Spoken Tutorial project.
If you do not have bandwidth, you may download and watch it. |
Workshop slide | We conduct workshops using Spoken Tutorials.
Give certificates. Please contact us. |
Spoken Tutorial Forum slide | Do you have questions in THIS Spoken Tutorial?
Please visit this site. Choose the minute and second where you have the question. Explain your question briefly. Someone from our team will answer them. |
Slide for no cluttering | The Spoken Tutorial forum is for specific questions on
this tutorial. Please do not post unrelated and general questions on them. This will help reduce the clutter. With less clutter, we can use these discussions as instructional material. |
General questions | For topics not covered in spoken tutorials, visit stack exchange at this address.
This is a great place to get answers on LaTeX. 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.
Goodbye. |