Skip to content

Commit

Permalink
增加intall-TeX-Live-mini
Browse files Browse the repository at this point in the history
  • Loading branch information
nanmu42 authored Jun 20, 2016
1 parent 59394f8 commit d0ca584
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
14 changes: 14 additions & 0 deletions toolkit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# CQUThesisSupply
重庆大学LaTeX模板的支持文件,这些程序往往用于[CQUThesis](https://github.com/nanmu42/CQUThesis)的开发、测试、部署。

# TeX Live 迷你安装
运行下列命令可以完成TeX Live的迷你版本的安装。这个项目为[CQUThesis](https://github.com/nanmu42/CQUThesis)(重庆大学LaTeX模板)的Travis测试提供支持。
当然,您也可以使用下列命令完成安装。
```
curl -sSL https://github.com/nanmu42/CQUThesisSupply/raw/master/install-tl-mini.sh | sudo bash
```

# 致谢
感谢[中科大TeX用户组](https://github.com/ustctug)`TeX Live 迷你安装`的贡献。

你们让世界更加美好。
35 changes: 35 additions & 0 deletions toolkit/install-tl-mini.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

REMOTE="http://mirrors.ustc.edu.cn/CTAN/systems/texlive/tlnet"
TEXLIVE=2016
PACKAGES="zhnumber zapfding array longtable booktabs listings fancyhdr xcolor enumitem etoolbox metalogo graphicx xspace hypdoc newpxtext newpxmath geometry siunitx upgreek mhchem totcount tocloft hyperref natbib changepage afterpage footmisc varwidth subcaption tabularx multirow diagbox tabu courier pdfpages ntheorem newtxtext newtxmath pifont CJKfntef fontspec amsmath xparse environ calc ifxetexcte"
DOCPACKAGES="latexmk texdoc ctex fandol algorithm2e"
SRCPACKAGES=""

mkdir -p /tmp/install-texlive
cd /tmp/install-texlive/

curl -sSL $REMOTE/install-tl-unx.tar.gz | tar -xzv -C ./ --strip-components=1

cat << EOF > texlive.profile
selected_scheme scheme-basic
TEXMFHOME ~/.texmf
collection-basic 1
collection-genericrecommended 1
collection-latex 1
collection-latexextra 1
collection-latexrecommended 1
collection-xetex 1
option_autobackup 0
option_doc 0
option_src 0
EOF

PLATFORM=`./install-tl --print-platform`
TEXBIN="/usr/local/texlive/${TEXLIVE}/bin/${PLATFORM}"
./install-tl -profile texlive.profile -repository $REMOTE

echo 'export PATH=$PATH':$TEXBIN >> ~/.bash_profile
$TEXBIN/tlmgr install $PACKAGES
$TEXBIN/tlmgr install --with-doc $DOCPACKAGES
$TEXBIN/tlmgr install --with-doc --with-src $SRCPACKAGES

0 comments on commit d0ca584

Please sign in to comment.