-
Notifications
You must be signed in to change notification settings - Fork 92
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
Modify settings.json file in visual studio code #48
Open
wtllll
wants to merge
2
commits into
BIT-thesis:master
Choose a base branch
from
wtllll:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,29 +62,186 @@ latexmk | |
- 在vscode上编译 (LaTex Workshop):对于使用vscode写tex的用户,添加如下配置,可在vscode上使用XeLaTeX: | ||
|
||
``` | ||
"latex-workshop.latex.tools": [ | ||
{ | ||
"name": "xelatex", | ||
"command": "xelatex", | ||
"args": [ | ||
"-synctex=1", | ||
"-interaction=nonstopmode", | ||
"-file-line-error", | ||
"%DOC%" | ||
] | ||
} | ||
], | ||
"latex-workshop.latex.recipes": [ | ||
{ | ||
"name": "xelatex -> bibtex -> xelatex*2", | ||
"tools": [ | ||
"xelatex", | ||
"bibtex", | ||
"xelatex", | ||
"xelatex" | ||
] | ||
} | ||
] | ||
// ======================== LaTeX 设置 BEGIN ======================== | ||
// bibtex 格式 | ||
"latex-workshop.bibtex-format.tab": "tab", | ||
|
||
// 自动编译,全部关闭,当且仅当你认为有需要的时候才会去做编译 | ||
"latex-workshop.latex.autoBuild.run": "never", | ||
"latex-workshop.latex.autoBuild.cleanAndRetry.enabled": false, | ||
|
||
// 设置 latex-workshop 的 PDF 预览程序,external 指的是外部程序 | ||
//"latex-workshop.view.pdf.viewer": "external", | ||
//"latex-workshop.view.pdf.ref.viewer": "external", | ||
//"latex-workshop.view.pdf.external.viewer.command": "D:/Users/newton/Documents/Softwares/software_windows/design/SumatraPDF-3.2-64.exe", | ||
//"latex-workshop.view.pdf.external.viewer.args": [ | ||
// "%PDF%" | ||
//], | ||
|
||
// 配置正向、反向搜索:.tex -> .pdf | ||
//"latex-workshop.view.pdf.external.synctex.command": "D:/Users/newton/Documents/Softwares/software_windows/design/SumatraPDF-3.2-64.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\" -gr %f:%l", | ||
// "%PDF%" | ||
//], | ||
|
||
// 这是一些独立的编译选项,可以作为工具被编译方案调用 | ||
"latex-workshop.latex.tools": [ | ||
{ | ||
// Windows 原生安装 TeX Live 2021 的编译选项 | ||
"name": "Windows XeLaTeX", | ||
"command": "xelatex", | ||
"args": [ | ||
"-synctex=1", | ||
"-interaction=nonstopmode", | ||
"-file-line-error", | ||
"-pdf", | ||
"%DOCFILE%" | ||
] | ||
}, | ||
{ | ||
// Windows Biber 编译 | ||
"name": "Windows Bibtex", | ||
"command": "bibtex", | ||
"args": [ | ||
"%DOCFILE%" | ||
] | ||
}, | ||
{ | ||
// WSL XeLaTeX 编译一般的含有中文字符的文档 | ||
"name": "WSL XeLaTeX", | ||
"command": "wsl", | ||
"args": [ | ||
"/usr/local/texlive/2021/bin/x86_64-linux/xelatex", | ||
"-synctex=1", | ||
"-interaction=nonstopmode", | ||
"-file-line-error", | ||
"-pdf", | ||
//"-output-directory=%OUTDIR%", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason to comment these (L127-128) out? I would either uncomment them or simply remove them. |
||
//"-aux-directory=%OUTDIR%", | ||
"%DOCFILE%" | ||
] | ||
}, | ||
{ | ||
// WSL biber / bibtex 编译带有 citation 标记项目的文档 | ||
"name": "WSL Bibtex", | ||
"command": "wsl", | ||
"args": [ | ||
"/usr/local/texlive/2021/bin/x86_64-linux/bibtex", | ||
"%DOCFILE%" | ||
] | ||
}, | ||
{ | ||
// macOS 或者 Linux 的简单编译 | ||
// 两种操作系统的操作方式相同 | ||
"name": "macOS / Linux XeLaTeX", | ||
"commmand": "xelatex", | ||
"args": [ | ||
"-synctex=1", | ||
"-interaction=nonstopmode", | ||
"-file-line-error", | ||
"-pdf", | ||
"%DOCFILE%" | ||
] | ||
}, | ||
{ | ||
// macOS 或者 Linux 的索引编译 | ||
// 两种操作系统的操作方式相同 | ||
"name": "macOS / Linux Bibtex", | ||
"command": "bibtex", | ||
"args": [ | ||
"%DOCFILE%" | ||
] | ||
} | ||
], | ||
|
||
// 这是一些编译方案,会出现在 GUI 菜单里 | ||
"latex-workshop.latex.recipes": [ | ||
{ | ||
// 1.1 Windows 编译简单的小文档,这个选项不太常用,因为绝大多数文章都需要有参考文献索引 | ||
"name": "Windows XeLaTeX 简单编译", | ||
"tools": [ | ||
"Windows XeLaTeX" | ||
] | ||
}, | ||
{ | ||
// 1.2 Windows 编译带有索引的论文,需要进行四次编译;-> 符号只是一种标记而已,没有程序上的意义 | ||
"name": "Windows xe->bib->xe->xe 复杂编译", | ||
"tools": [ | ||
"Windows XeLaTeX", | ||
"Windows Bibtex", | ||
"Windows XeLaTeX", | ||
"Windows XeLaTeX" | ||
] | ||
}, | ||
{ | ||
// 2.1 WSL 编译简单的小文档,这个选项不太常用,因为我绝大多数文章都需要有引用。 | ||
"name": "XeLaTeX 简单编译", | ||
"tools": [ | ||
"WSL XeLaTeX" | ||
] | ||
}, | ||
{ | ||
// 2.2 带有 citation 索引的文档,需要进行四次编译;-> 符号只是一种标记而已,没有程序上的意义 | ||
"name": "xe->bib->xe->xe 复杂编译", | ||
"tools": [ | ||
"WSL XeLaTeX", | ||
"WSL Bibtex", | ||
"WSL XeLaTeX", | ||
"WSL XeLaTeX" | ||
] | ||
}, | ||
{ | ||
// 3.1 macOS 简单 小文档 | ||
"name": "macOS XeLaTeX 简单编译", | ||
"tools": [ | ||
"macOS XeLaTeX" | ||
] | ||
}, | ||
{ | ||
// 3.2 macOS 四次编译 | ||
"name": "macOS xe->bib->xe->xe 复杂编译", | ||
"tools": [ | ||
"macOS / Linux XeLaTeX", | ||
"macOS / Linux Bibtex", | ||
"macOS / Linux XeLaTeX", | ||
"macOS / Linux XeLaTeX" | ||
] | ||
} | ||
], | ||
|
||
// 清空中间文件 | ||
"latex-workshop.latex.clean.fileTypes": [ | ||
"*.aux", | ||
"*.bbl", | ||
"*.blg", | ||
"*.idx", | ||
"*.ind", | ||
"*.lof", | ||
"*.lot", | ||
"*.out", | ||
"*.toc", | ||
"*.acn", | ||
"*.acr", | ||
"*.alg", | ||
"*.glg", | ||
"*.glo", | ||
"*.gls", | ||
"*.ist", | ||
"*.fls", | ||
"*.log", | ||
"*.fdb_latexmk", | ||
"*.bcf", | ||
"*.run.xml", | ||
"*.synctex.gz" | ||
], | ||
``` | ||
## Linux用户可能遇到的问题 | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path here can be cleaner like
C:/path/to/my/PDFViewer.exe
- similar comments to belowThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be useful only if you have the software Sumatra.If you don't have the software,then it is up to you to change it or remove it. Therefore I comment these ,similar comments to below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, but I don't think this addresses my comment on the very specific path 🤔