-
I'm trying to convert docx files into markdown while keeping the headings and their numbering. Here is an example: The output I would like: # LOREM IPSUM (h1)
## 1. Lorem ipsum (h2)
Lorem ipsum
# LOREM IPSUM (h1)
### 2. Lorem ipsum (h3)
2.1. Lorem ipsum (paragraph) When converting directly to markdown, numbering would disappear, so I'm first converting to html with the Running <h1 class="unnumbered" id="lorem-ipsum-h1">LOREM IPSUM (h1)</h1>
<h2 data-number="0.1" id="lorem-ipsum-h2">
<span class="header-section-number">0.1</span> Lorem ipsum (h2)
</h2>
<p>Lorem ipsum</p>
<h1 class="unnumbered" id="lorem-ipsum-h1-1">LOREM IPSUM (h1)</h1>
<h3 data-number="0.1.1" id="lorem-ipsum-h3">
<span class="header-section-number">0.1.1</span> Lorem ipsum (h3)
</h3>
<ol type="1">
<li>
<p>Lorem ipsum (paragraph)</p>
</li>
</ol> There are two issues here:
My guess is that there is some style information that is not used by Pandoc. Is there a general solution for that (each of my docx will have different styling)? Pandoc version: 3.1.12.3 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Pandoc just ignores the numbers in Word. Only the section heading levels are recorded. |
Beta Was this translation helpful? Give feedback.
Pandoc just ignores the numbers in Word. Only the section heading levels are recorded.