Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ~/.saphe/unidata/ and develop unidata package #437

Merged
merged 14 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,6 @@ jobs:
- name: Install SATySFi
run: |
opam install -y .
if [ "${{ matrix.os }}" == 'macos-latest' ]; then
./install-libs.sh ~/.saphe ginstall
else
./install-libs.sh ~/.saphe install
fi

# It is no longer necessary to download font files beforehand
# due to the package system:
# if [ -z "$(ls lib-satysfi/dist/fonts)" ]; then
# ./download-fonts.sh
# fi

- name: Check library packages
run: |
Expand Down
85 changes: 43 additions & 42 deletions README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[![Build Status](https://github.com/gfngfn/SATySFi/workflows/CI/badge.svg?branch=master)](https://github.com/gfngfn/SATySFi/actions?query=workflow%3ACI)

**注意: 2024年3月現在,SATySFi は 0.0.x から 0.1.x へと移行する過程にあります.このREADMEをはじめとして多くの文書では古くなっている情報が残っているかもしれません.**

[English README is here](https://github.com/gfngfn/SATySFi/blob/master/README.md)

## 概要
Expand All @@ -14,38 +16,8 @@
* 株式会社ドワンゴ(2018年10月–2019年3月.アルバイトとして)
* [The SATySFi​book](https://booth.pm/ja/items/1127224)を購入頂いた,多くの匿名の支援者の方々

また,2023年10月現在も発展を続けています。

## Satyrographos を使ったインストール方法 (初心者向け)

パッケージマネージャー [Satyrographos](https://github.com/na4zagin3/satyrographos/blob/master/README-ja.md) を用いたインストール方法が用意されています。
詳しくは [SATySFi インストール手引き](https://qiita.com/na4zagin3/items/a6e025c17ef991a4c923) をご覧下さい。

```sh
# 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)
また,2024年3月現在も発展を続けています。

# Mac の場合
# 要 homebrew (https://brew.sh/index_ja に従いインストールして下さい)
brew update
brew install opam

# 共通 OPAM の設定
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

# 共通 SATySFi のインストール
opam depext satysfi satysfi-dist satyrographos
opam install satysfi satysfi-dist satyrographos

# 共通 SATySFi 標準ライブラリのセットアップ
satyrographos install
```

## OPAM を使ったインストール方法

Expand Down Expand Up @@ -90,6 +62,7 @@ opam repository add satysfi-external https://github.com/gfngfn/satysfi-external-
opam update
```


#### 準備例(OS X Mavericks 以降)

```sh
Expand All @@ -109,6 +82,7 @@ opam repository add satysfi-external https://github.com/gfngfn/satysfi-external-
opam update
```


### ビルド

まず,このリポジトリを clone し,OPAM を使って SATySFi をビルドします:
Expand All @@ -119,23 +93,45 @@ git clone https://github.com/gfngfn/SATySFi.git
cd SATySFi

# build
opam pin add satysfi .
opam install satysfi
opam pin add .
opam install satysfi saphe
```

* 再インストール: `opam reinstall satysfi` を実行
* アンインストール: `opam uninstall satysfi` を実行

### セットアップ

使用する前に,フォントをダウンロードし,ライブラリ等を所定の場所に移す必要があります。以下のように2つのシェルスクリプトを順に実行します:
## SATySFi **0.0.x** についての説明

### Satyrographos を使ったインストール方法 (初心者向け)

パッケージマネージャー [Satyrographos](https://github.com/na4zagin3/satyrographos/blob/master/README-ja.md) を用いたインストール方法が用意されています。詳しくは [SATySFi インストール手引き](https://qiita.com/na4zagin3/items/a6e025c17ef991a4c923) をご覧下さい。

```sh
./download-fonts.sh
./install-libs.sh
```
# 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)

# Mac の場合
# 要 homebrew (https://brew.sh/index_ja に従いインストールして下さい)
brew update
brew install opam

# 共通 OPAM の設定
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

前者はデフォルトで必要なフォントファイルを Web 上からダウンロードして `lib-satysfi/dist/fonts/` 直下に格納し,後者は `lib-satysfi/` 以下を `/usr/local/share/satysfi/` 以下にそのままコピーします。
# 共通 SATySFi のインストール
opam depext satysfi satysfi-dist satyrographos
opam install satysfi satysfi-dist satyrographos

# 共通 SATySFi 標準ライブラリのセットアップ
satyrographos install
```

ここでインストールされるフォントは以下の通りです。ライセンスを確認した上で使用してください:

Expand All @@ -144,7 +140,8 @@ opam install satysfi
* [Latin Modern](http://www.gust.org.pl/projects/e-foundry/latin-modern/)
* [Latin Modern Math](http://www.gust.org.pl/projects/e-foundry/lm-math)

## 用法

### 用法

```sh
satysfi <input file> -o <output file>
Expand All @@ -156,6 +153,7 @@ satysfi <input file> -o <output file>
satysfi doc.saty -o output.pdf
```


### コンパイルしてみよう

デモファイルが `demo` フォルダにあるので,初めにこのファイルをコンパイルしてみましょう。
Expand All @@ -168,6 +166,7 @@ make

うまく準備できていれば,`demo.pdf` が作成されます。


### リファレンス

詳細な解説である [The SATySFi​book](https://booth.pm/ja/items/1127224) が BOOTH にて公開されており,無償でダウンロードできます。このほか,SATySFi で文書を作成するためのごく簡単なリファレンスが `doc` フォルダに SATySFi を用いて書かれており,以下の処理で PDF が生成されます:
Expand All @@ -177,7 +176,8 @@ cd doc
make
```

## コマンドラインオプション

### コマンドラインオプション

* `-v`, `--version`: ヴァージョンを表示します。
* `-o`, `--output`: 出力ファイル名を指定します。省略された場合,入力ファイル名の拡張子を `.pdf` に変えた名前を出力ファイル名とします。
Expand All @@ -187,6 +187,7 @@ make
* `--debug-show-bbox`: (デバッグ目的で)各グリフにバウンディングボックスをつけて出力します。
* `--debug-show-space`: (デバッグ目的で)スペース部分に目印をつけて出力します。

## SATySFiを学ぶ

### SATySFiを学ぶ

[Wiki](https://github.com/gfngfn/SATySFi/wiki/SATySFi-Wiki#%E5%AD%A6%E7%BF%92%E7%94%A8%E8%B3%87%E6%96%99) に学習用の資料があります。
98 changes: 39 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

[![Build Status](https://github.com/gfngfn/SATySFi/workflows/CI/badge.svg?branch=master)](https://github.com/gfngfn/SATySFi/actions?query=workflow%3ACI)

**Note: As of Mar 2024, we are in the process of migrating SATySFi 0.0.x to SATySFi 0.1.x. In many documents as well as this README file. there might be information about features that has already been obsoleted.**

[日本語版 README はこちら](https://github.com/gfngfn/SATySFi/blob/master/README-ja.md)

## Summary of SATySFi
## What’s SATySFi?

*SATySFi* (pronounced in the same way as the verb “satisfy” in English) is a new typesetting system equipped with a statically-typed, functional programming language. It consists mainly of two “layers” ― the text layer and the program layer. The former is for writing documents in LaTeX-like syntax. The latter, which has OCaml-like syntax, is for defining functions and commands. SATySFi enables you to write documents markuped with flexible commands of your own making. In addition, its informative type error reporting will be a good help to your writing.

Expand All @@ -14,37 +16,8 @@ This software was supported by:
* Dwango Co., Ltd. (October 2018 – March 2019; as a part-time job), and
* many anonymous supporters who bought [The SATySFi​book](https://booth.pm/ja/items/1127224),

and its development continues to this day (Oct 2023).

## Install using Satyrographos (for non-devs)

You can install SATySFi with package manager [Satyrographos](https://github.com/na4zagin3/satyrographos/blob/master/README.md).

```sh
# 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
# Please make sure homebrew is installed. Otherwise, follow https://brew.sh/
brew update
brew install opam
and its development continues to this day (Mar 2024).

# Common: Set up OPAM
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

# Common: Install SATySFi
opam depext satysfi satysfi-dist satyrographos
opam install satysfi satysfi-dist satyrographos

# Common: Set up the SATySFi standard library
satyrographos install
```

## Install using OPAM

Expand Down Expand Up @@ -110,49 +83,53 @@ opam update

### Build

First, clone this repository and submodules. Then build SATySFi using OPAM.
First, clone this repository. Then build SATySFi and Saphe using OPAM.

```sh
# clone
git clone https://github.com/gfngfn/SATySFi.git
cd SATySFi

# build
opam pin add satysfi .
opam install satysfi
opam pin add .
opam install satysfi saphe
```

* To reinstall, run `opam reinstall satysfi`.
* To uninstall, run `opam uninstall satysfi`.
* To reinstall, run `opam reinstall satysfi saphe`.
* To uninstall, run `opam uninstall satysfi saphe`.

<!--
### Manual build of SATySFi

1. Install ocamlbuild, ocamlfind, and Menhir.
2. In repository, run `make`.
3. `macrodown` should then be available under the diretory.
4. Run `make install` to install `satysfi` as `/usr/local/bin/satysfi`.
5. Run `make install-lib` to create a symbolic link for the library.
## About SATySFi **0.0.x**

You can modify the directory for the installation by specifying `PREFIX` like `sudo make install PREFIX=/usr/bin`. the symbolic link for the SATySFi library will be created as `/usr/local/lib-satysfi -> DIR/lib-satysfi` where `DIR` is the top directory of the repository.
-->
### Install SATySFi **0.0.x** using Satyrographos (for non-devs)

<!--
### Download release from GitHub
You can install SATySFi **0.0.x** with package manager [Satyrographos](https://github.com/na4zagin3/satyrographos/blob/master/README.md).

See [release page](https://github.com/gfngfn/Macrodown/releases)
-->
```sh
# 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)

### Setup for SATySFi
# For Mac
# Please make sure homebrew is installed. Otherwise, follow https://brew.sh/
brew update
brew install opam

Before using SATySFi, one should put libraries and fonts onto the appropriate directory. This can be done by invoking the following commands in order:
# Common: Set up OPAM
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

```sh
./download-fonts.sh
./install-libs.sh
```
# Common: Install SATySFi
opam depext satysfi satysfi-dist satyrographos
opam install satysfi satysfi-dist satyrographos

The former downloads the fonts required by the default settings into `lib-satysfi/dist/fonts/`, and the latter copies `lib-satysfi/` to `/usr/local/share/satysfi/`.
# Common: Set up the SATySFi standard library
satyrographos install
```

During this setup, the following fonts are downloaded. Consult their license before using them.

Expand All @@ -161,7 +138,8 @@ During this setup, the following fonts are downloaded. Consult their license bef
* [Latin Modern](http://www.gust.org.pl/projects/e-foundry/latin-modern/)
* [Latin Modern Math](http://www.gust.org.pl/projects/e-foundry/lm-math)

## Usage of SATySFi

### Usage

Type

Expand All @@ -186,6 +164,7 @@ make

If `demo.pdf` is created, then the setup has been finished correctly.


### Reference

In addition, a concice reference of SATySFi is written by SATySFi itself in `doc` folder. You need to compile it to read.
Expand All @@ -195,7 +174,7 @@ cd doc
make
```

## Command-line options
### Command-line options

* `-v`, `--version`: Prints the version.
* `-o`, `--output`: Specify the name of the output PDF file. if this option is not given explicitly, the name of the output file is the concatenation of the base name of the input file and the extension `.pdf`.
Expand All @@ -205,6 +184,7 @@ make
* `--debug-show-bbox`: Outputs bounding boxes for each glyph (for the purpose of debugging).
* `--debug-show-space`: Outputs boxes for spaces (for the purpose of debugging).

## Learning SATySFi

### Learning SATySFi **0.0.x**

[Wiki](https://github.com/gfngfn/SATySFi/wiki/SATySFi-Wiki#%E5%AD%A6%E7%BF%92%E7%94%A8%E8%B3%87%E6%96%99) (currently written only in Japanese) has some information about learning SATySFi.
Loading
Loading