Skip to content

Commit

Permalink
conflicts resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
goessner committed Feb 20, 2017
1 parent 82936e1 commit f24753f
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 623 deletions.
52 changes: 0 additions & 52 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< HEAD
## CHANGELOG

### [1.2.0]() on February 20, 2017
Expand Down Expand Up @@ -45,54 +44,3 @@
### [0.8.0](https://github.com/goessner/mdmath/tree/20e9002) on November 25, 2016

* First Release
=======
## CHANGELOG

### [1.2.0]() on February 20, 2017
* *blockquote* bug removed.
* Support of user settings.
* Allow *yaml* and *JSON* front matter in markdown.
* Copy HTML source to clipboard.
* Command `Markdown+Math to Html` is now deprecated.
* Generation of *Table of Contents* is now supported.
* Support of custom CSS styles for preview window.
* Documentation changes
* some minor documentation changes
* moved CHANGELOG to its own file
* moved CONTRIBUTING guide
* added ISSUE_TEMPLATE
* updated links in README
* Updated CSS links for generated HTML code.
* Updated dependencies and added bugs section to `package.json`.
* updated CSS links for generated HTML code
* updated dependencies and added bugs section to `package.json`

### [1.1.0](https://github.com/goessner/mdmath/compare/5329d04...fcfcbdf) on December 27, 2016

* Single character inline formula bug fixed.
* Formula in lists bug fixed.
* Handling of KaTeX errors improved.
* Micro-improvement of regular expressions.

### [1.0.1](https://github.com/goessner/mdmath/compare/d7b2f55...5329d04) on December 21, 2016

* `code block` bug removed.

### [1.0.0](https://github.com/goessner/mdmath/compare/f0eaf9b...d7b2f55) on December 20, 2016

