LoginSignup
4
1

〇〇env系ツールtlenvでTeX Liveもインストールしてみた

Last updated at Posted at 2022-12-12

これは「TeX & LaTeX Advent Calendar 2022」の11日目の記事です。
10日目は、wtsnjpさんでした。12日目は、zr_tex8rさんです。

みなさん、#テフライブ! していますか?

TeX & LaTeX Advent Calendar 2022が埋まらないので、TeX Liveも〇〇env系ツールでインストールできるようにすべく、でっち上げたGitHub: munepi/tlenvを公開しました。

Getting started

1. tlenvをgit cloneしてインストール

git clone https://github.com/munepi/tlenv.git ~/.tlenv
cd ~/.tlenv
git clone https://github.com/munepi/tlenv-texlive-install.git  plugins/texlive-install

もしお手元がMacかつApple silicon搭載Macだったら、 texlive-install-darwinプラグインも入れておくと、ちょっとだけ嬉しいかも。

git clone https://github.com/munepi/tlenv-texlive-install-darwin.git  plugins/texlive-install-darwin

2. tlenvの設定

以下のとおり、〇〇env系のお約束です。

# export TLENV_ROOT=/some/where/tlenv  ## ~/.tlenv
# export PATH=${TLENV_ROOT}/bin:${PATH}

export PATH=~/.tlenv/bin:${PATH}
if which tlenv > /dev/null; then eval "$(tlenv init -)"; fi

3. 最新版TeX Live currentをインストールします。

2022年12月12日時点でcurrentをインストールすると、TeX Live 2022がインストールされます。

tlenv install current

無事にインストールが完了すると、以下のとおりになります。

Installed current to /home/munepi/.tlenv/versions/current


NOTE: to activate this TeX Live version as the new default, run: tlenv global current

実際に、currentのtlmgrを確認してみます。

$ tlenv shell current
$ tlmgr --version
tlmgr revision 63068 (2022-04-18 07:58:07 +0200)
tlmgr using installation: /home/munepi/.tlenv/versions/current
TeX Live (https://tug.org/texlive) version 2022

日本語話者ならば、collection-langjapaneseあたりもほしいでしょう。

tlmgr update --self --all
tlmgr install collection-langjapanese
tlenv rehash

ざっくりとちょっとだけリッチな環境がほしければ、以下のcollections系パッケージを入れておけば、通常用途でも困ることがないと思います。

  • collection-binextra
  • collection-latexextra
  • collection-luatex
  • collection-fontsrecommended
tlmgr install collection-binextra collection-latexextra collection-luatex collection-fontsrecommended 
tlenv rehash

2024年3月23日時点で、日本語話者向けに小さな日本語TeX環境を構築できるように、日本語話者バージョン(langjapanese-20yy (yy: 12-23))をインストールできるようにしています。

例えば、langjapanese-currentをインストールすると、TeX Live 2024 currentにcollection-langjapaneseをはじめ、collection-binextra, collection-latexextra, collection-luatex, collection-fontsrecommendedなどがインストールされます。

tlenv install langjapanese-current

プラグイン

とりあえず、すぐさま欲しくなるであろうプラグインも公開しました。

Enjoy Happy TeXing!

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