Friday, January 27, 2012

LaTeX is a great tool for typesetting and it is more powerful than MS-Word. It has a steep learning curve and that is why I believe these video tutorials will help you guys. Today, I am going to talk about lists in LaTeX. LaTeX can produce both bulleted lists or unordered lists, and numbered lists or ordered lists. We will also see how to use lists with descriptions given to each list item.

Specifically, we are going to have an introduction of following topics in LaTex:

Lists in LaTeX: Itemize, enumerate, inparalist, and description

Itemized list in LaTeX for bullets

enumerated list in LaTeX for numbered lists

inparalist in LaTeX for lists wrapped around text

description lists in LaTeX for lists with description for each item

Nested lists in LaTeX

Using styles for numbering lists (roman, in parenthesis etc.)

Use of paralist LaTeX package

Here is the video for this tutorial:

If you have a question or comment please do not hesitate to leave a comment. I will answer to as many comments as I can.

The code for this tutorial is here:

\documentclass{article}
\usepackage{paralist}
\begin{document}
\title{Creating Bullets and Lists with \LaTeX by http://QuickLatex.blogspot.com}
\maketitle
\section{Bullets and Lists in \LaTeX}
\begin{itemize}
\item First bullet is here
\item Second bullet is here
\end{itemize}
\begin {enumerate}
\setcounter{enumi}{5}
\item This is item number 1
\item This is item number 2
\end{enumerate}
\begin {description}
\item [Chapter 1] This is the first desciption
\item [Chapter 2] This is the second description
\end{description}
\begin{inparaenum}[(i)]
There are three advantages of this method:
\item it is faster,
\item it is cost effective, and
\item it is efficient
\end{inparaenum}
\end{document}

Thursday, January 19, 2012

Those who use LaTeX for their documentation related works, usually are from STEM (Science, Technology, Engineering, Mathematics) background. These people use equations more often than not. Therefore, I will introduce how to write equations in LaTeX today.

Thursday, January 12, 2012

People in Computer Science and Mathematics department often write algorithms for their papers, thesis, and other research articles. In this tutorial I will explain how to write an algorithm in Latex using the algorithm and algorithmic package in Latex. I will explain the basics of an article and show how simple building blocks can be added to Latex to write a full fledged professional quality algorithm.

Specifically, we will learn the following in this tutorial:

How to write an algorithm in Latex

Use of algorithm and algorithmic package

How to use loops in an algorithm

How to use IF statements in an algorithm

How to add caption to an algorithm

How to label an algorithm to refer it in the document

The code for this algorithm is shown below and explained in the video.

Here is the code used in this video:

\documentclass{article}\usepackage{algorithm}\usepackage{algorithmic}\begin{document}\begin{algorithm}\textbf{INPUT:} Set of Base Layer polygon $S_b$ and Set of Overlay Layer polygon $S_o$\\\textbf{OUTPUT:} Intersection Graph ($V$,$E$), where $V$ is set of polygons and $E$ is edges among polygons with intersecting bounding boxes.\begin{algorithmic}\STATE Parallel Merge Sort set $S_o$ of overlay polygons based on X co-ordinates of bounding boxes\footnotemark[1]\FORALL{base polygon $B_i$ in set $S_b$ of base polygons} \STATE find $S_x \subset S_o$ such that $B_i$ intersects with all elements of $S_x$ over $X$ co-ordinate \FORALL{overlay polygon $O_j$ in $S_x$} \IF {$B_i$ intersects $O_j$ over $Y$ co-ordinate} \STATE{Create Link between $O_j$ and $B_i$} \ENDIF \ENDFOR \ENDFOR \end{algorithmic}\caption{Algorithm to create polygon intersection graph}\label{algo:relgraph}\end{algorithm}\end{document}

Thursday, January 5, 2012

If you are not a Redditor you are a lucky person. It's a one way traffic scenario with no dead end. Once you subscribe to Reddit there is no way back and it is no good being there. I am expecting my colleagues to have an intervention for my Reddit addiction soon but till then I am all here to invest (read:waste) my precious time.

Since we got that out of our way, let us get back to business. Today, we are going to see how to draw a cartoon figure using LaTeX. The motivation behind this post is /r/latex on Reddit as I wanted that subreddit to have its logo drawn in LaTeX. I did not know it already was in LaTeX but it seems my work is appreciated there so I am going to contribute my 2 cents to the community.

Specifically, we will learn following things in this tutorial:

How to work with Colors - defining RGB colors in LaTeX.

How to use multiple layers to set order of document objects (send to back, bring forward like functionality).

How to use Arcs in an effective way.

How to draw lines with multiple points

How to draw curved lines in LaTeX

Check out this video for explanation of the code. The co-ordinates might look crazy but after you go through the video it will be a cinch. Leave a comment if you have a question. The code is given below, so if you improve it please do let me know and I will post your code on here.