mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Merge pull request #4154 from ellisonbg/mathstyle
Center LaTeX and figures in markdown
This commit is contained in:
commit
7ccb1bbc8a
@ -1,2 +1,2 @@
|
||||
@import "../auth/less/login.less";
|
||||
@import "../auth/less/logout.less";
|
||||
@import "login.less";
|
||||
@import "logout.less";
|
@ -1,4 +1,4 @@
|
||||
@import "../base/less/variables.less";
|
||||
@import "../base/less/mixins.less";
|
||||
@import "../base/less/flexbox.less";
|
||||
@import "variables.less";
|
||||
@import "mixins.less";
|
||||
@import "flexbox.less";
|
||||
|
||||
|
@ -25,7 +25,9 @@ IPython.mathjaxutils = (function (IPython) {
|
||||
processEscapes: true,
|
||||
processEnvironments: true
|
||||
},
|
||||
displayAlign: 'left', // Change this to 'center' to center equations.
|
||||
// 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 }
|
||||
|
@ -3,6 +3,24 @@ div.output_area {
|
||||
padding: 0px;
|
||||
page-break-inside: avoid;
|
||||
.hbox();
|
||||
|
||||
.MathJax_Display {
|
||||
// Inside a CodeCell, elements are left justified
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.rendered_html {
|
||||
// Inside a CodeCell, elements are left justified
|
||||
table {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
img {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
.rendered_html{
|
||||
.rendered_html {
|
||||
|
||||
color: black;
|
||||
em {font-style: italic;}
|
||||
@ -43,7 +43,15 @@
|
||||
margin: 1em 2em;
|
||||
}
|
||||
|
||||
table, tr, th, td {
|
||||
table {
|
||||
// Center tables horizontally
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
tr, th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
margin: 1em 2em;
|
||||
@ -63,7 +71,22 @@
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
p + p {
|
||||
img {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
* + p {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
* + table {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
* + img {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
}
|
||||
|
12
IPython/html/static/style/ipython.min.css
vendored
12
IPython/html/static/style/ipython.min.css
vendored
@ -130,7 +130,9 @@ p{margin-bottom:0;}
|
||||
.end_space{height:200px;}
|
||||
#notification_area{z-index:10;}
|
||||
.notification_widget{color:#777777;padding:1px 12px;margin:2px 4px;z-index:10;border:1px solid #ccc;border-radius:4px;background:rgba(240, 240, 240, 0.5);}
|
||||
div.output_area{padding:0px;page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;}
|
||||
div.output_area{padding:0px;page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;}div.output_area .MathJax_Display{text-align:left !important;}
|
||||
div.output_area .rendered_html table{margin-left:0;margin-right:0;}
|
||||
div.output_area .rendered_html img{margin-left:0;margin-right:0;}
|
||||
div.output_area pre{font-family:monospace;margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;color:black;background-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;line-height:inherit;}
|
||||
div.output_subarea{padding:0.44em 0.4em 0.4em 1px;margin-left:6px;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;}
|
||||
div.output_text{text-align:left;color:#000000;font-family:monospace;line-height:1.231em;}
|
||||
@ -171,11 +173,15 @@ div.quickhelp{float:left;width:50%;}
|
||||
.rendered_html pre{margin:1em 2em;}
|
||||
.rendered_html pre,.rendered_html code{border:0;background-color:#ffffff;color:#000000;font-size:100%;padding:0px;}
|
||||
.rendered_html blockquote{margin:1em 2em;}
|
||||
.rendered_html table,.rendered_html tr,.rendered_html th,.rendered_html td{border:1px solid black;border-collapse:collapse;margin:1em 2em;}
|
||||
.rendered_html table{margin-left:auto;margin-right:auto;border:1px solid black;border-collapse:collapse;}
|
||||
.rendered_html tr,.rendered_html th,.rendered_html td{border:1px solid black;border-collapse:collapse;margin:1em 2em;}
|
||||
.rendered_html td,.rendered_html th{text-align:left;vertical-align:middle;padding:4px;}
|
||||
.rendered_html th{font-weight:bold;}
|
||||
.rendered_html p{text-align:justify;}
|
||||
.rendered_html p+p{margin-top:1em;}
|
||||
.rendered_html img{display:block;margin-left:auto;margin-right:auto;}
|
||||
.rendered_html *+p{margin-top:1em;}
|
||||
.rendered_html *+table{margin-top:1em;}
|
||||
.rendered_html *+img{margin-top:1em;}
|
||||
span#save_widget{padding:0px 5px;margin-top:12px;}
|
||||
span#checkpoint_status,span#autosave_status{font-size:small;}
|
||||
@media (max-width:767px){span#save_widget{font-size:small;} span#checkpoint_status,span#autosave_status{font-size:x-small;}}@media (max-width:767px){span#checkpoint_status,span#autosave_status{display:none;}}@media (min-width:768px) and (max-width:979px){span#checkpoint_status{display:none;} span#autosave_status{font-size:x-small;}}div.text_cell{padding:5px 5px 5px 5px;}
|
||||
|
12
IPython/html/static/style/style.min.css
vendored
12
IPython/html/static/style/style.min.css
vendored
@ -1511,7 +1511,9 @@ p{margin-bottom:0;}
|
||||
.end_space{height:200px;}
|
||||
#notification_area{z-index:10;}
|
||||
.notification_widget{color:#777777;padding:1px 12px;margin:2px 4px;z-index:10;border:1px solid #ccc;border-radius:4px;background:rgba(240, 240, 240, 0.5);}
|
||||
div.output_area{padding:0px;page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;}
|
||||
div.output_area{padding:0px;page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;}div.output_area .MathJax_Display{text-align:left !important;}
|
||||
div.output_area .rendered_html table{margin-left:0;margin-right:0;}
|
||||
div.output_area .rendered_html img{margin-left:0;margin-right:0;}
|
||||
div.output_area pre{font-family:monospace;margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;color:black;background-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;line-height:inherit;}
|
||||
div.output_subarea{padding:0.44em 0.4em 0.4em 1px;margin-left:6px;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;}
|
||||
div.output_text{text-align:left;color:#000000;font-family:monospace;line-height:1.231em;}
|
||||
@ -1552,11 +1554,15 @@ div.quickhelp{float:left;width:50%;}
|
||||
.rendered_html pre{margin:1em 2em;}
|
||||
.rendered_html pre,.rendered_html code{border:0;background-color:#ffffff;color:#000000;font-size:100%;padding:0px;}
|
||||
.rendered_html blockquote{margin:1em 2em;}
|
||||
.rendered_html table,.rendered_html tr,.rendered_html th,.rendered_html td{border:1px solid black;border-collapse:collapse;margin:1em 2em;}
|
||||
.rendered_html table{margin-left:auto;margin-right:auto;border:1px solid black;border-collapse:collapse;}
|
||||
.rendered_html tr,.rendered_html th,.rendered_html td{border:1px solid black;border-collapse:collapse;margin:1em 2em;}
|
||||
.rendered_html td,.rendered_html th{text-align:left;vertical-align:middle;padding:4px;}
|
||||
.rendered_html th{font-weight:bold;}
|
||||
.rendered_html p{text-align:justify;}
|
||||
.rendered_html p+p{margin-top:1em;}
|
||||
.rendered_html img{display:block;margin-left:auto;margin-right:auto;}
|
||||
.rendered_html *+p{margin-top:1em;}
|
||||
.rendered_html *+table{margin-top:1em;}
|
||||
.rendered_html *+img{margin-top:1em;}
|
||||
span#save_widget{padding:0px 5px;margin-top:12px;}
|
||||
span#checkpoint_status,span#autosave_status{font-size:small;}
|
||||
@media (max-width:767px){span#save_widget{font-size:small;} span#checkpoint_status,span#autosave_status{font-size:x-small;}}@media (max-width:767px){span#checkpoint_status,span#autosave_status{display:none;}}@media (min-width:768px) and (max-width:979px){span#checkpoint_status{display:none;} span#autosave_status{font-size:x-small;}}div.text_cell{padding:5px 5px 5px 5px;}
|
||||
|
@ -1,2 +1,2 @@
|
||||
@import "../tree/less/altuploadform.less";
|
||||
@import "../tree/less/tree.less";
|
||||
@import "altuploadform.less";
|
||||
@import "tree.less";
|
Loading…
Reference in New Issue
Block a user