足球彩票14场胜负结果:LaTeX技巧892: Ubuntu 安裝新版本TeXLive并更新

摘要: 本文比較系統地介紹了在Ubuntu下的TeXLive的安裝與配置測試過程,建議使用Ubuntu的重度LaTeX用戶可以看看該文章,另外,文章中也解決了烏班圖安裝TeXLive并更新問題。 TeXLive在CTAN最新版本下載地址
 14场胜负彩走势 www.jufkwk.com.cn https://www.tug.org/texlive/acquire-iso.html
該頁面下有texlive最新版本ISO種子問題下載鏈接。
https://www.tug.org/texlive/files/texlive2016.iso.torrent
TeXLive在國內下載源很多,現僅以清華大學和阿里云為例。
https://mirrors.tuna.tsinghua.edu.cn/#
  找到常用發行版 iso 和應用工具安裝包直接下載,點擊應用軟件,TeXLive2016下載鏈接如下
https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive2016-20160523.iso
阿里云下載鏈接:
//mirrors.aliyun.com/CTAN/systems/texlive/Images/
選擇對應版本下載即可。 下載可以使用wget下載,也可以在Windows上面將ISO文件復制到系統目錄。 下載完成就可以掛載ISO鏡像。 CTAN官方網站ISO掛載教程如下。
mount -t iso9660 -o ro,loop,noauto /yourISOFileDictory/texlive.iso /mnt
筆者掛載記錄如下:
[email protected]:~$ sudo mount -o loop texlive2016.iso /mnt/
mount: /home/dell/texlive2016.iso is already mounted
[email protected]:~$ ls /mnt/
archive      install-tl               LICENSE.CTAN  readme-html.dir    release-texlive.txt  tlpkg
autorun.inf  install-tl-advanced.bat  LICENSE.TL    readme-txt.dir     source               tl-tray-menu.exe
index.html   install-tl-windows.bat   README        README.usergroups  texlive-doc
[email protected]:~$
安裝命令
[email protected]:~$ cd /mnt/
[email protected]:/mnt$ sudo ./install-tl --gui
該命令可以在圖形化界面下安裝。 安裝過程和完成截圖如下。 安裝界面有很多安裝選項,無特殊要求直接點擊安裝texlive,等待安裝過程完成。 完成安裝后,卸載鏡像。
sudo umount /mnt
也可以將ISO解壓后復制到Linux系統。復制文件方法這里不再贅述。 增加環境變量。
# TeX Live 2016
#命令可以直接復制運行,每次運行一條命令
export TeXLiveMANPATH=/urs/local/texlive/2016/texmf-dist/doc/man
export TeXLiveINFOPATH=/usr/local/texlive/2016/texmf-dist/doc/info
#64位系統
export TeXLivePATH=/usr/local/texlive/2016/bin/x86_64-linux
具體安裝路徑請以安裝時選擇目錄為準。 本機運行結果如下:
[email protected]:~$ export TeXLiveMANPATH=/urs/local/texlive/2016/texmf-dist/doc/man
[email protected]ver:~$ export TeXLiveINFOPATH=/usr/local/texlive/2016/texmf-dist/doc/info
[email protected]:~$ export TeXLivePATH=/usr/local/texlive/2016/bin/x86_64-linux
[email protected]:~$ echo $TeXLiveMANPATH
/urs/local/texlive/2016/texmf-dist/doc/man
[email protected]:~$ echo $TeXLiveINFOPATH
/usr/local/texlive/2016/texmf-dist/doc/info
[email protected]:~$ echo $TeXLivePATH
/usr/local/texlive/2016/bin/x86_64-linux
[email protected]:~$
建議安裝前將Windows字體復制到Linux,復制字體方法和復制ISO解壓后文件方法一樣,等待字體安裝完成后再安裝texlive。 在Linux系統字體目錄下創建winfonts文件夾(可選項),前提是已復制字體到Linux主機。
#創建Windows字體文件目錄,目錄名稱可自定義
[email protected]:~$ sudo mkdir /usr/share/fonts/WindowsFonts
#查看目錄
[email protected]:~$ ls /usr/share/fonts/
cmap  opentype  truetype  type1  WindowsFonts  X11
復制字體到winfonts文件夾。
[email protected]:~$ sudo cp /home/dell/Fonts/* /usr/share/fonts/WindowsFonts/
#查看字體復制情況
[email protected]:~$ ls /usr/share/fonts/WindowsFonts/
安裝字體命令。
[email protected]:mkfontscale
[email protected]:mkfontdir
[email protected]:sudo fc-cache -fv
[email protected]:~$ sudo fc-cache -fsv
/usr/share/fonts: caching, new cache contents: 0 fonts, 6 dirs
/usr/share/fonts/WindowsFonts: caching, new cache contents: 1188 fonts, 0 dirs
/usr/share/fonts/X11: caching, new cache contents: 0 fonts, 4 dirs
/usr/share/fonts/X11/Type1: caching, new cache contents: 8 fonts, 0 dirs
/usr/share/fonts/X11/encodings: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/X11/encodings/large: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/X11/misc: caching, new cache contents: 59 fonts, 0 dirs
/usr/share/fonts/X11/util: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap: caching, new cache contents: 0 fonts, 5 dirs
/usr/share/fonts/cmap/adobe-cns1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-gb1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-japan1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-japan2: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-korea1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/opentype: caching, new cache contents: 0 fonts, 5 dirs
/usr/share/fonts/opentype/mondulkiri: caching, new cache contents: 8 fonts, 0 dirs
/usr/share/fonts/opentype/noto: caching, new cache contents: 36 fonts, 0 dirs
/usr/share/fonts/opentype/opendyslexic: caching, new cache contents: 9 fonts, 0 dirs
/usr/share/fonts/opentype/stix: caching, new cache contents: 29 fonts, 0 dirs
/usr/share/fonts/opentype/stix-word: caching, new cache contents: 5 fonts, 0 dirs
/usr/share/fonts/truetype: caching, new cache contents: 2 fonts, 38 dirs
/usr/share/fonts/truetype/abyssinica: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/ancient-scripts: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/arphic: caching, new cache contents: 8 fonts, 0 dirs
/usr/share/fonts/truetype/capture-it-elementary: caching, new cache contents: 2 fonts, 0 dirs
/usr/share/fonts/truetype/croscore: caching, new cache contents: 12 fonts, 0 dirs
/usr/share/fonts/truetype/daniel-elementary: caching, new cache contents: 3 fonts, 0 dirs
/usr/share/fonts/truetype/dejavu: caching, new cache contents: 21 fonts, 0 dirs
/usr/share/fonts/truetype/fonts-guru-extra: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/freefont: caching, new cache contents: 12 fonts, 0 dirs
/usr/share/fonts/truetype/hvd-bodedo-elementary: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/jenna-sue-elementary: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/kacst: caching, new cache contents: 15 fonts, 0 dirs
/usr/share/fonts/truetype/kacst-one: caching, new cache contents: 2 fonts, 0 dirs
/usr/share/fonts/truetype/lao: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lato: caching, new cache contents: 18 fonts, 0 dirs
/usr/share/fonts/truetype/liberation: caching, new cache contents: 16 fonts, 0 dirs
/usr/share/fonts/truetype/limelight-elementary: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lobster-elementary: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-punjabi: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/nanum: caching, new cache contents: 8 fonts, 0 dirs
/usr/share/fonts/truetype/noto: caching, new cache contents: 175 fonts, 0 dirs
/usr/share/fonts/truetype/open-sans-elementary: caching, new cache contents: 10 fonts, 0 dirs
/usr/share/fonts/truetype/openoffice: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/operating-instructions-elementary: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/padauk: caching, new cache contents: 4 fonts, 0 dirs
/usr/share/fonts/truetype/plainblack-elementary: caching, new cache contents: 6 fonts, 0 dirs
/usr/share/fonts/truetype/raleway-elementary: caching, new cache contents: 9 fonts, 0 dirs
/usr/share/fonts/truetype/redacted-elementary: caching, new cache contents: 3 fonts, 0 dirs
/usr/share/fonts/truetype/roboto: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/truetype/roboto/hinted: caching, new cache contents: 18 fonts, 0 dirs
/usr/share/fonts/truetype/roboto-mono-elementary: caching, new cache contents: 10 fonts, 0 dirs
/usr/share/fonts/truetype/sinhala: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/takao-gothic: caching, new cache contents: 3 fonts, 0 dirs
/usr/share/fonts/truetype/takao-mincho: caching, new cache contents: 3 fonts, 0 dirs
/usr/share/fonts/truetype/tibetan-machine: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/tlwg: caching, new cache contents: 58 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-khmeros-core: caching, new cache contents: 2 fonts, 0 dirs
/usr/share/fonts/truetype/ubuntu-font-family: caching, new cache contents: 13 fonts, 0 dirs
/usr/share/fonts/truetype/unfonts-core: caching, new cache contents: 12 fonts, 0 dirs
/usr/share/fonts/type1: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/type1/gsfonts: caching, new cache contents: 35 fonts, 0 dirs
/usr/local/share/fonts: caching, new cache contents: 0 fonts, 0 dirs
Re-scanning /usr/share/fonts: caching, new cache contents: 0 fonts, 6 dirs
Re-scanning /usr/share/fonts/X11: caching, new cache contents: 0 fonts, 4 dirs
Re-scanning /usr/share/fonts/X11/encodings: caching, new cache contents: 0 fonts, 1 dirs
Re-scanning /usr/share/fonts/cmap: caching, new cache contents: 0 fonts, 5 dirs
Re-scanning /usr/share/fonts/opentype: caching, new cache contents: 0 fonts, 5 dirs
Re-scanning /usr/share/fonts/truetype: caching, new cache contents: 2 fonts, 38 dirs
Re-scanning /usr/share/fonts/truetype/roboto: caching, new cache contents: 0 fonts, 1 dirs
Re-scanning /usr/share/fonts/type1: caching, new cache contents: 0 fonts, 1 dirs
/var/cache/fontconfig: cleaning cache directory
fc-cache: succeeded
[email protected]:~$
  Ubuntu網絡安裝TeXLive比較簡單,只需要執行一條命令并等待安裝完成。 首先要安裝基礎依賴軟件。
sudo apt-get install libdigest-perl-md5-perl perl-tk
sudo apt install texlive-full
但該方法安裝存在一個弊端,即不能更新宏包(包括所有Debian和Ubuntu發行版本)。 當我們執行命令
tlmgr update -all
我們可以使用 時會有報錯。報錯信息如下:
[email protected]:~$ tlmgr update --all
(running on Debian, switching to user mode!)
cannot setup TLPDB in /home/jiangjuan/texmf at /usr/bin/tlmgr line 5604.
其他tlmgr命令也無效。所以我們需要其他方法安裝TeXLive。下文將加以介紹。 所有宏包均是打包時老版本,部分軟件包會在Ubuntu 安裝源發布后更新,本方法可以解決安裝源太舊問題。 首先,執行命令:
sudo apt install git
安裝git客戶端,克隆代碼到本地。git完成后如下圖。 install-tl-ubuntuGitHub地址。 https://github.com/scottkosty/install-tl-ubuntu . 下面是重要環節,git 同步 install-tl-ubuntu代碼,并安裝。代碼如下:
git clone https://github.com/scottkosty/install-tl-ubuntu.git

cd cd install-tl-ubuntu

chmod +x ./install-tl-ubuntu

sudo ./install-tl-ubuntu
等待程序自動選擇安裝源并自動安裝,大功告成。 提示:該方法需要全網絡極為穩定,否則可能會出現斷線重新安裝。 安裝完成后,檢查安裝情況,可以執行命令。
xelatex -version
程序安裝完成后,開始菜單會增加一個選項--TeXLive Package Manager,通過該軟件可以完成宏包更新和管理等操作。 圖片是在Windows 環境下面執行結果,可能與Ubuntu執行結果略有差異。 示例代碼如下,
\documentclass{book}
\usepackage{amsmath}
\usepackage{ctex}
%\usepackage{ctex}%(PDF)LaTeX編譯方式請選擇此行,注釋上一行代碼
\begin{document}
你好,中國。

勾股定律
$$a^2+b^2=c^2$$

Happy TeXing.
\end{document}
將代碼保存至/home/dell/文檔/tex/Hello目錄下,該目錄是筆者電腦目錄,可根據實際情況選擇保存目錄。
/home/dell/文檔/tex/Hello/hello.tex
編譯文件,
#切換到tex源文件目錄
cd /home/dell/文檔/Hello/
#xelatex命令編譯文件,可選其他選項
xelatex hello.tex
等待編譯完成。 選自:https://my.oschina.net/u/1011130/blog/787473
分享到:
未經允許不得轉載:LaTeX技巧892: Ubuntu 安裝新版本TeXLive并更新
已有 條意見

    最新文章

    加載中...
      本站提供專業LaTeX排版、咨詢、定制服務,請點擊下圖咨詢詳情


      全國首個精品的LaTeX視頻教程,大牛帶著你入門,讓LaTeX學習不再糾結,請點擊下圖咨詢詳情

      熱門評論

        聯系我們

        交流QQ群:91940767
        本站QQ號:343083553
        郵箱聯系[email protected]
        淘寶店鋪latexstudio.taobao.com 提供排版,模板定制,培訓,圖片處理,視頻教程等LaTeX服務。


        如果您投稿或者希望加入我們團隊,請發送您的簡歷到[email protected]。

        科技藝術的完美融合,專業精致的排版體驗

        聯系我們聯系我們