English | 中文
SoMarkDown Viewer is a web application of SoMarkDown, designed for previewing and rendering SoMarkDown documents.
Quick Try: https://somark.tech/smd
SoMarkDown is a Markdown superset built upon markdown-it, providing enhanced support for professional rendering capabilities including mathematical formulas, chemical structures (SMILES), code syntax highlighting, and more. SoMarkDown also serves as the target protocol for parsing results in the SoMark document intelligence parsing product.
This Viewer project is not only a SoMarkDown preview tool, but also provides interactive professional rendering features, including:
- Real-time editing and rendering of SoMarkDown documents.
- Bi-directional synchronized scrolling with logical alignment.
- Bi-directional click-to-jump position mapping.
We also provide the Gradio plugin gradio-somarkdown, which can replace the Markdown component in Gradio.
This project is implemented entirely with native HTML, JavaScript, and CSS, and can be launched with a straightforward setup.
- Clone the repository:
git clone https://github.com/SoMarkAI/SoMarkDownViewer.git
cd SoMarkDownViewer- Retrieve the latest SoMarkDown JavaScript and CSS files:
# -k runs silently
./get_latest_smd.shIf you encounter network issues, you may manually download the latest
somarkdown.umd.min.jsandsomarkdown.cssfiles from the SoMarkDown npm package, and place them underlib/somarkdown.
- Start the project using an HTTP server (for example, Python 3 HTTPServer):
# Python 3.x
python3 -m http.server 8000- Open
http://localhost:8000in your browser to use SoMarkDown Viewer.
The Viewer supports multiple methods to load SoMarkDown files:
- Specify the relative file path directly in the URL (relative to the server root), for example:
http://localhost:8000?file=example.md. - Click the "Open File" button on the page and select a local file.
MIT

