# latex: natbib issue

I was writing a paper and found out that if I use multiple citations together they appear rather awkwardly in separate square brackets (e.g. [1], [2], [3]). What I wanted is to have them within one bracket and even better to be as a sequence. Solution to this is to use the NATBIB package and then use the citation labels separated by comma within one \cite command. For example:

\usepackage[square, comma, sort&compress]{natbib}

\cite{bluecoat,ciscowan,riverbed}

Should produce the output [1-3] if they are citations 1,2, and 3 or [2,5,7] if they are 2,5 and 7. However, with newer natbib style files there is a weired problem, which shows the error “natbib Error: Bibliography not compatible with author-year citations”. A simple solution to this problem is to use “numbers” option with the package.

\usepackage[numbers,square, comma, sort&compress]{natbib}

# LaTeX Poster Template

Do you have any latex poster template to share?  I am preparing a poster paper for a workshop this month.  I couldn’t find any poster templates in LaTeX that I liked, and frankly I have started preparing it using open office instead. However, just wanna give it a try preparing it using latex. Found the following template form Mr. google and I think it suits my poster. I prefer to produce a simple’ but elegant’ type of poster and since this paper have lots of graphics rather than result, I think I would like to only have two-column instead of three.

I should remember that preparing a poster is very different from preparing a paper. You will not be enlarging your research paper and wallpapering the display board. Your main objective in preparing text for this presentation is to edit it down to very concise language. Use bullets and numbers to break text visually and aid you in the interactive use of your poster.

This is how the poster looks like ( p/s: still have way though….)..

The final version: to be updated after tomorrow meeting ok?

Meeting outcome: finalised paper to be submitted and Alan is happy to involve and go though the paper..:P..The poster needs more graphic…means another version need to be prepared…and finally finally…ICARIS deadline and all experiment should ready this week to be discussed with Jon next week.

Using Multiple X- and Y-Axes in Matlab:

I am trying to plot another graph having Double Axis Graphs for my simulation.  lets see whether it works or not. This is the output…So the analysis shall starts…

Next meeting: Wedenesday 1 p.m over in electronics

# Table issues…

I am writing to those who are facing the issues on displaying long table in latex. The default table environment in LaTeX does not work well if the data to be displayed in your table spans more than one page — the text cuts off and may flow outside of the normal page margins. The solution to this is to use the longtable package, which allows tables to take up multiple pages, and enables table row headings that span page breaks.

Declare the use of this package \usepackage{longtable} in the preamble, which should be installed already in your LaTeX setup. The skeleton of a long table looks like this:

\setlongtables % keeps the width uniform across both pages
\begin{longtable}{|c|c|c|c|}
\caption{Spurred species and their pollinators}\\
\hline
Flower species & Pollinator species & Family & Functional Group \\

\hline
Flower species & Pollinator species & Family & Functional Group \\
\hline \hline
{\it Aquilegia canadensis} & {\it Trochilus} & Trochil. & Bird \\

{ ….

……}

{\it Habenaria leucophaea} & {\it Chaerocampa} & Sphing. & Lepidoptera \\
\hline
\end{longtable}

# Collecting reference again

I realised my references are somehow outdated, and updation is required upon submission of my conference paper. Collection is tedious. 50% of references that I have collected in my first year is not referred at all since during my first year the area of research is still broad. It is a good idea when I started writing a conference paper in my third year as I start to look back on al the references that we have. Jon has suggested that we wrote a paper ( publishable or not every month, so I can start identify the hole in my research, things that I consider important or not should be identified prior to my thesis writing). Having the general outline of thesis is helpful, and as we move on we know which references are important and start writing literature on a specific title. I collected all the bibtex entry and update. Consistency is important while writing the entry, cannot really copy and paste it. I updated and collected my bibitem using BibDesk but for this conference, I have to rewrite since I have difficulties in getting the format that the LNCS provided, there is but it goes crazy with by .bib file.  Below, is the seven standard styles in latex, I prefer to use the apa standard format (author, year) format

Seven standard style

Every computer with LaTeX comes with the following seven standard styles. While they work, we recommend the natbib interpretations below. NatBib is a citation package that standardizes citation commands across many different bibliography styles, so you can switch from using plain.bst to acm.bst without having to change your in-text citations.

 plain.bst acm.bst ieeetr.bst alpha.bst abbrv.bst siam.bst

# Loathe in exploiting the comments

