\citefield 包含来自 BibTeX 文件的摘要

\citefield 包含来自 BibTeX 文件的摘要

我尝试使用\citefield{soure1}{abstract}将 BibTeX 文件中的摘要包含到我的文档中。但是,我总是收到消息

未定义控制序列。\citefield

以下是 MWE:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{authoryear,
title = {title},
author = {XY},
journal = {XY},
volume = {119},
pages = {100},
year = {2015},
url = {http://www.url.com},
abstract = {long abstract.}
}
\end{filecontents*}

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[top=2cm,left=1.5cm,right=1.5cm]{geometry}
\usepackage[english,german]{babel}
\usepackage[authoryear]{natbib}
\usepackage[hidelinks]{hyperref}

\pagestyle{myheadings}

\RedeclareSectionCommand[
  beforeskip=-2\baselineskip,
  afterskip=1\baselineskip]{section}
\RedeclareSectionCommand[
  beforeskip=-1\baselineskip,
  afterskip=0.5\baselineskip]{subsection}
\RedeclareSectionCommand[
  beforeskip=-1\baselineskip,
  afterskip=.5\baselineskip]{subsubsection}
\newenvironment{newabstract}

\begin{document}

\begin{newabstract}
  \citefield{authoryear}{abstract}
\end{newabstract}

\section*{Group A}
\subsection*{\cite{authoryear} \\ \href{http://www.url.com}{title} }

\bibliography{authoryear} 
\bibliographystyle{apalike}

\end{document}

答案1

\citefield是一个biblatex命令。您可能能够摆脱usebib;查看文档以获取更多信息。

\begin{filecontents*}{\jobname.bib}
@article{authoryear,
title = {title},
author = {XY},
journal = {XY},
volume = {119},
pages = {100},
year = {2015},
url = {http://www.url.com},
abstract = {long abstract.}
}
\end{filecontents*}

\documentclass{scrartcl}

\usepackage{hyperref}
\usepackage{usebib}

\newbibfield{abstract}
\bibinput{\jobname}

\begin{document}

\begin{abstract}
\usebibentry{authoryear}{abstract}
\end{abstract}

\section*{Group A}
\subsection*{\cite{authoryear} \\ \href{http://www.url.com}{title} }

\bibliographystyle{apalike}
\bibliography{\jobname}

\end{document}

在此处输入图片描述

相关内容