编辑 bst 文件以加下划线标题

编辑 bst 文件以加下划线标题

我在 makebst 中找不到可以让文章标题加下划线的选项,但是,使用emphasize其他正确的 bst,我能够给它加下划线。不幸的是,这会导致带下划线的文本超出边距。我的代码是

\documentclass[10pt,oneside,letterpaper,spanish]{book}
\usepackage[utf8x]{inputenc}
\usepackage[activeacute,spanish]{babel}
\addto\shorthandsspanish{\spanishdeactivate{~<>.}}
\decimalpoint %\spanishdecimal{.}

\usepackage[spanish]{babel}
\usepackage{natbib}

\begin{document}
asdasd \citep{chsh_inequality} asdasd \citep*{aspect_test_bell}
\bibliographystyle{fiuady3}
\bibliography{ejem_biblio}

\end{document}

我的 bib 文件是

% 此文件使用 JabRef 2.5 创建。% 编码:Cp1252

@ARTICLE{chsh_inequality,
   author = {{Clauser}, J.~F. and {Horne}, M.~A. and {Shimony}, A. and {Holt}, R.~A.
    },
    title = "{Proposed Experiment to Test Local Hidden-Variable Theories}",
  journal = {Physical Review Letters},
     year = 1969,
    month = oct,
   volume = 23,
   number = 15,
    pages = {880-884},
      doi = {10.1103/PhysRevLett.23.880},
   adsurl = {http://adsabs.harvard.edu/abs/1969PhRvL..23..880C},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{aspect_test_bell,
   author = {{Aspect}, A. and {Grangier}, P. and {Roger}, G.},
    title = "{Experimental Tests of Realistic Local Theories via Bell's Theorem}",
  journal = {Physical Review Letters},
 keywords = {Fluorescence, phosphorescence},
     year = 1981,
    month = aug,
   volume = 47,
   number = 15,
    pages = {460-463},
      doi = {10.1103/PhysRevLett.47.460},
   adsurl = {http://adsabs.harvard.edu/abs/1981PhRvL..47..460A},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

我用 makebst 生成的 bst 文件是http://pastebin.com/ji5d4vrx。在第 527 行,{ title用替换{ emphasize title会使标题带有下划线,但它们超出了边距。像这样在此处输入图片描述

我该如何修复边距?此外,如何添加作者和标题之间以及标题和年份之间缺失的空格?

答案1

我建议你修改一下你的.bst文件。例如,将第 1574-1575 行改为

  write$ newline$
  "\expandafter\ifx\csname bbluline\endcsname\relax\let\bbluline\underline\fi"

并在你的 TeX 文件中写入

\usepackage{ulem}
\def\bbluline#1{\uline#1}

\enquote还应更改定义:第 1572-1573 行应为

  write$ newline$
  "\newcommand{\enquote}[1]{~`#1'\ }"

此外,第 197 行必须更改为

    { "\bbluline{" swap$ * "}" * }

(即变成\uline\bbluline

当然,第 527 行应该变成

526 FUNCTION {format.title}
527 { title emphasize
528    "title" bibinfo.check

也就是说,也删除了add.blank

答案2

写入文档的序言中

\usepackage{soul}

并将 bst 文件中的标题函数更改为

FUNCTION {format.title}
{ title add.blank
   "title" bibinfo.check
  duplicate$ empty$ 'skip$
    {
      "\enquote{\ul{" swap$ *
      non.stop
        { "}} " * }
        { "}} " * }
      if$
    }
  if$
}

那么它就可以工作了。

相关内容