平均能量损失

平均能量损失

看起来Pandoc能够处理.bib文件中给出的引用。但是,我无法简单地要求Pandoc.bib文件转换为htmlmarkdown其他格式。有办法吗?

作为我的意思的一个例子(因为我不确定我是否足够清楚......),我会说以下内容导出myfile.bibmyfile.pdf:创建myfile.tex包含

\documentclass{article}
\begin{document}
\nocite{*}
\bibliographystyle{abbrv} % or another bibliography style!
\bibliography{myfile.bib}
\end{document}

pdflatex并使用和进行编译bibtex

有没有这样一种简单的方法可以导出myfile.bib到(比如说)myfile.html

答案1

pandoc无法将.bib文件转换为其他文件格式1。但是,它可以将.tex包含参考文献(从文件中调用.bib)的文件转换为 pdf、odt、html 等。如果您的.tex文件仅包含\nocite{*}命令,则结果是相似的(您将打印所有参考文献)。

以下是神奇的命令:

pandoc test.tex -o output.odt --bibliography /my/bibliography.bib 

或(pdf)

pandoc test.tex -o output.pdf --bibliography /my/bibliography.bib 

或(对于 html)

pandoc test.tex -o output.html --bibliography /my/bibliography.bib

请注意,可能需要多次启动 pandoc 命令才能获得正确的结果。

平均能量损失

文件

\documentclass{article}
\usepackage{biblatex}
\bibliography{mybib}

\begin{document}
\autocite{author00:_title}
\printbibliography
\end{document}

mybib.bib文件:

@Book{author00:_title,
  author =   {Author},
  title =    {Title},
  publisher =    {Publisher},
  year =     2000}

输出

PDF

在此处输入图片描述

html

html 生成者pandoc test.tex -o output.html --bibliography mybib.bib

<p><span class="citation">(Author 2000)</span></p>
<div class="references">
<p>Author. 2000. <em>Title</em>. Publisher.</p>
</div>

1文档对这一点不太清楚。有些措辞可能会让人相信可以直接从 .bib 转换为 .*。我测试过了,但不起作用。如果你想转换 .bib 文件(今天),你必须使用 .tex 文件。

答案2

作为pandoc-citeproc-0.4 pandoc-citeproc支持 -equivalent \nocite{*}

mybib.bib文件:

@article{behbahani2014aircraft,
    title={Aircraft Integration Challenges and Opportunities for Distributed Intelligent Control, Power, Thermal Management, Diagnostic and Prognostic Systems},
    author={Behbahani, Alireza R and Von Moll, Alexander and Zeller, Robert and Ordo, James},
    journal={SAE Tech. Pap. 2014-01},
    volume={2161},
    year={2014}
  }
@article{jia2013emergence,
    title={Emergence of bimodality in controlling complex networks},
    author={Jia, Tao and Liu, Yang-Yu and Cs{\'o}ka, Endre and P{\'o}sfai, M{\'a}rton and Slotine, Jean-Jacques and Barab{\'a}si, Albert-L{\'a}szl{\'o}},
    journal={Nature communications},
    volume={4},
    year={2013},
    publisher={Nature Publishing Group}
 }

@article{zhu2015game,
    title={Game-theoretic methods for robustness, security, and resilience of cyberphysical control systems: games-in-games principle for optimal cross-layer resilient control systems},
    author={Zhu, Quanyan and Basar, Tamer},
    journal={Control Systems, IEEE},
    volume={35},
    number={1},
    pages={46--65},
    year={2015},
    publisher={IEEE}
 }
@inproceedings{rieger2013hierarchical,
    title={A hierarchical multi-agent dynamical system architecture for resilient control systems},
    author={Rieger, Craig and Zhu, Quanyan},
    booktitle={Resilient Control Systems (ISRCS), 2013 6th International Symposium on},
    pages={6--12},
    year={2013},
    organization={IEEE}
  }

以及以下 Markdown 框架mybib.md

---
bibliography: mybib.bib
nocite: '@*'
...

# Bibliography

使用构建pandoc --filter=pandoc-citeproc --standalone mybib.md -o mybib.html

产生以下输出: 在此处输入图片描述


与此对应的 HTML 是:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta name="generator" content="pandoc" />
  <title></title>
  <style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<h1 id="bibliography" class="unnumbered">Bibliography</h1>
<div id="refs" class="references">
<div id="ref-behbahani2014aircraft">
<p>Behbahani, Alireza R, Alexander Von Moll, Robert Zeller, and James Ordo. 2014. “Aircraft Integration Challenges and Opportunities for Distributed     Intelligent Control, Power, Thermal Management, Diagnostic and Prognostic Systems.” <em>SAE Tech. Pap. 2014-01</em> 2161.</p>
</div>
<div id="ref-jia2013emergence">
<p>Jia, Tao, Yang-Yu Liu, Endre Csóka, Márton Pósfai, Jean-Jacques Slotine, and Albert-László Barabási. 2013. “Emergence of Bimodality in Controlling Complex Networks.” <em>Nature Communications</em> 4. Nature Publishing Group.            </p>
</div>
<div id="ref-rieger2013hierarchical">
<p>Rieger, Craig, and Quanyan Zhu. 2013. “A Hierarchical Multi-Agent Dynamical System Architecture for Resilient Control Systems.” In <em>Resilient Control Systems (ISRCS), 2013 6th International Symposium on</em>, 6–12. IEEE.</p>
</div>
<div id="ref-zhu2015game">
<p>Zhu, Quanyan, and Tamer Basar. 2015. “Game-Theoretic Methods for Robustness, Security, and Resilience of Cyberphysical Control Systems: Games-in-Games Principle for Optimal Cross-Layer Resilient Control Systems.” <em>Control Systems, IEEE</em> 35 (1). IEEE: 46–65.</p>
</div>
</div>
</body>
</html>

相关内容