-
Dear all, first, thanks to the developers for this great tool! I would like to include the listing of a file (e.g. a source code file) into the jupyter notebook. Like the listing environment in LaTeX. Is this somehow possible? NB, I know that I could copy the content of the file into the notebook, but this way I would have to make sure that it is in sync with the actual file. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@mmcky is working on this issue but I'm not sure what the status is. |
Beta Was this translation helpful? Give feedback.
-
@lu-kas does the contents of that file need to be executable? If not you can use the sphinx
We are working on support in |
Beta Was this translation helpful? Give feedback.
@lu-kas does the contents of that file need to be executable?
If not you can use the sphinx
literalinclude
directive to bring in the contents from a file (but this can't be used to bring inexecutable code
just contents of files for viewing that may or may not need syntax highlighting)We are working on support in
jupyter-book
to bring in code from a file through a:file:
option tocode-cell
directives. It is currently inPR
phase and not yet merged -- but it is coming. You can follow progress: executablebooks/MyST-NB#286