pandoc-crossref 缺少对子节的引用的顶级节号

pandoc-crossref 缺少对子节的引用的顶级节号

在以下 Pandoc markdown 文档中,pandoc-crossref错误地将节号1.1而不是分配2.1.1给对sec:first-background-subsubsection(level=3) 的引用。对sec:second-background-subsection-- 的引用变为2.2-- 由 (level=2) 正确处理pandoc-crossref。一般来说,似乎pandoc-crossref只保留最后两个节号,即截断1.2.3.43.4

Pandoc 降价:

# Introduction

* A reference to a section of depth 3: @sec:first-background-subsubsection.
* A reference to a section of depth 2: @sec:second-background-subsection.
* A reference to a section of depth 4: @sec:deepest-subsection.

# Background

Here's the background.

## First Background-subsection

Here's a the first subsection in the Background-section.

### Some subsubsection {#sec:first-background-subsubsection}

Here's a subsubsection.

### Ignore this subsubsection

#### Deepest subsection {#sec:deepest-subsection}

A level-four subsection.

## Second Background-subsection {#sec:second-background-subsection}

Here's a the second subsection in the Background-section.

用于构建.tex 文件的 Pandoc 命令:

pandoc --standalone --from markdown -F pandoc-crossref --pdf-engine=xelatex input.md -o output.tex

LateX 输出介绍部分:

\section{Introduction}\label{introduction}}

\begin{itemize}
\tightlist
\item
  A reference to a section of depth 3: sec.~1.1.
\item
  A reference to a section of depth 2: sec.~2.2.
\item
  A reference to a section of depth 4: sec.~2.1.
\end{itemize}

版本信息:

  • pandoc 2.9.2.1(使用 pandoc-types 1.20、texmath 0.12.0.1、skylighting 0.8.3.2 编译)
  • pandoc-crossref v0.4.0.0 git commit 80080744cec5c9d0696d4e4be77bec5fc1cc2375 (HEAD) 使用 Pandoc v2.9.2.1、pandoc-types v1.20 和 GHC 8.8.3 构建

相关内容