-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty code cells in Jupyter notebook and errors allowed? #209
Comments
For (1) I found the comment in the docs that a This gives a workaround for (2): User |
I came here to report the same issue about comments inside functions and now I have also adopted the |
Hi, sorry for the late reply. Just to provide some context; from the very beginning the Markdown indicator was
Allowing whitespace before the indicator was added in #6 but perhaps that was a mistake. The reason for it is that Literate.jl and Documenter.jl support partial blocks, which allows for interweaving markdown with code, even in the middle of a function. Allowing whispace in front thus enables you to write
instead of
You can see this in action here: https://ferrite-fem.github.io/Ferrite.jl/stable/examples/ns_vs_diffeq/ where the function In any case, using a custom preprocessor such as (untested)
Would allow you to write your documents like that. |
And regarding empty cells, those are filtered out. For the specific usecase mentioned above though, perhaps it would be more instructive that the empty, to be filled in, cells contain a comment such as
which is pretty easy to achieve. |
Also forgot about deliberate errors: For Documenter output you can use |
Thanks for the preprocess hint - I might give that a try! |
Personally I'd vote to revert #6 but I can live with the current behaviour. FYI I'm now using Literate.jl for my labs: https://github.com/Imperial-MATH50003/MATH50003NumericalAnalysis/blob/main/src/labs/lab2.jl |
Same here (both voting and living with 😄 ). The benefit is that you can include math in the markdown, but a drawback is that the code block gets chopped up so users can't use the copy icon to grab the entire function. |
I've run into a few issues trying to use this:
It doesn't seem to let me do comments inside functions without code. E.g. I have a problem sheet which has the following template:But it is treating the # TODO as a new cell. If I change to the following it works however:The text was updated successfully, but these errors were encountered: