GitHub - gfngfn/SATySFi:一个静态类型化的、函数式排版系统

Summary of SATySFi

  • SATySFi is a new typesetting system with a statically-typed, functional programming language. It has two main “layers”: text layer (for LaTeX-like syntax documents) and program layer (with OCaml-like syntax for defining functions and commands). It allows writing documents with flexible own commands and provides informative type error reporting.
  • Supported by IPA Mitou Project 2017, Dwango Co., Ltd., and many anonymous supporters. Development continues to Feb 2024.

    Install using Satyrographos (for non-devs)

  • Install with package manager Satyrographos:

    • For Ubuntu 20.04: sudo apt-get update, sudo apt-get install build-essential git m4 unzip curl pkg-config, sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
    • For Mac: Ensure homebrew is installed, then brew update, brew install opam
    • Common: opam init, eval $(opam env), opam repository add satysfi-external https://github.com/gfngfn/satysfi-external-repo.git, opam repository add satyrographos https://github.com/na4zagin3/satyrographos-repo.git, opam update, opam depext satysfi satysfi-dist satyrographos, opam install satysfi satysfi-dist satyrographos, satyrographos install

    Install using OPAM

  • Prerequisites: bzip2, cc, git, m4, make, unzip, wget or curl, opam 2 (see https://opam.ocaml.org/doc/In... On Windows, WSL 2 is recommended. ocaml 4.10.0 installed by OPAM. Add external OPAM repo: opam repository add satysfi-external https://github.com/gfngfn/satysfi-external-repo.git, opam update

    • Example (Ubuntu): sudo apt-get update, sudo apt-get install build-essential git m4 unzip curl, sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh), opam init --comp 4.10.0, eval $(opam env), opam repository add satysfi-external https://github.com/gfngfn/satysfi-external-repo.git, opam update
    • Example (OS X Mavericks or later): Install essential software, install Homebrew, brew update, brew install opam, opam init --comp 4.10.0, eval $(opam env), opam repository add satysfi-external https://github.com/gfngfn/satysfi-external-repo.git, opam update
  • Build: Clone repository and submodules, then build with OPAM: git clone https://github.com/gfngfn/SATySFi.git, cd SATySFi, opam pin add satysfi., opam install satysfi. To reinstall, run opam reinstall satysfi. To uninstall, run opam uninstall satysfi.
  • Setup for SATySFi: Put libraries and fonts in appropriate directory by running ./download-fonts.sh and ./install-libs.sh. Fonts downloaded: Junicode, IPA Font, Latin Modern, Latin Modern Math

    Usage of SATySFi

  • Convert input file to output file using satysfi <input file> -o <output file>. For example, satysfi doc.saty -o output.pdf

    • Starting out: Compile demo file in demo folder by cd demo, make. If demo.pdf is created, setup is correct.
    • Reference: Compile reference in doc folder by cd doc, make

    Command-line options

  • -v, --version: Print version.
  • -o, --output: Specify output PDF file name. If not given, output file name is input file base name with .pdf extension.
  • -b, --bytecomp: Use byte compiler for enhanced performance.
  • --full-path: Display file names with absolute path in stdout.
  • --type-check-only: Stop after type checking.
  • --debug-show-bbox: Output bounding boxes for each glyph (for debugging).
  • --debug-show-space: Output boxes for spaces (for debugging).

    Learning SATySFi

  • Wiki (currently in Japanese) has learning information.
阅读 10
0 条评论