Manual On Writing Project Reports

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

Brief Manual On Writing Project-Report

using LATEX

May 11, 2011

version 0.1

Introduction
While writing a long report, we should bother more on content than formatting it.
This is where LATEXcomes into picture. Here you need to tell to LATEX, about the required
format, it will do on its own & will give you a formatted document.
This document is giving overview of small set of keywords of LATEX required, while
creating report. To know more details or if u get any errors, refer the following docs,
LATEX WikiBook: A quick reference.. http://en.wikibooks.org/wiki/LaTeX
Memoir Manual: Our report-template is written using Memoir-document-class. Hence
u may need to refer manual to moidfy template.
1. In linux to get memoir manual, type in terminal,texdoc memoir
2. On web:http://mirror.ctan.org/macros/latex/contrib/memoir/memman.
pdf
Similarly if u want to know more options & details, look into the manual of corresponding packages, say Graphicx-package for Image handling, amsmath-for mathematics

Our Template Structure


The document is divided into several file & all are included in report.tex file. You can
create some more files on your convenience & then u need to include it in report.tex.
Finally a pdf will be generated out of report.tex.
Get upto-date template from http://www.gnubox.wordpress.com/

Any suggestions or comments,


[email protected]
[email protected]

Enjoy W riting Report

Contents
Contents

List of Figures

1 Basics
1.1 Chapters, Section Subsection . .
1.2 Itemize, Enumerate & Description
1.3 Fonts . . . . . . . . . . . . . . . .
1.4 Figures . . . . . . . . . . . . . . .
1.5 Table . . . . . . . . . . . . . . . .
1.6 Referencing table & figures . . . .
2 Backmatter
2.1 Including peice of code .
2.2 Bibliography & citations
2.3 Citations . . . . . . . . .
2.4 Appendix . . . . . . . .
2.5 Including pdf-pages . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

4
4
4
5
5
6
7

.
.
.
.
.

8
8
10
11
11
11

References

12

3 Miscellaneous
3.1 Installation of LATEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 For Further Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13
14
14

List of Figures
1.1
1.2

caption for figure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Figure with two subfigures . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5
6

1
Basics
For all the topics covered, self explanatory illustrations are given...

1.1

Chapters, Section Subsection

For creating chapter ,section, subsections,


\chapter{Chapter Name}
\section{Section Name}
Similarly for further
\subsection{} \subsubsection{}

1.2
1.2.1

Itemize, Enumerate & Description


Itemize

This is item number 1


This is item number 2
\begin{itemize}
\item This is item number 1
\item This is item number 2
\end{itemize}

1.2.2

Enumerate

1. Observer the numbering


2. point number 2
\begin{enumerate}
\item Observer the numbering
\item point number 2
\end{enumerate}

Writing Project-Report Using LATEX

1.2.3

CHAPTER 1. BASICS

Description

This will be helpful for while writing acronyms & glossary


TEX Typesetting tool
LATEX Built on TeX, composed of many Macros
\begin{description}
\item[\TeX] Typesetting tool
\item[\LaTeX] Built on TeX composed of Macros
\end{description}

1.3

Fonts

To get variable types & dimensions


\textsc- Small Caps
\textbf- bold fonts
\textit or emph- italicized
\small
\large, \Large, \LARGE
\huge. \Huge, \HUGE

1.4

Figures

\begin{figure}[h]
\includegraphics[scale=0.50]{images/vnc.jpg}
\caption{caption for figure}
\label{fig:vnc}
\end{figure}

Figure 1.1: caption for figure


In LATEX, figure used to flow to top or bottom of page. This floating can be fixed to
certain positions by using,
[h]-here, to get figure where u include
[t]-top of page
[b]-bottom of page.
5

Writing Project-Report Using LATEX

1.4.1

CHAPTER 1. BASICS

Subfigures

Some time you may need to add two or more subfigures like this....

Caption for subfigure1

Caption for subfigure2

Figure 1.2: Figure with two subfigures

\begin{figure}[h]
\centering
%\fbox..this adds a box around the figure
\subbottom[Caption for subfigure1]
{\fbox{\includegraphics[height=6cm]{images/vtu.png}}}
\hfill
\subbottom[Caption for subfigure2]
{\fbox{\includegraphics[height=6cm]{images/jcelogo.jpg}}}
\caption{Figure with two subfigures}
\end{figure}

1.5

Table

\begin{tabular}[ pos ]{ preamble } rows \end{tabular}


\begin{tabular*}{ width }[ pos ]{ preamble } rows \end{tabular*}
\begin{tabularx}{ width }[ pos ]{ preamble } rows \end{tabularx}
In preamble we can specify the indention of columns, c-center, l-left, r-right, p-specify
width, m-specify height &| (pipe) for vertical lines inbetween columns \hline for
horizontal line
\begin{table}[h]
\centering
6

