使用 natbib 获取杂项和书籍中标题标签的相同布局

使用 natbib 获取杂项和书籍中标题标签的相同布局

我有一个 .bib 文件,bibtex.bib其中有 @book 和 @misc (用于 URL)

@MISC {urlkey,
title        = {The good page},
author       = {Some Guy},
howpublished = {[Online]. Available on: \url{www.google.com}},
note = {URL, accessed 05-05-2015}
}

@BOOK {bookkey,
author       = {Some Other Guy},
title        = {The Good Book},
year         = {2012},
publisher    = {Pearson}
} 

问题是书名是斜体,而网址不是,我在序言中使用了以下内容。

\bibliography{bibtex}
\bibliographystyle{plain}

我希望两者兼而有之斜体.我如何实现此行为?

答案1

您已修改bst文件。请确保以新名称保存它并更改文件中的日期。

将函数更改misc为如下形式:

FUNCTION {misc}
{ output.bibitem
  format.authors output
  title howpublished new.block.checkb
  format.btitle output%<- significant change
  howpublished new.block.checka
  howpublished output
  format.date output
  new.block
  note output
  fin.entry
  empty.misc.check
}

emilPlainMiscTitle

测试文档:

\begin{filecontents}{\jobname.bib}
    @MISC {urlkey,
        title        = {The good page},
        author       = {Some Guy},
        howpublished = {[Online]. Available on: \url{www.google.com}},
        note         = {URL, accessed 05-05-2015}
    }

    @BOOK {bookkey,
        author       = {Some Other Guy},
        title        = {The Good Book},
        year         = {2012},
        publisher    = {Pearson}
    } 
\end{filecontents}
\documentclass{article}
\usepackage[numbers]{natbib}
\usepackage{url}
\begin{document}
\nocite{*}
\bibliography{\jobname}
\bibliographystyle{emilPlain}
\end{document}

相关内容