版本和位置之间的空间过大,书目条目类型为 inbook

版本和位置之间的空间过大,书目条目类型为 inbook

我的问题是版本和位置之间出现的空格。我正在使用 IEEE 引文风格指南。我一直试图删除出现的空格,但无济于事。任何帮助都很好。

例如

@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}
}

输出如下所示:

[45] S. Lin 和 DJ Costello,《差错控制编码》第 2 版。¨此处有额外空格¨ Upper Saddle River,新泽西州: Prentice Hall,2004 年。

版本和位置之间出现了额外的 3 个空格。我该如何删除它?

天气预报:

\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}

我已经包含了所有的标题,以防我不知道的包之间发生任何冲突。

也可以将上述参考资料保存为reference.bib来编译上述代码。

经过一些额外的调查。我发现输出中生成的 .bib 文件如下:

\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.

因此,如果有一种方法可以摆脱 bibtex 生成的所有书籍参考之间的“\hskip 1em plus 0.5em minus 0.4em\relax”那就太好了。

答案1

不幸的是IEEEtran.bstBibTeX 的风格是硬连线的

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

因此必须改变风格。

在您的系统上找到IEEEtran.bst它并将其复制到您拥有论文主文件的目录中,其名称为myIEEEtran.bst。使用任何文本编辑器打开新文件(用于 LaTeX 文件的编辑器就可以了),并在其中找到以下行

% 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 " }

将其更改为

% 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 " }

然后修改你的主要 LaTeX 文件,添加序言

\providecommand{\IEEElargespace}{, }

(或者任何你想要的代替 使用的“大空格”的东西IEEEtran,这里它是一个逗号,后跟一个普通空格);最后说

\bibliographystyle{myIEEEtran}

最好使用命令而不是硬连线值,这样您可以更轻松地改变主意:只需\IEEElargespace在文档中改变含义即可。

相关内容