Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: instructions for specifying Python path manually #30

Merged
merged 1 commit into from
May 18, 2023

Conversation

watermellye
Copy link
Contributor

对该 PR 的总结

  • main.tex和README中添加了(Windows下)关于如何手动指定 Python 的路径的说明。
  • 将标题使用 pip 安装 pygmentize中的pygmentize改为pygments。因为安装Pygments库后,在python中的依赖方式为import pygmentspygmentize是安装该库过程中产生的可执行文件,在用户使用本项目时并不会显式地出现此词(除log文件外)。

@skyleaworlder
Copy link
Member

skyleaworlder commented May 18, 2023

对本 PR 没有意见。(由于目前仓库维护工作移交给 @tobiasforest 了,所以我只 approve 提供参考,合入需要 @tobiasforest 的同意)

但正如 #26 讨论的,我们以后是否需要把 pygments 相关的说明放到 wiki 中?个人感觉 README 中提供 python 相关的环境配置过于冗余了。

@watermellye
Copy link
Contributor Author

watermellye commented May 18, 2023

我认为暂时不需要建立wiki,而是对Readme中[使用方法]这个模块的标题结构进行整体修改。在提高Readme质量的同时便可解决这个问题。

当前结构:

使用方法

1. 通过 Overleaf 模板直接使用

2. 在 Overleaf 上导入本仓库

3. 在 Mac / Linux 上使用

i. 安装 Python

ii. 使用 pip 安装 pygmentize

iii. 使用 tlmgr

iv. 通过 Makefile 构建项目

4. 在 Windows 上使用

i. 安装 Python

ii. 使用 pip 安装 pygments

iii. 安装 TeXLive

iv. 通过 Batchfile 构建项目

5. 在 VSCode 上使用

i. 配置 VSCode

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

6. 在 GitHub Actions 中编译

7. 在 Docker 中使用

我建议的修改后的结构:

使用方法

在线使用

通过 Overleaf 模板直接使用

Overleaf 上导入本仓库

本地使用

若希望在Docker中使用,详见 tongji-undergrad-thesis-env

安装Latex

在 Mac / Linux 上安装 tlmgr
在 Windows 上安装 TeXLive

构建项目

通过 Makefile 或 Batchfile
通过 VSCode 及 LaTeX Workshop 插件

其它须知

对文档中的代码高亮支持
安装Python和Pygments
将Python加入环境变量或在main.tex指定路径
可能遇到的问题和解决方案

(贴issue链接)

在 GitHub Actions 中编译

@skyleaworlder
Copy link
Member

我认为 @watermellye 提出的 README 组织形式非常有建设性——优点在于将模板使用步骤作为线索;但缺点是使用者需要阅读并选择自己需要的步骤,相较于现在的“按照使用者所使用平台”的划分方式可能会出现一些额外的问题。

不过目前的划分方式将 VSCode 与 Windows / Linux 相提并论总归是不伦不类的。

我认为 docker 可以和 Actions 一起放在最后,毕竟是两种基本没有人用的构建方法(tut-env 镜像的下载量只有个位数,还都是我自己贡献的……)

希望能和 @watermellye@tobiasforest 有更多的相关讨论。

Copy link
Member

@RizhongLin RizhongLin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@RizhongLin
Copy link
Member

@watermellye 谢谢支持,我同意标题结构需要修改,我第一次更新 Overleaf 链接时也觉得有点奇怪。之后我会(或者其他有兴趣的同学)会完成标题重构这一工作。

@skyleaworlder 谢谢!

@RizhongLin RizhongLin merged commit b22ec01 into TJ-CSCCG:master May 18, 2023
@RizhongLin RizhongLin mentioned this pull request Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants