Skip to content

DaohongMei/mdmath

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdmath Markdown+Math

License npm npm

What is it ...

mdmath allows to use Visual Studio Code as a markdown editor capable of typesetting and rendering TeX math. In fact it functions and renders identically to the built in markdown viewer. Additionally KaTeX works inside as a fast math renderer.

You can install the extension directly from Visual Studio Code Marketplace.

Release 1.0 published with support of ...

  • Formula numbers.
  • Footnotes

mdmath editing

Features

Simplify the process of authoring and live previewing markdown documents containing math formulas. This extension is a comfortable tool for scientists, engineers and students with markdown as their first choice document format.

  • Inline math by $ ... $
  • Display math by $$ ... $$
  • Add formula numbering by $$ ... $$ (1)
  • Inline math with tables
  • Embedded HTML
  • Syntax highlighting with code sections
  • Export resulting HTML code for web usage

Test Table

Some math expressions are collected in a test table.

Installation ...

... from inside of VSCode

Press F1 key inside of Visual Studio Code and type extension. Choose Extensions: Install Extension and then select the Markdown+Math extension from the list.

... from Mac & Linux Command Line

cd $HOME/.vscode/extensions
git clone https://github.com/goessner/mdmath.git
cd mdmath
npm install

... from Windows Command Line

cd  %USERPROFILE%\.vscode\extensions
git clone https://github.com/goessner/mdmath.git
cd mdmath
npm install

Usage

  • Launch VS Code, create or open a markdown file (.md).
  • Press Ctrl+Shift+. to open a preview window side by side, or ...
  • .. alternatively press Ctrl+Shift+P and run the command Markdown+Math to achive the same.
  • Typeset in your markdown source window and see the preview window live updating.
  • Press Ctrl+Shift+P and run the command Markdown+Math as HTML to open an output window for viewing and possibly copying the corresponding HTML source.

mdmath html export

Note: Attempt to show HTML output with Preview Window as Active Window results in a warning Cannot show source of that document!. Make your markdown source window active first.

You can see HTML export of triangle.md live in your browser.

Dependencies

Issues, Hints

  • In order to create *.pdf output from your Markdown you should consider using Pandoc.
  • Opening multiple preview windows is not possible at current. Even changing the active markdown source window doesn't update the preview window properly. Close the preview window first as a workaround here.

Contributing

See contributing.md

ChangeLog

  • December 20, 2016

    • Release 1.0.0
    • Dependency on markdown-it-katex removed in favour of some lightweight regular expressions.
    • Very simple (manual) equation numbering implemented.
    • KaTeX error highlighting activated.
    • Footnotes by markdown-it-footnote added.
    • Standalone tests for math rendering added.
    • Markdown+Math CSS file added to CDN
    • Some minor bugs removed.
  • December 2, 2016

    • Release 0.9.0
    • Installation bug resolved
  • November 25, 2016

    • First Release 0.8.0

License

Markdown+Math for VS Code is licensed under the MIT License

© Stefan Gössner

About

LaTeX Math for Markdown inside of Visual Studio Code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 68.8%
  • CSS 20.8%
  • HTML 10.4%