如何进行引用?

如何进行引用?

我注意到,像这样的网站维基百科<ref>允许您使用 html 标签和进行“索引”引用</ref>。如下例所示:

<ref> Robert B. Tomer, ''Getting the most out of vacuum tubes'', Howard W. Sams, Indianapolis, USA 1960, Library of Congress card no. 60-13843, available on the Intenet Archive. Chapter 3. </ref>

紧挨着文本(不开始参考书目环境或任何东西)。甚至当您在 stackexchange 中的问题中放置外部链接时也会发生类似的事情。

我所寻找的就是这样的东西,这样每当我输入信息时,我都可以引用一些包含所有所需信息的内容,如前所述维基百科例如,然后根据需要添加额外的 \bibitems。我希望引用也按顺序出现(如 [1]、[2]、[3]、...),但我还想决定是否希望将额外的引用放在文本中的引用之前,还是之后:

[1] Additional.
[2] Additional.
[3] InTextCitation.
[4] InTextCitation.
[5] Additional.
[6] Additional.

答案1

你要求两件事:

  1. 在文档的任意位置嵌入书目信息。我认为这个目标是错误的。通过在整个文档中嵌入书目信息,除了最琐碎的文档之外,你都可以做到这一点更难弄清楚您已经引用的内容,更不用说让它更难找到。(我假设您正在想象一个非常简单的文档中的非常简单的参考书目,但这只是表明您正在要求一个通常无法很好地扩展的不灵活的系统。)然而,更重要的是,我无法为您解决这个问题......

  2. 能够仅显示\cite更完整参考书目中的部分项目,这些项目按您希望的顺序显示。这在任一thebibliography环境中都很容易实现,使用natbib和 使用biblatex。基本上,您需要做的就是\nocite{*}在文档开头使用 。

.bib以下所有示例都将按照文件或环境中出现的顺序打印书目条目thebibliography。当然,找到这些条目会容易得多,因为它们都位于同一个位置/文件中

使用natbib

% normally this would be (and can be) an external file
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}

@book{jackson91,
    author    = {Jackson, John David},
    title     = {Classical Electrodynamics},
    publisher = {John Wiley \& Sons, Inc.},
    address  = {New Jersey, USA},
    edition  = {3},
    year      = {1991}
}

@book{jackson92,
    author    = {Jackson, John David},
    title     = {Classical Electrodynamics},
    publisher = {John Wiley \& Sons, Inc.},
    address  = {New Jersey, USA},
    edition  = {3},
    year      = {1992}
}

@book{jackson93,
    author    = {Jackson, John David},
    title     = {Classical Electrodynamics},
    publisher = {John Wiley \& Sons, Inc.},
    address  = {New Jersey, USA},
    edition  = {3},
    year      = {1993}
}

@book{jackson94,
    author    = {Jackson, John David},
    title     = {Classical Electrodynamics},
    publisher = {John Wiley \& Sons, Inc.},
    address  = {New Jersey, USA},
    edition  = {3},
    year      = {1994}
}
\end{filecontents}

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{natbib}

\begin{document}
\nocite{*}

I only mention the book from 1992 here~\cite{jackson92}.

\bibliographystyle{unsrt}
\bibliography{\jobname}

\end{document}

使用biblatex

% keep the same filecontents environment
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[style=numeric]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}

I only mention the book from 1992 here~\cite{jackson92}.

\printbibliography

\end{document}

只是为了完整性,不需要的解决方案

\documentclass{article}
\usepackage[T1]{fontenc}

\begin{document}

Vaccum tubes~\cite{tomer}.

\begin{thebibliography}{9}

\bibitem[1]{companion} Michel Goossens, Franck Mittelbach and
  Alexander Samarin, \emph{The \LaTeX{} Companion}, Addison Wesley,
  1993.

\bibitem[2]{tomer} Robert B. Tomer, ``Getting the most out of vacuum
  tubes'', Howard W. Sams, Indianapolis, USA 1960, Library of Congress
  card no.\ 60--13843, available on the Intenet Archive. Chapter 3.

\bibitem[3]{lamport} Leslie Lamport, \emph{\LaTeX: A Document
    Preparation System}, Addison Wesley, 1997.

\end{thebibliography}

\end{document}

相关内容