目录
1.论文写作
1.1 LaTeX排版
1.1.1 VSCode+LaTeX环境配置
使用VSCode编写LaTeX
2020搭建Latex环境:Texlive+VScode
使用VSCode编写LaTeX
-
安装 VSCode 上的LATEX插件
-
配置 VSCode 的LATEX插件
-
配置正向和反向搜索
安装Sumatra PDF
Viewing & SyncTeX
GitHub Issue{ "workbench.colorTheme": "Default Dark+", "security.workspace.trust.untrustedFiles": "open", "latex-workshop.latex.tools": [ { // 编译工具和命令 "name": "xelatex", "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdf", "%DOCFILE%" ] }, { "name": "pdflatex", "command": "pdflatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOCFILE%" ] }, { "name": "bibtex", "command": "bibtex", "args": [ "%DOCFILE%" ] } ], "latex-workshop.latex.recipes": [ { "name": "xelatex", "tools": [ "xelatex" ], }, { "name": "pdflatex", "tools": [ "pdflatex" ] }, { "name": "xe->bib->xe->xe", "tools": [ "xelatex", "bibtex", "xelatex", "xelatex" ] }, { "name": "pdf->bib->pdf->pdf", "tools": [ "pdflatex", "bibtex", "pdflatex", "pdflatex" ] } ], "latex-workshop.view.pdf.viewer": "external", "latex-workshop.view.pdf.external.viewer.command": "D:/Program Files (x86)/SumatraPDF/SumatraPDF.exe", "latex-workshop.view.pdf.external.viewer.args": [ "-forward-search", "%TEX%", "%LINE%", "-reuse-instance", "-inverse-search", "\"C:/Program Files/Microsoft VS Code/Code.exe\" \"C:/Program Files/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"", "%PDF%" ], "latex-workshop.view.pdf.external.synctex.command": "D:/Program Files (x86)/SumatraPDF/SumatraPDF.exe", "latex-workshop.view.pdf.external.synctex.args": [ "-forward-search", "%TEX%", "%LINE%", "-reuse-instance", "-inverse-search", "\"C:/Program Files/Microsoft VS Code/Code.exe\" \"C:/Program Files/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"", "%PDF%", ], }
-
快捷键设置
// 将键绑定放在此文件中以覆盖默认值 [ { //正向搜索 "key": "ctrl+d", "command": "latex-workshop.synctex", "when": "editorTextFocus && !isMac" }, { //使用默认 recipe 编译 "key": "ctrl+k", "command": "latex-workshop.build", "when": "editorTextFocus && !isMac" }, { //终止编译 "key": "alt+t", "command": "latex-workshop.kill", "when": "editorTextFocus && !isMac" }, { "key": "alt+e", "command": "latex-workshop.recipes" }, ]
-
其他设置
1.1.2 Latex使用
1.2.1.latex显示中文
在源文件中导言部分加入代码:\usepackage[UTF8]{ctex}
。
1.3 GitHub代码管理
1.3.1 安装
-
安装Git
git安装教程
Download for Windows
一句话总结,一直next到底,选择默认设置
-
安装TortoiseGit
TortoiseGit安装教程
Download
注意:下载安装包和语言包(简体中文)
1.3.2 TortoiseGit使用
存在问题,TortoiseGit与Git的密码不兼容,从而导致其与Vscode为两个单独部分。目前,Vscode+Git代码管理中没有使用TortoiseGit,#TODO增加将Git与TortoiseGit进行统一。
1.创建本地密钥
- 运行Puttygen,把右下角的数值改成4096(这个是最长的)然后点击“Generate”就可以了。点击之后它会要求你随机移动鼠标,直到进度条满为止。
- 在passphrase和下面的确认框输入密码,这个密码你自己写咯,不过记着哦。写好之后,点“save private key”保存就行。
- Public key是填在服务器上的,打开你的Github账户,Edit YourProfile,然后SSH keys,然后add,然后把putty生成的public key贴进去就行了。
2.建立github仓库
3.克隆仓库到本地及推送服务器端
- url中填写之前github提供的ssh地址,putty key填写创建的private key,ok之后,输入passphrase。
- commit记录到本地版本库,注意,git要求每次commit必须输入描述信息。
- 推送(push)到服务器端
- GitHub服务器端查看
4.使用用例
Git Pull是从远端拉取最新的代码
Git Fetch是从远端拉取最新的分支
Git Push是将本地仓库的代码提交到远端
Git Commit ->”master”,将本地代码提交到本地版本库
1.3.3 Vscode配置Git
- 设置全局变量
git config --global user.name "your name" git config --global user.email "your@email.com"
- 登陆GitHub,创建SSHkey
ssh -T git@github.com
- 克隆仓库
git clone git@github.com:fenyukuang/TestCode.git