natbib
我使用带有参考书目风格的包apa
。
如何删除名称后的点、逗号和“and”,然后将年份位置(不带括号)更改为参考文献的末尾。
Maniatis, T.、Fritsch, EF 和 Sambrook, J. (2001)。《分子克隆:实验室手册》。冷泉港实验室,纽约,第 3 版。
我想要制作以下格式:
Maniatis T、Fritsch EF 和 Sambrook J.《分子克隆:实验室手册》。纽约冷泉港实验室,第 3 版。2001
或者请帮我看看哪个vancouver
style 包可以用于作者年份引用?例如“ biologi is bla bla (James et.al., 2009) ”
答案1
vancouver
是一种带有数字引用的书目样式,这意味着您将无法使用此样式生成作者年份引用。(natbib
仅有助于解决相反的问题,即您有作者年份样式并且想要数字引用。)
看起来你想要的vancouver
是 的书目样式,但作者年份引用。为此,你可以遵循 prettygully 的建议,并使用 创建自定义作者年份样式custombib
。
或者,你可以采纳 Marco 的建议并使用biblatex
。内置的 author-title 和 author-year 样式可以帮您完成大部分工作。下面的代码完成其余工作。为了处理作者姓名标点符号/分隔符,我采用了来自的解决方案步调一致。
\documentclass{article}
\usepackage[american]{babel}
\usepackage[bibstyle=authortitle,citestyle=authoryear,maxcitenames=2,%
firstinits=true,terseinits=true,natbib=true]{biblatex}
\usepackage{filecontents}
\DeclareNameAlias{author}{last-first}
% ----- lockstep's solution for name delimiters/punctuation
\renewbibmacro*{name:last-first}[4]{%
\ifuseprefix
{\usebibmacro{name:delim}{#3#1}%
\usebibmacro{name:hook}{#3#1}%
\ifblank{#3}{}{%
\ifcapital
{\mkbibnameprefix{\MakeCapital{#3}}\isdot}
{\mkbibnameprefix{#3}\isdot}%
\ifpunctmark{'}{}{\bibnamedelimc}}%
\mkbibnamelast{#1}\isdot
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
% \ifblank{#2}{}{\addcomma\bibnamedelimd\mkbibnamefirst{#2}\isdot}}% DELETED
\ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}}% NEW
{\usebibmacro{name:delim}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibnamelast{#1}\isdot
\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
% \ifblank{#2#3}{}{\addcomma}% DELETED
\ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}%
\ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}
% -----
% no "and" before final name in bibliography
%\renewcommand*{\finalnamedelim}{%
% \ifbibliography% NEW
% {\addcomma\space}% NEW
% {\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
% \addspace\bibstring{and}\space}}
\DefineBibliographyStrings{american}{%
edition = {edition}}
\makeatletter
\AtEveryBibitem{%
\savefield{edition}{\bbx@edition}%
\clearfield{edition}}
\renewbibmacro*{publisher+location+date}{%
\restorefield{edition}{\bbx@edition}% NEW
% \printlist{location}% DELETED
% \iflistundef{publisher} DELETED
% {\setunit*{\addcomma\space}} DELETED
% {\setunit*{\addcolon\space}}% DELETED
\printlist{publisher}%
\setunit*{\addcomma\space}%
\printlist{location}% NEW
\setunit*{\addcomma\space}% NEW
\printfield{edition}% NEW
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
\makeatother
\begin{filecontents}{\jobname.bib}
@Book{clone,
author = {Maniatis, T. and Fritsch, E. F. and Sambrook, J.},
title = {Molecular Cloning: A Laboratory Manual},
year = {2001},
publisher = {Cold Spring Harbor Laboratory},
location = {New York},
edition = {3}}
@Book{companion,
author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
title = {The LaTeX Companion},
edition = {1},
publisher = {Addison-Wesley},
location = {Reading, Mass.},
date = {1994}}
@Article{gillies,
author = {Gillies, Alexander},
title = {Herder and the Preparation of Goethe's Idea of World Literature},
journaltitle = {Publications of the English Goethe Society},
volume = {9},
date = {1933},
pages = {46--67}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Text \citep{companion}. More text \citep{clone}. Even more text \citep{gillies}.
\printbibliography
\end{document}