Open naikymen opened 1 year ago
Thanks for opening the new issue. It makes things clearer to track for us.
I checked with Pandoc as the highlighting feature comes from it, and it seems it does not support highlighting for ODT. From: https://pandoc.org/MANUAL.html#syntax-highlighting
Currently highlighting is supported only for HTML, EPUB, Docx, Ms, and LaTeX/PDF output.
This mean you can't use the standard highlighting mechanism provided by Pandoc, that most of the document rely on.
I don't think we have a solution for that... Not sure there is an external tool to highlight code for ODT document. I'll do some research.
For context on the Pandoc side
It seems it is still an open feature request:
with already only inline code highlighted
But code block is still not
It seems it needs to be reactivated and it is stale 🤔
Hello!
As a LibreOffice user, I would like to have Knitted ODT documents with syntax-highlighted code chunks.
The
word_document
has this feature, but theodt_document
output does not seem to have it.Here is a reprex, I've knitted to DOCX and ODT, using rmakrdown and bookdown: reprex.zip
DOCX shot:
ODT shot:
I'm not certain if this is a feature request or a bug.
It may be a bug, according to this Bookdown issue: https://github.com/rstudio/bookdown/issues/1394#issuecomment-1370134795
I'd like to stick to ODT, since using DOCX as an intermediary is nightmarish.
Is highlighting possible with
odt_document
orodt_document2
? Are there workarounds?Thanks!