Issue
I would like to know if it is possible to remove empty space on the left side of a Markdown cell in Jupyter Notebook. Here is a screen shot of what I mean. The empty space is highlighted with the red box:
If it helps, I am running Python2.7, and I am using the monokai jupytertheme, which I loaded at the terminal as follows:
jt -t monokai -f fira -fs 13 -nf ptsans -nfs 11 -cursw 5 -cursc r -T -N -kl
Is the issue related to using a jupytertheme? Would other information be helpful? Thanks.
Solution
Open a jupyter notebook cell, put the in your cell, execute it then there will appear a click, you can toggle the left side as your will
from IPython.display import HTML
HTML('''
<script>
code_show=false;
function code_toggle(){
if(code_show){$('.prompt').hide();}
else{$('.prompt').show();}
code_show=!code_show;
}
function initialize(){
document.body.style.fontFamily='Palatino';
var output=$('.output_subarea.output_text.output_stream.output_stdout');
$.merge(output,$('.output_subarea.output_text.output_result'));
for(var i=0;i<output.length;i++)for(var j=0;j<output[i].children.length;j++)
output[i].children[j].style.fontFamily='Palatino';
code_toggle();
}
$(document).ready(initialize);
</script>
Click <a href="javascript:code_toggle()">here</a> to show/hide prompt in this notebook.
''')
Answered By - dyl dyl
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.