MathB-Go is a mathematics pastebin software, a MathB successor. It is a web-based service meant for sharing snippets of mathematical text with others on the world wide web. It is rewritten in Go and with additional security enhancement. Demo.
- Rewritten in Go and Gin.
- User input sanitization.
- Use random UUIDs to prevent your pastes being accessed by others.
- Use SQLite to store data.
- Use reCAPTCHA v3 as protection.
- Minimalist user interface that has not changed much over a decade.
- Live preview of Markdown and LaTeX content as it is typed.
- Support for mixing Markdown and LaTeX code freely.
- Printing a post to PDF or paper prints only the rendered content.
- All UI elements apart from rendered content are excluded from prints.
- No web cookies.
- No web analytics.
Requirement: Go 1.23+
git clone https://github.com/juzeon/mathb-go.git
cd mathb-go/
cp config.yml.example config.yml
vim config.yml # Fill in your reCAPTCHA v3 keys
go build
./mathb-go
# Visit: http://localhost:7156/
While the primary purpose of this project is to allow users to write mathematical snippets, save them, and share a link to them with others, the stylesheet used in this project takes special care to allow printing beautifully rendered pages to paper.
When a MathB-Go page is printed, only the rendered content appears in the print. The input form, buttons, navigation links, and other user interface elements do not appear in the print.
It is possible to turn a MathB-Go post into a PDF file using the printing facility of most web browsers running on a desktop or laptop. The exact steps to save a web page as PDF vary from browser to browser but the steps to do so look roughly like this:
- Select File > Print from the web browser menu.
- Then in the print window or dialog box that comes up, deselect/disable the options to print headers and footers.
- Finally, choose the option to save a PDF.
If everything works as expected, the saved PDF should contain only the rendered content with all mathematical formulas rendered properly. The web pages generated by this project use special styling rules to ensure that the input form, buttons, navigation links, and other user interface elements do not appear in saved PDF.
MIT.
To report bugs, suggest improvements, or ask questions, create issues.