年份也显示在参考书目中的参考文献之前

年份也显示在参考书目中的参考文献之前

我是 BibTeX 的新手。虽然我已经使用 LaTeX 有一段时间了,但我以前都是手动写所有参考文献的,哈哈!我的序言是

\documentclass[10pt,letter]{article}  
\usepackage{fullpage}  
\usepackage{setspace}  
\usepackage{parskip}  
\usepackage{titlesec}  
\usepackage{xcolor}  
\PassOptionsToPackage{hyphens}{url}  
\usepackage[colorlinks = true,  
            linkcolor = blue,  
            urlcolor  = blue,  
            citecolor = blue,  
            anchorcolor = blue]{hyperref}  
\usepackage[round]{natbib}  
\let\cite\citep  

\renewenvironment{abstract}  
  {{\bfseries\noindent{\large\abstractname}\par\nobreak}}  
  {}  

\renewenvironment{quote}  
  {\begin{tabular}{|p{13cm}}}  
  {\end{tabular}}  

\usepackage{authblk}  
\makeatletter  
\renewcommand\AB@authnote[1]{\rlap{\textsuperscript{\normalfont#1}}}  
\renewcommand\Authsep{,~\,}  
\renewcommand\Authands{,~\,and }  
\makeatother  

.....other \usepackages...

\usepackage[utf8]{inputenc}  
\usepackage[ngerman,english]{babel} 

我从网上复制了此内容,在引用参考文献 () 和制作参考书目方面似乎效果不错\citet{}。只有参考书目中的某些元素很奇怪,如下所示:

\begin{document}  
\title{}  
.....  
\bibliographystyle{plainnat}  
\bibliography{biblio}  
\end{document}   

biblio是一个包含参考文献的 bibtex 文件 (.bib)。

如果我使用

@Misc{bbc2016,
  url={http://www.bbc.com/news/world-asia-india-37536348},
  note = {Accessed 2017-03-01},
  title = {{India ratifies Paris climate agreement}},
 journal={{BBC News}},
  author = {{BBC News}},
  year = {2016},
}

我明白了

2016 BBC News. India ratifies Paris climate agreement. http://www.bbc.com/news/world-asia-india-
37536348, 2016. Accessed 2017-03-01.

我尝试将环境更改为“文章”,但没有帮助。每次我保存 BibTeX 文件 ( biblio.bib) 并执行\bibliography{biblio}

任何帮助,将不胜感激。

答案1

好吧,使用当前的 MiKTeX 2.9,我可以编译以下 MWE(我使用了您的代码并将带有包的 bib 文件添加filecontents到 MWE)并获得您想要的结果。

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Misc{bbc2016,
  url={http://www.bbc.com/news/world-asia-india-37536348},
  note = {Accessed 2017-03-01},
  title = {{India ratifies Paris climate agreement}},
 journal={{BBC News}},
  author = {{BBC News}},
  year = {2016},
}
@article{bbc2017,
  url={http://www.bbc.com/news/world-asia-india-37536348},
  note = {Accessed 2017-03-01},
  title = {{India ratifies Paris climate agreement}},
 journal={{BBC News}},
  author = {{BBC News}},
  year = {2017},
}
@Book{Goossens,
  author    = {Goossens, Michel and Mittelbach, Frank and 
               Samarin, Alexander},
  title     = {The LaTeX Companion},
  edition   = {1},
  publisher = {Addison-Wesley},
  location  = {Reading, Mass.},
  year      = {1994},
}
@Book{adams,
  title     = {The Restaurant at the End of the Universe},
  author    = {Douglas Adams},
  series    = {The Hitchhiker's Guide to the Galaxy},
  publisher = {Pan Macmillan},
  year      = {1980},
}
@article{feynman,
  title     = {Very High-Energy Collisions of Hadrons},
  author    = {Richard P. Feynman},
  journal   = {Phys. Rev. Lett.},
  volume    = {23},
  issue     = {24},
  pages     = {1415--1417},
  year      = {1969},
  month     = {Dec},
  doi       = {10.1103/PhysRevLett.23.1415},
  url       = {http://link.aps.org/doi/10.1103/PhysRevLett.23.1415},
  publisher = {American Physical Society},
}
\end{filecontents}


\listfiles % only to get a list of used packages and version numbers
\documentclass[10pt,letter]{article}  

\usepackage[utf8]{inputenc}  
\usepackage[ngerman,english]{babel} 

\usepackage{fullpage}  
\usepackage{setspace}  
\usepackage{parskip}  
\usepackage{titlesec}  
\usepackage{xcolor}  
\usepackage{authblk}  
\usepackage[round]{natbib}  
\let\cite\citep  

\PassOptionsToPackage{hyphens}{url}  
\usepackage[colorlinks = true,  
            linkcolor = blue,  
            urlcolor  = blue,  
            citecolor = blue,  
            anchorcolor = blue]{hyperref}  


\renewenvironment{abstract}  
  {{\bfseries\noindent{\large\abstractname}\par\nobreak}}  
  {}  

\renewenvironment{quote}  
  {\begin{tabular}{|p{13cm}}}  
  {\end{tabular}}  


\makeatletter  
\renewcommand\AB@authnote[1]{\rlap{\textsuperscript{\normalfont#1}}}  
\renewcommand\Authsep{,~\,}  
\renewcommand\Authands{,~\,and }  
\makeatother  


\begin{document}  
\title{test}

test \citet{bbc2016} test \citet{bbc2017} test\citet{adams} test
\nocite{*}

\bibliographystyle{plainnat}  
\bibliography{\jobname} % to use bib file created with filecontents 
\end{document}

我得到以下结果:

由此产生的书目

命令\listfiles向我显示了以下使用的软件包和版本号。请复制我的 MWE,在您的计算机上编译它,并将我的列表与您的列表进行比较(请参阅此列表的日志文件末尾):

 *File List*
filecontents.sty    2011/10/08 v1.3 Create an external file from within a LaTeX document
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
inputenc.sty    2015/03/17 v1.2c Input encoding file
    utf8.def    2017/01/28 v1.1t UTF-8 support for inputenc
   t1enc.dfu    2017/01/28 v1.1t UTF-8 support for inputenc
  ot1enc.dfu    2017/01/28 v1.1t UTF-8 support for inputenc
  omsenc.dfu    2017/01/28 v1.1t UTF-8 support for inputenc
   babel.sty    2017/06/29 3.12 The Babel package
 bblopts.cfg    2005/09/08 v0.1 add Arabic and Farsi to "declared" options of babel
 ngerman.ldf    2016/11/02 v2.9 German support for babel (new orthography)
 english.ldf    2017/06/06 v3.3r English support from the babel system
fullpage.sty    1999/02/23 1.1 (PWD)
setspace.sty    2011/12/19 v6.7a set line spacing
 parskip.sty    2001/04/09 non-zero parskip adjustments
titlesec.sty    2016/03/21 v2.10.2 Sectioning titles
  xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
   color.cfg    2016/01/02 v1.6 sample color configuration
  pdftex.def    2017/06/24 v1.0g Graphics/color driver for pdftex
 authblk.sty    2001/02/27 1.3 (PWD)
  natbib.sty    2010/09/13 8.31b (PWD, AO)
hyperref.sty    2017/03/14 v6.85a Hypertext links for LaTeX
hobsub-hyperref.sty    2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2016/05/16 v1.14 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2016/05/16 v1.14 Construct package bundles (HO)
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
  ifvtex.sty    2016/05/16 v1.6 Detect VTeX and its facilities (HO)
 intcalc.sty    2016/05/16 v1.2 Expandable calculations with integers (HO)
   ifpdf.sty    2017/03/15 v3.2 Provides the ifpdf switch
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
pdftexcmds.sty    2017/03/19 v0.25 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty    2016/05/16 v1.14 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2016/05/16 v1.4 Expandable calculations on big integers (HO)
  bitset.sty    2016/05/16 v1.2 Handle bit-vector datatype (HO)
uniquecounter.sty    2016/05/16 v1.3 Provide unlimited unique counter (HO)
letltxmacro.sty    2016/05/16 v1.5 Let assignment for LaTeX macros (HO)
 hopatch.sty    2016/05/16 v1.3 Wrapper for package hooks (HO)
xcolor-patch.sty    2016/05/16 xcolor patch
atveryend.sty    2016/05/16 v1.9 Hooks at the very end of document (HO)
atbegshi.sty    2016/06/09 v1.18 At begin shipout hook (HO)
refcount.sty    2016/05/16 v3.5 Data extraction from label references (HO)
 hycolor.sty    2016/05/16 v1.8 Color options for hyperref/bookmark (HO)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 auxhook.sty    2016/05/16 v1.4 Hooks for auxiliary files (HO)
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
  pd1enc.def    2017/03/14 v6.85a Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
     url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.
 hpdftex.def    2017/03/14 v6.85a Hyperref driver for pdfTeX
rerunfilecheck.sty    2016/05/16 v1.8 Rerun checks for auxiliary files (HO)
supp-pdf.mkii
 nameref.sty    2016/05/21 v2.44 Cross-referencing by name of section
gettitlestring.sty    2016/05/16 v1.5 Cleanup title references (HO)
  364889.out
  364889.out
  364889.bbl
 ***********

相关内容