Skip to content
This repository was archived by the owner on Nov 5, 2019. It is now read-only.
This repository was archived by the owner on Nov 5, 2019. It is now read-only.

Proposal: Add support for LaTeX equations using MathJax #34

@fiedl

Description

@fiedl

What do you think about adding support for LaTeX equations like this?

bildschirmfoto 2016-02-03 um 15 45 57

To render this, I've copied these lines (https://github.com/textmate/markdown.tmbundle/blob/master/Commands/Markdown%20preview.plist#L30L45)

if ENV["TM_MARKDOWN_MATHJAX"].to_i > 0
    puts "<script type=\"text/x-mathjax-config\">
      MathJax.Hub.Config({
        extensions: [\"tex2jax.js\"],
        jax: [\"input/TeX\", \"output/HTML-CSS\"],
        tex2jax: {
          inlineMath: [ [\"$\",\"$\"], [\"\\\\(\",\"\\\\)\"] ],
          displayMath: [ [\"$$\",\"$$\"], [\"\\\\[\",\"\\\\]\"] ],
          processEscapes: false
        },
        \"HTML-CSS\": { availableFonts: [\"TeX\"] }
      });
    </script>
    <script type=\"text/javascript\"    src=\"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\">
    </script>"
end

into

https://github.com/streeter/markdown-redcarpet.tmbundle/blob/master/Commands/Preview.tmCommand

and set TM_MARKDOWN_MATHJAX to 1 in the Textmate properties.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions