# Are there any packages that I should not be using with ifthen package

I am new to TeX and I started adding package files to prepare my document without worrying about conflicts. I am asking this subjective question because I am not sure if I can post entire document preamble here. Any generic tips would be of big help.

I am getting extra white space with \ifthenelse which I highlighted with a circle in the attached image. I tried using just the ifthen package and commands and it works just fine.

\documentclass[fleqn,12pt,a4paper]{article}
\usepackage{mypackage}
\begin{document}
\Vibhakti{11} \& \Vibhakti{52} \& \Vibhakti{73}
\end{document}


(This should be compiled with xelatex.)

I am not sure if I am using any package that I should not be...

-
There isn't any attached picture. –  Caramdir Jan 17 '11 at 18:35
@Caramdir: Now there is :-) –  Hendrik Vogt Jan 17 '11 at 18:41
I am not sure why the image is not attached. I tried editing the image as well. –  Aku Jan 17 '11 at 18:41
You had the number [1] inside the code block, so the image didn't appear. –  Hendrik Vogt Jan 17 '11 at 18:45

The lines

\ifthenelse{\equal{#1}{11}}{\underline{\textcolor{blue}{प्रथमा एकवचनम्}} }{}
^   ^


produce two white spaces at the marked positions. Note that the newline character introduces one space for each line. So you should remove the first whitespace and add a comment character (%) immediately after the last closing brace of each line. This will remove the white space introduced by the newline characters.

In short, you should replace the whole command definition by

\newcommand{\Vibhakti}[1]%
{%
%\ifthenelse{\equal{#1}{1}}{}{}%
\ifthenelse{\equal{#1}{11}}{\underline{\textcolor{blue}{प्रथमा एकवचनम्}}}{}%
\ifthenelse{\equal{#1}{12}}{\underline{\textcolor{blue}{प्रथमा द्विवचनम्}}}{}%
\ifthenelse{\equal{#1}{13}}{\underline{\textcolor{blue}{प्रथम बहुवचनम्}}}{}%
\ifthenelse{\equal{#1}{21}}{\underline{\textcolor{blue}{द्वितीया एकवचनम्}}}{}%
\ifthenelse{\equal{#1}{22}}{\underline{\textcolor{blue}{द्वितीया द्विवचनम्}}}{}%
\ifthenelse{\equal{#1}{23}}{\underline{\textcolor{blue}{द्वितीया बहुवचनम्}}}{}%
\ifthenelse{\equal{#1}{31}}{\underline{\textcolor{blue}{तृतीया एकवचनम्}}}{}%
\ifthenelse{\equal{#1}{32}}{\underline{\textcolor{blue}{तृतीया द्विवचनम्}}}{}%
\ifthenelse{\equal{#1}{33}}{\underline{\textcolor{blue}{तृतीया बहुचनम्}}}{}%
\ifthenelse{\equal{#1}{41}}{\underline{\textcolor{blue}{चतुर्थी एकवचनम्}}}{}%
\ifthenelse{\equal{#1}{42}}{\underline{\textcolor{blue}{चतुर्थी द्विवचनम्}}}{}%
\ifthenelse{\equal{#1}{43}}{\underline{\textcolor{blue}{चतुर्थी बहुचनम्}}}{}%
\ifthenelse{\equal{#1}{51}}{\underline{\textcolor{blue}{पञ्चमी एकवचनम्}}}{}%
\ifthenelse{\equal{#1}{52}}{\underline{\textcolor{blue}{पञ्चमी द्विवचनम्}}}{}%
\ifthenelse{\equal{#1}{53}}{\underline{\textcolor{blue}{पञ्चमी बहुचनम्}}}{}%
\ifthenelse{\equal{#1}{61}}{\underline{\textcolor{blue}{षष्ठी एकवचनम्}}}{}%
\ifthenelse{\equal{#1}{62}}{\underline{\textcolor{blue}{षष्ठी द्विवचनम्}}}{}%
\ifthenelse{\equal{#1}{63}}{\underline{\textcolor{blue}{षष्ठी बहुचनम्}}}{}%
\ifthenelse{\equal{#1}{71}}{\underline{\textcolor{blue}{सप्तमी एकवचनम्}}}{}%
\ifthenelse{\equal{#1}{72}}{\underline{\textcolor{blue}{सप्तमी द्विवचनम्}}}{}%
\ifthenelse{\equal{#1}{73}}{\underline{\textcolor{blue}{सप्तमी बहुचनम्}}}{}%
\ifthenelse{\equal{#1}{81}}{\underline{\textcolor{blue}{सम्बोधन प्रथमा एकवचनम्}}}{}%
\ifthenelse{\equal{#1}{82}}{\underline{\textcolor{blue}{सम्बोधन प्रथमा द्विवचनम्}}}{}%
\ifthenelse{\equal{#1}{83}}{\underline{\textcolor{blue}{सम्बोधन प्रथमा बहुचनम्}}}{}%
}

-
you guys are awesome, adding the % sign at the end of each statement did the trick. –  Aku Jan 17 '11 at 18:45