Giter Site home page Giter Site logo

tj-csccg / tongji-undergrad-thesis Goto Github PK

View Code? Open in Web Editor NEW
164.0 3.0 19.0 50.56 MB

:page_facing_up: 同济大学本科生毕业设计论文模板 | Tongji University Undergraduate Thesis Template | Overleaf / Mac / Linux / Windows / Workshop / Docker

Home Page: https://tj-csccg.github.io/tongji-undergrad-thesis/

License: LaTeX Project Public License v1.3c

TeX 95.00% Makefile 1.81% Batchfile 2.90% Perl 0.30%
latex-template thesis latex tongji docker latex-workshop linux macos overleaf windows

tongji-undergrad-thesis's Introduction

📄 同济大学本科生毕业设计论文模板(理工类)

中文 | English

样例展示

Note

完整样例可见 模板输出样例展示(完整版)Release 页 中 "Assets" 下的 pdf 下载链接或 Overleaf 模版 PDF

以下依次展示 “封面”、“中文摘要”、“目录”、“主要内容”、“参考文献” 与 “谢辞”。

使用方法

在线使用

通过 Overleaf 模板直接使用

您可以通过以下链接访问我们的 Overleaf 模板并使用:svg of overleaf-tongjithesis

Important

在使用 Overleaf 模板时,请检查编译器和主入口的设置:

  • main.tex 文件设为主入口文件,而不是项目中的其他 .tex 文件(尤其是 tongjithesis.clstongjithesis.sty);
  • 推荐使用 XeLaTeXLuaLaTeX 编译器,本模板不支持某些编译器(如 pdfLaTeX)。

在 Overleaf 上导入本仓库

  • 通过本仓库主页项目文件列表上方的 Code | Download ZIP 下载本仓库;
  • 打开 Overleaf
  • 通过拖拽下载的 zip 文件上传至 Overleaf。

在 GitHub Actions 中编译

