![使用 CSL 将 Pandoc LaTeX 转换为 DOCX \cite[arg1]{arg2} 时未找到 arg1](https://linux22.com/image/402882/%E4%BD%BF%E7%94%A8%20CSL%20%E5%B0%86%20Pandoc%20LaTeX%20%E8%BD%AC%E6%8D%A2%E4%B8%BA%20DOCX%20%5Ccite%5Barg1%5D%7Barg2%7D%20%E6%97%B6%E6%9C%AA%E6%89%BE%E5%88%B0%20arg1.png)
梅威瑟:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Knu86,
author = {Knuth, Donald E.},
year = {1986},
title = {The \TeX book},
}
\end{filecontents}
\begin{document}
This works, yeah! \cite{Knu86} and \cite[Page 121]{Knu86}
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
pandoc -F pandoc-crossref --bibliography=MWE.bib MWE.tex -o MWE.docx
输出:
This works, yeah! (Knuth 1986) and (Knuth 1986 Page 121)
Knuth, Donald E. 1986. *The Texbook*.
然而,
pandoc -F pandoc-crossref --bibliography=MWE.bib --csl computing-surveys.csl MWE.tex -o MWE.docx
输出:
This works, yeah! [1] and [1]
[1] Donald E. Knuth. 1986. *The texbook*.