Random Notes from My Research Life @ IISc

March 13, 2012

Nice tables using Latex

Filed under: Latex,ResearchLife,Uncategorized — Sooraj K. Ambat @ 14:16
Tags: , , ,

Here, we’ll show how to improve the default appearance of a table in \LaTeX.

The following commands will produce the default style table in \LaTeX. (Refer Table I)

\caption{Default Table}
\multirow{2}{1.5cm}{Method}& \multicolumn{3}{p{5cm}|}{\centering Measurements} \\
\cline{2-4} & \multicolumn{1}{c|}{Clean} & \multicolumn{1}{c|}{SMNR=15 dB} & \multicolumn{1}{c|}{SMNR = 10 dB} \\ \hline
Type1 & 27.54 & 13.23 & 6.80 \\
Type2 & 29.55 & 9.61 & 6 \\
Type3 & 25.99 & 11.49 & 6.15 \\

* The following modifications will make the table look more attractive. (Refer Table II).

You need to include additional packages using commands


\renewcommand{\multirowsetup}{\centering} %to align center inside the table
\caption{A Nice Table}
\multirow{2}{1.5cm}{Method}& \multicolumn{3}{p{5cm}|}{\centering Measurements} \bigstrut \\
\cline{2-4} & \multicolumn{1}{c|}{Clean} & \multicolumn{1}{c|}{SMNR=15 dB} & \multicolumn{1}{c|}{SMNR = 10 dB} \bigstrut \\ \hline
Type1 & 27.54 & 13.23 & 6.80 \bigstrut \\
Type2 & 29.55 & 9.61 & 6 \bigstrut \\
Type3 & 25.99 & 11.49 & 6.15 \bigstrut \\


March 9, 2012

Adding New Application Launcher to Unity in Ubuntu

Filed under: Linux,Matlab,Uncategorized — Sooraj K. Ambat @ 23:00
Tags: , , ,

To add New Application Launcher (here we are using Matlab as example)  to Unity in Ubuntu 11.10, copy the following into a file with an extension ‘.desktop’ and save it in /usr/share/applications/.

[Desktop Entry]
Exec=/usr/local/MATLAB/R2010b/bin/matlab -desktop

You may replace Matlab with any other application of your choice, but don’t forget to update the other relevant information.

March 8, 2012

Enhancing Bash

Filed under: Linux — Sooraj K. Ambat @ 15:17
Tags: , ,

Use the following e lines in Bash init. (/etc/bash.bashrc in Ubuntu 11.10!)

export HISTCONTROL=erasedups 
export HISTSIZE=10000 
shopt -s histappend

The first line removes the duplicate commands saved in history (when a command is entered).
Second line sets history size to 1000 lines.
The third line makes sure that when you exit a bash shell, the history from that session is appended to ~/.bash_history. (By default this may not happen always especially when you are working on multiple shells!)

Searching History in Bash

Filed under: Linux — Sooraj K. Ambat @ 14:50
Tags: , ,

Often we require to repeat a command already typed earlier in bash.

To search for a previous command used in bash, use CTRL+R and start typing the previous command.

Use CTRL+R  again (while searching), and it will jump back further in history and search with the same text.

ENTER will execute command.(You may also use CTRL+O as well for the same.)

The command can be modified using the arrow keys before pressing ENTER.

CTRL+C cancels the search.

Create a free website or blog at WordPress.com.