如何创建一个个人网站,在哪里建设网站,源代码,南京房地产网站建设一般大伙使用 LaTeX 大体有两种方案#xff0c;
一种是在本地配置环境或使用本地的软件#xff0c;如 vscode LaTeX#xff0c;texlive#xff0c;lyx 等等#xff1b;
另一种是线上 LaTeX 平台#xff0c;其中用的最多的是 Overleaf#xff0c;还有一部分高校也有自…一般大伙使用 LaTeX 大体有两种方案
一种是在本地配置环境或使用本地的软件如 vscode LaTeXtexlivelyx 等等
另一种是线上 LaTeX 平台其中用的最多的是 Overleaf还有一部分高校也有自己的 Overleaf 平台比如北大以前有一个 latex.pku。
各种方案各有各的优势和劣势本地配置往往要求用户对 LaTeX 各种配置了如指掌如果用户本身是个 LaTeX 相关技术爱好者本地编译就是最完美的而不太擅长此道的朋友要么就下个软件经常是破解版要么就得求助于线上平台。 众所周知年纪越大了越喜欢各种事情、任务执行时all in one
参考我之前的博客codingdebugLLM QAAI editing最好是all in one所以我选了vscodeclinecopilot
同样的平时写科研周报、提交小论文写小报告等展示成果上无非是markdown以及latex两种格式 本文主要讲latex 一overleaf等线上latex编辑平台 https://www.overleaf.com/project/
优点是模板多多比如说我随便找一个中文的 只需要在规定latex格式下变换填充内容字符即可简便省力
缺点就是保存不方便编译麻烦以及不是all in one平台等非常受限
类似的网页在线latex编辑平台有很多基本上都和overleaf差不多
二vscode本地部署
本教程将介绍如何在 VSCode 中配置 LaTeX 环境以便于在 VSCode 中进行 LaTeX 的编写和预览打造一个舒适便捷的 LaTeX 编写环境
1TeX Live 安装 使用清华源
https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/
curl -O -s https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive.iso静默模式直接用下载文件名命名输出文件名字省去传递参数麻烦
当然iso盘需要GUI操作在linux上
个人还是偏向于使用apt install
sudo apt install texlive-fullsudo apt install texlivehttps://tex.stackexchange.com/questions/134365/installation-of-texlive-full-on-ubuntu-12-04
至于是否要安装full等全部的package看自己需求定
最终决定如果麻烦各种依赖的包可以full 2LaTeX Workshop 配置
1vscode中latex插件安装
等插件
然后就是配置vscode本地的settings
latex-workshop.hover.preview.mathjax.extensions: [boldsymbol
],
latex-workshop.intellisense.package.enabled: true,
latex-workshop.latex.outDir: ./tmp,
latex-workshop.latex.recipe.default: lastUsed,
latex-workshop.mathpreviewpanel.cursor.enabled: true,
latex-workshop.message.error.show: false,
latex-workshop.message.warning.show: false,
latex-workshop.view.pdf.invert: 1,
latex-workshop.view.pdf.invertMode.enabled: auto,实际上就是
// 鼠标悬停预览公式时支持 boldsymbol 宏
latex-workshop.hover.preview.mathjax.extensions: [boldsymbol
],
// 是否启用 IntelliSense自动补全引用的包中的环境和命令
latex-workshop.intellisense.package.enabled: true,
// 编译后的文件输出目录
latex-workshop.latex.outDir: ./tmp,
// 默认编译引擎为上次使用的
latex-workshop.latex.recipe.default: lastUsed,
// 预览复杂公式使用时需要通过 command palette (命令面板) 打开
latex-workshop.mathpreviewpanel.cursor.enabled: true,
// 不允许弹窗显示错误信息
latex-workshop.message.error.show: false,
// 不允许弹窗显示警告信息
latex-workshop.message.warning.show: false,
// 预览 PDF 时反转颜色
latex-workshop.view.pdf.invert: 1,
// 预览 PDF 时自动检测是否需要反转颜色
latex-workshop.view.pdf.invertMode.enabled: auto,或 注意在前面head头部复制粘贴进去不要在tail尾部 参考部分这里需要修改否则我其他coding部分的pdf文件都是灰色的
如果比较熟悉 VSCode可以点击左下角的齿轮按钮选择 Command Palette (命令面板)在命令面板中搜索 settings打开 settings.json 文件直接复制粘贴上面的代码从而快速修改配置。
2编译工具链配置
latex-workshop.latex.recipes: [{name: XeLaTeX,tools: [xelatexmk]},{name: PdfLaTeX,tools: [pdflatexmk]}
],
latex-workshop.latex.tools: [{args: [-synctex1,-pdfxe,-interactionnonstopmode,-file-line-error,-outdir%OUTDIR%,%DOC%],command: latexmk,env: {},name: xelatexmk},{args: [-synctex1,-pdf,-interactionnonstopmode,-file-line-error,-outdir%OUTDIR%,%DOC%],command: latexmk,env: {},name: pdflatexmk}
],3实际编写latex 从overleaf上随便找一个latex模板 参考 https://github.com/shinyypig/latex-vscode-config
texlive在linux上可以参考 https://akshatshah21.github.io/tex-install-linux/
https://tug.org/texlive/quickinstall.html
https://www.tug.org/texlive/doc/texlive-zh-cn/texlive-zh-cn.pdf
https://latex.lierhua.top/zh/docs/TeXLive-%E7%9A%84%E5%AE%89%E8%A3%85/