XiaO

tinytex 安装 LaTeX 发行版 TinyTeX

XiaO / 2020-05-17


更新 R

更新 R 4.0 后,所有的 R 包都不见了。不过好在自己平时所用到的包就那么些个,而且都是广 (tè) 泛 (bié) 使 (dà) 用 (zhòng) 的包,故而不用担心重装包的繁琐,也不需要担心包的版本和 R 之间的兼容性问题。

所用 R 包之些微(读音 xiē wēi 而非 xuē wēi)譬如一下(我知道这里语法使用不正确,只是想戏谑(xì xuè)诙谐或顽皮一下):

install.packages(c("tidyverse","reshape2")) # 图片输出
install.packages(c("rmarkdown","bookdown","blogdown","tufte", "tinytex","miniUI")) # 网站或论文输出
tinytex::install_tinytex()

另外发现,自 RStudio v1.3.958-3 Preview 预览版之后,当遇到需要的包而又没有的时候,会弹框提示是否安装,于是傻乎乎地点击一下是即可,真是舒心啊。

想来,如果一切都是这么稀松平常的话,那我在这里写字到底是要做什么呢?是的,一些事情就是会遇到一些但是

三更半夜重装 TinyTeX

install.packages('tinytex')
tinytex::install_tinytex()
tinytex::uninstall_tinytex() # to uninstall TinyTeX

遇到提示如下:

tinytex::install_tinytex()
…
failed. Output was:
gpg: Signature made Thu May 14 16:34:16 2020 CEST
gpg:                using RSA key 4CE1877E19438C70
gpg: BAD signature from "TeX Live Distribution <tex-live@tug.org>" [ultimate]

Please try from a different mirror and/or wait a few minutes
and try again; usually this is because of transient updates.
If problems persist, feel free to report to texlive@tug.org.
…

于是作罢,异日请早。

tinytex::install_tinytex()
…
tlmgr: package log updated: ~/Library/TinyTeX/texmf-var/web2c/tlmgr.log
TinyTeX installed to ~/Library/TinyTeX

咦,这就安装成功了。这个官方,诚不我欺也。TinyTeX 的安装位置 ~/Library/TinyTeX。于是赶紧立刻马上愉快地输出了一个 PDF 文件。这排版,果然很漂亮。


记录安装提示

提示安装未成功

> tinytex::install_tinytex()
trying URL 'https://yihui.org/gh/tinytex/tools/install-unx.sh'
Content type 'text/plain; charset=utf-8' length 614 bytes
==================================================
downloaded 614 bytes

Downloading install-tl-unx.tar.gz to /var/folders/ws/s7w2_p5j4r162xr_hrn_3tm00000gn/T ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   342  100   340    0     0      2    0     0   7276      0 --:--:-- --:--:-- --:--:--  7276
100 5371k   36 1964k 100 5371k    0     0  4830k      0  0:00:01  0:00:01 --:--:-- 3875k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    100    81  100    81    0     0    159      0 --:--:-- --:--:-- --:--:-
100   142  100   142    0     0    177      0 --:--:-- --:--:-- --:--:--   177
100   183  100   183    0     0    186      0 --:--:-- --:--:-- --:--:--   186
Automated TeX Live installation using profile: ../tinytex.profile
Loading http://mirrors.nic.cz/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb

../install-tl-20200515/install-tl: signature verification error of /var/folders/ws/s7w2_p5j4r162xr_hrn_3tm00000gn/T/ZXg3ebl7PI/DiqGq4YuRA from http://mirrors.nic.cz/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb: cryptographic signature verification of
  /var/folders/ws/s7w2_p5j4r162xr_hrn_3tm00000gn/T/ZXg3ebl7PI/7oycIG2MTk
against
  http://mirrors.nic.cz/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
failed. Output was:
gpg: Signature made Thu May 14 16:34:16 2020 CEST
gpg:                using RSA key 4CE1877E19438C70
gpg: BAD signature from "TeX Live Distribution <tex-live@tug.org>" [ultimate]

Please try from a different mirror and/or wait a few minutes
and try again; usually this is because of transient updates.
If problems persist, feel free to report to texlive@tug.org.

