https://github.com/mathedu4all/mmarked-vscode-extension
An alternative to the builtin markdown previewer based on @mathcrowd/mmarked.
https://github.com/mathedu4all/mmarked-vscode-extension
markdown markdown-previewer vscode-extension
Last synced: 2 months ago
JSON representation
An alternative to the builtin markdown previewer based on @mathcrowd/mmarked.
- Host: GitHub
- URL: https://github.com/mathedu4all/mmarked-vscode-extension
- Owner: mathedu4all
- License: mit
- Created: 2024-10-25T01:15:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-28T12:45:33.000Z (over 1 year ago)
- Last Synced: 2025-02-07T13:15:28.954Z (over 1 year ago)
- Topics: markdown, markdown-previewer, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=MCLab.mmarked
- Size: 171 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# MMarked - Enhanced Markdown Preview for VS Code
[](https://marketplace.visualstudio.com/items?itemName=MCLab.mmarked)
[](https://marketplace.visualstudio.com/items?itemName=MCLab.mmarked)
[](https://marketplace.visualstudio.com/items?itemName=MCLab.mmarked)
[](https://marketplace.visualstudio.com/items?itemName=MCLab.mmarked)
[](LICENSE)
A powerful Visual Studio Code extension that brings advanced Markdown rendering with LaTeX math support, powered by [@mathcrowd/mmarked](https://github.com/mathedu4all/mmarked).
**[ä¸ćć楣](./README.zh.md)** | **[Marketplace](https://marketplace.visualstudio.com/items?itemName=MCLab.mmarked)** | **[GitHub](https://github.com/mathedu4all/mmarked-vscode-extension)**
## đ Overview
Transform your Markdown editing experience with **MMarked** - a specialized preview extension designed for educational and mathematical content. Built on the powerful [@mathcrowd/mmarked](https://github.com/mathedu4all/mmarked) library, it brings real-time rendering of complex LaTeX formulas, theorem blocks, and custom syntax to your VS Code workspace.
**Perfect for:**
- đ Educators creating math course materials
- đ Students writing technical notes and assignments
- đ Researchers authoring academic papers
- đĄ Anyone working with mathematical notation in Markdown
## ⨠Features
### Core Capabilities
- â
**Full CommonMark Support** - Complete compatibility with standard Markdown syntax
- ⥠**Real-Time Preview** - Instant visual feedback as you type (300ms debounced)
- đ **Smart Theme Switching** - Automatically adapts to your VS Code theme (light/dark)
- đ **WeChat Export** - One-click copy HTML optimized for WeChat Official Account editor
### Mathematical Content
- đ§Ž **Advanced LaTeX Rendering** - Powered by MathJax for professional-quality formulas
- đ **TeX to SVG Conversion** - Optional high-quality SVG output for equations
- đ˘ **Auto-Numbered Footnotes** - Easy-to-use reference system
### Educational Features
- đ **Theorem-Like Blocks** - Dedicated syntax for theorems, lemmas, definitions, and examples
- Auto-numbering support
- Cross-reference linking
- Customizable titles
- đ **Collapsible Solution Blocks** - Hide/show answers with toggle buttons
- đŻ **Syntax Highlighting** - Code blocks enhanced by highlight.js
### Media & Customization
- đźď¸ **Local Image Support** - Automatic path resolution for relative images
- đ **Image/Video Resizing** - Simple syntax for custom dimensions
- đ¨ **Custom CSS** - Configure your own stylesheets for complete control
## đ Installation
### Method 1: VS Code Marketplace (Recommended)
1. Open Visual Studio Code
2. Go to Extensions view (`Ctrl+Shift+X` or `Cmd+Shift+X` on Mac)
3. Search for **"mmarked"**
4. Click **Install**
### Method 2: Quick Install
Click here: [Install MMarked](vscode:extension/MCLab.mmarked)
### Method 3: Command Line
```bash
code --install-extension MCLab.mmarked
```
## đ Usage
### Quick Start
1. **Open** any Markdown file (`.md`)
2. **Click** the VSCode preview button (đď¸) in the editor title bar for standard preview, or
3. **Press** `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac) to open the command palette
4. **Type** and select: `Markdown: Open Preview` for mmarked preview
5. **Edit** your Markdown and see live updates in the preview pane
### Copy to WeChat Official Account
1. **Open** your Markdown file
2. **Click** the copy button (đ) in the editor title bar, or use command palette
3. **Select**: `Copy HTML for WeChat`
4. **Paste** into WeChat Official Account editor - formatting preserved!
### Keyboard Shortcuts
You can assign custom keyboard shortcuts in VS Code:
1. Go to `File` > `Preferences` > `Keyboard Shortcuts`
2. Search for `mmarked.previewMarkdown` or `mmarked.copyToWeChat`
3. Set your preferred key bindings
### Tips
- The preview updates automatically with a 300ms delay as you type
- Preview panel opens in the second editor column by default
- Local images are automatically resolved relative to your document
- WeChat export includes inlined CSS for consistent rendering
## âď¸ Configuration
Customize the extension by adding settings to your VS Code configuration file (`.vscode/settings.json` or User Settings):
### Available Settings
| Setting | Type | Default | Description |
|---------|------|---------|-------------|
| `mmarked.cssUrl` | `string` | `https://cdn2.mathcrowd.cn/assets/styles/mathcrowd.css` | URL for the light theme stylesheet |
| `mmarked.darkCssUrl` | `string` | `https://cdn2.mathcrowd.cn/assets/styles/mathcrowd-dark.css` | URL for the dark theme stylesheet |
| `mmarked.enableTex2svg` | `boolean` | `false` | Enable TeX to SVG conversion for better quality math rendering |
| `mmarked.removeLinksForWeChat` | `boolean` | `false` | Remove hyperlinks when copying to WeChat |
| `mmarked.showPreviewButton` | `boolean` | `false` | Show mmarked preview button in editor title bar (use command palette instead to avoid duplicate buttons) |
### Example Configuration
```json
{
"mmarked.cssUrl": "https://cdn2.mathcrowd.cn/assets/styles/mathcrowd.css",
"mmarked.darkCssUrl": "https://cdn2.mathcrowd.cn/assets/styles/mathcrowd-dark.css",
"mmarked.enableTex2svg": true,
"mmarked.removeLinksForWeChat": false,
"mmarked.showPreviewButton": false
}
```
### Using Custom Stylesheets
You can use your own CSS by providing a custom URL:
```json
{
"mmarked.cssUrl": "https://your-domain.com/styles/custom-light.css",
"mmarked.darkCssUrl": "https://your-domain.com/styles/custom-dark.css"
}
```
**Note:** Custom CSS must be hosted on a public URL (local files are not supported for security reasons).
## đ About MMarked
**MMarked** is a specialized Markdown renderer designed for educational and mathematical content. It extends standard Markdown with powerful features for academic writing, including theorem blocks, numbered definitions, collapsible solutions, and advanced LaTeX support.
đ **Learn More:**
- [MMarked Product Page](https://lab.mathcrowd.cn/mmarked)
- [MMarked GitHub Repository](https://github.com/mathedu4all/mmarked)
- [Documentation & Syntax Guide](https://lab.mathcrowd.cn/mmarked)
## đ¤ Support & Community
### Get Help
- đ **Bug Reports:** [GitHub Issues](https://github.com/mathedu4all/mmarked-vscode-extension/issues)
- đĄ **Feature Requests:** [GitHub Issues](https://github.com/mathedu4all/mmarked-vscode-extension/issues)
- đ **Documentation:** [MMarked Docs](https://lab.mathcrowd.cn/mmarked)
- đŹ **Community Chat:** [Join Our Discord](https://discord.gg/6VMUVA5Yq2)
### Library-Specific Issues
For questions about the `@mathcrowd/mmarked` library itself (not the VS Code extension), please [open an issue](https://github.com/mathedu4all/mmarked/issues) on the MMarked repository.
## đ About Mathcrowd
**Mathcrowd** is an innovative education technology company founded by experienced developers and educators, dedicated to transforming mathematics education through cutting-edge technology. We create engaging, interactive, and visualized learning experiences for math enthusiasts and self-learners.
### Connect With Us
- đ [MCLab Official Website](https://lab.mathcrowd.cn)
- đ [Online Math Community](https://www.mathcrowd.cn)
- đŹ [Discord Server](https://discord.gg/6VMUVA5Yq2)
- đ [Support Our Work](https://www.mathcrowd.cn/crowd-funding/charging)
## đ ď¸ Development & Contributing
Interested in contributing to this extension? We welcome pull requests, bug reports, and feature suggestions!
**For developers and contributors, see:**
- **[CONTRIBUTING.md](CONTRIBUTING.md)** - Complete development guide
- **[GitHub Repository](https://github.com/mathedu4all/mmarked-vscode-extension)** - Source code
- **[Changelog](CHANGELOG.md)** - Version history
## đ License
This extension is licensed under the [MIT License](LICENSE).
---
## đ Acknowledgments
- Built with [@mathcrowd/mmarked](https://github.com/mathedu4all/mmarked)
- Math rendering powered by [MathJax](https://www.mathjax.org/)
- Code highlighting by [highlight.js](https://highlightjs.org/)
---
**Note:** This extension bundles `@mathcrowd/mmarked` to ensure compatibility and optimal performance.
**Enjoy using MMarked!** â If you find it helpful, please consider [leaving a review](https://marketplace.visualstudio.com/items?itemName=MCLab.mmarked&ssr=false#review-details) on the Marketplace!