Skip to content
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

issue #90 - Implementation of --execute on html format #117

Merged
merged 11 commits into from
Mar 17, 2021

Conversation

aless80
Copy link
Contributor

@aless80 aless80 commented Mar 17, 2021

Implementation of the --execute option, which executes code blocks. This s now implemented for the html, latex/pdflatex, ipynb formats and for doconce jupyterbook. The lib/doconce/html.py had code to render (unexecuted) code blocks. However, I hd to completely rework that part of code. I modularized much of the code so that latex.py and html.py can reuse it. I did not touch ipynb.py. I made sure that postfixes ['hid', '-h', '-e', '-t', 'out'] to code block environents work in both the latex and html formats. Same for code blocks using Sage (!bc pyscpro)

postfix Effect on code block
hid Hide the cell (but not in ipynb)
-e Hide the cell (also in ipynb)
-t Code as text
-h Show/Hide button in html
out Output cell

@aless80 aless80 merged commit 6825065 into doconce:master Mar 17, 2021
@aless80 aless80 deleted the issue91 branch March 17, 2021 14:19
@lexnederbragt
Copy link
Contributor

Thanks! Testing now. Was it a deliberate choice to have In [1]: in front of code blocks in html? I'd think this is not needed as it is a ipynb thing?

@aless80
Copy link
Contributor Author

aless80 commented Mar 18, 2021

Yes, I had that idea and after that didn't give it much thought. I copied the html+css styling from a Jupyter Notebook. Other than that is the formatting of the input and output cells ok? Should I remove only that In [1] or do more modifications?

@lexnederbragt
Copy link
Contributor

Please remove it, it should not be present in html. The rest looks OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants