Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODT reader doesn't generate figures for images #10567

Open
CodeSandwich opened this issue Jan 26, 2025 · 0 comments
Open

ODT reader doesn't generate figures for images #10567

CodeSandwich opened this issue Jan 26, 2025 · 0 comments
Labels

Comments

@CodeSandwich
Copy link

Explain the problem.

I created a simple ODT file using LibreOffice 24.8.4.2 containing a picture with a caption inserted using the "insert caption" option: awake.odt. Using pandoc 3.6.2 I run

pandoc awake.odt

The results were:

<p><img src="Pictures/10000000000001000000010097DDA497.jpg" title="fig:"
style="width:8.996cm;height:8.996cm"
alt="Figure 1: But at what cost" /></p>

There's no "figure" element, just a "p".

The expected behavior

An identical document in Markdown produced "figure" which seems to be the correct behavior. Consider this:

pandoc -t markdown awake.odt

Produced a simple markdown:

![Figure 1: But at what
cost](Pictures/10000000000001000000010097DDA497.jpg "fig:"){width="8.996cm"
height="8.996cm"}

And running

pandoc -t markdown awake.odt | pandoc

Resulted in

<figure>
<img src="Pictures/10000000000001000000010097DDA497.jpg" title="fig:"
style="width:8.996cm;height:8.996cm" alt="Figure 1: But at what cost" />
<figcaption aria-hidden="true">Figure 1: But at what cost</figcaption>
</figure>

It contains the "figure" element with "figcaption" which seems to be the correct output.

Pandoc version?

3.6.2 on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant