Ubuntu下TeX live的安裝與配置

TeX live是可以作為Tex文件生成的軟件系統(tǒng),提供了在Unix(包括LInux)環(huán)境下的完整Tex 系統(tǒng)。

由于前期我們提到了用Texshade 進(jìn)行序列的可視化,但是最近感覺那文章中僅僅介紹Texshade的使用,但沒有對TeXlive作為環(huán)境的介紹,因此今天就講講在Ubuntu下安裝TeXlive的方法并結(jié)合前面的Texshade對多重序列比對進(jìn)行可視化進(jìn)行進(jìn)一步完善。

首先是安裝軟件

參考網(wǎng)站指導(dǎo)中的描述:

http://tug.org/texlive/acquire-mirror.html

選擇清華鏡像進(jìn)行安裝:

訪問鏡像列表網(wǎng)站

選擇清華鏡像

找到后查看路徑:

https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/

對應(yīng)路徑中的文件

然后進(jìn)行下載
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software$ rsync -a --delete   rsync://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/README.md  . -v
+==================================================+
|               Tsinghua University                |
|          -= Open Source Mirror Site =-           |
+--------------------------------------------------+
|   Welcome to Tsinghua Open Source Mirror Site.   |
|                                                  |
|   This mirror is also available on HTTP.         |
|   HTTP  [https://mirrors.tuna.tsinghua.edu.cn]   |
|   RSYNC [rsync://mirrors.tuna.tsinghua.edu.cn]   |
|                                                  |
|   If you have any issues, please contact us      |
|   via GitHub @ https://github.com/tuna/issues    |
|   or IRC at #tuna on freenode                    |
|   or Fishroom at https://fishroom.tuna.moe/      |
|                                                  |
|   Supported by                                   |
|      Tsinghua Information Technology Center      |
|   Maintained by                                  |
|      Tsinghua University TUNA Association        |
|   Service Provided by                            |
|      neomirrors                                  |
|                                                  |
+==================================================+

 Note: This service is provided with a modified 
 version of rsync. For detailed information, please 
 visit: https://github.com/tuna/rsync

receiving incremental file list
README.md

sent 43 bytes  received 1,313 bytes  904.00 bytes/sec
total size is 1,222  speedup is 0.90
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software$ l
code_1.27.2-1536736588_amd64.deb  shadowsocksr-linux-client-CLI/    texlive2018.iso*
README.md                         sogoupinyin_2.2.0.0108_amd64.deb
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software$ cat README.md 
TeX Live ISO Images
-------------------

This directory contains the ISO image for the official TeX Live
release; md5 and sha512 checksums are provided, and the sha checksum is
GPG-signed.  The generic names (texliveYYYY.iso and texlive.iso) are
symlinks to the dated release .iso.

The TeX Live web pages <https://tug.org/texlive/> have information on:
- other ways to acquire the distribution <https://tug.org/texlive/acquire.html>,
- quick installation <https://tug.org/texlive/quickinstall.html>,
- documentation <https://tug.org/texlive/doc.html>,
- reporting bugs and known issues <https://tug.org/texlive/bugs.html>,
and more.

Instead of dealing with this giant image, for typical use we recommend
the small installer package(s)
<https://tug.org/texlive/acquire-netinstall.html> available from
CTAN <https://ctan.org/>).

If you have problems with installation or running TeX after
installation, please check your environment variables: settings,
including your PATH, that end up referencing previously-installed TeX
systems (TeX Live or otherwise), can cause trouble, especially on Windows.

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
這個是READ.md的內(nèi)容
接下來進(jìn)行下載:
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software$ rsync -a --delete   rsync://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive2018-20180414.iso . -v 
+==================================================+
|               Tsinghua University                |
|          -= Open Source Mirror Site =-           |
+--------------------------------------------------+
|   Welcome to Tsinghua Open Source Mirror Site.   |
|                                                  |
|   This mirror is also available on HTTP.         |
|   HTTP  [https://mirrors.tuna.tsinghua.edu.cn]   |
|   RSYNC [rsync://mirrors.tuna.tsinghua.edu.cn]   |
|                                                  |
|   If you have any issues, please contact us      |
|   via GitHub @ https://github.com/tuna/issues    |
|   or IRC at #tuna on freenode                    |
|   or Fishroom at https://fishroom.tuna.moe/      |
|                                                  |
|   Supported by                                   |
|      Tsinghua Information Technology Center      |
|   Maintained by                                  |
|      Tsinghua University TUNA Association        |
|   Service Provided by                            |
|      neomirrors                                  |
|                                                  |
+==================================================+

 Note: This service is provided with a modified 
 version of rsync. For detailed information, please 
 visit: https://github.com/tuna/rsync

receiving incremental file list
texlive2018-20180414.iso

sent 43 bytes  received 3,455,940,464 bytes  1,334,597.61 bytes/sec
total size is 3,455,096,832  speedup is 1.00
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software$ rsync -a --delete   rsync://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive2018-20180414.iso.md5 .+==================================================+
|               Tsinghua University                |
|          -= Open Source Mirror Site =-           |
+--------------------------------------------------+
|   Welcome to Tsinghua Open Source Mirror Site.   |
|                                                  |
|   This mirror is also available on HTTP.         |
|   HTTP  [https://mirrors.tuna.tsinghua.edu.cn]   |
|   RSYNC [rsync://mirrors.tuna.tsinghua.edu.cn]   |
|                                                  |
|   If you have any issues, please contact us      |
|   via GitHub @ https://github.com/tuna/issues    |
|   or IRC at #tuna on freenode                    |
|   or Fishroom at https://fishroom.tuna.moe/      |
|                                                  |
|   Supported by                                   |
|      Tsinghua Information Technology Center      |
|   Maintained by                                  |
|      Tsinghua University TUNA Association        |
|   Service Provided by                            |
|      neomirrors                                  |
|                                                  |
+==================================================+

 Note: This service is provided with a modified 
 version of rsync. For detailed information, please 
 visit: https://github.com/tuna/rsync

yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software$ l
code_1.27.2-1536736588_amd64.deb  sogoupinyin_2.2.0.0108_amd64.deb  texlive2018-20180414.iso.md5
README.md                         texlive/                          texlive2018.iso*
shadowsocksr-linux-client-CLI/    texlive2018-20180414.iso
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software$ rm texlive2018.iso 
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software$ mv texlive2018-20180414.iso* texlive
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software$ l
code_1.27.2-1536736588_amd64.deb  shadowsocksr-linux-client-CLI/    texlive/
README.md                         sogoupinyin_2.2.0.0108_amd64.deb
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software$ cd texlive/
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software/texlive$ md5sum texlive2018-20180414.iso
5b547f6949d9688e56b11633f55806cf  texlive2018-20180414.iso
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software/texlive$ cat texlive2018-20180414.iso.md5 
5b547f6949d9688e56b11633f55806cf  texlive2018-20180414.iso
下載后的結(jié)果,經(jīng)過md5sum進(jìn)行計算后校驗完整性。

接下來進(jìn)行安裝

yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software/texlive$ sudo mount texlive2018-20180414.iso /mnt/
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Software/texlive$ sudo perl /mnt/install-tl
#然后 進(jìn)入一個界面后 輸入 I 后回車
最后安裝完成后進(jìn)行路徑配置
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~$ echo 'export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH' >> ~/.bashrc
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~$ echo 'export MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH' >> ~/.bashrc 
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~$ echo 'export INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH' >> ~/.bashrc
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~$ tail ~/.bashrc 
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi
export https_proxy='127.0.0.1:8118'
export http_proxy='127.0.0.1:8118'
export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH
export MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH
export INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~$ source ~/.bashrc 
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~$ which pdftex 
/usr/local/texlive/2018/bin/x86_64-linux/pdftex
至此,Texlive就已經(jīng)安裝完畢了。

配置完成后的驗證

由于使用Texlive主要是用于構(gòu)建多重序列比對,我們就再次進(jìn)行一次嘗試看能不能完成以前的工作。
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Biodata/test$ ll
total 20
drwxrwxr-x 2 yeyuntian yeyuntian 4096 10月  7 23:20 ./
drwxrwxr-x 4 yeyuntian yeyuntian 4096 10月  7 21:38 ../
-rw-rw-r-- 1 yeyuntian yeyuntian  816 10月  7 23:16 latextest.tex # 這個是關(guān)于多重序列比對的標(biāo)注文件
-rw-rw-r-- 1 yeyuntian yeyuntian 1290 10月  7 21:42 maffttest.fa #這個是幾個序列的元數(shù)據(jù)
-rw-rw-r-- 1 yeyuntian yeyuntian 1584 10月  7 21:42 maffttest.fa.aln #這個是經(jīng)過mafft比對后的文件
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Biodata/test$ cat latextest.tex 
\documentclass[15pt,a3paper]{report}
\usepackage{geometry}
\geometry{a4paper,left=0.2cm,right=0.2cm,top=1.5cm,bottom=0.1cm}
\usepackage{texshade}
\begin{document}
    \begin{texshade}{/home/yeyuntian/Biodata/test/maffttest.fa.aln}
    \shadingmode{T-coffe}
    \setends{1}{0..361}
    \showruler{1}{top}
    \rulersteps{5}
    \feature{top}{1}{7..15}{helix[Red]}{Alpha-helix1}
    \feature{top}{1}{18..39}{helix[Red]}{Alpha-helix2}
    \feature{top}{1}{58..63}{helix[Red]}{Alpha-helix3}
    \feature{top}{1}{83..95}{helix[Red]}{Alpha-helix4}
    \feature{top}{1}{105..116}{helix[Red]}{Alpha-helix5}
    \feature{top}{1}{212..223}{helix[Red]}{Alpha-helix6}
    \feature{bottom}{1}{5..47}{box[LimeGreen,LimeGreen]}{B-box domain}
    \feature{bottom}{1}{53..97}{box[LimeGreen,LimeGreen]}{B-box domain}
    \showsequencelogo{top}
    \end{texshade}
\end{document}
這個里面有三個文件,其中 tex 文件可以作為后期的模版進(jìn)行使用,接下來我們進(jìn)行編譯排版
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Biodata/test$ cat latextest.tex 
\documentclass[15pt,a3paper]{report}
\usepackage{geometry}
\geometry{a4paper,left=0.2cm,right=0.2cm,top=1.5cm,bottom=0.1cm}
\usepackage{texshade}
\begin{document}
    \begin{texshade}{/home/yeyuntian/Biodata/test/maffttest.fa.aln}
    \shadingmode{T-coffe}
    \setends{1}{0..361}
    \showruler{1}{top}
    \rulersteps{5}
    \feature{top}{1}{7..15}{helix[Red]}{Alpha-helix1}
    \feature{top}{1}{18..39}{helix[Red]}{Alpha-helix2}
    \feature{top}{1}{58..63}{helix[Red]}{Alpha-helix3}
    \feature{top}{1}{83..95}{helix[Red]}{Alpha-helix4}
    \feature{top}{1}{105..116}{helix[Red]}{Alpha-helix5}
    \feature{top}{1}{212..223}{helix[Red]}{Alpha-helix6}
    \feature{bottom}{1}{5..47}{box[LimeGreen,LimeGreen]}{B-box domain}
    \feature{bottom}{1}{53..97}{box[LimeGreen,LimeGreen]}{B-box domain}
    \showsequencelogo{top}
    \end{texshade}
\end{document}
yeyuntian@yeyuntian-RESCUER-R720-15IKBN:~/Biodata/test$ ll
total 124
drwxrwxr-x 2 yeyuntian yeyuntian  4096 10月  7 23:23 ./
drwxrwxr-x 4 yeyuntian yeyuntian  4096 10月  7 21:38 ../
-rw-rw-r-- 1 yeyuntian yeyuntian   143 10月  7 23:23 latextest.aux
-rw-rw-r-- 1 yeyuntian yeyuntian 11571 10月  7 23:23 latextest.log
-rw-rw-r-- 1 yeyuntian yeyuntian 86143 10月  7 23:23 latextest.pdf
-rw-rw-r-- 1 yeyuntian yeyuntian   816 10月  7 23:16 latextest.tex
-rw-rw-r-- 1 yeyuntian yeyuntian  1290 10月  7 21:42 maffttest.fa
-rw-rw-r-- 1 yeyuntian yeyuntian  1584 10月  7 21:42 maffttest.fa.aln

最后我們需要補充一些關(guān)于 TeXlive 在VScode中搭建編寫環(huán)境

參考:

Visual Studio Code 搭建 LaTeX 編寫環(huán)境
如何在 VS Code 上編寫 LaTeX(附入門指南)

前面已經(jīng)介紹了如何安裝VScode以及TeXlive,所以在此就繼續(xù)先講如何將兩者結(jié)合起來
安裝VScode中LaTeX插件
快捷方式打開插件搜索框 (Ctrl + Shift + X )
打開插件搜索框
install安裝就好了
然后從新啟動VScode就可以看到邊框上有個標(biāo)志就可以用這個插件了。
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容