📑 Add literalinclude directive#610
Conversation
| const showLineNumbers = | ||
| options?.linenos || options?.['lineno-start'] || options?.['lineno-match'] || numberLines |
There was a problem hiding this comment.
This fixes a portion of the bug in:
Line number is now turned on if lineno-start is included.
fwkoch
left a comment
There was a problem hiding this comment.
This looks great - I didn't dig through all the logic around line numbers, etc, in detail, but testing and documentation both look thorough 👍
Despite all the logic complexity added, there was nice simplification around previously duplicated options/directives. My only comments are non-critical.
|
I confirm that the dev version of myst supports smoothly the literalincludes Since I could not yet test it with JupyterLab, I actually started Guys, it's amazing what you are building!!! Can't wait to switch over from Jupyter-book for my whole toolchain. |
|
⚡️💨🚀 Really glad you are up and running with the CLI -- we will get it over to Jupyter soon! |
|
Dear @rowanc1, There seems to be a little glitch in the tex export when literal-including indented code. I have a file It's included as such: The generated TeX looks as such; mind the indentation of the first line: Let me know if more detailed instructions to reproduce would be helpful. The generated html is fine. |
This supports a new directive,
literalincludeas well as all of the additional options across RST and Sphinx.RST documentation:
Sphinx documentation:
See jupyter-book/jupyterlab-myst#189 and https://github.com/orgs/executablebooks/discussions/1026
There are a few more tweaks that will be necessary to bring this to
jupyterlab-mystto expose the transform and extend to not having to read from disk, etc.cc @nthiery @matthewfeickert @fperez who were asking for this over the last few months.