中文 | English
为 TongjiThesis 提供开箱即用的 Docker 编译环境,基于 texlive/texlive,内含论文编译所需的全部 TeX Live 宏包和 Pygments,支持 XeLaTeX 和 LuaLaTeX。
前往 TongjiThesis,点击 Use this template 创建你的论文仓库并克隆到本地。
git clone https://github.com/TJ-CSCCG/TongjiThesis-env
cd TongjiThesis-env
source envsetup.sh
docker compose up -dcd /path/to/your-thesis-repo
compile编译完成后,main.pdf 将自动复制到当前目录。
执行 source envsetup.sh 后:
| 命令 | 说明 |
|---|---|
compile |
编译当前目录的论文,输出 main.pdf |
tlmgr-install <pkg> |
在容器中安装额外宏包 |
Note
compile 默认使用 XeLaTeX。如需 LuaLaTeX,进入容器执行 latexmk -lualatex。
命令内部使用 sudo docker,如需免 sudo 请将用户加入 docker 组。
不使用预构建镜像时,可本地构建:
docker build -t tongjithesis-env .
docker run -itd --name tongjithesis-env tongjithesis-env- Docker(含 Compose V2)
- 约 2.5 GB 磁盘空间
A ready-to-use Docker environment for compiling TongjiThesis, based on texlive/texlive with all required TeX Live packages and Pygments pre-installed. Supports XeLaTeX and LuaLaTeX.
Go to TongjiThesis, click Use this template to create your thesis repo and clone it.
git clone https://github.com/TJ-CSCCG/TongjiThesis-env
cd TongjiThesis-env
source envsetup.sh
docker compose up -dcd /path/to/your-thesis-repo
compilemain.pdf is automatically copied to your current directory.
After source envsetup.sh:
| Command | Description |
|---|---|
compile |
Compile the thesis in current directory, output main.pdf |
tlmgr-install <pkg> |
Install additional TeX Live packages in the container |
Note
compile uses XeLaTeX by default. For LuaLaTeX, enter the container and run latexmk -lualatex.
Commands use sudo docker internally. Add your user to the docker group to avoid sudo.
Instead of the pre-built image:
docker build -t tongjithesis-env .
docker run -itd --name tongjithesis-env tongjithesis-env- Docker (with Compose V2)
- ~2.5 GB disk space