Random Notes from My Research Life @ IISc

September 4, 2012

Common Bugs in Writing

Filed under: Latex,ResearchLife — Sooraj K. Ambat @ 11:50
Tags: , , ,

Here, I’ll post a few links which discuss about the common mistakes while writing a paper.

Advertisements

June 21, 2012

Margin Issue in Latex

Filed under: Latex,ResearchLife — Sooraj K. Ambat @ 21:02
Tags: , , ,

Today, while submitting my work in TENCON through edas.info, I faced an issue with the bottom margin.

Edas complained that the 3rd page has only 0.92 inch bottom margin where the minimum requirement was 1 inch.

I tried many things ……and wasted my time.

Then I found that TENCON asked for A4 paper and by default ieeetran gives LETTER format.

I simply changed \documentclass[conference]{IEEEtran} to \documentclass[a4paper,conference]{IEEEtran}, and the problem was solved!

June 19, 2012

Embedding All Fonts in PDF file

Filed under: Latex,ResearchLife — Sooraj K. Ambat @ 11:20
Tags: , , ,

When we submit/send a pdf file, it is a good idea to embedd all fonts used, in the pdf file.

To embed all fonts in your pdf file use this command in terminal and create the pdf file from ps file.

ps2pdf -dEmbedAllFonts=true -dSubsetFonts=true -dEPSCrop=true -dPDFSETTINGS=/prepress FILENAME.ps

This will create a pdf file with name FILENAME.pdf

June 8, 2012

Hard word wrapping in gedit

Filed under: Linux,ResearchLife — Sooraj K. Ambat @ 12:41
Tags: , , ,

gedit is a handy option for dealing ‘.txt. files.

Unfortunately, gedit does not contain any hard word wrapping plugin.

1. Open gedit
2. Navigate to Edit -> Preferences -> Plugins
3. Enable “External Tools”and press “close”
4. Now, go to “Tools” -> “Manage External Tools”
5. Press “New” (press ‘+’ sign) and enter “Line Break at Col 80″ (or any name you like)
6. Paste the following script in the “command(s)” text area (you can choose to leave out the #comments, these are only here as a reminder in case you want to modify it to fit your needs):

#!/bin/sh
BREAK=80
# fmt [-WIDTH][OPTION]… [FILE]…
# –uniform-spacing — one space between words, two after sentences
# –split-only — split long lines, but do not refill
# –width=WIDTH — maximum line width (default of 75 columns)
# when FILE is -, read standard input
fmt –uniform-spacing –split-only –width $BREAK –

7. Choose “Current selection” as Input
8. Choose “Replace current selection” as Output
9. At this point, you can choose to create a shortcut key such as “ctrl+m” for easy access.
10. Close “External Tools Manager” by pressing the “Close” button
11. Now this script is executable under the “Tools” menu. Alternatively, you can use your shortcut key for quick access.

My gedit version: 3.4.1, OS: Ubuntu 12.04 (64-bit)

April 30, 2012

Installing latex extras

Filed under: Latex — Sooraj K. Ambat @ 14:47
Tags: , , , ,

\LaTeX may often require packeges like multirow.

many packges are not included by default in texlive.

To install the extra packages use the following command

sudo apt-get install texlive-latex-extra

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)

\begin{table}[htbp]
\caption{Default Table}
\label{Tab:SRNRValues}
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
\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 \\
\hline
\end{tabular}
\end{center}
\end{table}

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

You need to include additional packages using commands

\usepackage{multirow}
\usepackage{bigstrut}

\renewcommand{\multirowsetup}{\centering} %to align center inside the table
\setlength{\tabcolsep}{10pt}
\begin{table}[htbp]
\caption{A Nice Table}
\label{Tab:SRNRValues}
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
\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 \\
\hline
\end{tabular}
\end{center}
\end{table}

February 5, 2012

Latex Symbols in Matlab figure on Ubuntu

Filed under: Latex,Linux,Matlab,Uncategorized — Sooraj K. Ambat @ 15:35
Tags: , , , , ,

By default, Matlab figure inUbuntu (I’ve faced this problem in 10.04, 10.10, 11.04, and 11.10) is unable to interpret the latex symbols.

Matlab figure also shows problems with fonts installed.

We can correct it by installing packages using the command in terminal:

sudo apt-get install xfonts-100dpi xfonts-75dpi

January 31, 2012

Bibliography in Beamer (Latex Presentation)

Filed under: Latex,ResearchLife — Sooraj K. Ambat @ 11:30
Tags: , , , ,

Beamer put an icon before every bibliography item listed, by default.

The following code does this job.

——————————————————————————————————————–

\begin{frame}[allowframebreaks] %allow to expand references to multiple frames (slides)

\frametitle{References}

\scriptsize{\bibliographystyle{acm}}

\bibliography{references} %bibtex file name without .bib extension

\end{frame}

——————————————————————————————————————–

We will get the normal bibliography style (number or text instead of icon) by including the following code in the preamble of the document.

(Before \begin{document})

\setbeamertemplate{bibliography item}[text]

 

Ref: http://ininweb.uprm.edu/nambiar/latex/Latex-Tips005.html

 

January 24, 2012

Spellcheck with Kile

Filed under: Latex,Linux,Uncategorized — Sooraj K. Ambat @ 16:25
Tags: , , ,

We often need to run spell-check in Kile. Unfortunately, current version of Kile (2.1.0) does not ignore all latex commands and it is a pain to do spell-check with Kile.

An easy way to do this is to use ‘aspell’. Run the following in command line (terminal)

aspell -c yourFile.tex

November 25, 2011

Inverse and forward search in Kile

Filed under: Uncategorized — Sooraj K. Ambat @ 12:32
Tags: , , ,

This feature of Kile allows to click in the DVI viewer and jump to the corresponding LaTeX line in the editor, or jump from the editor to the corresponding page in the viewer.

It saves a lot of time which otherwise we need to spend in searching a particular location in the document or source.

You may follow the following steps to enable this feature. (The steps are borrowed from here.)

  1. Open some LaTeX file in Kile
  2. Open “Settings -> Configure Kile…”
  3. Click “Tools -> Build -> LaTeX”
  4. Select the “Modern” configuration
  5. Set the options to -interaction=nonstopmode -src %source
  6. Click “ForwardDVI” in the list
  7. Select the “Embedded Viewer” configuration
  8. Click OK
  9. Click “LaTeX” in the build toolbar menu
  10. Click “ForwardDVI” in the view toolbar menu
  11. Open “Settings -> Configure Viewer…”
  12. Click “Editor”
  13. Select Kile as the editor
  14. Click OK
  15. Scroll to some interesting location in the document and hold down Shift while left-clicking on that location. It should jump to that spot in the LaTeX source.
  16. Scroll to some other location in the LaTeX source and click “ForwardDVI”. It should jump to that location in the DVI.
  17. etc.
Next Page »

Create a free website or blog at WordPress.com.