LoginSignup
1
0

More than 5 years have passed since last update.

intra-mart実践入門の作成記録 #002 執筆環境作成途中

Last updated at Posted at 2018-01-10

執筆環境作成途中

 前回の投稿TeX Live 2017のインストールに非常に時間がかかるという問題があったので、まずはそこの改善を行いました。PaperistさんのDockerfileを参考にしてTeX Live 2017のインストールオプションを変更しました。それと、Rubyも2.5.0に上げました。

Hello World!!

 今回はシェルスクリプトで動作確認してみました。結果としてセットアップ時間が約3時間から約30分1に短縮されました。

review.sh
#!/bin/bash
# 最低限のセキュリティアップデート
yum -y update
# 最低限のユーティリティ
yum -y install wget zip unzip

# rubyインストール
yum -y install openssl zlib gcc make zlib-devel openssl-devel
mkdir /tmp/ruby
wget  -qO- https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.0.tar.gz | tar zxv -C /tmp/ruby --strip-components=1
cd /tmp/ruby
./configure --prefix=/usr/local/ruby
make
make install
echo "export PATH=/usr/local/ruby/bin:$PATH" >> /etc/profile
source /etc/profile
cd ~
rm -rf /tmp/ruby


# Re:VIEWのインストール
gem install review

# perlのインストール
yum -y install perl-Digest-MD5

# TeX Live 2017のインストール
mkdir /tmp/texlive
wget -qO- http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz | tar zxv -C /tmp/texlive --strip-components=1
echo "selected_scheme scheme-basic" > /tmp/texlive/texlive.profile
echo "option_doc 0" >> /tmp/texlive/texlive.profile
echo "option_src 0" >> /tmp/texlive/texlive.profile
perl /tmp/texlive/install-tl --profile=/tmp/texlive/texlive.profile
echo "export INFOPATH=/usr/local/texlive/2017/texmf-dist/doc/info:$INFOPATH" >> /etc/profile
echo "export MANPATH=/usr/local/texlive/2017/texmf-dist/doc/man:$MANPATH" >> /etc/profile
echo "export PATH=/usr/local/texlive/2017/bin/x86_64-linux:$PATH" >> /etc/profile
source /etc/profile
rm -rf /tmp/texlive

# TeX Liveの更新
tlmgr install collection-basic collection-latex
tlmgr install collection-latexrecommended 
tlmgr install collection-latexextra
tlmgr install collection-fontsrecommended
tlmgr install collection-langjapanese
tlmgr install latexmk
tlmgr install xetex
tlmgr update --self
tlmgr update --all

# サンプルプロジェクトの作成とPDF変換
review-init hello
cd hello/
rake pdf

雑感

 次は執筆用のエディターの選択を行います。マークアップを扱うのでシンタックスハイライトや入力補完がないと文章に集中できませんからね。


  1. Windows 10のHyper-VでCPUコア数1、メモリ4096MBの割当したVMで確認。ネットワークは100Mbpsのマンション用光ファイバー 

1
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
1
0