あかり描像のブログ

思ったことや学習記録を適当に書いていきます。お気軽にコメントください

TeXLive2024 のインストール記録

TeXLive2024 がリリースされたので満を持して導入しました。
tug.org
https://www.tug.org/texlive/doc/texlive-ja/texlive-ja.pdf

この記事は自分用の備忘録です。これから TeX Live をインストールしたいという方は私の記事みたいなゴミクズではなく極力一次情報を参照するようにしてください。PC 爆発したんやが?www などと言われても責任は取れません。

ここに書いてあるコマンド等はすべて上の参照先に書いてあります。

https://animelogo.com/lovelive/

方針

  • TeXLive は WSL2 (Ubuntu 22.04.3 LTS) 上にインストール
  • エディタ (VSCode) は Windows11 上にインストールして Remote-WSL

もともと W32TeX を使っていたのですが、サ終したため TeXLive を入れます。

パッケージマネージャーの tlmgr の更新が Windows だと怠すぎるので、 TeXLive は Linux に入れます。
VSCode を WSL に入れるのは GUI, 入力メソッドなどの面でメリットがないので Windows の方に入れます。

やったこと

TeXLive のインストール

cd /tmp # working directory of your choice
curl -L -o install-tl-unx.tar.gz https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
zcat < install-tl-unx.tar.gz | tar xf -
cd install-tl-20240408    # 日付で変わると思います
sudo perl ./install-tl --no-interaction # as root or with writable destination

ログメッセージ

Loading https://ftp.yz.yamagata-u.ac.jp/pub/CTAN/systems/texlive/tlnet/tlpkg/texlive.tlpdb
Installing TeX Live 2024 from: https://ftp.yz.yamagata-u.ac.jp/pub/CTAN/systems/texlive/tlnet (verified)
Platform: x86_64-linux => 'GNU/Linux on x86_64'
Distribution: net  (downloading)
Using URL: https://ftp.yz.yamagata-u.ac.jp/pub/CTAN/systems/texlive/tlnet
Directory for temporary files: /tmp/eIUWPXVHIQ
Installing to: /usr/local/texlive/2024
Installing [1/4, time/total: ??:??/??:??]: hyphen-base [23k]
Installing [2/4, time/total: 00:00/00:00]: kpathsea [1065k]
Installing [3/4, time/total: 00:00/00:00]: texlive-scripts [536k]
Installing [4/4, time/total: 00:01/00:01]: texlive.infra [557k]
Time used for installing the packages: 00:01
Installing [0001/4682, time/total: ??:??/??:??]: 12many [376k]

: (中略)

Installing [4682/4682, time/total: 31:28/31:28]: zztex [147k]
Time used for installing the packages: 31:28
running mktexlsr /usr/local/texlive/2024/texmf-dist ...
mktexlsr: Updating /usr/local/texlive/2024/texmf-dist/ls-R...
mktexlsr: Done.
writing fmtutil.cnf to /usr/local/texlive/2024/texmf-dist/web2c/fmtutil.cnf
writing updmap.cfg to /usr/local/texlive/2024/texmf-dist/web2c/updmap.cfg
writing language.dat to /usr/local/texlive/2024/texmf-var/tex/generic/config/language.dat
writing language.def to /usr/local/texlive/2024/texmf-var/tex/generic/config/language.def
writing language.dat.lua to /usr/local/texlive/2024/texmf-var/tex/generic/config/language.dat.lua
running mktexlsr /usr/local/texlive/2024/texmf-var /usr/local/texlive/2024/texmf-config /usr/local/texlive/2024/texmf-dist ...
mktexlsr: Updating /usr/local/texlive/2024/texmf-config/ls-R...
mktexlsr: Updating /usr/local/texlive/2024/texmf-dist/ls-R...
mktexlsr: Updating /usr/local/texlive/2024/texmf-var/ls-R...
mktexlsr: Done.
running updmap-sys --nohash ...done
re-running mktexlsr /usr/local/texlive/2024/texmf-var /usr/local/texlive/2024/texmf-config ...
mktexlsr: Updating /usr/local/texlive/2024/texmf-config/ls-R...
mktexlsr: Updating /usr/local/texlive/2024/texmf-var/ls-R...
mktexlsr: Done.
setting up ConTeXt caches: running mtxrun --generate ...done
running context --luatex --generate ...done
running mtxrun --script fonts --reload ...done
running context --luajittex --generate ...done
pre-generating all format files, be patient...
running fmtutil-sys --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --no-strict --all ...done
running package-specific postactions
finished with package-specific postactions
Welcome to TeX Live!
See /usr/local/texlive/2024/index.html for links to documentation.

The TeX Live web site (https://tug.org/texlive/) provides all updates
and corrections. TeX Live is a joint project of the TeX user groups
around the world; please consider supporting it by joining the group
best for you. The list of groups is available on the web
at https://tug.org/usergroups.html.

Add /usr/local/texlive/2024/texmf-dist/doc/man to MANPATH.
Add /usr/local/texlive/2024/texmf-dist/doc/info to INFOPATH.
Most importantly, add /usr/local/texlive/2024/bin/x86_64-linux
to your PATH for current and future sessions.

Logfile: /usr/local/texlive/2024/install-tl.log


以下を $HOME/.profile に追加。($HOME/.bash_profile があるならそっちに追加)

PATH=/usr/local/texlive/2024/bin/x86_64-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2024/texmf-dist/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2024/texmf-dist/doc/info:$INFOPATH; export INFOPATH

[Linux]環境変数の読み込み順番 #Linux - Qiita

VSCode の setting

工事中

LaTeX Workshop

settings.json 周りの仕様がアレなので、vim と SumatraPDF でガチった方が楽説もある

デフォルトのショートカットキー

key 内容
Ctrl+Alt+v PDF プレビューの表示
Ctrl+Alt+b settings.json"latex-workshop.latex.recipes" の一番最初に書いてあるレシピ通りにビルド
Ctrl+Alt+j SyncTeX   tex->pdf
Ctrl+左クリック SyncTeX   pdf->tex