I have been trying to delay this correction, finally I have enough strengths to do it, I know the reviewer is Fiona since the comments are similar with my QD, Progress report and Thesis Outline. Meeting her again next month for my Thesis Audit. A reminder has been sent by Fiona stating that we have to submit the Thesis Audit form and report to our supervisor and accessor. This paper was written in rush actually and I thought it will never been accepted since I have been abandoning the modeling work for quite sometime, focusing on my robotics algorithm.

————————————

sudo apt-get install latex2rtf

latex2rtf paper

————————————

# Calc2LaTeX & towards my experiment ..:P

Calc2LaTeX is an OpenOffice.org Calc (Spreadsheet) macro for converting tables. It makes making tables on LaTeX very easy which can be downloaded from http://calc2latex.sourceforge.net/. For installation refer to ‘Calc2LaTeX installation on OpenOffice.org 2.0,’ ‘Calc2LaTeX installation on OpenOffice 1.1,’ or ‘Calc2LaTeX installation on OpenOffice 1.0.3

Upon conversion you will get the latex text like this:

\begin{table}[htbp]
\caption{}
\begin{tabular}{|l|l|l|}
\hline
Parameter & Value & Description \\ \hline
T & 0.2 s & Time step duration \\ \hline
Tc & 15 & Coherence duration in time steps \\ \hline
TA & 5 & Avoidance duration in time steps \\ \hline
V & 0.15 m/s & Robot forward velovity \\ \hline
Ra & 0.4m & Avoidance sensor range \\ \hline
Rp & 0.1m & Robot body radius \\ \hline
Rw & 2.0 m & Wireless range \\ \hline
\end{tabular}
\label{}
\end{table}
First Experiment: My running simulation

This week I need to run the simulation and show the first experimental result…was a bit worried..The robot simulation as shown:

First few seconds

Starts to loose cohesion

Maintain aggregation between robots, started to move towards beacon

Akhirnya tahu juga macam mana nak include standard deviation di dalam graph…blurghh

I used open office to generate this graph…pakai gnuplot sangat complicated ( maybe later baru boleh test2)

Ini semua raw data untuk melihat connection or robots which is tak betul lagi I guess sebab coding dia ada sedikit error…so this weekend buat coding untuk experiment ini dan next week baru inject faulty robot…hopefully by next week siap la experimental setup ini untuk dilihat oleh jon….

Eid-ul-adha is just around the corner…Malaysian society is busy preparing for the gathering which is the makan-makan’ activity, however looking at my tight schedule, it is very unlikely that I can join and do the preparation..has to submit additional 5 pages on the experimental design. It means no celebration on my part but my hubby will go on friday to help the others. I do belief that most of PhD students who are still sailing like me might have meeting, group seminar or submission’ which makes us ended up staying in the lab or in front of the laptop trying to prepare for any upcoming event’ ….To the others, eidul-adha mubarak and may we have a better days ahead!!!!

# While writing algorithm using algorithm2e.sty — package for algorithms in latex

Algorithm2e is an environment for writing algorithms in Latex. An algorithm is defined as a  floating object like figures. It provides macros that allow you to create different sorts of key words, thus a set of predefined key words is given. You can also change the typography of the keywords.

It takes a while to write the algorithm ….the input is

\begin{algorithm}
\label{alg:beta_algo}
\dontprintsemicolon
\SetKwInOut{Input}{input}
\SetKwInOut{Output}{output}
\SetKwComment{Comment}{}{}
%\Input{$??$ = data from sensors}
%\Output{$??$ = actuation of robot}
\Begin{
\SetLine
Create list of neighbours for robot, Nlist\;
k = number of neighbours in Nlist\;
\Repeat{forever}{\;
Save copy of Nlist in Oldlist\;
Save copy of k in LastK\;
Set reaction of indicator Back to FALSE\;\;
\BlankLine
Send radio ‘ping’ to neighbourhood every 100 time steps \;
Listen for return calls from robots in rabge that received the ping’\;
Create Nlist from all returns\;
k = number of neighbours in Nlist
\BlankLine
Create LocalList, list of robots which have lost contact since previous `ping’
\For{each robot in LostList}{
Find nShared, number of shared enighbours\;
\If{nShared <= beta (threshold value)}{
Set reaction indicator Back to TRUE \;
}
}
\lIf{Back=TRUE}\;{Turn robot through 180 degrees}\;
\uElseIf{k>LastK}{
make rendom turn\;
}
}
}
\caption{Pseudo-code fo $\beta$-algorithm}
\end{algorithm}