Skip to content

TJ-CSCCG/TongjiThesis-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TongjiThesis-env

test GHCR TongjiThesis

中文 | English

TongjiThesis 提供开箱即用的 Docker 编译环境,基于 texlive/texlive,内含论文编译所需的全部 TeX Live 宏包和 Pygments,支持 XeLaTeX 和 LuaLaTeX。

快速开始

1. 克隆论文仓库

前往 TongjiThesis,点击 Use this template 创建你的论文仓库并克隆到本地。

2. 启动编译环境

git clone https://github.com/TJ-CSCCG/TongjiThesis-env
cd TongjiThesis-env
source envsetup.sh
docker compose up -d

3. 编译论文

cd /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 磁盘空间

English

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.

Quick Start

1. Clone Your Thesis Repository

Go to TongjiThesis, click Use this template to create your thesis repo and clone it.

2. Start the Environment

git clone https://github.com/TJ-CSCCG/TongjiThesis-env
cd TongjiThesis-env
source envsetup.sh
docker compose up -d

3. Compile

cd /path/to/your-thesis-repo
compile

main.pdf is automatically copied to your current directory.

Commands

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.

Build Locally

Instead of the pre-built image:

docker build -t tongjithesis-env .
docker run -itd --name tongjithesis-env tongjithesis-env

Requirements

  • Docker (with Compose V2)
  • ~2.5 GB disk space

About

🐳 TongjiThesis Docker 环境 | Docker environment for TongjiThesis (Tongji University thesis LaTeX template)

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors