LoginSignup
0
0

More than 3 years have passed since last update.

Re:Viewで数式をSVGで埋め込んだepubを作成する手順

Posted at

Re:Viewで数式をSVGで埋め込んだepubを作成する手順

細かい躓きポイントがあったのでメモ。

ベースに使った環境:

実行手順

文書ファイルは冒頭にあげたベース環境のファイルに一部を変更して使用。

まず、articles/article.reの末尾に下記を追記

articles/article.re
== 数式チェック!!

//texequation{
\sum_{i=1}^nf_n(x)
//}

@<m>{y = \alpha x ^ 2 + \beta x + \gamma}

次に、articles/config.ymlを変更。
(変更箇所のみ記載。一部本質でない項目も含む)

articles/config.yml
imgmath: true
imgmath_options:
  format: svg
  fontsize: 24
  lineheight: 32
  pdfcrop_pixelize_cmd: "pdftocairo -svg -r 90 -f %p -l %p %i %o"

epubを生成する。

epubを生成する
# npm run epub
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0