Manual On Writing Project Reports
Manual On Writing Project Reports
Manual On Writing Project Reports
using LATEX
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
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
5
6
1
Basics
For all the topics covered, self explanatory illustrations are given...
1.1
1.2
1.2.1
1.2.2
Enumerate
1.2.3
CHAPTER 1. BASICS
Description
1.3
Fonts
1.4
Figures
\begin{figure}[h]
\includegraphics[scale=0.50]{images/vnc.jpg}
\caption{caption for figure}
\label{fig:vnc}
\end{figure}
1.4.1
CHAPTER 1. BASICS
Subfigures
Some time you may need to add two or more subfigures like this....
\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
CHAPTER 1. BASICS
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
Usage
\fref {fig:vnc}
\tref {tab:1}
We get
Figure 1.1
Table 1.1
2
Backmatter
This composes of Bibliography, appendix
2.1
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
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
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
\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
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
2.5
Including pdf-pages
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
2
b2 4ac b
x=
2a
\begin{equation}
x=\frac{\sqrt[2]{b{2}-4ac}\pm{b}}{2a}
\end{equation}
13
(3.1)
CHAPTER 3. MISCELLANEOUS
EX
3.2
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