yihui 我发现 tinytex::tlmgr_update
不能升级 TinyTeX,考虑写个函数 tlmgr_upgrade
怎么样?
我查看了 TeXLive 的官方升级指南 <https://tug.org/texlive/upgrade.html> 强推大家卸载重装,不喜欢!不喜欢!
- 手动下载 update-tlmgr-latest.sh(exe)
- 升级
sudo sh update-tlmgr-latest.sh -- --upgrade
tlmgr option repository yourrepo (这个可以省,之前安装过 TinyTeX,如果设置过)
tlmgr update --self --all
在 Windows 命令行窗口操作,
update-tlmgr-latest.exe -- --upgrade
tlmgr option repository yourrepo (这个可以省,之前安装过 TinyTeX,如果设置过)
tlmgr update --self --all
注意 windows 下 执行第一行有个弹窗,点击安装就好
然后就升级完成了。
附升级日志
sudo sh update-tlmgr-latest.sh -- --upgrade
Verifying archive integrity... All good.
Uncompressing TeX Live Manager Updater 100%
./runme.sh: updating in /opt/TinyTeX...
./runme.sh: tlmgr version says this is TeX Live 2018
./runme.sh: have TL 2018, new version also 2018;
./runme.sh: using --upgrade doesn't make sense; terminating.
tlmgr update --self --all
tlmgr: package repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet (verified)
[1/1, ??:??/??:??] update: texlive.infra [204k] (46470 -> 47457) ... done
Restarting tlmgr to complete update ...
tlmgr: package repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet (verified)
[ 1/35, ??:??/??:??] update: amsmath [30k] (45246 -> 47349) ... done
[ 2/35, 00:00/00:00] update: bibtex.x86_64-linux [72k] (43804 -> 47063) ... done
[ 3/35, 00:00/00:00] update: bibtex [15k] (44166 -> 47198) ... done
[ 4/35, 00:00/00:00] update: dvipdfmx [27k] (44224 -> 47198) ... done
[ 5/35, 00:01/02:06] update: geometry [9k] (19716 -> 47106) ... done
[ 6/35, 00:01/01:59] update: graphics [15k] (44703 -> 47350) ... done
[ 7/35, 00:01/01:48] update: gsftopk.x86_64-linux [40k] (43804 -> 47063) ... done
[ 8/35, 00:01/01:27] update: gsftopk [4k] (44166 -> 47198) ... done
[ 9/35, 00:01/01:26] update: hyphen-base [22k] (45751 -> 47260) ... done
[10/35, 00:01/01:17] update: ifluatex [3k] (46447 -> 47293) ... done
[11/35, 00:01/01:17] update: kpathsea.x86_64-linux [47k] (43804 -> 47063) ... done
[12/35, 00:01/01:04] update: kpathsea [31k] (46655 -> 47198) ... done
[13/35, 00:02/01:55] update: l3kernel [125k] (46720 -> 46875) ... done
[14/35, 00:02/01:22] update: latex [163k] (43813 -> 47377) ... done
[15/35, 00:02/00:59] update: latex-bin [1k] (45751 -> 47198) ... done
[16/35, 00:02/00:59] update: luaotfload [432k] (43194 -> 47444) ... done
[17/35, 00:03/00:52] update: luatex.x86_64-linux [7301k] (44582 -> 47245) ... done
[18/35, 00:07/00:14] update: luatex [13k] (46508 -> 47235) ... done
[19/35, 00:07/00:14] update: makeindex.x86_64-linux [49k] (43804 -> 47063) ... done
[20/35, 00:08/00:17] update: makeindex [5k] (44166 -> 47198) ... done
[21/35, 00:08/00:16] update: metafont.x86_64-linux [189k] (44013 -> 47063) ... done
[22/35, 00:08/00:16] update: metafont [33k] (45678 -> 47198) ... done
[23/35, 00:08/00:16] update: mfware.x86_64-linux [120k] (43804 -> 47063) ... done
[24/35, 00:08/00:16] update: mfware [4k] (44166 -> 47198) ... done
[25/35, 00:08/00:16] update: oberdiek [222k] (46447 -> 47293) ... done
[26/35, 00:09/00:17] update: pdftex.x86_64-linux [795k] (44065 -> 47140) ... done
[27/35, 00:09/00:16] update: pdftex [36k] (44166 -> 47199) ... done
[28/35, 00:09/00:16] update: tetex [70k] (46595 -> 47198) ... done
[29/35, 00:09/00:16] update: tex.x86_64-linux [172k] (44013 -> 47063) ... done
[30/35, 00:10/00:17] update: tex [1k] (44166 -> 47198) ... done
[31/35, 00:10/00:17] update: tools [39k] (43813 -> 47377) ... done
[32/35, 00:10/00:17] update: ttfutils.x86_64-linux [410k] (43804 -> 47063) ... done
[33/35, 00:10/00:17] update: ttfutils [106k] (45845 -> 47198) ... done
[34/35, 00:10/00:16] update: xecjk [126k] (46756 -> 47362) ... done
[35/35, 00:11/00:18] update: xetex.x86_64-linux [7123k] (44328 -> 47245) ... done
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.
regenerating fmtutil.cnf in /opt/TinyTeX/texmf-dist
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine luatex ...
done running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine luatex.
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine pdftex ...
done running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine pdftex.
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine luajittex ...
done running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine luajittex.
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine xetex ...
done running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine xetex.
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine tex ...
done running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine tex.
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --byfmt mf ...
done running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --byfmt mf.
tlmgr: package log updated: /opt/TinyTeX/texmf-var/web2c/tlmgr.log
测试环境
Windows 8.1
R 3.5.0
sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8.1 x64 (build 9600)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936
[2] LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0 tinytex_0.5
Linux 即带 TinyTeX 的 rocker 镜像
sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)
Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.19.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=C
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4 yaml_2.1.18
吊诡的是 tlmgr update --self --all
竟然不能升级,虽然能更新包管理器和 TeX 包,目前的方案是,如果 执行tlmgr_upgrade
就根据系统类型下载 update-tlmgr-latest.sh (update-tlmgr-latest.exe),并执行