文中引用一定数量

文中引用一定数量

我正在使用natbibwithunsrtnat处理论文的参考书目。我必须准备论文的简短摘要(约 35 页,共约 200 页)。它不包括文献概述,只包括我的结果摘要。我必须在末尾包含一些(约 10%)引用的参考文献,并且我想保留论文文本的编号。像这样:

In thesis bibliography section:
[1] Article 1
[2] Article 2
[3] Article 3
[4] Article 4
[5] Article 5
At the end of summary it should be:
[2] Article 2
[4] Article 4

那可能吗?

答案1

这里有一个(不那么肮脏的)手动方法。假设你的完整论文在thesis.tex。它应该包含以下内容:

\usepackage[numbers]{natbib}
...
\bibliographystyle{unsrtnat}
\bibliography{annbib}

当你编译它时,你应该得到一个thesis.bbl包含完整参考书目的文件。为了制作一个工作示例,假设这个完整的参考书目包含以下内容:

\begin{thebibliography}{5}
\providecommand{\natexlab}[1]{#1}
\providecommand{\url}[1]{\texttt{#1}}
\expandafter\ifx\csname urlstyle\endcsname\relax
  \providecommand{\doi}[1]{doi: #1}\else
  \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi

\bibitem[Tennent(1976)]{tennent-1976-dspl}
R.~D. Tennent.
\newblock The denotational semantics of programming languages.
\newblock \emph{Communications of the ACM}, 19\penalty0 (8):\penalty0 437--453,
  August 1976.

\bibitem[Tennent(1991)]{tennent-1991-spl}
R.~D. Tennent.
\newblock \emph{Semantics of Programming Languages}.
\newblock Englewood Cliffs, NJ, 1991.

\bibitem[Scott and Strachey(1971)]{scott-1971-tmscl}
D.~Scott and C.~Strachey.
\newblock Towards a mathematical semantics for computer languages.
\newblock In \emph{Proceedings of the Symposium on Computers and Automata},
  pages 19--46, Brooklyn, NY, 1971. Polytechnic Press.

\bibitem[Gunter(1992)]{gunter-1992-splst}
C.~A. Gunter.
\newblock \emph{Semantics of Programming Languages: Structures and Techniques}.
\newblock Foundations of Computing Series. 1992.

\bibitem[Mitchell(1996)]{mitchell-1996-fpl}
J.~C. Mitchell.
\newblock \emph{Foundations for Programming Languages}.
\newblock 1996.

\end{thebibliography}

然后,你可以很容易地在另一个文档中使用该书目的子集,summary.tex并保留这样的编号

\documentclass{article}
\usepackage[numbers]{natbib}

\makeatletter
% keep track of citations in the summary
\let\oldcite\cite
\renewcommand\cite[2][]{%
  \expandafter\let\csname bib@#2\endcsname\strut%
  \oldcite[#1]{#2}%
}
% replacement for bibitem
\let\oldbibitem\bibitem
\renewcommand\bibitem[2][]{%
  \expandafter\ifx\csname bib@#2\endcsname\relax%
    \advance\c@NAT@ctr\@ne%
    \skipbibitem%
  \else%
    \oldbibitem[#1]{#2}% 
  \fi%
}
% skip unused bibitems
\def\skipbibitem#1\par{}
\makeatother

\begin{document}
\section{Summary}
Just two citations: \cite{tennent-1991-spl} and \cite{mitchell-1996-fpl}.

\input{thesis.bbl}
\end{document}

请注意,为简单起见,跳过的\bibitem必须以段落标记 ( \par) 结尾。确保您的.bbl文件符合这一点,否则您将收到 LaTeX 错误。

这是您将从该工作示例中获得的内容:

工作示例

相关内容