0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RaspberryPi4BにRe:VIEW starterのビルド環境を構築する

Posted at

RaspberryPi4B(4Gb)+RaspbianDesktopな環境に Re:VIEWStarterのビルド環境を立ててみた。

RaspbianにDockerをインストールし、公式が用意しているDockerイメージをそのまま利用しようと思ったのだけど kauplan/review2.5 がうまく起動せず、ホスト環境(Raspbian)に直接環境をインストールすることにしました。

Raspbianは Debianベース、kauplan/review2.5はubuntu18.04ベースだけど、両者パッケージ管理にはaptが採用されているし、おそらく動くんじゃないかな、という軽い気持ちで試してみました。

結果、成功。

以下、DockerHub | kauplan/review2.5 の Dockerfileをほぼそのまま写経した感じです。

$ sudo su -

# apt-get update && \
    apt-get install -y --no-install-recommends \
      locales git-core curl ca-certificates && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen

# locale-gen en_US.UTF-8 && update-locale en_US.UTF-8

# apt-get update && \
    apt-get install -y --no-install-recommends \
      texlive-lang-japanese texlive-fonts-recommended texlive-latex-extra lmodern fonts-lmodern tex-gyre fonts-texgyre texlive-pictures \
      texlive-fonts-extra texlive-generic-recommended \
      fonts-noto fonts-noto-cjk fonts-noto-cjk-extra fonts-noto-color-emoji \
      ghostscript gsfonts zip ruby-zip ruby-nokogiri mecab ruby-mecab mecab-ipadic-utf8 poppler-data cm-super \
      graphviz gnuplot python-blockdiag python-aafigure && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# gem install -N bundler rake && \
    gem install -N combine_pdf && \
    gem install -N review -v "2.5.0" && \
    gem install -N review-peg -v "0.2.2"

# apt-get update && \
    apt-get install -y --no-install-recommends \
      gnupg && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# curl -sL https://deb.nodesource.com/setup_9.x | bash - 

# apt-get update && \
    apt-get install -y --no-install-recommends \
      nodejs && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* && \
    npm install -g yarn

# git clone https://github.com/kauplan/docker-review.git

# cd docker-review

# mkdir /usr/share/texlive/texmf-dist/fonts/map/dvipdfmx/ptex-fontmaps/noto/

# cp ./noto/* /usr/share/texlive/texmf-dist/fonts/map/dvipdfmx/ptex-fontmaps/noto/

# texhash && kanji-config-updmap-sys noto

これで完了。

Re:VIEW starter で作った雛形プロジェクトのディレクトリに移動して $ review-pdfmaker config.yml を動かせばPDFファイルが作られます。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?