How can I get the line-numbers to display on the left edge of a code block in a Reveal.js slide show created with pandoc from a markdown document?
I have tried the following markdown:
---
title: 'Display Code-block Line Numbers'
date: 'Aug 2020'
---
--------
~~~ { .python .number-lines startFrom="1" data-line-numbers="3,4-5" }
def main():
print( "hello pan" )
if __name__ == '__main__:
main()
~~~
--------
With this command for pandoc:
pandoc -s -i -t revealjs --section-divs -o slides.html slides.md
I have also tried various alterations of the fenced_code_attributes
:
{ .python .number-lines }
, { .python .numberLines }
; and pandoc
commands: removing the -i
flag and trying some --variable
s.
Also, the following does not work either: https://stackoverflow.com/a/55845381/5060792