mathjax

Mathjax: how to deal with this strange behavior?

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am using the markdown editor and I have loaded Mathjax in all pages of my website. I have realized that this line of latex works well: $ ( u_1 ) $ However, this one does not work (basically latex does not work): $ ( u_1 , u_2 ) $ In order to make this work, I have to write something like this: $ ( u\_ 1 , u\_ 2 ) $ I have a similar problem here. This does not work: $$M = \left ( \begin { array }{ cc } a & b \\ c & d \\ \end { array } \right ) $$ But this works: $$M = \left ( \begin { array }{ cc } a & b \\\\ c & d \\\\ \end {

MathJax inside SVG

白昼怎懂夜的黑 提交于 2019-12-03 02:34:30
I'm doing some writing where I use MathJax to render the math. I also occasionally include SVG diagrams which are generated dynamically by javascript. Those SVG diagrams occasionally include math. I'd like the text elements in those SVG diagrams to be rendered using MathJax. I know how to cause the dynamic math to be rendered . However, the mathjax output is in <span> s which aren't valid SVG and don't show up. This persists when I configure MathJax to use SVG output mode, though this is perhaps due to an improper use of SVG output mode. I changed by MathJax CDN link to http://cdn.mathjax.org

Setting CSS styles, color, for MathJax

匿名 (未验证) 提交于 2019-12-03 02:28:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Hi I am trying to add styles to my MathJax output. In particular I would like to set a global color for my equations (so that it matches the styles on the rest of my page). Currently I have the following configuration. <script type="text/x-mathjax-config"> MathJax.Hub.Config({ jax: ["input/TeX", "output/HTML-CSS"], tex2jax: { inlineMath: [ ['$', '$'] ], displayMath: [ ['$$', '$$']], processEscapes: true, skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'] }, messageStyle: "none", "HTML-CSS": { preferredFont: "TeX",

How to convert HTML with mathjax into latex using pandoc?

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have some HTML documents with MathJax equations, and I want to convert them to latex, and then to pdf. I'd like to use pandoc. However, pandoc replaces $ with \$ and it replaces \ in formulas with \textbackslash{} . Is it possible to get pandoc to pass Mathjax formulas literally from html to latex? 回答1: With the latest version of pandoc (1.12.2), you can do this: pandoc -f html+tex_math_dollars+tex_math_single_backslash -t latex Much nicer! If you don't want to convert math delimited by \( and \) , just do pandoc -f html+tex_math_dollars

let PageDown and MathJax work together

走远了吗. 提交于 2019-12-03 02:03:08
问题 I am implementing a UI which is supposed to look pretty much like the one on math.stackexchange.com: Using fancy Markdown like you are used to on stackoverflow Parsing formulars using MathJax between $ ... $ -signs. So I downloaded the PageDown demo and set it up, which works pretty well. Now I try to let MathJax being loaded dynamically everytime the <textarea> changes. MathJax got an example for this approach but I'm not able to get it running. This is what 'my' code looks like: <link rel=

How to get Mathjax working with Angular2?

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Has anyone gotten Mathjax working with Angular2 ? Plunkr example created :- http://plnkr.co/edit/FLduwmtHfkCN5XPfzMsA?p=preview From some Angular1 examples I saw it looks like a directive is needed to call MathJax.Hub.Queue, but I suspect it will take me quite a while to get the Angular 2 syntax right, so I wondered if anyone has already done it ? e.g the following is an Angular 1 example. https://github.com/ColCarroll/ngMathJax/blob/master/ng-mathjax.js And the mathjax syntax is here :- https://docs.mathjax.org/en/v1.1-latest/typeset.html

pandoc document conversion failed with error 2

匿名 (未验证) 提交于 2019-12-03 01:17:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: when I knit HTML in R studio, I get this: "C:/Users/Susan/ANACON~1/Scripts/pandoc" +RTS -K512m -RTS lesson3_student.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output lesson3_student.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "C:\Users\Susan\Documents\R\win-library\3.3\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "C:\Users\Susan\AppData\Local\Temp\RtmpaUaaRx

IPython (Jupyter) MathJaX preamble

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Question How can I setup a MathJax "preamble" for use in IPython (or Jupyter) notebooks for repeated use in a way that is convenient for others to read my documents (on http://nbviewer.org ) and that works for LaTeX/PDF generation? Background I would like to use IPython (now Jupyter) notebooks for documents that I later convert to PDF via LaTeX (using ipython nbconvert ). The problem is how to include a bunch of macro definitions that I use in almost every document. Something like: \newcommand{\vect}[1]{\vec{#1}} \newcommand{\abs}[1]{\lvert

CSP: How to allow unsafe-eval for a given URI prefix (Firefox)

血红的双手。 提交于 2019-12-02 23:09:16
I'm trying to use MathJax as part of our web application which uses pretty strict Content Security Policy (CSP) . The problem is that MathJax is coded to use eval() [to be exact, in form of Function() ] which is not considered safe by default by CSP. I'm using following CSP header currently: X-Content-Security-Policy: allow 'self'; img-src *; media-src *; frame-src *; font-src *; frame-ancestors 'none'; style-src *; report-uri '/:save-csp-violation'; Which causes MathJax 2.0 code to fail because it uses Function() . I tried to allow unsafe-eval (i.e. Function() ) only for MathJax located

How to left align Mathjax elements

久未见 提交于 2019-12-02 22:08:46
Mathjax elements are by default, center aligned. How can I make Mathjax elements left aligned? Anas MathJax.Hub.Config({ jax: ["input/TeX","output/HTML-CSS"], displayAlign: "left" }); Or my solution with CSS: .MathJax_Display { text-align: left !important; } It worked for me. Edit to previous answer, this works perfectly for me .MathJax_Display { text-align: left !important; display: inline !important; } The other answers didn't work for me - but what did work was modifying the MathML that MathJax was displaying (and I know there are equivalents for other input formats). I was trying to indent