GitXplorerGitXplorer
t

metamath-web

public
4 stars
0 forks
8 issues

Commits

List of commits on branch main.
Verified
79043c6bfbf136a5b1663485b8412eaa00041dbe

Merge pull request #28 from tirix/sts-tc

ttirix committed a year ago
Unverified
bf8f09b7afd6392033307bcc781243d20d1f5019

Fmt

ttirix committed a year ago
Unverified
80d7f04bd73cdcf777afc0e2bb749f0be21cb896

Correct STS typecode for syntax definitions

ttirix committed a year ago
Verified
fcd37d4c382670cd080dfb18f117fd5487ebfa6c

Merge pull request #27 from tirix/syntax-breakdown

ttirix committed a year ago
Unverified
83df7928ab801cfde2af2ed776c88cdc942e4bbc

Fmt

ttirix committed a year ago
Unverified
6cf4e2ca95121bc1491e7f187c397d1968fb8881

Formula extraction for syntax breakdown

ttirix committed a year ago

README

The README file for this repository.

metamath-web

A simple Metamath web server for Rust, displaying proofs in the most basic way.

View these Metamath pages in action here.

How-to

Installation

First, install rust if you don't have it yet on your system.

Clone this repository, and set.mm or the database you want to work with:

git clone https://github.com/metamath/set.mm.git –-depth 1
git clone https://github.com/tirix/metamath-web.git

Running the server

The following commands can then be used to launch the server:

cd metamath-web
cargo run ../set.mm/set.mm

Viewing the pages

Once the server is started, it will parse the metamath database. Wait until it displays the "Ready" message: it shall be a few seconds. You can then switch to a browser and visit for example http://localhost:3030/mpeascii/o2p2e4 or the table of content and start navigating. The port 3030 is the default, see usage for configuration of the server address and port.

Stopping the server

Just hit CTRL+C to stop the server once you're done browsing!

Features and roadmap

Here are some features implemented, and some which are still lacking:

  • [x] support for 3 typesettings:
    • [x] ASCII (mpeascii) - this is Metamath "source code"
    • [x] Unicode (mpeuni) - this is the symbol-by-symbol typesetting
    • [x] STS (mpests) - structured typesetting (sts feature needed)
  • [x] display axioms and definitions' syntax proof
  • [x] links to other theorems in comments
  • [x] links to bibliographic references (see command line option -b)
  • [ ] in-line math in comments
  • [x] summary of the theorems (hypotheses and statement) before the proof
  • [x] navigation to next/previous theorem in the database
  • [x] navigation between the different typesettings
  • [x] table of content
  • [ ] distinct variables
  • [ ] list of uses

Additional feature

It is possible to serve pages formatted using structured typesetting, by activating the sts feature, and browsing pages in the mpests path.

cargo run --features sts ../set.mm/set.mm

Libraries used

  • metamath-knife for parsing metamath file and obtaining proofs,
  • handlebars for templating,
  • warp for the web server.
  • nom for parsing the STS definition file.