rm: install-tl.log: No such file or directory
sh: line 45: ./bin/*/tlmgr: No such file or directory
sh: line 55: ./bin/*/tlmgr: No such file or directory
mv: rename texlive/* to ~/Library/TinyTeX/*: No such file or directory
install-unx.sh: line 20: ~/Library/TinyTeX/bin/*/tlmgr: No such file or directory
install-unx.sh: line 27: ~/Library/TinyTeX/bin/*/tlmgr: No such file or directory
sh: path: command not found
sh: conf: command not found
TinyTeX installed to ~/Library/TinyTeX
Warning messages:
1: In system2(bin, c("path", "add")) : error in running command
2: In system2(bin, c("conf", "auxtrees", "add", r_texmf_path())) :
  error in running command
3: In tinytex::install_tinytex() :
  TinyTeX was not successfully installed or configured.Your PATH variable is /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/usr/local/MacGPG2/bin:/opt/X11/bin:/Applications/RStudio.app/Contents/MacOS/postback. See https://yihui.org/tinytex/faq/ for more information.

提示安装成功

> tinytex::install_tinytex()
trying URL 'https://yihui.org/gh/tinytex/tools/install-unx.sh'
Content type 'text/plain; charset=utf-8' length 614 bytes
==================================================
downloaded 614 bytes

Downloading install-tl-unx.tar.gz to /var/folders/ws/s7w2_p5j4r162xr_hrn_3tm00000gn/T ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0100   339  100   339    0     0    374      0 --:--:-- --:--:-- --:--:--     0
100 5371k  100 5371k    0     0  3060k      0  0:00:02  0:00:01  0:00:01 1905k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    81  100     0    0     81    0     0    153      0 --:--:-- --:--:-- --:--:--   153
100   142  100   142    0     0    174      0 --:--:-- --:--:-- --:--:--   648
100   183  100   183    0     0    170      0  0:00:01  0:00:01 --:--:--   170
Automated TeX Live installation using profile: ../tinytex.profile
Loading http://ftp.cvut.cz/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb
Installing TeX Live 2020 from: http://ftp.cvut.cz/tex-archive/systems/texlive/tlnet (verified)
Platform: x86_64-darwin => 'MacOSX current (10.13-) on x86_64'
Distribution: net  (downloading)
Using URL: http://ftp.cvut.cz/tex-archive/systems/texlive/tlnet
Directory for temporary files: /var/folders/ws/s7w2_p5j4r162xr_hrn_3tm00000gn/T/ck0XQAQcoR
Installing to: ./
Installing [1/7, time/total: ??:??/??:??]: texlive.infra [221k]
Installing [2/7, time/total: 00:00/00:00]: texlive.infra.x86_64-darwin [342k]
Installing [3/7, time/total: 00:01/00:01]: hyphen-base [22k]
Installing [4/7, time/total: 00:01/00:01]: kpathsea [32k]
Installing [5/7, time/total: 00:01/00:01]: kpathsea.x86_64-darwin [50k]
Installing [6/7, time/total: 00:01/00:01]: texlive-scripts [130k]
Installing [7/7, time/total: 00:01/00:01]: texlive-scripts.x86_64-darwin [1k]
Time used for installing the packages: 00:01
running mktexlsr ./texmf-dist ...
writing fmtutil.cnf to ./texmf-dist/web2c/fmtutil.cnf
writing updmap.cfg to ./texmf-dist/web2c/updmap.cfg
writing language.dat to ./texmf-var/tex/generic/config/language.dat
writing language.def to ./texmf-var/tex/generic/config/language.def
writing language.dat.lua to ./texmf-var/tex/generic/config/language.dat.lua
running mktexlsr ./texmf-var ./texmf-config ./texmf-dist ...
running updmap-sys --nohash ...done
re-running mktexlsr ./texmf-var ./texmf-config ...
pre-generating all format files, be patient...
running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-strict --all ...done
running package-specific postactions
finished with package-specific postactions

Logfile: ./install-tl.log
tlmgr: setting default package repository to http://mirror.ctan.org/systems/texlive/tlnet
tlmgr: updating /private/var/folders/ws/s7w2_p5j4r162xr_hrn_3tm00000gn/T/texlive/tlpkg/texlive.tlpdb
tlmgr: package repository http://mirrors.nic.cz/tex-archive/systems/texlive/tlnet (verified)
[1/36, ??:??/??:??] install: babel [162k]
[2/36, 00:01/02:43] install: cm [233k]
[3/36, 00:01/01:06] install: dehyph [46k]
[4/36, 00:01/00:59] install: dvipdfmx.x86_64-darwin [446k]
[5/36, 00:01/00:29] install: dvipdfmx [27k]
[6/36, 00:01/00:28] install: etex [12k]
[7/36, 00:02/00:56] install: glyphlist [25k]
[8/36, 00:02/00:55] install: graphics [15k]
[9/36, 00:02/00:54] install: graphics-cfg [2k]
[10/36, 00:02/00:54] install: graphics-def [10k]
[11/36, 00:02/00:54] install: hyph-utf8 [16k]
[12/36, 00:02/00:53] install: knuth-lib [30k]
[13/36, 00:02/00:51] install: l3backend [12k]
[14/36, 00:02/00:51] install: l3kernel [150k]
[15/36, 00:02/00:44] install: l3packages [21k]
[16/36, 00:02/00:43] install: latex [165k]
[17/36, 00:03/00:57] install: latex-bin.x86_64-darwin [1k]
[18/36, 00:03/00:57] install: latex-bin [1k]
[19/36, 00:03/00:57] install: latex-fonts [18k]
[20/36, 00:03/00:57] install: latexconfig [4k]
[21/36, 00:03/00:56] install: lm [11665k]
[22/36, 00:07/00:14] install: luahbtex.x86_64-darwin [2102k]
[23/36, 00:08/00:13] install: luahbtex [1k]
[24/36, 00:08/00:13] install: lualibs [119k]
[25/36, 00:08/00:13] install: luaotfload.x86_64-darwin [1k]
[26/36, 00:08/00:13] install: luaotfload [572k]
[27/36, 00:09/00:14] install: luatex.x86_64-darwin [1775k]
[28/36, 00:10/00:14] install: luatex [13k]
[29/36, 00:10/00:14] install: pdftex.x86_64-darwin [954k]
[30/36, 00:10/00:14] install: pdftex [37k]
[31/36, 00:10/00:14] install: plain [70k]
[32/36, 00:11/00:15] install: tex-ini-files [4k]
[33/36, 00:11/00:15] install: unicode-data [285k]
[34/36, 00:11/00:15] install: xetex.x86_64-darwin [7281k]
[35/36, 00:13/00:13] install: xetex [7k]
[36/36, 00:14/00:14] install: xetexconfig [1k]
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.
regenerating fmtutil.cnf in /private/var/folders/ws/s7w2_p5j4r162xr_hrn_3tm00000gn/T/texlive/texmf-dist
running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-error-if-no-format --byengine luatex ...
done running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-error-if-no-format --byengine luatex.
running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-error-if-no-format --byengine luahbtex ...
done running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-error-if-no-format --byengine luahbtex.
running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-error-if-no-format --byengine pdftex ...
done running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-error-if-no-format --byengine pdftex.
running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-error-if-no-format --byengine xetex ...
done running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-error-if-no-format --byengine xetex.
tlmgr: package log updated: /private/var/folders/ws/s7w2_p5j4r162xr_hrn_3tm00000gn/T/texlive/texmf-var/web2c/tlmgr.log
tlmgr: package repository http://mirrors.nic.cz/tex-archive/systems/texlive/tlnet (verified)
[1/67, ??:??/??:??] install: amsfonts [3542k]
[2/67, 00:02/00:05] install: amsmath [30k]
[3/67, 00:02/00:05] install: atbegshi [5k]
[4/67, 00:02/00:05] install: atveryend [4k]
[5/67, 00:02/00:05] install: auxhook [2k]
[6/67, 00:02/00:05] install: bibtex.x86_64-darwin [100k]
[7/67, 00:03/00:07] install: bibtex [15k]
[8/67, 00:04/00:10] install: bigintcalc [7k]
[9/67, 00:04/00:10] install: bitset [6k]
[10/67, 00:04/00:10] install: booktabs [3k]
[11/67, 00:05/00:13] install: dvips.x86_64-darwin [167k]
[12/67, 00:05/00:12] install: dvips [57k]
[13/67, 00:05/00:12] install: ec [258k]
[14/67, 00:06/00:13] install: epstopdf-pkg [5k]
[15/67, 00:06/00:13] install: etexcmds [3k]
[16/67, 00:06/00:13] install: etoolbox [9k]
[17/67, 00:06/00:13] install: euenc [4k]
[18/67, 00:06/00:13] install: fancyvrb [12k]
[19/67, 00:06/00:13] install: filehook [5k]
[20/67, 00:06/00:13] install: float [3k]
[21/67, 00:07/00:16] install: fontspec [27k]
[22/67, 00:07/00:16] install: framed [8k]
[23/67, 00:07/00:16] install: geometry [9k]
[24/67, 00:07/00:16] install: gettitlestring [3k]
[25/67, 00:07/00:16] install: grffile [4k]
[26/67, 00:07/00:16] install: helvetic [527k]
[27/67, 00:07/00:14] install: hycolor [4k]
[28/67, 00:07/00:14] install: hyperref [96k]
[29/67, 00:08/00:15] install: iftex [3k]
[30/67, 00:08/00:15] install: inconsolata [293k]
[31/67, 00:08/00:15] install: infwarerr [3k]
[32/67, 00:08/00:15] install: intcalc [6k]
[33/67, 00:08/00:15] install: kvdefinekeys [3k]
[34/67, 00:08/00:15] install: kvoptions [7k]
[35/67, 00:08/00:14] install: kvsetkeys [4k]
[36/67, 00:08/00:14] install: latex-amsmath-dev [30k]
[37/67, 00:08/00:14] install: latex-tools-dev [35k]
[38/67, 00:09/00:16] install: latexmk.x86_64-darwin [1k]
[39/67, 00:09/00:16] install: latexmk [92k]
[40/67, 00:09/00:16] install: letltxmacro [3k]
[41/67, 00:09/00:16] install: lm-math [369k]
[42/67, 00:09/00:15] install: ltxcmds [5k]
[43/67, 00:09/00:15] install: lualatex-math [4k]
[44/67, 00:09/00:15] install: mdwtools [19k]
[45/67, 00:09/00:15] install: metafont.x86_64-darwin [260k]
[46/67, 00:09/00:14] install: metafont [9k]
[47/67, 00:10/00:16] install: mfware.x86_64-darwin [135k]
[48/67, 00:10/00:15] install: mfware [4k]
[49/67, 00:10/00:15] install: modes [27k]
[50/67, 00:10/00:15] install: natbib [17k]
[51/67, 00:10/00:15] install: pdfescape [5k]
[52/67, 00:10/00:15] install: pdftexcmds [7k]
[53/67, 00:10/00:15] install: refcount [3k]
[54/67, 00:10/00:15] install: rerunfilecheck [4k]
[55/67, 00:10/00:15] install: stringenc [23k]
[56/67, 00:10/00:15] install: tex.x86_64-darwin [238k]
[57/67, 00:11/00:16] install: tex [1k]
[58/67, 00:11/00:16] install: times [281k]
[59/67, 00:11/00:15] install: tipa [2809k]
[60/67, 00:12/00:12] install: tools [41k]
[61/67, 00:12/00:12] install: unicode-math [42k]
[62/67, 00:12/00:12] install: uniquecounter [3k]
[63/67, 00:12/00:12] install: url [6k]
[64/67, 00:13/00:13] install: xcolor [17k]
[65/67, 00:13/00:13] install: xkeyval [13k]
[66/67, 00:13/00:13] install: xunicode [26k]
[67/67, 00:13/00:13] install: zapfding [46k]
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.
regenerating fmtutil.cnf in ~/Library/TinyTeX/texmf-dist
running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-error-if-no-format --byengine tex ...
done running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-error-if-no-format --byengine tex.
running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --byfmt mf ...
done running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --byfmt mf.
tlmgr: package log updated: ~/Library/TinyTeX/texmf-var/web2c/tlmgr.log
TinyTeX installed to ~/Library/TinyTeX