浏览代码

Left-align equations in cell outputs. (#5115)

Ian Rose 6 年之前
父节点
当前提交
83c907d641

+ 2 - 0
packages/mathjax2-extension/src/index.ts

@@ -16,6 +16,8 @@ import { PromiseDelegate } from '@phosphor/coreutils';
 // Stub for window MathJax.
 declare var MathJax: any;
 
+import '../style/index.css';
+
 /**
  * The MathJax latexTypesetter plugin.
  */

+ 14 - 0
packages/mathjax2-extension/style/index.css

@@ -0,0 +1,14 @@
+/*-----------------------------------------------------------------------------
+| Copyright (c) Jupyter Development Team.
+| Distributed under the terms of the Modified BSD License.
+|----------------------------------------------------------------------------*/
+
+/* Left-justify the MathJax preview in cell outputs. */
+.jp-OutputArea-output.jp-RenderedLatex .MathJax_Preview .MJXp-display {
+  text-align: left !important;
+}
+
+/* Left-justify the MathJax display equation in cell outputs. */
+.jp-OutputArea-output.jp-RenderedLatex .MathJax_Display {
+  text-align: left !important;
+}

+ 5 - 4
packages/rendermime/style/index.css

@@ -140,6 +140,11 @@
   line-height: var(--jp-content-line-height);
 }
 
+/* Left-justify outputs.*/
+.jp-OutputArea-output.jp-RenderedLatex {
+  text-align: left;
+}
+
 /*-----------------------------------------------------------------------------
 | RenderedHTML
 |----------------------------------------------------------------------------*/
@@ -153,10 +158,6 @@
   padding-right: 20px;
 }
 
-.jp-RenderedHTMLCommon .MathJax_Display {
-  margin: 0;
-}
-
 .jp-RenderedHTMLCommon em {
   font-style: italic;
 }