请教谢老师,运行 tinytex::install_tinytex() 报错

R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

报错如下:

tinytex::install_tinytex()
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 81 bytes
trying URL 'https://yihui.org/gh/tinytex/tools/pkgs-custom.txt'
trying URL 'https://yihui.org/gh/tinytex/tools/pkgs-custom.txt'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 81 100 81 0 0 81 0 0:00:01 0:00:01 --:--:-- 54
100 142 100 142 0 0 35 0 0:00:04 0:00:04 --:--:-- 91
curl: (6) Could not resolve host: raw.githubusercontent.com
Error in download.file(url, output, ..., method = method) :
'curl' call had nonzero exit status
In addition: Warning messages:
1: 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'
2: In download.file(url, output, ..., method = method) :
InternetOpenUrl failed: 'The server name or address could not be resolved'
3: In download.file(url, output, ..., method = method) :
InternetOpenUrl failed: 'The server name or address could not be resolved'
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.

    yanglin9909 要么有伟大的墙,要么你的网络需要代理,总之你的 R 似乎无法访问 https://raw.githubusercontent.com/yihui/tinytex/master/tools/pkgs-custom.txt 这个链接。要是你浏览器里能打开的话,那应该就是有代理了。要是浏览器里也不能打开,那就是你所在的地区墙了 github,你可以换试

    remotes::install_github('yihui/tinytex')
    tinytex:::install_prebuilt()
       tinytex:::install_prebuilt()

      报错信息如下

       trying URL 'https://ci.appveyor.com/api/projects/yihui/tinytex/artifacts/TinyTeX.zip'
      trying URL 'https://ci.appveyor.com/api/projects/yihui/tinytex/artifacts/TinyTeX.zip'
      trying URL 'https://ci.appveyor.com/api/projects/yihui/tinytex/artifacts/TinyTeX.zip'
      Error in xfun::download_file(..., quiet = Sys.getenv("APPVEYOR") != "") : 
        No download method works (auto/wininet/wget/curl/lynx)
      In addition: Warning messages:
      1: In download.file(url, output, ..., method = method) :
        cannot open URL 'https://ci.appveyor.com/api/projects/yihui/tinytex/artifacts/TinyTeX.zip': HTTP status was '400 Bad Request'
      2: In download.file(url, output, ..., method = method) :
        cannot open URL 'https://ci.appveyor.com/api/projects/yihui/tinytex/artifacts/TinyTeX.zip': HTTP status was '400 Bad Request'
      3: In download.file(url, output, ..., method = method) :
        cannot open URL 'https://ci.appveyor.com/api/projects/yihui/tinytex/artifacts/TinyTeX.zip': HTTP status was '400 Bad Request'

      这个包要是放在gitee上就好了,真的老纠结了。

        chuxinyuan

        似乎是CI的问题,上面压缩包链接打开显示 错误
        {"message":"\"job\" parameter must be specified if build contains multiple jobs.\r\nParameter name: job"}
        @yihui

        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' ”

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