docling-project / docling-project/docling
Docling cannot correctly convert the headers of a DOCX document into headers in a Markdown document.
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
### Bug
Docling cannot correctly convert the headers of a DOCX document into headers in a Markdown document.
### Steps to reproduce
1. download the zip from `https://www.3gpp.org/ftp/tsg_ran/WG1_RL1/TSGR1_124b/Docs/R1-2602579.zip` , unzip this zip file and then you can get
a file named `R1-2602579 Discussion on other aspects of CSI acquisition.docx`
2. use docling to convert the docx to markdown file
```
cmd = [
"docling",
"--from", "docx",
"--to", "md",
"--output", os.path.dirname(md_path),
doc_path
]
print(f"run command: {' '.join(cmd)}")
result = subprocess.run(
cmd,
capture_output=True,
text=True,
check=True
)
```
3. I get the markdown, I have obtained the markdown file and carefully compared the contents of the docx file and the markdown file (I use typora to read markdown file).
4. I found the error. The details are as follows:
The display effect of the markdown file is as follows:
The display effect of the docx file is as follows:
`The title style of section 2.2 disappears. Another serious issue is that the text below the 2.2 heading and between the text boxes has inexplicably disappeared: According to the agreement in RP-260798 from the RAN-111 meeting, the maximum CBW is set to 400 MHz. With such a wide CBW, the Doppler shift difference between the highest and lowest subcarriers becomes significant, as illustrated by the following formula`
### Docling version
Docling version: 2.88.0
Docling Core version: 2.72.0
Docling IBM Models version: 3.13.0
Docling Parse version: 5.8.0
Python: cpython-312 (3.12.12)
Platform: Linux-6.8.0-90-generic-x86_64-with-glibc2.39
### Python version
`Python 3.12.12`
Contributor guide
Assessment
This issue has not been assessed yet.