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

*********************************************************************

TO TYPE THEOREMS IN LATEX

http://en.wikibooks.org/wiki/LaTeX/Theorems
\usepackage{amsthm}
\newtheorem{defn}{Definition} %this will start a definition section that can be used
\newtheorem{theorem}{Theorem} %this will start a theorem section that can be used
\begin{defn}
Here is a new definition
\end{defn}
\begin{defn}
Here is yet another definition
\end{defn}
\begin{theorem}
Prime numbers are infinite.
\end{theorem}
\begin{proof}
So why to prove this statement... open up G. H. Hardys Mathematicians Apology ;-)
\end{proof}
\end{document}
*********************************************************************
TO INCLUDE AN ALGORITHM
\usepackage{algorithmic}
\usepackage{algorithm}
\begin{algorithm}
\caption{The preprocessing component}
\begin{algorithmic}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\REQUIRE G(V,E)
\ENSURE
\WHILE {$i<10$}
\STATE HIP HIP HURRAY
\STATE $i++$
\ENDWHILE
\end{algorithmic}
\end{algorithm}

Excellent resource : http://en.wikibooks.org/wiki/LaTeX/Algorithms_and_Pseudocode


*********************************************************************
TO OUTPUT COLOR FONT
\usepackage{color}
\textcolor{red}{This text will be displayed in red}
*********************************************************************
TO INCLUDE COMMENTS
\usepackage{verbatim} %this must be included in the beginning of the document
\begin{comment}
Whatever you type here will not be displayed in the output text
........
........
........
enjoy!
\end{comment}
*********************************************************************
TO INCLUDE BIBLIOGRAPHY OR REFERENCES:
1) Create a file biblio.bib and include the details of your references there.
This file must contain the details in the following format:
%Note that {D} and {I} below are placed within brackets, that is because if we miss the
brackets these letters willbe displayed in lowercase.
@Article{robertson:96,
author =
{Robertson, Douglas S. and
Grant, Michael C.},
title =
{Feedback and Chaos in {D}arwinian Evolution, part {I}:
Theoretical Considerations},
journal =
{Complexity},
year =
1996,
volume =
2,
number =
1,
month =
{sept/oct},
pages =
{10-14}
}
%| Books and collections
@Book{brown:1836,
author =
{Brown, Thomas},
title =
{The Conchologist's Text-book},
publisher = {Archibald Fullerton and Co},
year =
1836,
address =
{Glasgow}
}
2. In the main latex file namely bibdemo.tex include the following two lines:
\bibliography{biblio}

% the name of the BibTeX file without extension

\bibliographystyle{plain}

% the type of formatting to use

3. Plain is one type of formating. To know different available types, refer


http://amath.colorado.edu/documentation/LaTeX/reference/faq/bibstyles.html

4. When you need to cite a paper.. just say \cite{robertson:96} in your main document

5. Then, compile the document using these commands:


latex bibdemo
bibtex bibdemo
latex bibdemo
latex bibdemo
Note that you must do "latex filename" many times.
*********************************************************************
TO INCLUDE FIGURE IMAGE
\usepackage{graphicx}
What next?
The best way is to read the following page:
http://www.andy-roberts.net/misc/latex/latextutorial6.html
**********************************************************************

To reverse number the items:


1) download revnum.sty file and install it
2) Use the following code to get the countdown listing:

\documentclass[12]{article}

\usepackage{revnum} % reverse nunmbering environment


\begin{document}
%this counter must be manually
% set so that the last publication is labelled as 1
\newcounter{totalnumpubs}
\setcounter{totalnumpubs}{100}

\begin{revnumerate}[\value{totalnumpubs}]

\item Sudarshan
\item Megha
\end{revnumerate}

\end{document}

**********************************************************************

**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************

**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************

You might also like