Output of Python code cell seems to be not processed by Markdown.
For example in Python code cell there could be something like that:
print "**bold**"
And the output is: **bold** instead of bold. Is there a way to make it really bold?
While the default cell type for new cells is Code, you can change the cell type of any existing cell by clicking in the cell and selecting a new cell type (e.g. Markdown ) in the cell type menu in the toolbar.
Using Jupyter Lab, and coding in r, the way to enter code blocks in a markdown cell is easy and has good and predictable results. Just follow the same steps each time. Press Esc key, type m for markdown cell, press Enter key. The cursor is now in the markdown cell waiting for instructions.
For example, to make a word bold, surround it with the HTML code for bold ( <b>text</b> instead of the Markdown code. You can attach image files directly to a notebook in Markdown cells by dragging and dropping it into the cell.
Just double click on the markdown cell. Edit what you want to and Run. It will reflect the changes.
To get markdown formatted output, you can use the Markdown object of the display machinery. A print-like function could thus look like
from IPython.display import Markdown, display
def printmd(string):
display(Markdown(string))
printmd('**bold**')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With