微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何配置 pandoc-crossref 来处理补充图和子图? 乳胶输入,单词输出

如何解决如何配置 pandoc-crossref 来处理补充图和子图? 乳胶输入,单词输出

我正在使用链接模式为 LaTeX 中的补充数字添加单独的编号:

https://support.authorea.com/en-us/article/how-to-create-an-appendix-section-or-supplementary-information-1g25i5a/

MWE:https://gist.github.com/meowcat/0c521026935455b0e6b8985b78a82cbe

我的 MWE 使用 \begin{figure}..\end{figure}\begin{subfigure}..\end{subfigure}\begin{table}..\end{table} 和相应的 \caption\label

输入

This references figure \ref{fig:fig1},in particular Panel \ref{fig:fig1-a},then Table \ref{tab:tab1},Supplementary figure \ref{si-fig:fig1} and Supplementary Table \ref{si-tab:tab1}.

LaTeX 输出(如预期)

This references figure 1,in particular Panel 1a,then Table 1,Supplementary figure S1 and Supplementary Table S1

Pandoc 输出 pandoc -F pandoc-crossref pandoc-test.tex -o pandoc-test.docx

This references figure [fig:fig1],in particular Panel [fig:fig1-a],Supplementary figure [si-fig:fig1] and Supplementary Table 2.

我已经找到的

  • 似乎 Pandoc-crossref 在 \begin{tabular}\includegraphics 上而不是 \begin{table}\begin{figure} 上。在图中插入 \includegraphics 会产生正确的引用(但子图未标记为 a、b、c)。如果我有 table 环境但没有 tabular,则不会编号。
  • 毫不奇怪地忽略了补充技巧;不幸的是还有子图的东西......

从我收集到的文档中,pandoc-crossref 可以以某种方式处理子图、附录等。有什么方法可以编写我的 LaTeX 并为 pandoc-crossref 使用 YAML 配置,以便正确拾取它?我必须做的任何重写都可以,条件是它仍然可以在原始 LaTeX(到 PDF)中编译。 (另外,我正在使用 \phantomcaption,所以如果这行得通,那将是额外的奖励。)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。