-
Notifications
You must be signed in to change notification settings - Fork 8.2k
如何使用Latex相关插件(arxiv文章翻译)
binary-husky edited this page Jan 21, 2025
·
16 revisions
- 使用方法一(见README.md),安装本项目
- 安装Texlive
- 确保pdflatex在PATH环境变量中(一般会第2步自动完成)
- 确保系统中安装了宋体、黑体、楷体等中文字体
- 使用docker-compose.yml中的 “方案0” 或者 “方案4” 运行本项目
- 使用任意方法安装本项目
- 安装Texlive
- 确保pdflatex在PATH环境变量中(一般会第2步自动完成)
- 请想办法合法获取以下字体,并复制到Latex的字体目录
/usr/local/texlive/2023/texmf-dist/fonts/truetype
MSYHBD.TTC SIMLI.TTF msyh.ttc simfang.ttf simkai.ttf SIMYOU.TTF msyhbd.ttc simhei.ttf simsun.ttc
- 使用
texhash
命令刷新字体,使第4步生效 - 【使用xelatex请执行】使用
ln -s /usr/local/texlive/2023/texmf-dist/fonts/truetype /usr/share/fonts/truetype/texlive
复制一份字体到/usr/share/fonts/truetype
- 【使用xelatex请执行】使用
fc-cache -fv
命令刷新字体,使第4步生效
如果使用docker安装,且希望使用主机的Latex程序,请对额外LaTex目录进行正确映射,以no_local的docker-compose.yml为例
version: '3' services: gpt_academic_nolocalllms: image: ghcr.io/binary-husky/gpt_academic_nolocal:master # (Auto Built by Dockerfile: docs/GithubAction+NoLocal) volumes: # 你的LaTex版本路径,以2023版为例 - /usr/local/texlive/2023/:/usr/local/texlive/2023/ environment: ############################## # # # 其他配置内容 # # # ############################## PATH: '/usr/local/texlive/2023/bin/x86_64-linux:$PATH' # LaTex的PATH环境变量 # 与宿主的网络融合 network_mode: "host" # 不使用代理网络拉取最新代码 command: > bash -c "python3 -u main.py"