{"id":13484485,"url":"https://github.com/gfngfn/SATySFi","last_synced_at":"2025-03-27T16:30:55.299Z","repository":{"id":28982481,"uuid":"32509015","full_name":"gfngfn/SATySFi","owner":"gfngfn","description":"A statically-typed, functional typesetting system","archived":false,"fork":false,"pushed_at":"2025-01-20T05:56:22.000Z","size":8117,"stargazers_count":1197,"open_issues_count":120,"forks_count":84,"subscribers_count":52,"default_branch":"master","last_synced_at":"2025-03-21T21:05:38.045Z","etag":null,"topics":["functional-programming","latex","markup-language","ocaml","opam","opentype","pdf","pdf-generation","programming-language","satysfi","typesetting-system"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gfngfn.png","metadata":{"files":{"readme":"README-ja.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-19T08:19:49.000Z","updated_at":"2025-03-13T09:50:28.000Z","dependencies_parsed_at":"2023-10-24T04:24:40.130Z","dependency_job_id":"ed4c4060-40af-4160-be2e-8ffb5d568a69","html_url":"https://github.com/gfngfn/SATySFi","commit_stats":{"total_commits":2332,"total_committers":46,"mean_commits":50.69565217391305,"dds":0.1530874785591767,"last_synced_commit":"f28404348d84842fddc22d98f0266426c98638a2"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfngfn%2FSATySFi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfngfn%2FSATySFi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfngfn%2FSATySFi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfngfn%2FSATySFi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gfngfn","download_url":"https://codeload.github.com/gfngfn/SATySFi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245882288,"owners_count":20687860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["functional-programming","latex","markup-language","ocaml","opam","opentype","pdf","pdf-generation","programming-language","satysfi","typesetting-system"],"created_at":"2024-07-31T17:01:25.108Z","updated_at":"2025-03-27T16:30:55.281Z","avatar_url":"https://github.com/gfngfn.png","language":"OCaml","funding_links":[],"categories":["OCaml","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"![logo1](https://raw.githubusercontent.com/wiki/gfngfn/SATySFi/img/satysfi-logo.png)\n\n[![Build Status](https://github.com/gfngfn/SATySFi/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/gfngfn/SATySFi/actions?query=workflow%3ACI)\n\n[English README is here](https://github.com/gfngfn/SATySFi/blob/master/README.md)\n\n## 概要\n\n*SATySFi*（英単語の “satisfy” と同様に発音します）は，静的型つきのいわゆる函数型言語が備わった，新しい組版処理システムです。構文は主にテキスト部分とプログラム部分からなり，前者はLaTeX風の構文で文書を執筆するために，後者はOCaml風の構文でコマンドを定義するために使われます。函数型プログラミングの要領でコマンドが定義でき，かつ静的に型がつけられるため，柔軟な記述とわかりやすいエラー報告が実現されています。\n\n本ソフトウェアは以下のような支援のもと開発されました：\n\n* 2017年度IPA未踏事業（2017年6月–2018年2月．概要は[こちら](https://www.ipa.go.jp/jinzai/mitou/2017/gaiyou_t-4.html)）\n* 株式会社ドワンゴ（2018年10月–2019年3月．アルバイトとして）\n* [The SATySFi​book](https://booth.pm/ja/items/1127224)を購入頂いた，多くの匿名の支援者の方々\n\nまた，2024年2月現在も発展を続けています。\n\n## Satyrographos を使ったインストール方法 (初心者向け)\n\nパッケージマネージャー [Satyrographos](https://github.com/na4zagin3/satyrographos/blob/master/README-ja.md) を用いたインストール方法が用意されています。\n詳しくは [SATySFi インストール手引き](https://qiita.com/na4zagin3/items/a6e025c17ef991a4c923) をご覧下さい。\n\n```sh\n# Ubuntu 20.04 の場合\nsudo apt-get update\nsudo apt-get install build-essential git m4 unzip curl pkg-config\nsh \u003c(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)\n\n# Mac の場合\n# 要 homebrew (https://brew.sh/index_ja に従いインストールして下さい)\nbrew update\nbrew install opam\n\n# 共通 OPAM の設定\nopam init\neval $(opam env)\nopam repository add satysfi-external https://github.com/gfngfn/satysfi-external-repo.git\nopam repository add satyrographos https://github.com/na4zagin3/satyrographos-repo.git\nopam update\n\n# 共通 SATySFi のインストール\nopam depext satysfi satysfi-dist satyrographos\nopam install satysfi satysfi-dist satyrographos\n\n# 共通 SATySFi 標準ライブラリのセットアップ\nsatyrographos install\n```\n\n## OPAM を使ったインストール方法\n\n### 事前に必要なもの\n\nビルド前に最低限，以下のソフトウェアが必要です。\n\n* bzip2\n* cc\n* git\n* m4\n* make\n* unzip\n* wget or curl\n* [opam](https://opam.ocaml.org/) 2\n    * インストール方法：\u003chttps://opam.ocaml.org/doc/Install.html\u003e\n    * Windows の場合，bubblewrap 関係の問題を回避するため，Windows Subsystem for Linux (WSL) 2 をオススメします。\n* ocaml 4.10.0 （OPAM からインストールします）\n\nまた，ビルドには外部 OPAM リポジトリの追加が必要です。これは以下のコマンドでできます：\n\n```sh\nopam repository add satysfi-external https://github.com/gfngfn/satysfi-external-repo.git\nopam update\n```\n\n#### 準備例（Ubuntu）\n\n```sh\nsudo apt-get update\nsudo apt-get install build-essential git m4 unzip curl\n\nsh \u003c(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)\n\n# 以下のコマンドは OPAM がファイルに追記してもよいか聞いてきます。\n# 必ず説明を読み，環境変数を適切に設定してください。\nopam init --comp 4.10.0\n\neval $(opam env)\n\nopam repository add satysfi-external https://github.com/gfngfn/satysfi-external-repo.git\nopam update\n```\n\n#### 準備例（OS X Mavericks 以降）\n\n```sh\n# このスクリプトを実行する前に，GCC や Make などの基本的なソフトウェアをインストールしておいてください。これらは Xcode Command Line Tools からインストールできます。\n# また，Homebrew もインストールしてください。\n\nbrew update\nbrew install opam\n\n# 以下のコマンドは OPAM が（~/.bash_profile などの）ファイルに環境変数に関する設定を追記してもよいか聞いてきます。\n# 必ず説明を読み，環境変数を適切に設定してください。\nopam init --comp 4.10.0\n\neval $(opam env)\n\nopam repository add satysfi-external https://github.com/gfngfn/satysfi-external-repo.git\nopam update\n```\n\n### ビルド\n\nまず，このリポジトリを clone し，OPAM を使って SATySFi をビルドします：\n\n```sh\n# clone\ngit clone https://github.com/gfngfn/SATySFi.git\ncd SATySFi\n\n# build\nopam pin add satysfi .\nopam install satysfi\n```\n\n* 再インストール： `opam reinstall satysfi` を実行\n* アンインストール： `opam uninstall satysfi` を実行\n\n### セットアップ\n\n使用する前に，フォントをダウンロードし，ライブラリ等を所定の場所に移す必要があります。以下のように2つのシェルスクリプトを順に実行します：\n\n```sh\n./download-fonts.sh\n./install-libs.sh\n```\n\n前者はデフォルトで必要なフォントファイルを Web 上からダウンロードして `lib-satysfi/dist/fonts/` 直下に格納し，後者は `lib-satysfi/` 以下を `/usr/local/share/satysfi/` 以下にそのままコピーします。\n\nここでインストールされるフォントは以下の通りです。ライセンスを確認した上で使用してください：\n\n* [Junicode](http://junicode.sourceforge.net)\n* [IPA Font](https://moji.or.jp/ipafont/)\n* [Latin Modern](http://www.gust.org.pl/projects/e-foundry/latin-modern/)\n* [Latin Modern Math](http://www.gust.org.pl/projects/e-foundry/lm-math)\n\n## 用法\n\n```sh\nsatysfi \u003cinput file\u003e -o \u003coutput file\u003e\n```\n\nで `\u003cinput file\u003e` から `\u003coutput file\u003e` を出力します。例えばソースファイル `doc.saty` から `output.pdf` を出力したい場合，次のようにします：\n\n```sh\nsatysfi doc.saty -o output.pdf\n```\n\n### コンパイルしてみよう\n\nデモファイルが `demo` フォルダにあるので，初めにこのファイルをコンパイルしてみましょう。\nこのデモには `MakeFile` が用意されているので，`make` を実行するだけで完了します。\n\n```sh\ncd demo\nmake\n```\n\nうまく準備できていれば，`demo.pdf` が作成されます。\n\n### リファレンス\n\n詳細な解説である [The SATySFi​book](https://booth.pm/ja/items/1127224) が BOOTH にて公開されており，無償でダウンロードできます。このほか，SATySFi で文書を作成するためのごく簡単なリファレンスが `doc` フォルダに SATySFi を用いて書かれており，以下の処理で PDF が生成されます：\n\n```sh\ncd doc\nmake\n```\n\n## コマンドラインオプション\n\n* `-v`, `--version`: ヴァージョンを表示します。\n* `-o`, `--output`: 出力ファイル名を指定します。省略された場合，入力ファイル名の拡張子を `.pdf` に変えた名前を出力ファイル名とします。\n* `-b`, `--bytecomp`: 評価前にバイトコンパイルを行ないます（複雑な計算に対して高速化が期待できます）。\n* `--full-path`: 標準出力に書き込むログに於いて，ファイル名をすべて絶対パスで表示します。\n* `--type-check-only`: 型検査だけをして終了します。\n* `--debug-show-bbox`: （デバッグ目的で）各グリフにバウンディングボックスをつけて出力します。\n* `--debug-show-space`: （デバッグ目的で）スペース部分に目印をつけて出力します。\n\n## SATySFiを学ぶ\n\n[Wiki](https://github.com/gfngfn/SATySFi/wiki/SATySFi-Wiki#%E5%AD%A6%E7%BF%92%E7%94%A8%E8%B3%87%E6%96%99) に学習用の資料があります。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgfngfn%2FSATySFi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgfngfn%2FSATySFi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgfngfn%2FSATySFi/lists"}