如何将带有参考文献 *.bib 的 *.tex 转换为 *.docx

如何将带有参考文献 *.bib 的 *.tex 转换为 *.docx

我有一个 *.tex 文档,其引用 *.bib 写在 overleaf 上。我想将此文档转换为带有引用的 *.docx。我使用了 pandoc 工具,如下所示:

pandoc -s main.tex -o document.docx

问题是我得到的只是文本而没有参考文献。是否可以生成参考文献?例如:

*.tex

\documentclass[preprint,12pt]{elsarticle}

\begin{document}

\section{The First Section}
\label{S:1}

Maecenas \cite{Smith:2012qr} fermentum \cite{Smith:2013jd} urna ac sapien tincidunt lobortis. Nunc feugiat faucibus varius. Ut sed purus nunc. Ut eget eros quis lectus mollis pharetra ut in tellus. Pellentesque ultricies velit sed orci pharetra et fermentum lacus imperdiet. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse commodo ultrices mauris, condimentum hendrerit lorem condimentum et. Pellentesque urna augue, semper et rutrum ac, consequat id quam. Proin lacinia aliquet justo, ut suscipit massa commodo sit amet. Proin vehicula nibh nec mauris tempor interdum. Donec orci ante, tempor a viverra vel, volutpat sed orci.



\bibliographystyle{IEEEtran}
\bibliography{sample.bib}


\end{document}

*。围兜

@BOOK{Smith:2012qr,
    title = {{B}ook {T}itle},
    publisher = {Publisher},
    author = {Smith, J.~M. and Jones, A.~B.},
    year = {2012},
    edition = {7th},
}

@ARTICLE{Smith:2013jd,
    author = {Jones, A.~B. and Smith, J.~M.},
    title = {{A}rticle {T}itle},
    journal = {{J}ournal {T}itle},
    year = {2013},
    volume = {13},
    pages = {123-456},
    number = {52},
    month = {March},
    publisher = {Publisher}
}

答案1

从以下位置下载 ieee.cslIEEE 文档获取 IEEE 书目样式并运行此命令

pandoc -s main.tex --bibliography=main.bib --csl=ieee.csl -o main.docx

相关内容