Skip to content

Commit

Permalink
Merge pull request #4708 from damianavila/fix_indent_and_center
Browse files Browse the repository at this point in the history
Fix indent and center
  • Loading branch information
ellisonbg committed Jan 27, 2014
2 parents ae17b42 + 2ca4708 commit 1d0bcb1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
15 changes: 15 additions & 0 deletions IPython/nbconvert/templates/html/basic.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ In [{{ cell.prompt_number }}]:
</div>
{%- endblock in_prompt %}

{% block empty_in_prompt -%}
<div class="prompt input_prompt">
</div>
{%- endblock empty_in_prompt %}

{#
output_prompt doesn't do anything in HTML,
because there is a prompt div in each output area (see output block)
Expand Down Expand Up @@ -54,15 +59,25 @@ In&nbsp;[{{ cell.prompt_number }}]:
{% endblock output %}
{% block markdowncell scoped %}
<div class="input">
{{ self.empty_in_prompt() }}
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
{{ cell.source | markdown2html | strip_files_prefix }}
</div>
</div>
</div>
{%- endblock markdowncell %}
{% block headingcell scoped %}
<div class="input">
{{ self.empty_in_prompt() }}
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
{{ ("#" * cell.level + cell.source) | replace('\n', ' ') | markdown2html | strip_files_prefix | add_anchor }}
</div>
</div>
</div>
{% endblock headingcell %}
{% block unknowncell scoped %}
Expand Down
21 changes: 13 additions & 8 deletions IPython/nbconvert/templates/html/mathjax.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
<!-- MathJax configuration -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
},
displayAlign: 'left', // Change this to 'center' to center equations.
"HTML-CSS": {
styles: {'.MathJax_Display': {"margin": 0}}
}
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true,
processEnvironments: true
},
// Center justify equations in code and markdown cells. Elsewhere
// we use CSS to left justify single line equations in code cells.
displayAlign: 'center',
"HTML-CSS": {
styles: {'.MathJax_Display': {"margin": 0}},
linebreaks: { automatic: true }
}
});
</script>
<!-- End of mathjax configuration -->
Expand Down

0 comments on commit 1d0bcb1

Please sign in to comment.