|
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! |
Replies: 2 comments 2 replies
|
@mmcky is working on this issue but I'm not sure what the status is. |
|
@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 |
@lu-kas does the contents of that file need to be executable?
If not you can use the sphinx
literalincludedirective to bring in the contents from a file (but this can't be used to bring inexecutable codejust contents of files for viewing that may or may not need syntax highlighting)We are working on support in
jupyter-bookto bring in code from a file through a:file:option tocode-celldirectives. It is currently inPRphase and not yet merged -- but it is coming. You can follow progress: executablebooks/MyST-NB#286