pandoc icon indicating copy to clipboard operation
pandoc copied to clipboard

Fenced code attributes produce no line numbers in PowerPoint

Open dmail00 opened this issue 1 year ago • 2 comments

Explain the problem. With an input file:

% Fenced code issue in powerpoint

# Line numbers

------------------------

## No line numbers

~~~~ {#mycode .haskell .numberLines startFrom=100}
qsort []     = []
qsort (xxs) = qsort (filter ( x) xs) ++ [x] ++
               qsort (filter (= x) xs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

------------------------

Ran with the command:

pandoc.exe -f markdown+fenced_code_attributes fenced_code_issue.md -o fenced_code_issue.pptx

No line numbers are present in the Powerpoint file.

The docs state that it should work in Powerpoint:

Currently, the only output formats that use this information are HTML, LaTeX, Docx, Ms, and PowerPoint

It does however work with the same file generating a HTML Slidy presentation

Pandoc version 3.1.12.1 OS Windows 10

dmail00 avatar Feb 21 '24 01:02 dmail00

"this information" here refers to all of it -- the language name in addition to the other attributes. The docx and pptx writers don't currently implement line numbers and never did. I suppose it would be good if they did.

jgm avatar Feb 21 '24 03:02 jgm

Thanks for the information. I suppose this is a feature request then and I will have to continue using images generated by pygments.

dmail00 avatar Feb 21 '24 15:02 dmail00