Writing Project-Report Using LATEX

CHAPTER 1. BASICS

\caption{a simple table}\label{tab:1}


\begin{tabular}{l|c|r}
left justified & center & right justified \\ \hline
21 & 22 & 23 \\
31 & 32 & 33 \\
\end{tabular}
\end{table}
\end{center}
Table 1.1: a simple table
left justified
21
31

center
22
32

right justified
23
33

If we have long strings, LATEX will try to put everything in one line & table go out of
page. Hence u need to use {p{<width>}
\begin{tabular}{l|c|p{3cm}}
Third column will be fixed to 3cm
\begin{tabularx}{300pt}{l|X|X}
Table width is 300pt & 2nd,3rd column widths are adjusted automatically, so that
total width remain as specified
\begin{tabularx}{0.9\textwidth}{l|X|X}
to get table of 90% textwidth
tabular* is not flexible as tabularX. To know more, refer 227 page of memoir manual.

1.6

Referencing table & figures

\fref{<label-string-of-figure>}, for figures


\tref{<label-string-of-table>},for tables

Table 1.2: Referring tables & figures


Lables used before
\label {fig:vnc}
\label {tab:1}

Usage
\fref {fig:vnc}
\tref {tab:1}

We get
Figure 1.1
Table 1.1

2
Backmatter
This composes of Bibliography, appendix

2.1

Including peice of code

Normally source code are not included in report if necessary they are added in appendix.
There are two ways...
1. Using Verbatim
2. By using Listing

2.1.1

Listing

Here if u specify the language, it will automatically does formatting of code, like italicizing comments, highlighting some elements....
Usage: To include a source file named fr2.c placed in folder, code
\lstset{language=[ANSI]C}
\lstinputlisting{code/fr2.c}
For more info, see Listings manual
#define F CPU 1000000UL
#include<avr / i o . h>
#include < u t i l / d e l a y . h>
void UART transmit ( unsigned char data ) ;
int main ( void )
{
unsigned char i , message1 [ ] = l e f t ;
unsigned char message2 [ ] = r i g h t ;
unsigned char message3 [ ] = up ;
unsigned char message4 [ ] = down ;
unsigned char message5 [ ] = r c l i c k ;
unsigned char message6 [ ] = l c l i c k ;
DDRD=0x00 ;
PORTD=0xFF ;
UCSRA=0;
8

Writing Project-Report Using LATEX

CHAPTER 2. BACKMATTER

// l o n g i n t cap ;
long int c nt =0;
TCCR1A=0b00000000 ;
TCCR1B=0b10000001 ; // g e t t i m e r v a l u e on f a l l i n g edge
TIFR|=(0<<ICF1 ) ; //no p r e s c a l e r . . o v e r f l o w = 6 5 . 5 ms
TIFR|=(0<<TOV1 ) ;
while ( 1 )
{
while ( 1 )
{
i f ( b i t i s c l e a r (TIFR , 2 ) ) //no o v e r f l o w
{
i f ( b i t i s s e t (TIFR , 5 ) ) // d e t e c t r i s i n g edge
{
c nt=c n t +1;
// count p u l s e s
// cap=ICR1 ;
}
}
else
break ;
}
c n t =0;
TIFR|=(1<<TOV1 ) ;
return ( 0 ) ;
}
Similarly u can include for other languages
\lstset[language=Java]
\lstset[language=C]
\lstset[language=Matlab]
\lstset{language=[x86masm]Assembler}

2.1.2

Verbatim

Writing code within an environment, verbatim


\begin{verbatim}
#include<stdio.h>
main()
{
printf("Welcome to \LaTeX World")
}
\end{verbatim}
9

Writing Project-Report Using LATEX

CHAPTER 2. BACKMATTER

Output:
#include<stdio.h>
main()
{
printf("Welcome to \LaTeX World")
}

2.1.3

verbatiminput

Its preferable to include source code from file directly. This can be done as
\verbatiminput{code/fr2.c}

2.2

Bibliography & citations

An important component of all reports. Even u Wikipedia, gives a lot of importance


for references. Here is one simple way, there is another format which you can see from
reference manuals
\bibitem{citation-label}{reference-string}

\renewcommand{\ bibname }{ R e f e r e n c e s }
%i n c l u d e b i b l i o g r a p h y i n t a b l e o f c o n t e n t s
\begin{ t h e b i b l i o g r a p h y }{20}
%f o r b o o k s & j o u r n a l s
\bibitem{Tug} H. P a r t l : German \TeX,
\emph{TUGboat} Volume 9 , I s s u e 1 ( 1 9 8 8 )
\bibitem{ minix } Andrew S . Tanenbaum :
\emph{ Operating Systems Design and Implementation } ,
P r e n t i c e Hall , 2006
%f o r w e b l i n k s
\bibitem{ dfb } DirectFB documentation ,
\ u r l { http : / / e l i n u x . or g / DirectFB }
\bibitem{ putty }PuTTy on Wikipedia ,
\ u r l { http : / / en . w i k i p e d i a . or g / w i k i /PuTTy}
%f o r c o n f e r e n c e p a p e r s
\bibitem{ c o n f } N i c o l a L . C Talbot and Gavin C. Cawley .
A f a s t index assignment algorithm f o r robust
v e c t o r q u a n t i s a t i o n o f image data .
\emph{ In P r o c e e d i n g s o f t he I . E . E . E .
I n t e r n a t i o n a l C o n f e r e n c e on Image P r o c e s s i n g } ,
Santa Barbara , C a l i f o r n i a , USA, October 1 9 9 7 .
10

Writing Project-Report Using LATEX

CHAPTER 2. BACKMATTER

\end{ t h e b i b l i o g r a p h y }
\ textbf {NOTE: } This i s not t h e r e f e r e n c e o f manual but
t h e output o f code g i v e n i n B i b l i o g r a p h y s e c t i o n

2.3

Citations

For giving citations, u can use cite command by giving citation-label in your report,
wherever u want. To get a citation like this,[1]
\cite{Tug}% Tug is label for 1st reference
Similarly wherever u need citation include, \cite{<label in bibliography>}, like [2],[3].
\cite{minix}
\cite{dfb}

2.4

Appendix

In this environment, chapter numberining will be in the form of Appendix A, B, C...


\ addappheadtotoc
%add a p p e n d i x t o t a b l e o f c o n t e n t s
\begin{ a p p e n d i c e s }
\ c h a p t e r {ATMega 8}
The d a t a s h e e t o f ATMega microc o n t r o l l e r i s a t t a c h e d
\ i n c l u d e p d f [ pages =13]{atmega 8 . pdf }
%h e r e i t appends o n l y 3 p a g e s
\end{ a p p e n d i c e s }

2.5

Including pdf-pages

For including pdfpages, u can use


\includepdf[page=1-10]{atmega8.pdf}

11

References
[1] H. Partl:German TEX, TUGboat Volume 9, Issue 1 (1988)
[2] Andrew S. Tanenbaum: Operating Systems Design and Implementation, Prentice
Hall, 2006
[3] DirectFB documentation, http://elinux.org/DirectFB
[4] PuTTy on Wikipedia, http://en.wikipedia.org/wiki/PuTTy
[5] Nicola L. C Talbot and Gavin C. Cawley. A fast index assignment algorithm for
robust vector quantisation of image data. In Proceedings of the I.E.E.E. International
Conference on Image Processing, Santa Barbara, California, USA, October 1997.
NOTE: This is not the reference of manual but the output of code given in Bibliography section

12

3
Miscellaneous
3.0.1

Special symbols

Special symbols like, &, $, %, #,\... should be attached with a backslash prefix
\&, \$, \%, \#, \backslash
For opening quotes, inverted commas 0 , cant be used. Rather, grave accent, needs
to be used. No problem for closing quotes
opening quote should be with grave accent"
You can also use different environments for theorem & quotes
\begin{quote}
640K memory is ought to be enough for anybody"
sourceatright{Bill Gates, 3 decades ago}
\end{quote}
640K memory is ought to be enough for anybody
Bill Gates, 3 decades ago

3.0.2

Mathematics

LATEX is popular in math writings.Its better to refer http://en.wikibooks.org/wiki/


LaTeX/Mathematics
For small formula to be included in a para like,F = mc2 , following is the code
\( F=mc^{2}\)%this is the code
For equations, which will be numbered

2
b2 4ac b
x=
2a
\begin{equation}
x=\frac{\sqrt[2]{b{2}-4ac}\pm{b}}{2a}
\end{equation}
13

(3.1)

Writing Project-Report Using LATEX


3.1 Installation of LAT

CHAPTER 3. MISCELLANEOUS

EX

Things required are


Your favourite editor to write .tex file. Add tex-plugin to it if necessary
ex: gedit, texmaker, emacs, kile
TEXlive for doing formatting. It includes LATEX, pdfLATEX
a pdf viewer
In Linux
For Ubuntu/ Debian derivitives: sudo apt-get install texlive gedit-latex-plugin
This will install all latex components
Otherwise get texlive.iso, mount it to a folder & run installer script
In Windows
By installing miktex http://www.miktex.org/

3.2

For Further Help

LATEX Wikibook
The Not So Short Introduction to LATEX: a popular manual for startup
www.ctan.org/tex-archive/info/lshort/english/lshort.pdf
Memoir document-class manual,
www.tex.ac.uk/ctan/macros/latex/contrib/memoir/memman.pdf
Apart from these u may find numerous forums & useful tutorial blogs

14

You might also like