哈佛书目

哈佛书目

我目前正在使用哈佛软件包来编制参考书目,但我需要在参考书目中添加引用。

代码

\usepackage{harvard}
\harvardparenthesis{square}

输出

输出

我怎样才能获得[Mon05]这样的部分:

想

答案1

看起来你实际上并不想要“哈佛书目”,而是想要字母顺序的风格。你还谈到了“长引用”。下面是我使用 Biblatex 进行字母引用的方法,我\textcite在示例中添加了一个,这也许正是你所缺少的。

\begin{filecontents}{\jobname.bib}
@Book{book1,
  author =       {U. K. Nown},
  year =         2012,
  title =   {Book1}}

@Book{book2,
  author =       {A. U. Thor},
  year =         2013,
  title =   {Book2}}

@Book{book3,
  author =       {A. U. Thor},
  year =         2014,
  title =   {Book3}}
\end{filecontents}
\documentclass{article}
\usepackage[style=alphabetic]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}
Bla bla \cite{book1}.
Bla bla \cite{book2}.
Bla bla \cite{book3}.

But \textcite{book2} shows that \( 2+2=4 \).

\printbibliography

\end{document}

答案2

我认为你不会想要这个;使用作者年份引用样式的标签(例如“[Mon05]”)是无用的。

但是,这里有一种方法可以获取它们natbib

\begin{filecontents*}{\jobname.bib}
@book{montgomery2005,
 author={Montgomery, D. C.},
 title={Progettazione e analisi degli esperimenti},
 publisher={McGraw-Hill},
 address={Milano},
 year={2005},
}
\end{filecontents*}

\documentclass{article}
\usepackage[square]{natbib}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\@lbibitem}
  {\NAT@anchor{#2}{\NAT@num}}
  {\my@NAT@anchor{#1}{#2}}
  {}{}
\def\my@NAT@anchor#1#2{%
  \hyper@natanchorstart{#2\@extra@b@citeb}%
  \expandafter\@biblabel\expandafter{\@makeabbrev#1}%
  \hyper@natanchorend
}
\def\@makeabbrev#1#2#3#4(#5#6#7){#1#2#3#7}
\let\NATORIG@thebibliography\thebibliography
\def\thebibliography#1{%
  \let\@biblabel\NAT@biblabelnum
  \NATORIG@thebibliography{}%
}
\AtBeginDocument{%
  \def\@bibsetup#1{%
    \settowidth{\leftmargin}{MMM00}%
    \addtolength{\leftmargin}{\bibsep}%
    \setlength{\itemsep}{\bibsep}%
    \setlength{\itemindent}{-2\bibsep}%
    \setlength {\parsep}{\z@}%
  }%
}
\makeatother


\begin{document}

Citazione in parentesi: \citep{montgomery2005}.

Citazione in testo: \citet{montgomery2005}.

\bibliographystyle{plainnat}
\bibliography{\jobname}

\end{document}

在此处输入图片描述

相关内容