Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My issue is with the space that appears between the edition and the location. I am using the IEEE citation sytle guide. I have been trying to remove the space that appears but to no avail. Any help would be great.

e.g.

@inbook{Shulin-ECC-General-04 ,
Key = {Shulin-ECC-General-04},
Author = {S.~Lin and D.~J.~Costello},
Title = {Error Control Coding},
Publisher ={Prentice Hall},
Address = {Upper Saddle River, NJ},
edition = {2nd},    
Year = {2004}
}

The output looks like:

[45] S. Lin and D. J. Costello, in Error Control Coding, 2nd ed.¨extra spaces appear here¨ Upper Saddle River,NJ: Prentice Hall, 2004.

There are additional 3 white spaces which appear between the edition and location. How can I remove it?

MWS:

\documentclass[chap]{thesis}



% Use the first command below if you want captions over 1 line indented. A side
% effect of this is to remove the use of bold for captions (thesis default).
% To restore bold, also include the second line below.
\usepackage[hang]{caption2}      % to indent subsequent lines of captions
\renewcommand{\captionfont}{\bfseries} % bold caption (needed with caption 
                  %package to restore boldface.)
%\includeonly{rpichap1}  % use \includeonly to process only
            % the file(s) listed inside the braces                       

\usepackage{textcomp, threeparttable, booktabs}
\usepackage{lscape}
%\usepackage{subfig}
\usepackage{amsmath,cite,graphicx,times,paralist}
\usepackage{color, multirow,epsfig,graphicx,url,mdwtab,amssymb,eqparbox,stfloats,color,multirow,array,footnote}
\usepackage[ruled,vlined]{algorithm2e}
\usepackage[tight,footnotesize]{subfigure}
\usepackage{color, multirow, array, footnote}

%%%%%%%%%%%%%%%%%%%%%%Acronyms%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[acronym,toc,nonumberlist]{glossaries}
\usepackage{etoolbox}

%%%%%%%%%%%%%%%%%%%%%%Acronyms%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareListParser{\wordlist}{ }%

\DeclareRobustCommand{\capitalise}[1]{%
  \def\addspace{}%
  \renewcommand*{\do}[1]{\addspace\makefirstuc{##1}\def\addspace{ }}%
  \wordlist{#1}%
}

%Remove the dot at the end of glossary descriptions
\renewcommand*{\glspostdescription}{}

\makesavenoteenv{tabular}
%\usepackage{setspace}
\newtheorem{property}{Property}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{example}{Example}[section]
\newtheorem{theorem}{Theorem}[section]
\newtheorem{remark}{Remark}[section]
\newtheorem{definition}{Definition}[section]
%\newtheorem{algorithm}{Algorithm}[section]
\newtheorem{observation}{Observation}[section]
%\newtheorem{procedure}{Procedure}[section]

\newtheorem{mydef}{Definition}[section]
\renewcommand\footnotemark{}

\bibliographystyle{IEEEtran}

%%%%%%%%%%%%%%%%%%%%%   end titlepage info  %%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}


Nothing~\cite{Shulin-ECC-General-04}.

{\small \baselineskip 12pt \specialhead{REFERENCES}
\begin{singlespace}
%\let\secfnt\undefined
%\newfont{\secfnt}{ptmb8t at 12pt}
%\apptocmd{\thebibliography}{\small}{}{}
\fontsize{12}{12}\selectfont
\bibliography{reference}
\end{singlespace}
}

\end{document}

I have included all the headers in case there is any conflict between packages that I am not aware of.

Also the above reference can be saved as reference.bib to compile the above code.

After some additional investigation. I find that the generated .bib file at the output is as follows:

\bibitem{Shulin-ECC-General-04}
S.~Lin and D.~J. Costello, \emph{Error Control Coding}, 2nd~ed.\hskip 1em plus 0.5em minus 0.4em\relax Upper Saddle River, NJ: Prentice Hall, 2004.

So if there is a way to get rid of the ¨\hskip 1em plus 0.5em minus 0.4em\relax¨ in between all the book references that bibtex generates that would be great.

share|improve this question
    
Welcome to TeX.sx! –  hpesoj626 Dec 15 '12 at 17:56
    
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Kurt Dec 15 '12 at 18:06
add comment

1 Answer

up vote 7 down vote accepted

Unfortunately the IEEEtran.bst style for BibTeX hardwires that

\hskip 1em plus 0.5em minus 0.4em\relax

in it, so one has to change the style.

Find IEEEtran.bst on your system and copy it in the directory where you have the main file for your thesis, with a name such as myIEEEtran.bst. Open the new file with any text editor (the one you use for LaTeX files is fine) and find in it the lines

% This is the LaTeX spacer that is used when a larger than normal space
% is called for (such as just before the address:publisher).
FUNCTION {large.space} { "\hskip 1em plus 0.5em minus 0.4em\relax " }

Change them to

% This is the LaTeX spacer that is used when a larger than normal space
% is called for (such as just before the address:publisher).
%FUNCTION {large.space} { "\hskip 1em plus 0.5em minus 0.4em\relax " }
%%%%% Kalyanasv change: the above line becomes the following %%%%%
FUNCTION {large.space} { "\IEEElargespace " }

Then change your main LaTeX file adding in the preamble

\providecommand{\IEEElargespace}{, }

(or anything you want in place of the "large space" used by IEEEtran, here it's a comma followed by a normal space); finally say

\bibliographystyle{myIEEEtran}

It's better to use a command instead of a hardwired value, so that you can change your mind more easily: you just change the meaning of \IEEElargespace in your document.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.