yihui 我之前是安装过tinytex的,另外我这里没法执行第一行代码,所以打算通过运行tinytex:::install_prebuilt()得到包的下载地址,然后用下载软件下载下来,通过tinytex:::install_prebuilt('我的下载路径/TinyTeX.zip')本地安装的。

https://ci.appveyor.com/api/projects/yihui/tinytex/artifacts/TinyTeX.zip 扔进下载软件还是下载不了。

https://yihui.org/tinytex/TinyTeX.zip 这个地址经我验证是可以下载的,大小为154.1M。

    chuxinyuan https://ci.appveyor.com/api/projects/yihui/tinytex/artifacts/TinyTeX.zip 这个下载地址已经失效。这是因为我想同时支持 Windows、macOS 和 Ubuntu。为了将这些下载地址稳定化,我利用了我自己的网站重定向,这样用户就不需要管真实的 AppVeyor 下载地址是什么了。最新版的 tinytex 0.23 已经发布到 CRAN,所以不需要从 Github 安装了。

      yihui 已用上tinytex 0.23版,及时雨啊,非常感谢!官网上源码是0.23,还没来得及打包,直接安装仍然是0.22。不过安装后大鹏的bookdownplus包的paper_zh模板在我电脑上报错了,死活搞不定,悲剧了。具体情况如下:

      生成模板

        library(bookdownplus)
        setwd("~/paper_zh")
        bookdownplus(template = "paper_zh")

      日志信息

      The github repo "pzhaonet/bookdownplus" cannot be connected. Thus only local templates are displayed.

      processing file: paper_zh.Rmd
      |.............................................................................................| 100%
      ordinary text without R code

      output file: paper_zh.knit.md

      "C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS paper_zh.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output paper_zh.tex --self-contained --table-of-contents --toc-depth 3 --template "tex\template_paper_zh.tex" --number-sections --highlight-style tango --pdf-engine xelatex --natbib --lua-filter "C:/Users/cxy/Documents/R/win-library/3.5/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "C:/Users/cxy/Documents/R/win-library/3.5/rmarkdown/rmd/lua/latex-div.lua" --wrap preserve --top-level-division=chapter --variable tables=yes --standalone -Mhas-frontmatter=false
      ! Undefined control sequence.
      <argument> \__xeCJK_patch_microtype_get_slot:

      Error: LaTeX failed to compile paper_zh.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See paper_zh.log for more info.
      In addition: Warning message:
      In file(file, "rt") : InternetOpenUrl failed: '无法解析服务器的名称或地址'
      Please delete paper_zh.Rmd after you finish debugging the error.

      paper_zh.log日志信息如下:

      This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020/W32TeX) (preloaded format=xelatex 2020.5.19) 20 MAY 2020 05:52
      entering extended mode
      restricted \write18 enabled.
      %&-line parsing enabled.
      **paper_zh.tex
      (./paper_zh.tex
      LaTeX2e <2020-02-02> patch level 5
      L3 programming layer <2020-05-15> (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-d
      ist/tex/latex/base/article.cls
      Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/size10.clo
      File: size10.clo 2019/12/20 v1.4l Standard LaTeX file (size option)
      )
      \c@part=\count163
      \c@section=\count164
      \c@subsection=\count165
      \c@subsubsection=\count166
      \c@paragraph=\count167
      \c@subparagraph=\count168
      \c@figure=\count169
      \c@table=\count170
      \abovecaptionskip=\skip47
      \belowcaptionskip=\skip48
      \bibindent=\dimen134
      ) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/lm/lmodern.sty
      Package: lmodern 2009/10/30 v1.6 Latin Modern Fonts
      LaTeX Font Info: Overwriting symbol font operators' in versionnormal'
      (Font) OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
      LaTeX Font Info: Overwriting symbol font letters' in versionnormal'
      (Font) OML/cmm/m/it --> OML/lmm/m/it on input line 23.
      LaTeX Font Info: Overwriting symbol font symbols' in versionnormal'
      (Font) OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24.
      LaTeX Font Info: Overwriting symbol font largesymbols' in versionnormal'
      (Font) OMX/cmex/m/n --> OMX/lmex/m/n on input line 25.
      LaTeX Font Info: Overwriting symbol font operators' in versionbold'
      (Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.
      LaTeX Font Info: Overwriting symbol font letters' in versionbold'
      (Font) OML/cmm/b/it --> OML/lmm/b/it on input line 27.
      LaTeX Font Info: Overwriting symbol font symbols' in versionbold'
      (Font) OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28.
      LaTeX Font Info: Overwriting symbol font largesymbols' in versionbold'
      (Font) OMX/cmex/m/n --> OMX/lmex/m/n on input line 29.
      LaTeX Font Info: Overwriting math alphabet \mathbf' in versionnormal'
      (Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31.
      LaTeX Font Info: Overwriting math alphabet \mathsf' in versionnormal'
      (Font) OT1/cmss/m/n --> OT1/lmss/m/n on input line 32.
      LaTeX Font Info: Overwriting math alphabet \mathit' in versionnormal'
      (Font) OT1/cmr/m/it --> OT1/lmr/m/it on input line 33.
      LaTeX Font Info: Overwriting math alphabet \mathtt' in versionnormal'
      (Font) OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34.
      LaTeX Font Info: Overwriting math alphabet \mathbf' in versionbold'
      (Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35.
      LaTeX Font Info: Overwriting math alphabet \mathsf' in versionbold'
      (Font) OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36.
      LaTeX Font Info: Overwriting math alphabet \mathit' in versionbold'
      (Font) OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37.
      LaTeX Font Info: Overwriting math alphabet \mathtt' in versionbold'
      (Font) OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38.
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsfonts/amssymb.sty
      Package: amssymb 2013/01/14 v3.01 AMS font symbols

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsfonts/amsfonts.st
      y
      Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
      \@emptytoks=\toks15
      \symAMSa=\mathgroup4
      \symAMSb=\mathgroup5
      LaTeX Font Info: Redeclaring math symbol \hbar on input line 98.
      LaTeX Font Info: Overwriting math alphabet \mathfrak' in versionbold'
      (Font) U/euf/m/n --> U/euf/b/n on input line 106.
      )) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsmath.s
      ty
      Package: amsmath 2020/01/20 v2.17e AMS math features
      \@mathmargin=\skip49
      For additional information on amsmath, use the `?' option.
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amstext.sty
      Package: amstext 2000/06/29 v2.01 AMS text
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsgen.sty
      File: amsgen.sty 1999/11/30 v2.0 generic functions
      \@emptytoks=\toks16
      \ex@=\dimen135
      )) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsbsy.st
      y
      Package: amsbsy 1999/11/29 v1.2d Bold Symbols
      \pmbraise@=\dimen136
      ) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsopn.sty
      Package: amsopn 2016/03/08 v2.02 operator names
      )
      \inf@bad=\count171
      LaTeX Info: Redefining \frac on input line 227.
      \uproot@=\count172
      \leftroot@=\count173
      LaTeX Info: Redefining \overline on input line 389.
      \classnum@=\count174
      \DOTSCASE@=\count175
      LaTeX Info: Redefining \ldots on input line 486.
      LaTeX Info: Redefining \dots on input line 489.
      LaTeX Info: Redefining \cdots on input line 610.
      \Mathstrutbox@=\box45
      \strutbox@=\box46
      \big@size=\dimen137
      LaTeX Font Info: Redeclaring font encoding OML on input line 733.
      LaTeX Font Info: Redeclaring font encoding OMS on input line 734.
      \macc@depth=\count176
      \c@MaxMatrixCols=\count177
      \dotsspace@=\muskip16
      \c@parentequation=\count178
      \dspbrk@lvl=\count179
      \tag@help=\toks17
      \row@=\count180
      \column@=\count181
      \maxfields@=\count182
      \andhelp@=\toks18
      \eqnshift@=\dimen138
      \alignsep@=\dimen139
      \tagshift@=\dimen140
      \tagwidth@=\dimen141
      \totwidth@=\dimen142
      \lineht@=\dimen143
      \@envbody=\toks19
      \multlinegap=\skip50
      \multlinetaggap=\skip51
      \mathdisplay@stack=\toks20
      LaTeX Info: Redefining \[ on input line 2859.
      LaTeX Info: Redefining \] on input line 2860.
      ) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/iftex/ifxetex.st
      y
      Package: ifxetex 2019/10/25 v0.7 ifxetex legacy package. Use iftex instead.
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/iftex/iftex.sty
      Package: iftex 2020/03/06 v1.0d TeX engine tests
      ))
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/iftex/ifluatex.sty
      Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
      ) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/fixltx2e.sty
      Package: fixltx2e 2016/12/29 v2.1a fixes to LaTeX (obsolete)
      Applying: [2015/01/01] Old fixltx2e package on input line 46.

      Package fixltx2e Warning: fixltx2e is not required with releases after 2015
      (fixltx2e) All fixes are now in the LaTeX kernel.
      (fixltx2e) See the latexrelease package for details.

      Already applied: [0000/00/00] Old fixltx2e package on input line 53.
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/xelatex/xltxtra/xltxtra.st
      y
      Package: xltxtra 2018/12/31 v0.7 Improvements for the "XeLaTeX" format

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/fontspec/fontspec.st
      y
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/l3packages/xparse/xp
      arse.sty (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/l3kernel/ex
      pl3.sty
      Package: expl3 2020-05-15 L3 programming layer (loader)

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/l3backend/l3backend-
      xdvipdfmx.def
      File: l3backend-xdvipdfmx.def 2020-05-05 L3 backend support: xdvipdfmx
      \ggraphics_track_int=\count183
      \l
      pdf_internal_box=\box47
      \gpdf_backend_object_int=\count184
      \g
      pdf_backend_annotation_int=\count185
      ))
      Package: xparse 2020-05-15 L3 Experimental document command parser

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/l3packages/xparse/xp
      arse-generic.tex
      \lxparse_current_arg_int=\count186
      \g
      xparse_grabber_int=\count187
      \lxparse_m_args_int=\count188
      \l
      xparse_v_nesting_int=\count189
      ))
      Package: fontspec 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/fontspec/fontspec-xe
      tex.sty
      Package: fontspec-xetex 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTe
      X
      \lfontspec_script_int=\count190
      \l
      fontspec_language_int=\count191
      \lfontspec_strnum_int=\count192
      \l
      fontspec_tmp_int=\count193
      \lfontspec_tmpa_int=\count194
      \l
      fontspec_tmpb_int=\count195
      \lfontspec_tmpc_int=\count196
      \l
      fontspec_em_int=\count197
      \lfontspec_emdef_int=\count198
      \l
      fontspec_strong_int=\count199
      \lfontspec_strongdef_int=\count266
      \l
      fontspec_tmpa_dim=\dimen144
      \lfontspec_tmpb_dim=\dimen145
      \l
      fontspec_tmpc_dim=\dimen146
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/fontenc.sty
      Package: fontenc 2020/02/11 v2.0o Standard LaTeX package
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/fontspec/fontspec.cf
      g)))
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/realscripts/realscri
      pts.sty
      Package: realscripts 2016/02/13 v0.3d Access OpenType subscripts and superscrip
      ts
      \subsupersep=\dimen147
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/metalogo/metalogo.st
      y
      Package: metalogo 2010/05/29 v0.12 Extended TeX logo macros

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/graphicx.st
      y
      Package: graphicx 2019/11/30 v1.2a Enhanced LaTeX Graphics (DPC,SPQR)
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/keyval.sty
      Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
      \KV@toks@=\toks21
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/graphics.st
      y
      Package: graphics 2019/11/30 v1.4a Standard LaTeX Graphics (DPC,SPQR)
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/trig.sty
      Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-cfg/graphic
      s.cfg
      File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
      )
      Package graphics Info: Driver file: xetex.def on input line 105.

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-def/xetex.d
      ef
      File: xetex.def 2017/06/24 v5.0h Graphics/color driver for xetex
      ))
      \Gin@req@height=\dimen148
      \Gin@req@width=\dimen149
      )
      \xl@everylogo=\toks22
      \xl@@everylogo=\toks23
      LaTeX Info: Redefining \TeX on input line 193.
      LaTeX Info: Redefining \LaTeX on input line 202.
      LaTeX Info: Redefining \LaTeXe on input line 219.
      )
      \lxetex_show_hyphens_wrapping_box=\box48
      \l
      xetex_show_hyphens_temp_box=\box49
      \lxetex_show_hyphens_final_box=\box50
      \g
      xetex_show_hyphens_word_box=\box51
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/xelatex/xunicode/xunicode.
      sty
      File: xunicode.sty 2011/09/09 v0.981 provides access to latin accents and many
      other characters in Unicode lower plane
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/tipa/t3enc.def
      File: t3enc.def 2001/12/31 T3 encoding
      )
      \tipaTiiicode=\count267
      \tipasavetokens=\toks24
      \tipachecktokens=\toks25
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/microtype/microtype.
      sty
      Package: microtype 2019/11/18 v2.7d Micro-typographical refinements (RS)
      \MT@toks=\toks26
      \MT@count=\count268
      LaTeX Info: Redefining \textls on input line 790.
      \MT@outer@kern=\dimen150
      LaTeX Info: Redefining \textmicrotypecontext on input line 1354.
      \MT@listname@count=\count269

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/microtype/microtype-
      xetex.def
      File: microtype-xetex.def 2019/11/18 v2.7d Definitions specific to xetex (RS)
      LaTeX Info: Redefining \lsstyle on input line 258.
      )
      Package microtype Info: Loading configuration file microtype.cfg.

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/microtype/microtype.
      cfg
      File: microtype.cfg 2019/11/18 v2.7d microtype main configuration file (RS)
      ))
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/geometry/geometry.st
      y
      Package: geometry 2020/01/02 v5.9 Page Geometry
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/iftex/ifvtex.sty
      Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
      )
      \Gm@cnth=\count270
      \Gm@cntv=\count271
      \c@Gm@tempcnt=\count272
      \Gm@bindingoffset=\dimen151
      \Gm@wd@mp=\dimen152
      \Gm@odd@mp=\dimen153
      \Gm@even@mp=\dimen154
      \Gm@layoutwidth=\dimen155
      \Gm@layoutheight=\dimen156
      \Gm@layouthoffset=\dimen157
      \Gm@layoutvoffset=\dimen158
      \Gm@dimlist=\toks27
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hyperref/hyperref.st
      y
      Package: hyperref 2020-05-15 v7.00e Hypertext links for LaTeX

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/ltxcmds/ltxcmds.st
      y
      Package: ltxcmds 2019/12/15 v1.24 LaTeX kernel commands for general use (HO)
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/pdftexcmds/pdftexcmd
      s.sty
      Package: pdftexcmds 2019/11/24 v0.31 Utility functions of pdfTeX for LuaTeX (HO
      )

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/infwarerr/infwarer
      r.sty
      Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
      )
      Package pdftexcmds Info: \pdf@primitive is available.
      Package pdftexcmds Info: \pdf@ifprimitive is available.
      Package pdftexcmds Info: \pdfdraftmode not found.
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/kvsetkeys/kvsetkey
      s.sty
      Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO)
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/kvdefinekeys/kvdef
      inekeys.sty
      Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO)
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pdfescape/pdfescap
      e.sty
      Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO)
      ) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hycolor/hycolor.st
      y
      Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/letltxmacro/letltxma
      cro.sty
      Package: letltxmacro 2019/12/03 v1.6 Let assignment for LaTeX macros (HO)
      ) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/auxhook/auxhook.st
      y
      Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO)
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/kvoptions/kvoptions.
      sty
      Package: kvoptions 2019/11/29 v3.13 Key value format for package options (HO)
      )
      \@linkdim=\dimen159
      \Hy@linkcounter=\count273
      \Hy@pagecounter=\count274
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hyperref/pd1enc.def
      File: pd1enc.def 2020-05-15 v7.00e Hyperref: PDFDocEncoding definition (HO)
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/intcalc/intcalc.st
      y
      Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO)
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/etexcmds/etexcmds.
      sty
      Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
      )
      \Hy@SavedSpaceFactor=\count275
      Package hyperref Info: Option unicode' settrue' on input line 4338.
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hyperref/puenc.def
      File: puenc.def 2020-05-15 v7.00e Hyperref: PDF Unicode definition (HO)
      )
      Package hyperref Info: Hyper figures OFF on input line 4464.
      Package hyperref Info: Link nesting OFF on input line 4469.
      Package hyperref Info: Hyper index ON on input line 4472.
      Package hyperref Info: Plain pages OFF on input line 4479.
      Package hyperref Info: Backreferencing OFF on input line 4484.
      Package hyperref Info: Implicit mode ON; LaTeX internals redefined.
      Package hyperref Info: Bookmarks ON on input line 4717.
      \c@Hy@tempcnt=\count276
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/url/url.sty
      \Urlmuskip=\muskip17
      Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
      )
      LaTeX Info: Redefining \url on input line 5076.
      \XeTeXLinkMargin=\dimen160
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/bitset/bitset.sty
      Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO)

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/bigintcalc/bigintc
      alc.sty
      Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO
      )
      ))
      \Fld@menulength=\count277
      \Field@Width=\dimen161
      \Fld@charsize=\dimen162
      Package hyperref Info: Hyper figures OFF on input line 6347.
      Package hyperref Info: Link nesting OFF on input line 6352.
      Package hyperref Info: Hyper index ON on input line 6355.
      Package hyperref Info: backreferencing OFF on input line 6362.
      Package hyperref Info: Link coloring OFF on input line 6367.
      Package hyperref Info: Link coloring with OCG OFF on input line 6372.
      Package hyperref Info: PDF/A mode OFF on input line 6377.
      LaTeX Info: Redefining \ref on input line 6417.
      LaTeX Info: Redefining \pageref on input line 6421.

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/atbegshi/atbegshi.
      sty
      Package: atbegshi 2019/12/05 v1.19 At begin shipout hook (HO)
      )
      \Hy@abspage=\count278
      \c@Item=\count279
      \c@Hfootnote=\count280
      )
      Package hyperref Info: Driver (autodetected): hxetex.
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/hyperref/hxetex.def
      File: hxetex.def 2020-05-15 v7.00e Hyperref driver for XeTeX

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/stringenc/stringen
      c.sty
      Package: stringenc 2019/11/29 v1.12 Convert strings between diff. encodings (HO
      )
      )
      \pdfm@box=\box52
      \c@Hy@AnnotLevel=\count281
      \HyField@AnnotCount=\count282
      \Fld@listcount=\count283
      \c@bookmark@seq@number=\count284

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/rerunfilecheck/rerun
      filecheck.sty
      Package: rerunfilecheck 2019/12/05 v1.9 Rerun checks for auxiliary files (HO)

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/atveryend/atveryend.
      sty
      Package: atveryend 2019-12-11 v1.11 Hooks at the very end of document (HO)
      Package atveryend Info: \enddocument detected (standard20110627).
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/uniquecounter/uniq
      uecounter.sty
      Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO)
      )
      Package uniquecounter Info: New unique counter rerunfilecheck' on input line 2
      86.
      )
      \Hy@SectionHShift=\skip52
      )
      Package hyperref Info: Option
      colorlinks' set true' on input line 34.
      Package hyperref Info: Option
      breaklinks' set `true' on input line 34.
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/natbib/natbib.sty
      Package: natbib 2010/09/13 8.31b (PWD, AO)
      \bibhang=\skip53
      \bibsep=\skip54
      LaTeX Info: Redefining \cite on input line 694.
      \c@NAT@ctr=\count285
      ) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/color.sty
      Package: color 2019/11/23 v1.2a Standard LaTeX Color (DPC)

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-cfg/color.c
      fg
      File: color.cfg 2016/01/02 v1.6 sample color configuration
      )
      Package color Info: Driver file: xetex.def on input line 147.

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/dvipsnam.de
      f
      File: dvipsnam.def 2016/06/17 v3.0m Driver-dependent file (DPC,SPQR)
      ))
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/fancyvrb/fancyvrb.st
      y
      Package: fancyvrb 2020/05/03 v3.6 verbatim text (tvz,hv)
      \FV@CodeLineNo=\count286
      \FV@InFile=\read2
      \FV@TabBox=\box53
      \c@FancyVerbLine=\count287
      \FV@StepNumber=\count288
      \FV@OutFile=\write3
      ) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/framed/framed.sty
      Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
      \OuterFrameSep=\skip55
      \fb@frw=\dimen163
      \fb@frh=\dimen164
      \FrameRule=\dimen165
      \FrameSep=\dimen166
      ) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/tools/longtable.st
      y
      Package: longtable 2020/01/07 v4.13 Multi-page Table package (DPC)
      \LTleft=\skip56
      \LTright=\skip57
      \LTpre=\skip58
      \LTpost=\skip59
      \LTchunksize=\count289
      \LTcapwidth=\dimen167
      \LT@head=\box54
      \LT@firsthead=\box55
      \LT@foot=\box56
      \LT@lastfoot=\box57
      \LT@cols=\count290
      \LT@rows=\count291
      \c@LT@tables=\count292
      \c@LT@chunks=\count293
      \LT@p@ftn=\toks28
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/booktabs/booktabs.st
      y
      Package: booktabs 2020/01/12 v1.61803398 Publication quality tables
      \heavyrulewidth=\dimen168
      \lightrulewidth=\dimen169
      \cmidrulewidth=\dimen170
      \belowrulesep=\dimen171
      \belowbottomsep=\dimen172
      \aboverulesep=\dimen173
      \abovetopsep=\dimen174
      \cmidrulesep=\dimen175
      \cmidrulekern=\dimen176
      \defaultaddspace=\dimen177
      \@cmidla=\count294
      \@cmidlb=\count295
      \@aboverulesep=\dimen178
      \@belowrulesep=\dimen179
      \@thisruleclass=\count296
      \@lastruleclass=\count297
      \@thisrulewidth=\dimen180
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/mdwtools/footnote.st
      y
      Package: footnote 1997/01/28 1.13 Save footnotes around boxes
      \fn@notes=\box58
      \fn@width=\dimen181
      ) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/parskip/parskip.st
      y
      Package: parskip 2020-01-22 v2.0d non-zero parskip adjustments

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/etoolbox/etoolbox.st
      y
      Package: etoolbox 2019/09/21 v2.5h e-TeX tools for LaTeX (JAW)
      \etb@tempcnta=\count298
      )) (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
      Package: xeCJK 2020/05/01 v3.8.3 Typesetting CJK scripts with XeLaTeX

      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/l3packages/l3keys2e/
      l3keys2e.sty
      Package: l3keys2e 2020-05-15 LaTeX2e option processing using LaTeX3 keys
      )
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/l3packages/xtemplate
      /xtemplate.sty
      Package: xtemplate 2020-05-15 L3 Experimental prototype document functions
      \lxtemplate_tmp_dim=\dimen182
      \l
      xtemplate_tmp_int=\count299
      \lxtemplate_tmp_muskip=\muskip18
      \l
      xtemplate_tmp_skip=\skip60
      )
      \lxeCJK_tmp_int=\count300
      \l
      xeCJK_tmp_box=\box59
      \lxeCJK_tmp_dim=\dimen183
      \l
      xeCJK_tmp_skip=\skip61
      (c:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/ctex/ctexhook.sty
      Package: ctexhook 2020/05/16 v2.5.2 Document and package hooks (CTEX)
      )
      \gxeCJK_space_factor_int=\count301
      \l
      xeCJK_begin_int=\count302
      \lxeCJK_end_int=\count303
      \c
      xeCJK_CJK_class_int=\XeTeXcharclass1
      \cxeCJK_FullLeft_class_int=\XeTeXcharclass2
      \c
      xeCJK_FullRight_class_int=\XeTeXcharclass3
      \cxeCJK_HalfLeft_class_int=\XeTeXcharclass4
      \c
      xeCJK_HalfRight_class_int=\XeTeXcharclass5
      \cxeCJK_NormalSpace_class_int=\XeTeXcharclass6
      \c
      xeCJK_CM_class_int=\XeTeXcharclass7
      \cxeCJK_HangulJamo_class_int=\XeTeXcharclass8
      \l
      xeCJK_last_skip=\skip62
      \gxeCJK_node_int=\count304
      \c
      xeCJK_CJK_node_dim=\dimen184
      \cxeCJK_CJK-space_node_dim=\dimen185
      \c
      xeCJK_default_node_dim=\dimen186
      \cxeCJK_default-space_node_dim=\dimen187
      \c
      xeCJK_CJK-widow_node_dim=\dimen188
      \cxeCJK_normalspace_node_dim=\dimen189
      \l
      xeCJK_ccglue_skip=\skip63
      \lxeCJK_ecglue_skip=\skip64
      \l
      xeCJK_punct_kern_skip=\skip65
      \lxeCJK_last_penalty_int=\count305
      \l
      xeCJK_last_bound_dim=\dimen190
      \lxeCJK_last_kern_dim=\dimen191
      \l
      xeCJK_widow_penalty_int=\count306

      Package xtemplate Info: Declaring object type 'xeCJK/punctuation' taking 0
      (xtemplate) argument(s) on line 2302.

      \lxeCJK_fixed_punct_width_dim=\dimen192
      \l
      xeCJK_mixed_punct_width_dim=\dimen193
      \lxeCJK_middle_punct_width_dim=\dimen194
      \l
      xeCJK_fixed_margin_width_dim=\dimen195
      \lxeCJK_mixed_margin_width_dim=\dimen196
      \l
      xeCJK_middle_margin_width_dim=\dimen197
      \lxeCJK_bound_punct_width_dim=\dimen198
      \l
      xeCJK_bound_margin_width_dim=\dimen199
      \lxeCJK_margin_minimum_dim=\dimen256
      \l
      xeCJK_kerning_total_width_dim=\dimen257
      \lxeCJK_same_align_margin_dim=\dimen258
      \l
      xeCJK_different_align_margin_dim=\dimen259
      \lxeCJK_kerning_margin_width_dim=\dimen260
      \l
      xeCJK_kerning_margin_minimum_dim=\dimen261
      \lxeCJK_bound_dim=\dimen262
      \l
      xeCJK_reverse_bound_dim=\dimen263
      \lxeCJK_margin_dim=\dimen264
      \l
      xeCJK_minimum_bound_dim=\dimen265
      \lxeCJK_kerning_margin_dim=\dimen266
      \g
      xeCJK_family_int=\count307
      \lxeCJK_fam_int=\count308
      \g
      xeCJK_fam_allocation_int=\count309
      \lxeCJK_verb_case_int=\count310
      \l
      xeCJK_verb_exspace_skip=\skip66
      ! Undefined control sequence.
      <argument> \__xeCJK_patch_microtype_get_slot:


      l.4826 }


      Here is how much of TeX's memory you used:
      19211 strings out of 481274
      356971 string characters out of 5923180
      671217 words of memory out of 5000000
      36550 multiletter control sequences out of 15000+600000
      532738 words of font info for 30 fonts, out of 8000000 for 9000
      14 hyphenation exceptions out of 8191
      52i,0n,50p,971b,267s stack positions out of 5000i,500n,10000p,200000b,80000s

      No pages of output.

      系统环境

       sessionInfo()
      R version 3.5.3 (2019-03-11)
      Platform: x86_64-w64-mingw32/x64 (64-bit)
      Running under: Windows 10 x64 (build 18362)
      
      Matrix products: default
      
      locale:
      [1] LC_COLLATE=Chinese (Simplified)_China.936  LC_CTYPE=Chinese (Simplified)_China.936   
      [3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C                              
      [5] LC_TIME=Chinese (Simplified)_China.936    
      
      attached base packages:
      [1] stats     graphics  grDevices utils     datasets  methods   base     
      
      other attached packages:
      [1] bookdownplus_1.5.8   RevoUtils_11.0.3     RevoUtilsMath_11.0.0
      
      loaded via a namespace (and not attached):
       [1] Rcpp_1.0.4.6    bookdown_0.19   digest_0.6.25   magrittr_1.5    evaluate_0.14   xaringan_0.16  
       [7] stringi_1.4.6   rlang_0.4.6     rstudioapi_0.11 magick_2.3      rmarkdown_2.1   tools_3.5.3    
      [13] stringr_1.4.0   tinytex_0.23    yaml_2.2.1      xfun_0.13       compiler_3.5.3  htmltools_0.4.0
      [19] knitr_1.28     

      耗时一天一夜,终于找到问题了,大鹏paper_zh模板的template_paper_zh.tex文件的\usepackage[boldfont,slantfont]{xeCJK},我把它注释掉(前面加个%)后,在index.Rmd文件的yaml里加入CJKmainfont: Microsoft YaHei参数,目前可以生成pdf文件,暂时未发现其他不良影响。

      经查:xeCJK更新到 LaTeX 2020 后 BoldFont 等选项失效 · Issue #483 ,具体怎么解决的我进不去,所以坐等其他童鞋给出更完美的解决方案。

      yihui 老师你好,因为无法访问raw.xxx,我按照你的方法下载了文件后,打算用tinytex:::install_prebuilt(' XXX/TinyTeX.zip ') 安装时出现了错误,
      “In extract(path, exdir = path.expand(dirname(default_inst))) : 从zip文件中抽取-1时出了错,“
      应该怎么解决呢?谢谢!

        Year 你下载的 TinyTeX.zip 文件是多大?应该是在 154 Mb 左右。

        • Year 回复了此帖

          yihui 对的,我也找到了路径,使用了你在上面提到的code
          tinytex:::install_prebuilt("~/R/TinyTeX.zip")
          但是显示的错误是,
          In extract(path, exdir = path.expand(dirname(default_inst))) : 从zip文件中抽取1时出了错
          我重启Rstudio也没有改变这个情况。

            Year 你的意思是 ~/R/TinyTeX.zip 这个文件在 154 Mb 左右?

            直接运行 unzip('~/R/TinyTeX.zip') 能成功解压缩到当前工作目录下吗?

            • Year 回复了此帖

              yihui 对的,这个文件在154 Mb左右,而我直接运行 unzip('~/R/TinyTeX.zip') 发现没有任何结果出现。而如果我使用yihui老师你网页的code "tinytex::install_tinytex()", 结果显示
              “In download.file(url, output, ..., method = method) : URL 'https://raw.githubusercontent.com/yihui/tinytex/master/tools/pkgs-custom.txt': status was 'Couldn't resolve host name' ”

              应该如何解决呢?谢谢老师!

                yihui 不好意思,刚刚打错code了,重新输入unzip('~/R/TinyTeX.zip'),情况还是
                ” > unzip('~/R/TinyTeX.zip')
                Warning message:
                In unzip("~/R/TinyTeX.zip") : 从zip文件中抽取1时出了错 “
                应该怎么解决呢?

                  Year 可否请你帮忙再测试一下下面的代码告诉我结果:

                  # 测试解压缩 zip 文件
                  unlink('TinyTeX.zip')
                  tinytex:::download_installer('TinyTeX.zip')
                  str(unzip('TinyTeX.zip'))
                  list.files('TinyTeX')
                  
                  # 测试解压缩 tar.gz 文件
                  tinytex:::download_installer('TinyTeX.tar.gz')
                  str(untar('TinyTeX.tar.gz'))
                  list.files('.TinyTeX')
                  
                  # 清理解压缩文件
                  unlink(c('TinyTeX', '.TinyTeX', 'TinyTeX.zip', 'TinyTeX.tar.gz'), recursive = TRUE)

                  如果 untar() 能成功的话,那我可以考虑为 Windows 用户提供 tar.gz 格式的安装包。谢谢!

                  Year 我已经调整了链接(不再访问 Github 地址),你现在用 tinytex::install_tinytex() 应该可以成功安装了。

                    先把结果贴上来,回头我有空的时候整理下。
                    注:两个包我都是下载软件下载的。其中TinyTeX.zip是155M,TinyTeX.tar.gz是124M。

                     tinytex:::download_installer('TinyTeX.zip')

                    trying URL 'https://yihui.org/tinytex/TinyTeX.zip'

                    str(unzip('C:/Users/cxy/Desktop/test/TinyTeX.zip'))

                    chr [1:16083] "./TinyTeX/install-tl" "./TinyTeX/install-tl-windows.bat" ...

                     list.files('TinyTeX')

                    [1] "bin" "install-tl" "install-tl-windows.bat"
                    [4] "LICENSE.CTAN" "LICENSE.TL" "release-texlive.txt"
                    [7] "texmf-config" "texmf-dist" "texmf-local"
                    [10] "texmf-var" "texmf.cnf" "texmfcnf.lua"
                    [13] "tl-tray-menu.exe" "tlpkg"

                     tinytex:::download_installer('TinyTeX.tar.gz')

                    trying URL 'https://yihui.org/tinytex/TinyTeX.tar.gz'

                    str(untar('C:/Users/cxy/Desktop/test/TinyTeX.tar.gz'))

                    /Rtools/bin/tar: .TinyTeX/texmf-var/fonts/map/dvips/updmap/psfonts.map: Cannot create symlink to

                    'psfonts_t1.map': No such file or directory
                    /Rtools/bin/tar: .TinyTeX/bin/x86_64-linux/extractbb: Cannot create symlink to 'xdvipdfmx': No such file or

                    directory
                    /Rtools/bin/tar: .TinyTeX/bin/x86_64-linux/texlua: Cannot create symlink to 'luatex': No such file or directory
                    /Rtools/bin/tar: .TinyTeX/bin/x86_64-linux/dvipdfm: Cannot create symlink to 'xdvipdfmx': No such file or

                    directory
                    /Rtools/bin/tar: .TinyTeX/bin/x86_64-linux/texluac: Cannot create symlink to 'luatex': No such file or

                    directory
                    /Rtools/bin/tar: .TinyTeX/bin/x86_64-linux/lualatex: Cannot create symlink to 'luahbtex': No such file or

                    directory
                    /Rtools/bin/tar: .TinyTeX/bin/x86_64-linux/texhash: Cannot create symlink to 'mktexlsr': No such file or

                    directory
                    /Rtools/bin/tar: .TinyTeX/bin/x86_64-linux/inimf: Cannot create symlink to 'mf': No such file or directory
                    /Rtools/bin/tar: .TinyTeX/bin/x86_64-linux/mktexfmt: Cannot create symlink to 'fmtutil': No such file or

                    directory
                    /Rtools/bin/tar: .TinyTeX/bin/x86_64-linux/man: Cannot create symlink to '../../texmf-dist/doc/man': No such

                    file or directory
                    /Rtools/bin/tar: Exiting with failure status due to previous errors
                    int 2
                    Warning message:
                    In untar("C:/Users/cxy/Desktop/test/TinyTeX.tar.gz") :
                    ‘tar.exe -xf "C:/Users/cxy/Desktop/test/TinyTeX.tar.gz"’ returned error code 2

                     list.files('.TinyTeX')

                    [1] "bin" "install-tl" "LICENSE.CTAN"
                    [4] "LICENSE.TL" "release-texlive.txt" "texmf-config"
                    [7] "texmf-dist" "texmf-local" "texmf-var"
                    [10] "texmf.cnf" "texmfcnf.lua" "tlpkg"

                      tinytex::install_tinytex()确实舒服多了。安装过程中弹出一个信息框,说可能有两个地方报错,但是可以忽略。
                      注:我之前安装latex包的时候设置镜像为华中科技大学的镜像。

                      测试结果

                      tinytex::install_tinytex()

                      tlmgr revision 54446 (2020-03-21 17:45:22 +0100)
                      tlmgr using installation: C:/Users/cxy/AppData/Roaming/TinyTeX
                      TeX Live (https://tug.org/texlive) version 2020
                      trying URL 'http://mirror.ctan.org/systems/texlive/tlnet/install-tl.zip'
                      Content length 339 bytes
                      downloaded 23.1 MB

                      trying URL 'https://yihui.org/gh/tinytex/tools/pkgs-custom.txt'
                      Content length 57 bytes
                      downloaded 547 bytes

                      trying URL 'https://yihui.org/gh/tinytex/tools/tinytex.profile'
                      Content length 57 bytes
                      downloaded 183 bytes

                      Starting to install TinyTeX to C:\Users\cxy\AppData\Roaming/TinyTeX. It will take a few minutes.
                      Automated TeX Live installation using profile: ../tinytex.profile
                      Loading http://mirrors.ustc.edu.cn/CTAN/systems/texlive/tlnet/tlpkg/texlive.tlpdb
                      Installing TeX Live 2020 from: http://mirrors.ustc.edu.cn/CTAN/systems/texlive/tlnet (not verified)
                      Platform: win32 => 'Windows'
                      Distribution: net (downloading)
                      Using URL: http://mirrors.ustc.edu.cn/CTAN/systems/texlive/tlnet
                      Directory for temporary files: C:\Users\cxy\AppData\Local\Temp\Krel1rQotS
                      Installing to: ./TinyTeX/
                      Installing [01/10, time/total: ??:??/??:??]: texlive.infra [221k]
                      Installing [02/10, time/total: 00:24/31:09]: texlive.infra.win32 [1397k]
                      Installing [03/10, time/total: 00:49/08:41]: tlperl.win32 [6816k]
                      Installing [04/10, time/total: 02:20/04:45]: hyphen-base [22k]
                      Installing [05/10, time/total: 02:42/05:29]: kpathsea [32k]
                      Installing [06/10, time/total: 03:07/06:19]: kpathsea.win32 [476k]
                      Installing [07/10, time/total: 04:58/09:32]: texlive-scripts [130k]
                      Installing [08/10, time/total: 05:00/09:27]: texlive-scripts.win32 [36k]
                      Installing [09/10, time/total: 05:59/11:17]: tlgs.win32 [6674k]
                      Installing [10/10, time/total: 07:18/07:57]: tlpsv.win32 [1411k]
                      Time used for installing the packages: 08:16
                      running mktexlsr ./TinyTeX/texmf-dist ...
                      mktexlsr: Updating ./TinyTeX/texmf-dist/ls-R...
                      mktexlsr: Updated ./TinyTeX/texmf-dist/ls-R.
                      mktexlsr: Done.
                      writing fmtutil.cnf to ./TinyTeX/texmf-dist/web2c/fmtutil.cnf
                      writing updmap.cfg to ./TinyTeX/texmf-dist/web2c/updmap.cfg
                      writing language.dat to ./TinyTeX/texmf-var/tex/generic/config/language.dat
                      writing language.def to ./TinyTeX/texmf-var/tex/generic/config/language.def
                      writing language.dat.lua to ./TinyTeX/texmf-var/tex/generic/config/language.dat.lua
                      running mktexlsr ./TinyTeX/texmf-var ./TinyTeX/texmf-config ./TinyTeX/texmf-dist ...
                      mktexlsr: Updating ./TinyTeX/texmf-var/ls-R...
                      mktexlsr: Updated ./TinyTeX/texmf-var/ls-R.
                      Cannot open ./TinyTeX/texmf-config/ls-R to write.
                      Cannot open ./TinyTeX/texmf-dist/ls-R to write.
                      mktexlsr: Done.
                      running updmap-sys --nohash ...C:\Users\cxy\AppData\Local\Temp\RtmpwhjEuQ\install-tl-20200520\install-tl: updmap-sys --nohash failed (status 53):
                      failed
                      re-running mktexlsr ./TinyTeX/texmf-var ./TinyTeX/texmf-config ...
                      mktexlsr: Updating ./TinyTeX/texmf-var/ls-R...
                      mktexlsr: Updated ./TinyTeX/texmf-var/ls-R.
                      Cannot open ./TinyTeX/texmf-config/ls-R to write.
                      mktexlsr: Done.
                      pre-generating all format files, be patient...
                      running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-strict --all ...C:\Users\cxy\AppData\Local\Temp\RtmpwhjEuQ\install-tl-20200520\install-tl: fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-strict --all failed (status 53):

                      C:\Users\cxy\AppData\Local\Temp\RtmpwhjEuQ\install-tl-20200520\install-tl: errors in installation reported above

                      Summary of warnings:
                      C:\Users\cxy\AppData\Local\Temp\RtmpwhjEuQ\install-tl-20200520\install-tl: updmap-sys --nohash failed (status 53):
                      C:\Users\cxy\AppData\Local\Temp\RtmpwhjEuQ\install-tl-20200520\install-tl: fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-strict --all failed (status 53):


                      The following environment variables contain the string "tex"
                      (case-independent). If you're doing anything but adding personal
                      directories to the system paths, they may well cause trouble somewhere
                      while running TeX. If you encounter problems, try unsetting them.
                      Please ignore spurious matches unrelated to TeX.

                      II=C:\Users\cxy\AppData\Roaming\TinyTeX\bin\win32

                      failed
                      running package-specific postactions
                      finished with package-specific postactions

                      Welcome to TeX Live!

                      See ./TinyTeX//index.html for links to documentation.
                      The TeX Live web site (https://tug.org/texlive/) contains any 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.
                      Logfile: ./TinyTeX/install-tl.log
                      tlmgr.pl: package repository http://mirrors.ustc.edu.cn/CTAN/systems/texlive/tlnet (not verified: gpg unavailable)
                      [1/103, ??:??/??:??] install: amsfonts [3542k]
                      [2/103, 00:40/06:53] install: amsmath [30k]
                      [3/103, 00:40/06:49] install: atbegshi [5k]
                      [4/103, 00:41/06:59] install: atveryend [4k]
                      [5/103, 00:41/06:58] install: auxhook [2k]
                      [6/103, 00:41/06:58] install: babel [162k]
                      [7/103, 00:45/07:19] install: bibtex.win32 [41k]
                      [8/103, 00:46/07:24] install: bibtex [15k]
                      [9/103, 00:46/07:22] install: bigintcalc [7k]
                      [10/103, 00:47/07:31] install: bitset [6k]
                      [11/103, 00:47/07:31] install: booktabs [3k]
                      [12/103, 00:47/07:30] install: cm [233k]
                      [13/103, 00:50/07:32] install: dehyph [46k]
                      [14/103, 00:53/07:53] install: dvipdfmx.win32 [315k]
                      [15/103, 00:55/07:36] install: dvipdfmx [27k]
                      [16/103, 00:56/07:42] install: dvips.win32 [92k]
                      [17/103, 00:57/07:40] install: dvips [57k]
                      [18/103, 00:57/07:35] install: ec [258k]
                      [19/103, 01:03/07:56] install: epstopdf-pkg [5k]
                      [20/103, 01:09/08:41] install: etex [12k]
                      [21/103, 01:11/08:55] install: etexcmds [3k]
                      [22/103, 01:15/09:25] install: etoolbox [9k]
                      [23/103, 01:15/09:24] install: euenc [4k]
                      [24/103, 01:15/09:23] install: fancyvrb [12k]
                      [25/103, 01:16/09:29] install: filehook [5k]
                      [26/103, 01:16/09:29] install: float [3k]
                      [27/103, 01:16/09:29] install: fontspec [27k]
                      [28/103, 01:16/09:26] install: framed [8k]
                      [29/103, 01:17/09:32] install: geometry [9k]
                      [30/103, 01:17/09:31] install: gettitlestring [3k]
                      [31/103, 01:17/09:31] install: glyphlist [25k]
                      [32/103, 01:18/09:35] install: graphics [15k]
                      [33/103, 01:18/09:34] install: graphics-cfg [2k]
                      [34/103, 01:18/09:34] install: graphics-def [10k]
                      [35/103, 01:18/09:32] install: grffile [4k]
                      [36/103, 01:19/09:39] install: helvetic [527k]
                      [37/103, 01:21/08:57] install: hycolor [4k]
                      [38/103, 01:22/09:03] install: hyperref [96k]
                      [39/103, 01:22/08:54] install: hyph-utf8 [16k]
                      [40/103, 01:23/08:59] install: iftex [3k]
                      [41/103, 01:31/09:51] install: inconsolata [293k]
                      [42/103, 01:34/09:40] install: infwarerr [3k]
                      [43/103, 01:35/09:46] install: intcalc [6k]
                      [44/103, 01:35/09:46] install: knuth-lib [30k]
                      [45/103, 01:36/09:49] install: kvdefinekeys [3k]
                      [46/103, 01:36/09:49] install: kvoptions [7k]
                      [47/103, 01:36/09:48] install: kvsetkeys [4k]
                      [48/103, 01:36/09:48] install: l3backend [12k]
                      [49/103, 01:37/09:52] install: l3kernel [150k]
                      [50/103, 01:37/09:38] install: l3packages [21k]
                      [51/103, 01:38/09:42] install: latex [165k]
                      [52/103, 01:39/09:33] install: latex-amsmath-dev [30k]
                      [53/103, 01:40/09:36] install: latex-bin.win32 [1k]
                      [54/103, 01:40/09:36] install: latex-bin [1k]
                      [55/103, 01:40/09:36] install: latex-fonts [18k]
                      [56/103, 01:41/09:40] install: latex-tools-dev [35k]
                      [57/103, 01:41/09:37] install: latexconfig [4k]
                      [58/103, 01:42/09:42] install: latexmk.win32 [1k]
                      [59/103, 01:42/09:42] install: latexmk [92k]
                      [60/103, 01:42/09:34] install: letltxmacro [3k]
                      [61/103, 01:43/09:39] install: lm [11665k]
                      [62/103, 02:10/04:21] install: lm-math [369k]
                      [63/103, 02:22/04:40] install: ltxcmds [5k]
                      [64/103, 02:22/04:40] install: luahbtex.win32 [1515k]
                      [65/103, 02:25/04:24] install: luahbtex [1k]
                      [66/103, 02:25/04:24] install: lualatex-math [4k]
                      [67/103, 02:26/04:26] install: lualibs [119k]
                      [68/103, 02:26/04:24] install: luaotfload.win32 [1k]
                      [69/103, 02:27/04:26] install: luaotfload [572k]
                      [70/103, 02:29/04:22] install: luatex.win32 [1780k]
                      [71/103, 02:36/04:13] install: luatex [13k]
                      [72/103, 02:37/04:14] install: mdwtools [19k]
                      [73/103, 02:37/04:14] install: metafont.win32 [142k]
                      [74/103, 02:38/04:14] install: metafont [9k]
                      [75/103, 02:39/04:16] install: mfware.win32 [58k]
                      [76/103, 02:40/04:17] install: mfware [4k]
                      [77/103, 02:42/04:20] install: modes [27k]
                      [78/103, 02:43/04:21] install: natbib [17k]
                      [79/103, 02:43/04:21] install: pdfescape [5k]
                      [80/103, 02:44/04:22] install: pdftex.win32 [693k]
                      [81/103, 02:46/04:18] install: pdftex [37k]
                      [82/103, 02:47/04:19] install: pdftexcmds [7k]
                      [83/103, 02:47/04:19] install: plain [70k]
                      [84/103, 02:48/04:20] install: refcount [3k]
                      [85/103, 02:48/04:20] install: rerunfilecheck [4k]
                      [86/103, 02:48/04:20] install: stringenc [23k]
                      [87/103, 02:49/04:21] install: tex.win32 [130k]
                      [88/103, 02:50/04:21] install: tex [1k]
                      [89/103, 02:51/04:22] install: tex-ini-files [4k]
                      [90/103, 02:51/04:22] install: times [281k]
                      [91/103, 02:54/04:24] install: tipa [2809k]
                      [92/103, 03:12/04:21] install: tools [41k]
                      [93/103, 03:14/04:23] install: unicode-data [285k]
                      [94/103, 03:23/04:32] install: unicode-math [42k]
                      [95/103, 03:26/04:36] install: uniquecounter [3k]
                      [96/103, 03:26/04:36] install: url [6k]
                      [97/103, 03:26/04:36] install: xcolor [17k]
                      TLUtils::check_file: checksums differ for C:\Users\cxy\AppData\Local\Temp\bRFUs2ZeiL\rQ1LvcP4Oh/xetex.win32.tar.xz:
                      TLUtils::check_file: tlchecksum=0d48d24beac4105c288a564e54e9e55a3ad0252178c6171ce1db1be889aed96de1892da7933f2de66531609b66aaea36bcd7698d00a3a0a18980d87dd8addf08, arg=bd474df98c6b11e7e8c04ba93dcdec91d0cbf6e56495aa7e3fa950a7d26c8ccb8ea287bcd34e1721b1d6a33f95c786ff94fb135da5d08481478029d8c8c87f17
                      TLUtils::check_file: removing C:\Users\cxy\AppData\Local\Temp\bRFUs2ZeiL\rQ1LvcP4Oh/xetex.win32.tar.xz, but saving copy in C:\Users\cxy\AppData\Local\Temp\6KZiVBDa7v
                      TLPDB::_install_package: downloading did not succeed (check_file_and_remove failed)
                      [98/103, 03:27/04:37] install: xetex.win32 [9216k]
                      [99/103, 05:18/05:18] install: xetex [7k]
                      复制了 3 个文件
                      复制了 1 个文件
                      Running fc-cache -v -r
                      [100/103, 06:32/06:32] install: xetexconfig [1k]
                      [101/103, 06:33/06:33] install: xkeyval [13k]
                      [102/103, 06:34/06:34] install: xunicode [26k]
                      [103/103, 07:04/07:04] install: zapfding [46k]
                      running mktexlsr ...
                      done running mktexlsr.
                      running updmap-sys ...
                      done running updmap-sys.
                      regenerating fmtutil.cnf in C:/Users/cxy/AppData/Roaming/TinyTeX/texmf-dist
                      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 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 --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 xetex ...
                      done running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --no-error-if-no-format --byengine xetex.
                      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 --byfmt mf ...
                      done running fmtutil-sys --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --byfmt mf.
                      tlmgr.pl: package log updated: C:/Users/cxy/AppData/Roaming/TinyTeX/texmf-var/web2c/tlmgr.log
                      Use of uninitialized value in bitwise or (|) at C:\Users\cxy\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl line 1497.
                      Please quit and reopen your R session and IDE (if you are using one, such as RStudio or Emacs) and check if tinytex:::is_tinytex() is TRUE.

                      系统环境

                      R version 3.6.3 (2020-02-29)
                      Platform: i386-w64-mingw32/i386 (32-bit)
                      Running under: Windows 7 (build 7601) Service Pack 1
                      
                      Matrix products: default
                      
                      locale:
                      [1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936 
                      [2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936   
                      [3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936
                      [4] LC_NUMERIC=C                                                   
                      [5] LC_TIME=Chinese (Simplified)_People's Republic of China.936    
                      
                      attached base packages:
                      [1] stats     graphics  grDevices utils     datasets  methods   base     
                      
                      loaded via a namespace (and not attached):
                      [1] compiler_3.6.3 tools_3.6.3    yaml_2.2.1     tinytex_0.23   xfun_0.14 

                      yihui tinytex::install_tinytex()函数是否可以增加一个参数,让用户可以设置国内镜像,比如我想从清华大学的镜像下载,那么我希望命令是如下这般:

                      tinytex::install_tinytex(repos = "https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet")

                        chuxinyuan 你这自己不就把答案写出来了吗?就差真的运行了。repos 参数全名 repository,参见帮助文档 ?tinytex::install_tinytex

                        chuxinyuan 多谢测试!我再等一下 Year 的测试结果。

                          yihui 所有的安排都很舒心啊!参数没写全,用repos竟然也能运行,赞!

                            chuxinyuan R 的函数参数名不用写全,R 会采用部分匹配的方式传递参数,只要你写出来的部分字符串足够匹配该函数的唯一参数,那么R 就会把值传递给那个参数。