I have a jupyter notebook that is a mixture of markdown and code. In the end I want to render it out as a pdf report and hide the code. I still want to see the output of the code, the plots and tables, I just don't want to see the code in the final report. I found the post below that has the code below, which if added to the notebook creates a toggle button that can be used to hide or display the input code. The problem with that is I wind up with a toggle button at the top of my report. Does anyone know how to do this?
Post:
Code:
<script>
function code_toggle() {
if (code_shown){
$('div.input').hide('500');
$('#toggleButton').val('Show Code')
} else {
$('div.input').show('500');
$('#toggleButton').val('Hide Code')
}
code_shown = !code_shown
}
$( document ).ready(function(){
code_shown=false;
$('div.input').hide()
});
</script>
<form action="javascript:code_toggle()"><input type="submit" id="toggleButton" value="Show Code"></form>