* 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](http://goessner.github.io/mdmath/test/) for math rendering added.
* Markdown+Math CSS file added to [CDN](https://gitcdn.xyz/repo/goessner/mdmath/master/css/mdmath.css)
* Some minor bugs removed.

### [0.9.0](https://github.com/goessner/mdmath/compare/20e9002...f0eaf9b) on December 3, 2016

* Installation bug resolved

### [0.8.0](https://github.com/goessner/mdmath/tree/20e9002) on November 25, 2016

* First Release
>>>>>>> de5152803cda7e571b79df88376cac89ac77398a
161 changes: 0 additions & 161 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< HEAD
# ![mdmath](img/icon.png) Markdown+Math

[![License](https://img.shields.io/github/license/goessner/mdmath.svg)](https://github.com/goessner/mdmath/blob/master/LICENSE.txt)
Expand Down Expand Up @@ -158,163 +157,3 @@ See [`CHANGELOG.md`](CHANGELOG.md)
*Markdown+Math* for VS Code is licensed under the [MIT License](http://opensource.org/licenses/MIT)

© [Stefan Gössner](https://github.com/goessner)
=======
# ![mdmath](img/icon.png) Markdown+Math

[![License](https://img.shields.io/github/license/goessner/mdmath.svg)](https://github.com/goessner/mdmath/blob/master/LICENSE.txt)
[![npm](https://img.shields.io/npm/v/mdmath.svg)](https://www.npmjs.com/package/mdmath)
[![npm](https://img.shields.io/npm/dt/mdmath.svg)](https://www.npmjs.com/package/mdmath)

## 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](https://marketplace.visualstudio.com/items?itemName=goessner.mdmath).

### What is new in **mdmath** ...
* Support of table of Contents
* Support of Front Matter (YAML or JSON style)
* User Stylesheet
* User Settings

![mdmath editing](img/edit.gif)

## 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](http://goessner.github.io/mdmath/test/).

## Installation ...

### ... from inside of VSCode

Press <kbd>F1</kbd> 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 <kbd>Ctrl+Shift+.</kbd> to open a preview window side by side, or ...
* .. alternatively press <kbd>Ctrl+Shift+P</kbd> and run the command `Markdown+Math` to achive the same.
* Typeset in your markdown source window and see the preview window live updating.
* Press <kbd>Ctrl+K .</kbd> and run the command `Clip Markdown+Math to HTML` to copy the
corresponding HTML source to the underlying systems clipboard.

## Default User Settings
```json
// Path to custom stylesheet file (css).
"mdmath.style": "",

// Footnotes in markdown enabled.
"mdmath.footnotes": true,

// 'Table of Contents' generation in markdown enabled.
"mdmath.toc.enabled": false,

// Heading levels included in table of contents.
"mdmath.toc.includeLevel": [2,3],

// Add permalink symbols to headings.
"mdmath.toc.permalink": true,

// Begin adding permalink symbols starting from heading level.
"mdmath.toc.permalinkLevel": 2,

// Add permalink symbol in front of heading.
"mdmath.toc.permalinkSymbol": "#"
```

## Dependencies

=======
* [`markdown-it`](https://github.com/markdown-it/markdown-it): The markdown renderer also used in VS Code.
* [`katex`](https://github.com/Khan/KaTeX): This is where credits for fast rendering TeX math in HTML go to.
* [`markdown-it-footnote`](https://github.com/markdown-it/markdown-it-footnote): Using footnotes in markdown.
* [`highlight.js`](https://github.com/isagalaev/highlight.js): The code highlighter also used in VS Code.
* [`copy-paste`](https://github.com/xavi-/node-copy-paste): A command line utility that allows copy/paste (r/w) access to the system clipboard.

## FAQ

* __Which functions does KaTeX support ?__
* See them listed at [KaTeX Reference](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX).
* __The preview window does not scroll in sync with source window__
* No. Maybe VSCode's new native preview window behavior is supported in future.
* __What if I need to use the currency symbol `$` also in my markup ?__
* It should be safe to use it. If in doubt escape it.
* __What are the restrictions with inline formulas ?__
* Whitespace after opening `$` and before closing `$` is not allowed.
* Numeric character before opening `$` and after closing `$` is not allowed.
* At least one character (whitespace ?) is required between two consecutive inline formulas.
* Line break inside is not allowed.
* __What are the restrictions with display formulas ?__
* Not allowed inline of text. Write them on a separate line.
* Restrictions for inline formulas do not apply.
* __Can I use math markup in blockquotes ?__
* We can use inline and display formulas in blockquote sections. In order to avoid the blockquote symbol `'>'`
being part of a multiline display formula, display formulas have to be written on a single line
in blockquote sections.
* __Can I use math markup in code blocks ?__
* In order to prevent converting formulas in code blocks you must escape the enclosing dollars as in `\$\frac{a}{b}\$`.
* __Can I access the HTML source of the markdown file ?__
* Yes. Use the <kbd>Markdown: Clip Markdown+Math to Html</kbd> command or the key binding (`'ctrl+K .'`).
Please note, to have the markdown source window activated here (not the preview window!).
* __Can I prepend a frontmatter section to my markdown file ?__
* Yes. You can either use a *yaml* (`--- ... ---`) or a *JSON* (`{{{...}}}`) fromtmatter section.
* __Is PDF output supported ?__
* Not directly. In order to create `*.pdf` output from your Markdown you can create a `*.html` document first
and print it then using a `PDF` printer or use [Pandoc](http://pandoc.org/).
* __I cannot open multiple preview windows.__
* 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.
* __How to automatically generate a table of contents ?__
* Set `mdmath.toc.enabled` in user settings to `true` first. Then add the string `[[toc]]` at your document location,
where you want the table of content appear. Please note, that only heading levels *two* and *three*
are collected. They are prepended by a permalink symbol `#`. This behavior can also be fine tuned
by user settings.
* __Can I use custom CSS styles for the preview window ?__
* Yes. Set `mdmath.style` in user settings to the location of your custom CSS file. Its path
must be relative to this extension root.

## Contributing

See [`.github/CONTRIBUTING.md`](.github/CONTRIBUTING.md)

## Changelog

See [`CHANGELOG.md`](CHANGELOG.md)

## License

*Markdown+Math* for VS Code is licensed under the [MIT License](http://opensource.org/licenses/MIT)

© [Stefan Gössner](https://github.com/goessner)
>>>>>>> de5152803cda7e571b79df88376cac89ac77398a
135 changes: 0 additions & 135 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<<<<<<< HEAD
{
"name": "mdmath",
"displayName": "Markdown+Math",
Expand Down Expand Up @@ -131,137 +130,3 @@
"vscode": "^1.0.0"
}
}
=======
{
"name": "mdmath",
"displayName": "Markdown+Math",
"description": "LaTeX Math for Markdown",
"icon": "img/icon.png",
"version": "1.2.0",
"author": "Stefan Goessner",
"publisher": "goessner",
"keywords": [
"vscode",
"markdown",
"latex",
"katex",
"math"
],
"galleryBanner": {
"color": "#efefef",
"theme": "light"
},
"homepage": "https://github.com/goessner/mdmath/blob/master/README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/goessner/mdmath.git"
},
"bugs": {
"url": "https://github.com/goessner/mdmath/issues"
},
"license": "MIT",
"engines": {
"vscode": "^1.0.0"
},
"categories": [
"Languages",
"Other"
],
"activationEvents": [
"onLanguage:markdown",
"onCommand:mdmath.showPreview"
],
"contributes": {
"configuration": {
"title": "mdmath",
"properties": {
"mdmath.style": {
"type": "string",
"default": "",
"description": "Path to custom stylesheet file (css)."
},
"mdmath.footnotes": {
"type": "boolean",
"default": true,
"description": "Footnotes in markdown enabled."
},
"mdmath.toc.enabled": {
"type": "boolean",
"default": false,
"description": "'Table of Contents' generation in markdown enabled."
},
"mdmath.toc.includeLevel": {
"type": "array",
"default": [2,3],
"description": "Heading levels included in table of contents."
},
"mdmath.toc.permalink": {
"type": "boolean",
"default": true,
"description": "Add permalink symbols to headings."
},
"mdmath.toc.permalinkLevel": {
"type": "number",
"default": 2,
"description": "Begin adding permalink symbols starting from heading level."
},
"mdmath.toc.permalinkSymbol": {
"type": "string",
"default": "#",
"description": "Permalink symbol."
}
}
},
"commands": [
{
"command": "mdmath.showPreview",
"title": "Markdown+Math",
"category": "Markdown"
},
{
"command": "mdmath.exportToHtml",
"title": "Markdown+Math as HTML",
"category": "Markdown"
},
{
"command": "mdmath.clipToHtml",
"title": "Clip Markdown+Math to HTML",
"category": "Markdown"
}
],
"keybindings": [
{
"command": "mdmath.showPreview",
"key": "ctrl+shift+.",
"when": "editorTextFocus"
},
{
"command": "mdmath.clipToHtml",
"key": "ctrl+K .",
"when": "editorTextFocus"
}
]
},
"main": "./extension",
"scripts": {
"postinstall": "node ./node_modules/vscode/bin/install"
},
"dependencies": {
"argparse": "^1.0.9",
"entities": "^1.1.1",
"highlight.js": "^9.9.0",
"katex": "^0.6.0",
"linkify-it": "^2.0.3",
"markdown-it": "^8.2.2",
"markdown-it-footnote": "^3.0.1",
"copy-paste": "^1.3.0",
"match-at": "^0.1.0",
"mdurl": "^1.0.1",
"sprintf-js": "^1.0.3",
"uc.micro": "^1.0.3"
},
"devDependencies": {
"vscode": "^1.0.0"
}
}
>>>>>>> de5152803cda7e571b79df88376cac89ac77398a
Loading

0 comments on commit f24753f

Please sign in to comment.