项目以 .github/workflows/*.yaml 配置了 GitHub Actions,push 代码到 fork 仓库或 template-generated 仓库均可触发测试。可通过 commit 对应的 workflow run 中的 Summary | Artifacts 获得多平台构建产物。

(通过勾选 Settings | Actions | General | Allow all actions and reusable workflows 打开 GitHub Actions)

本地使用

安装 $\TeX$ 发行版

我们建议参照官方快速安装指南安装 TeX Live(Windows、Linux)或 MacTeX(macOS)。

支持代码高亮

本模板通过引入 minted 宏包支持代码高亮。minted 宏包需要 Python 环境支持,因此您需要安装 Python 并使用 pip 安装 Pygments。此后,需要将装有 Pygments 的 Python 路径添加到环境变量 PATH 中,或者按照下面的说明配置,使得 $\LaTeX$ 能够正确调用 minted 宏包。

不想将此 Python 路径添加到环境变量 `PATH` 中?

可以在 main.tex 文件中添加重定向 minted 宏包的 Python 路径:

\renewcommand{\MintedPython}{/path/to/your/python}

若您不需要代码高亮,请将 minted 宏包相关内容注释掉。

构建项目

因为本模版的文件结构较为复杂,我们不推荐直接使用 TeX Live 自带的 latexmk 等命令进行编译。

我们推荐使用命令行构建项目。进一步地,我们也支持通过 VS Code 的 LaTeX Workshop 插件,在一个完整的 UI 环境中构建项目。

通过命令行
Makefile (Linux/macOS)
make all                # compile main.pdf
make ENGINE=$ENGINE all # use $ENGINE(where $ENGINE=-xelatex or -lualatex) to compile main.pdf
make clean              # rm intermediate files
make cleanall           # rm all intermediate files (including .pdf)
make wordcount          # wordcount
Batchfile (Windows)
.\make.bat                # the same to "make.bat thesis"
.\make.bat thesis         # compile main.pdf
.\make.bat thesis $ENGINE # use $ENGINE (where $ENGINE=-xelatex or -lualatex) to compile main.pdf
.\make.bat clean          # clean all work files by latexmk -c
.\make.bat cleanall       # clean all work files and main.pdf by latexmk -C
.\make.bat wordcount      # wordcount
.\make.bat help           # read the manual
通过 VS Code 及 LaTeX Workshop 插件
配置 VS Code

在 VS Code 中安装 LaTeX Workshop 插件,然后打开本项目根目录。

通过 Workshop 提供的功能编译项目

因为我们已经在 .vscode/settings.json 中配置了 LaTeX Workshop 插件,所以您只需要:

  • 选中 main.tex 文件;
  • 点击左侧边栏中带有 $\TeX$ 图标的按钮;
  • 点击 Build LaTeX project 列表中的 Recipe: latexmk (xelatex) 编译 .pdf 文件。

或者,LaTeX Workshop 插件会在您保存文件时自动编译。

在 Docker 中使用

详细使用方法见 tongji-undergrad-thesis-env

其他功能

双面打印版

如果您需要使用双面打印版,请在 main.tex 中将第 1 行的

\documentclass[oneside]{tongjithesis}

修改为

\documentclass[twoside]{tongjithesis}

即可。

渲染生僻字

由于本模版默认使用 Fandol 字体,对于姓名、专有名词等生僻字的支持可能不够完善。我们在本模版 GitHub 仓库的 fonts 分支中提供了 Adobe 字体集,您可以下载、安装这些字体,然后在 style/tongjithesis.cls 中将

\LoadClass[UTF8,a4paper,fontset=fandol]{ctexart}

修改为

\LoadClass[UTF8,a4paper,fontset=adobe]{ctexart}

这样修改后,LaTeX 将使用 Adobe 字体集来渲染文档。您可以在模板文档的 1.2.1 小节 “测试生僻字” 中查看具体效果。

Warning

将 Adobe 字体文件放置在项目根目录下并在 main.tex 中指定字体路径的方式并不总是有效。因此,我们建议您将 Adobe 字体文件安装到系统字体目录中。

经测试,在 Overleaf 项目的根目录下放置 Adobe 字体文件,并只在使用 LuaLaTeX 编译的方式是有效的,但这种方式可能会导致编译速度变慢。

如何为该项目贡献代码?

还请查看 How to pull request

开源协议

该项目使用 LPPL-1.3c 许可证

%% tongji-undergrad-thesis
%% Copyright 2023 TJ-CSCCG
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% This Current Maintainer of this work is R. Lin.
%
% This work consists of all the *.tex, *.cls, *.cfg, and *.sty files in
%   https://github.com/TJ-CSCCG/tongji-undergrad-thesis

项目历史

  • 该项目起源于 YukuanHU 的本科毕业设计论文,论文于 2019.05.24 上传;
  • 2021.05.09 起,ganler 以上述项目为基础,增强其功能(项目结构与平台适配)并开始维护新项目。
  • 2022.05.12 起,skyleaworlder 开始贡献本项目,并将其整合进 TJ-CSCCG,并持续对该项目进行更新和改进,目前已经成为一个完善的本科毕业论文模板。
  • 2023.04 起,RizhongLin 开始贡献本项目,并负责项目的维护和更新。

我们非常感谢以上贡献者的付出,他们的工作为更多同学提供了方便和帮助。

在使用本模板时,如果您觉得本项目对您的毕业设计或论文有所帮助,我们希望您可以在您的致谢部分感谢并致以敬意。

致谢

我们从顶尖高校的优秀开源项目中学到了很多:

联系方式

# Python
[
    f'jiawei#@$.edu'.replace('#', '6').replace('$', 'illinois'),
    f'jgli22@$.edu.cn'.replace('$', 'm.fudan'),
    f'rizhong.lin@$.%'.replace('$', 'epfl').replace('%', 'ch'),
]

tongji-undergrad-thesis's People

Contributors

cookiepieww avatar ganler avatar rizhonglin avatar skyleaworlder avatar strear avatar watermellye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tongji-undergrad-thesis's Issues

ROADMAP: build ci for macos / windows

新增特性类型

  • 构建相关(如需要提供新的构建方法,现有构建方式需要迭代重构等)
  • 模板功能相关(如需要模板提供其他实用功能,适配新的模板样式等)
  • 文档相关(如更好展现该模板使用方法的想法)

特性描述

维护者不太可能在每次 commit 前都进行多平台测试,希望通过 GitHub Actions 在 MacOS 与 Windows 上测试。

其他信息

不适用 xu-cheng/latex-action 或 xu-cheng/texlive-action,因为目前 Docker action 仅支持 Linux 平台。

MacOS编译错误:Package minted Error: You must have `pygmentize' installed to use this package

使用平台详情

  • 线上:Overleaf
  • 本地:MacOS
  • 本地:Windows
  • 本地:各种 Linux 发行版
  • 不,我使用的是 _________

编译日志

报错内容 [点击打开]
tongji-undergrad-thesis/main.tex:21: Package minted Error: You must have `pygmentize' installed to use this package.

文件结构

问题描述

在macos上编译发现的一个问题,参考解决方案:https://tex.stackexchange.com/questions/48018/minted-not-working-on-mac
截屏2023-04-24 17 45 57

其他信息

将ganler / overleaf_tongji_thesis迁移至TJ-CSCCG组织下

Why

  • 因为本人即将毕业,之后本模板将失去维护,故想将其挂在一个org下,寻找新的维护人员。
  • 本模板显然更适合放到有同济“商标”的组织架构下,而非个人项目;

Call for maintainer:

在拥有maintainer之前&&2021年7月前,@ganler 会在TJ-CSCCG下继续维护该项目。

Call for suggestions

@skyleaworlder
@E011011101001

所以如果你们觉得OK,就:

BUG: 摘要和目录的页码问题

使用平台详情

  • 线上:Overleaf
  • 本地:MacOS
  • 本地:Windows
  • 本地:各种 Linux 发行版
  • 不,我使用的是 _________

问题描述

使用双面打印版本时,由于 \cleardoublepage 不会停止页码的计数,因此摘要和目录下方的罗马数字页码将以 Ⅰ-Ⅲ-Ⅴ 的形式递增。

其他信息

可能的解决方案:使用 \setcounter{page} 设置正确页码。

长标题无法自动换行

使用平台详情

  • 线上:Overleaf
  • 本地:MacOS
  • 本地:Windows
  • 本地:各种 Linux 发行版
  • 不,我使用的是 _________

问题描述

论文标题和副标题比较长时,不可以自动换行

其他信息

image

CI: Windows CI not passed

使用平台详情

  • 线上:Overleaf
  • 本地:MacOS
  • 本地:Windows
  • 本地:各种 Linux 发行版
  • 不,我使用的是 _________

问题描述

目前 Windows 的 CI 在 texlive 的安装上出了些问题,进而导致 CI 无法通过。

DOCS: 建立仓库 Wiki 或文档

文档不足之处

  • 平台相关
    • 在线平台:Overleaf
    • 本地:MacOS / Windows / 各种 Linux 发行版
  • 使用过程
    • 模版编译(编译配置、依赖安装等)
    • 最佳实践(LaTeX 基础知识、模版使用教学、工作流等)
  • 不,我需要其他文档:应该将 README 中的部分内容搬迁到 Wiki 当中,或者建立独立的文档。

对文档的期望

  • 对于 Wiki,当前的 “字体” 与 “双页设置” 就比较适宜放在 Wiki 中,然后在 README 中可以直接搞个链接过去。
  • 对于独立文档,搞个 docs 文件夹或者新搞个类似 “latex-talk” 的仓库?

其他信息

ROADMAP: complete documentation / example

Now, documentation is identical to example. In sections, there is a not-so-standard undergraduate thesis written by ganler.

Complete a brand-new and excellent documentation, teach basic LaTeX writing skills and guide users to features implemented in "tongjithesis".

FEAT: 模版提供双页版本

新增特性类型

  • 构建相关(如需要提供新的构建方法,现有构建方式需要迭代重构等)
  • 模板功能相关(如需要模板提供其他实用功能,适配新的模板样式等)
  • 文档相关(如更好展现该模板使用方法的想法)

特性描述

可能有双页打印的要求。目前的装订线、页眉页脚均不符合双页装订要求。

其他信息

无。

Bug:封面编译问题

使用平台详情

  • 线上:Overleaf
  • 本地:MacOS
  • 本地:Windows
  • 本地:各种 Linux 发行版
  • 不,我使用的是 _________

问题描述

编译封面时,课题名称字数过多,超出下划线无法换行
image

Docs: a new README designed to better guide users

文档不足之处

  • 平台相关
    • 在线平台:Overleaf
    • 本地:MacOS / Windows / 各种 Linux 发行版
  • 使用过程
    • 模版编译(编译配置、依赖安装等)
    • 最佳实践(LaTeX 基础知识、模版使用教学、工作流等)
  • 不,我需要其他文档:_________

对文档的期望

可参考 #30 中提供的组织方式。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.