如何修改你的 MWE

如何修改你的 MWE

解决方案!

非常感谢 CFR!Bibtex 并不是处理大量在线资料的最佳方式。Bibtex 是在网络出现之前开发的,而 Biber 则专门用于处理网络时代的内容。有关此内容的更多信息这里

我无法发现错误:url 没有出现在 bibtex 中,为什么?

在此处输入图片描述

平均能量损失

我的档案.tex

\documentclass[11pt]{article}
 
\usepackage{cite}
 
\begin{document}
The Nord Stream \cite{NordStream}.
Vessels \cite{PohjoinenLaivasto}.
Gas to the TAP \cite{CIAnaturalGas, EnergyPoliciesReviewEU, TAPoverNabuccoDefeatEU}.
 
\bibliographystyle{plain}
\bibliography{references_henri}{}
\end{document}

Bibtex 格式的 references_henri.bib 文件(?)

@webpage{TAPoverNabuccoDefeatEU,
    Date-Added = {2014-11-09 19:59:57 +0000},
    Date-Modified = {2014-11-09 20:01:28 +0000},
    Lastchecked = {September 21th, 2014},
    Month = {July},
    Title = {TAP Wins on Nabucco: A Total Defeat for the EU},
    Url = {http://eastbook.eu/en/2013/07/material-en/news-en/tap-wins-on-nabucco-a-total-defeat-for-the-eu/},
    Year = {2013}}
 
@electronic{NordStream,
    Date-Added = {2014-11-09 17:47:19 +0000},
    Date-Modified = {2014-11-09 18:23:12 +0000},
    Lastchecked = {Nov 11th, 2014},
    Title = {NordStream's official website},
    Url = {http://www.nord-stream.com/},
    Bdsk-Url-1 = {http://www.nord-stream.com/}}
 
@url{CIAnaturalGas,
    Author = {CIA},
    Date-Added = {2014-11-09 19:31:20 +0000},
    Date-Modified = {2014-11-09 19:32:46 +0000},
    Lastchecked = {September 13th, 2014},
    Title = {Country Comparison: Proved Natural Gas Reserves},
    Url = {https://www.cia.gov/library/publications/the-world-factbook/rankorder/2253rank.html},
    Year = {2014}}
 
@article{EnergyPoliciesReviewEU,
    Author = {International Energy Agency},
    Date-Added = {2014-11-09 20:42:47 +0000},
    Date-Modified = {2014-11-09 20:44:55 +0000},
    Lastchecked = {November 21th, 2014},
    Pages = {62},
    Title = {Energy Policies Review: The European Union},
    Url = {http://www.iea.org/publications/freepublications/publication/eu2008.pdf},
    Year = {2008}}
 
@url{PohjoinenLaivasto,
    Date-Added = {2014-11-09 17:53:07 +0000},
    Date-Modified = {2014-11-09 17:54:33 +0000},
    Lastchecked = {November 5th, 2014},
    Title = {Pohjoinen laivasto saa yli 40 alusta},
    Url = {http://finnish.ruvr.ru/news/2014_04_08/Pohjoinen-laivasto-saa-yli-40-alusta-6885/},
    Bdsk-Url-1 = {http://finnish.ruvr.ru/news/2014_04_08/Pohjoinen-laivasto-saa-yli-40-alusta-6885/}}

汇编没有网址

在此处输入图片描述

更新

我。对 CFR 答案的评论:使用上述 MWE 并且输出看起来很糟糕,为什么?

在此处输入图片描述

二.对 CFR 示例 2 的评论:看起来又糟糕了,为什么用我的 LaTex?

在此处输入图片描述

答案1

标准 BibTeX 样式不支持字段url或类似字段。如果您需要包含 URL,则需要使用支持它们的样式。该urlbst包提供了一种将 BibTeX 样式文件转换为支持此类字段的文件的方法。特别是,它提供了标准 BibTeX 样式的预转换版本。例如,\bibliographystyle{plainurl}plainnat应该为您提供一个版本,plain并增加了对字段的支持webpage,如url等。

正如 Mico 所指出的,您可能需要使用文件biblatex中的给定条目.bib。使用包中提供的示例数据库的一个简单示例如下:

\documentclass{article}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
  \cite{ctan}
  \printbibliography
\end{document}

这种情况下,编译顺序是 (pdf)LaTeX -> biber -> (pdf)LaTeX。

由 <code>biblatex</code> 提供的带 URL 的简单参考书目

如何修改你的 MWE

这将获取您的代码并演示如何修改它以使用biblatex。您使用的某些条目类型实际上甚至对 来说都是未知的biblatex。(也许它们是针对特定样式的?)@electronic是已知的。我已将@webpage和声明@url为 的别名@online,这与条目的处理方式相匹配@electronic。这将避免修改文件的需要.bib,同时希望以可接受的方式处理条目。

\documentclass[11pt]{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@webpage{TAPoverNabuccoDefeatEU,
    Date-Added = {2014-11-09 19:59:57 +0000},
    Date-Modified = {2014-11-09 20:01:28 +0000},
    Lastchecked = {September 21th, 2014},
    Month = {July},
    Title = {TAP Wins on Nabucco: A Total Defeat for the EU},
    Url = {http://eastbook.eu/en/2013/07/material-en/news-en/tap-wins-on-nabucco-a-total-defeat-for-the-eu/},
    Year = {2013}}

@electronic{NordStream,
    Date-Added = {2014-11-09 17:47:19 +0000},
    Date-Modified = {2014-11-09 18:23:12 +0000},
    Lastchecked = {Nov 11th, 2014},
    Title = {NordStream's official website},
    Url = {http://www.nord-stream.com/},
    Bdsk-Url-1 = {http://www.nord-stream.com/}}

@url{CIAnaturalGas,
    Author = {CIA},
    Date-Added = {2014-11-09 19:31:20 +0000},
    Date-Modified = {2014-11-09 19:32:46 +0000},
    Lastchecked = {September 13th, 2014},
    Title = {Country Comparison: Proved Natural Gas Reserves},
    Url = {https://www.cia.gov/library/publications/the-world-factbook/rankorder/2253rank.html},
    Year = {2014}}

@article{EnergyPoliciesReviewEU,
    Author = {International Energy Agency},
    Date-Added = {2014-11-09 20:42:47 +0000},
    Date-Modified = {2014-11-09 20:44:55 +0000},
    Lastchecked = {November 21th, 2014},
    Pages = {62},
    Title = {Energy Policies Review: The European Union},
    Url = {http://www.iea.org/publications/freepublications/publication/eu2008.pdf},
    Year = {2008}}

@url{PohjoinenLaivasto,
    Date-Added = {2014-11-09 17:53:07 +0000},
    Date-Modified = {2014-11-09 17:54:33 +0000},
    Lastchecked = {November 5th, 2014},
    Title = {Pohjoinen laivasto saa yli 40 alusta},
    Url = {http://finnish.ruvr.ru/news/2014_04_08/Pohjoinen-laivasto-saa-yli-40-alusta-6885/},
    Bdsk-Url-1 = {http://finnish.ruvr.ru/news/2014_04_08/Pohjoinen-laivasto-saa-yli-40-alusta-6885/}}
\end{filecontents}

\usepackage{biblatex}
\addbibresource{\jobname.bib}
\DeclareBibliographyAlias{url}{online}
\DeclareBibliographyAlias{webpage}{online}

\begin{document}
The Nord Stream \cite{NordStream}.
Vessels \cite{PohjoinenLaivasto}.
Gas to the TAP \cite{CIAnaturalGas, EnergyPoliciesReviewEU, TAPoverNabuccoDefeatEU}.

\printbibliography
\end{document}

使用 <code>biblatex</code> 的 MWE

答案2

如果您使用\bibliographystyle{plain},则在文件中使用以下格式.bib

@inproceedings{vqa-url,
    note = {\url{https://visualqa.org}},
}

然后,要在 LaTeX 文档中引用 URL,只需执行以下操作:

\cite{vqa-url}

然后它将在你的参考部分:

https://visualqa.org

以及实际文本部分中的对应数字。

注意:此外,需要\usepackage{url}在标题部分使用。但是,如果您希望参考部分中的 URL 可点击,则必须\usepackage{hyperref}在 LaTeX 文档的标题部分使用。

相关内容