第 8 章 命令行

8.2 tlmgr

LaTeX 包管理器说的其实是 tlmgr (TeXLive Manager)

base::system('tlmgr info --list --only-installed --data name,size', intern = TRUE)
#>   [1] "alegreya,52436992"                
#>   [2] "amscls,323584"                    
#>   [3] "amsfonts,7696384"                 
#>   [4] "amsmath,196608"                   
#>   [5] "babel,3399680"                    
#>   [6] "bibtex,208896"                    
#>   [7] "bibtex.x86_64-linux,172032"       
#>   [8] "booktabs,8192"                    
#>   [9] "caption,225280"                   
#>  [10] "changepage,16384"                 
#>  [11] "cm,1392640"                       
#>  [12] "colortbl,12288"                   
#>  [13] "ctex,778240"                      
#>  [14] "dehyph,233472"                    
#>  [15] "dvipdfmx,163840"                  
#>  [16] "dvipdfmx.x86_64-linux,1011712"    
#>  [17] "dvipng,0"                         
#>  [18] "dvipng.x86_64-linux,1077248"      
#>  [19] "dvips,380928"                     
#>  [20] "dvips.x86_64-linux,376832"        
#>  [21] "dvisvgm,0"                        
#>  [22] "dvisvgm.x86_64-linux,5550080"     
#>  [23] "ec,5918720"                       
#>  [24] "environ,8192"                     
#>  [25] "etex,45056"                       
#>  [26] "etoolbox,53248"                   
#>  [27] "euenc,57344"                      
#>  [28] "fancyvrb,69632"                   
#>  [29] "fandol,34922496"                  
#>  [30] "filehook,40960"                   
#>  [31] "float,8192"                       
#>  [32] "fontspec,327680"                  
#>  [33] "framed,24576"                     
#>  [34] "geometry,45056"                   
#>  [35] "glyphlist,98304"                  
#>  [36] "graphics,126976"                  
#>  [37] "graphics-cfg,8192"                
#>  [38] "graphics-def,86016"               
#>  [39] "gsftopk,8192"                     
#>  [40] "gsftopk.x86_64-linux,94208"       
#>  [41] "helvetic,2433024"                 
#>  [42] "hyperref,962560"                  
#>  [43] "hyphen-base,98304"                
#>  [44] "ifluatex,8192"                    
#>  [45] "ifmtarg,4096"                     
#>  [46] "iftex,4096"                       
#>  [47] "ifxetex,4096"                     
#>  [48] "inconsolata,1228800"              
#>  [49] "jknapltx,77824"                   
#>  [50] "knuth-lib,192512"                 
#>  [51] "kpathsea,212992"                  
#>  [52] "kpathsea.x86_64-linux,163840"     
#>  [53] "l3backend,139264"                 
#>  [54] "l3kernel,1216512"                 
#>  [55] "l3packages,159744"                
#>  [56] "latex,1691648"                    
#>  [57] "latex-base-dev,1744896"           
#>  [58] "latex-bin,0"                      
#>  [59] "latex-bin.x86_64-linux,16384"     
#>  [60] "latex-fonts,249856"               
#>  [61] "latexconfig,32768"                
#>  [62] "latexmk,405504"                   
#>  [63] "latexmk.x86_64-linux,4096"        
#>  [64] "lm,43601920"                      
#>  [65] "lm-math,737280"                   
#>  [66] "lualibs,757760"                   
#>  [67] "luaotfload,7344128"               
#>  [68] "luaotfload.x86_64-linux,4096"     
#>  [69] "luatex,151552"                    
#>  [70] "luatex.x86_64-linux,13287424"     
#>  [71] "makeindex,36864"                  
#>  [72] "makeindex.x86_64-linux,151552"    
#>  [73] "mathpazo,167936"                  
#>  [74] "mathspec,45056"                   
#>  [75] "mdwtools,126976"                  
#>  [76] "metafont,147456"                  
#>  [77] "metafont.x86_64-linux,696320"     
#>  [78] "mfware,16384"                     
#>  [79] "mfware.x86_64-linux,593920"       
#>  [80] "microtype,430080"                 
#>  [81] "ms,36864"                         
#>  [82] "natbib,135168"                    
#>  [83] "ncntrsbk,1249280"                 
#>  [84] "oberdiek,2871296"                 
#>  [85] "paralist,16384"                   
#>  [86] "parskip,12288"                    
#>  [87] "pdfcrop,40960"                    
#>  [88] "pdfcrop.x86_64-linux,8192"        
#>  [89] "pdftex,266240"                    
#>  [90] "pdftex.x86_64-linux,2232320"      
#>  [91] "pgf,6115328"                      
#>  [92] "placeins,4096"                    
#>  [93] "plain,1376256"                    
#>  [94] "preview,57344"                    
#>  [95] "psnfss,450560"                    
#>  [96] "rsfs,143360"                      
#>  [97] "sauerj,32768"                     
#>  [98] "scheme-infraonly,0"               
#>  [99] "setspace,24576"                   
#> [100] "sourcecodepro,7794688"            
#> [101] "subfig,32768"                     
#> [102] "tetex,520192"                     
#> [103] "tetex.x86_64-linux,77824"         
#> [104] "tex,0"                            
#> [105] "tex-ini-files,32768"              
#> [106] "tex.x86_64-linux,389120"          
#> [107] "tex4ht,37040128"                  
#> [108] "tex4ht.x86_64-linux,299008"       
#> [109] "texlive.infra,1036288"            
#> [110] "texlive.infra.x86_64-linux,344064"
#> [111] "times,1372160"                    
#> [112] "tipa,4489216"                     
#> [113] "titling,8192"                     
#> [114] "tocbibind,12288"                  
#> [115] "tocloft,36864"                    
#> [116] "tools,364544"                     
#> [117] "trimspaces,4096"                  
#> [118] "ttfutils,897024"                  
#> [119] "ttfutils.x86_64-linux,1773568"    
#> [120] "tufte-latex,110592"               
#> [121] "type1cm,8192"                     
#> [122] "ucs,2883584"                      
#> [123] "ulem,24576"                       
#> [124] "unicode-data,2691072"             
#> [125] "units,8192"                       
#> [126] "upquote,4096"                     
#> [127] "url,16384"                        
#> [128] "xcolor,81920"                     
#> [129] "xecjk,532480"                     
#> [130] "xetex,24576"                      
#> [131] "xetex.x86_64-linux,26554368"      
#> [132] "xetexconfig,4096"                 
#> [133] "xifthen,8192"                     
#> [134] "xkeyval,114688"                   
#> [135] "xunicode,208896"                  
#> [136] "zapfding,98304"                   
#> [137] "zhnumber,57344"
# or tinytex::tlmgr(c("info", "--list", "--only-installed", "--data", "name,size"))

tlmgr 管理器手册

  1. 安装和更新

  2. 搜索

    参数 \*what\* 是正则表达式

    这样,我们就可以知道要使用 \usepackage{tikz} 就得先安装 pgf 包,此外,管道命令也是支持的

    查询 CTAN 仓库列表

8.4 复制文件

复制到当前文件夹下

Linux 命令行工具是非常强大的12

  1. 查看文件

    列出目录下所有文件

    一行显示一个文件或文件夹

    按从 aA-zZ 的顺序列出所有文件以及所属权限

    相比于 ls -l 文件是逆序排列

    列出文件或文件夹(不包含子文件夹)的大小

    列出当前目录本身,而不是其所包含的内容

  2. 创建文件(夹)

    创建文件用 touchtouch .Rprofile

  3. 移动文件

    在当前目录下

    同一目录下有两个文件 R-3.5.1.tar.gz 未下载完整 和 R-3.5.1.tar.gz.1 完全下载

  4. 查看文件大小

    当前目录下各文件夹的大小, -h 表示人类可读的方式显示,如 Kb、Mb、Gb,-d 表示目录深度 du --human-readable --max-depth=1 ./