5 Half of Pain

「なぜ TinyTeX か ~LaTeX ディストリビューションの何が苦痛か?~」

オリジナルのページ: https://yihui.org/tinytex/pain/

オリジナルの更新日: 2017/12/15


私がしているのが車輪の再発明にすぎないと考えている開発者もいるかもしれません. 私は理由もなく車輪の再発明などしたくありません. ホームページで述べたように, 既存の LaTeX ディストリビューションを使うことによる苦痛は, ファイルとドキュメントが巨大であり, 包括的で有用な一方で, 私にとって最も有用が部分がどこなのか (つまり, 足りないパッケージをインストールする方法) が強調されないことです.

これを嫌うまた別の理由として, LaTeX パッケージの管理のために (UNIX系OSで) sudo がしょっちゅう必要であることもあります. TeX Live はコンピュータのどこに配置することもできる自己完結的なフォルダ構成であることを考えると, sudo が必要な理由が見当たりません. 数年間も待って tlmgr がとうとう Debian/Ubuntu で利用可能になると私はとても喜びましたが, それが使い物にならないとわかると私はすぐに失望しました (sudo なしでは何もできません). 今年再確認すると, まだ使い物にならないままでした. きっと私はこれを正しく使えません (なにをやろうとしてもエラーになります) が, tlmgr のユーザーモードを使うときだけ許可されますが, その機能は私にとって制約が多すぎました.

私が普段使っているのは macOS で, 公式に TeX Live ディストリビューションとして MacTeX が推奨されています. これには私にとって不要ないくつかの追加パッケージ, たとえば TeX Live Utility (私は tlmgr コマンドの使い方を知っています), TeXShop (R Markdown を使っていますし, 可能な限り生の LaTeX を編集することも, 読むことすらしたくないです), LaTeXiT などが含まれています.

実際 Window 上での MiKTeX (現在はこれはクロスプラットフォームになったようです) のよい機能の1つを私は評価しています. 不足している LaTeX パッケージの自動インストールのことです. これはとても便利だと思うので, 私はこの機能を R パッケージの tinytex でも借用し, R ユーザは TeX Live または TinyTeX 使用時にこの機能を活用することができます. つまり, 基本的な MiKTeX ですらまだ大きすぎ, そして私を腹立たせたのは MiKTeX の bbitex.exe です. これはいつも .aux ファイル内の文献データベースファイルに .bib 拡張子を付け足します. 例えば bar.tex 内に \bibliography{foo.bib} があったとして, bibtex.exebar.aux 内に \bibdata{foo.bib.bib} を生成してしまいます. なんであれ, Rパッケージの tinytex においては MiKTeX を使うウィンドウズユーザに対してはパッチを当てました. TeX Live ユーザはこの問題に苦しむことはありません.

このページでは LaTeX のインストールと管理の話を共有したいと思います. まずは私の発見した辛い場面を紹介しようと思います.

訳注: 以降は既存の LaTeX ディストリビューションの不便さを嘆く声を集めた内容となっており, TinyTeX の使用法とは直接関係ないため翻訳を省略します.

Below are stories and experiences contributed by other users:

Removed TeX Live from my system (openSUSE): 1.5gb. Installed TinyTeX + the dependencies to compile my thesis: 150mb!!!! This is great!

Bruno Rodrigues

Really liking the simplicity of tinytex package. Easy to get up and running to knit PDFs. No need for slow LaTeX install.

Daley Mikalson

A tiny LaTeX distribution easy to install from RStudio or on Travis CI is just what we needed!

Philippe Grosjean

Seriously one of my only holdups teaching LaTeX in Rmarkdown (still taught it anyway) is now solved.

Tyson Barrett

Tried TinyTeX with rmarkdown and both English and Chinese rendering. The most smooth experience ever using LaTeX!

Kun Ren

TinyTeX is awesome, if it had existed before I would have saved hours of my life spent dealing with LaTeX packages and failed R Markdown knits…

Antonio Vazquez Brust

Many people don’t realize that Texlive on some Linux systems (say you need a rstudio server) doesn’t come with the TeX package manager. If the package you need is not in their system, you are basically screwed as you can’t even install it. TinyTeX solves this problem and makes everything sweet and easy. Also, after using it for more than a month, I found the messages of tinytex are very helpful, comparing with basically NULL in texlive.

Hao Zhu

I’m a novice with R and I found the entire process of installing rmarkdown, knitr, MiKTeX, and pandoc and then reconciling all their directories very difficult. […] The 3-4 hour detour into MiKTeX etc and how to produce PDFs was a frustration experience to say the least. (Up and running with TinyTeX five minutes later…)

— Justin Shapiro

If you work in a locked down windows corporate enviroment and spent countless hours with MiKTeX or portable MiKTeX, you’ll want to buy @xieyihui lunch.

Thomas Speidel

Too bad, this computer had a good month of TeX-free.

Romain François

I’d been avoiding installing LaTeX on my macOS and Windows machines b/c it’s always such a hassle. Just learned about about TinyTeX today and easily got setup on both machines.

John Blischak

Like 2 hours later, I’m not sure I want to know, but there must be a faster way of updating all my TeX packages than the ftp in TeX Live Utility…

Mara Averick

Installing a complete version of MiKTeX is a freaking nightmare though. Don’t know if it’s my internet connection or what but I just can’t get it all installed in one go. I finally just did the basic install and am selecting batches of pkgs at a time to add.

[…] I just installed this (TinyTeX) and it was SO EASY and I’m kind of upset that I didn’t know about it before. Gonna be shouting this one from the rooftops.

Kim Cressman

Siri, how much of my life have I spent installing TeX distributions?

I have discovered that the tinytex package has handy tools for analysing the .log files, which solved my problems for me. That is, after I wasted half an hour trying to install MiKTeX for no good reason

Danielle Navarro

I used tinytex to upgrade TeX Live and install a package and it … worked. @xieyihui may have ended some of my LaTeX torment.

PirateGrunt

literally took me longer to remove all traces of MacTeX than to install TinyTeX and all the packages needed to build my thesis, and i saved about 10gb of disk space.

Tim Hosgood

I’ve always had a problem knitting to pdf with windows. I followed instruction for tinytex and it works great now!

Dilsher Dhillon

Learning to write a LaTeX manuscript in R Markdown and was having problems loading new packages: tlmgr wasn’t updating the packages. So, found the “tinytex” package that fixed everything.

Akash

Just had to reinstall texlive on my Mac and once again, @xieyihui’s tinytex package saves the day with tinytex::reinstall_tinytex().

Zhian N Kamvar

Having just for fun installed R on my new Raspberry pi 4, I thought to myself now it would be nice to have latex, but really, all of texlive, probably not, so this was exactly what was needed. It installed for me immediately and “just worked.”

Roger Koenker

I’ve always had problems knitting to pdf on Windows until I came across tinytex package.

Dilsher Dhillon

[…] uninstall MacTeX and install TinyTeX was the ticket! It FINALLY knit to pdf!!!!

Tiffany Timbers

[…] Why install 3GB of languages you don’t know when all you want are beautiful tables?

Roman Link

[…] Have you tried {tinytex}? It installs only what you need from LaTeX so you can knit to pdf! Changed my life!

Kim Cressman

[…] R Markdown + library(tinytex) basically unlock all of the power of LaTeX without any of the headaches.

Aaron R. Williams

A nice, ultra light, LaTeX distribution, I used TinyTeX on my chromebook for a while.

@onebellboy

But also LaTeX took 6 hours to download and now I’m struggling to set the path variable for it so maybe I’ll just give up for today and try tomorrow.

jade eden