Last active
April 28, 2022 12:34
-
-
Save huaminghuangtw/5364fd2e87146206966366bf8e7ba087 to your computer and use it in GitHub Desktop.
Configuration for LaTeX-Workshop (VS Code Extension)
This file contains hidden or 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
[ | |
{ | |
"key": "ctrl+shift+B", | |
"command": "editor.action.insertSnippet", | |
"when": "editorHasSelection && resourceExtname == .tex", | |
"args": { | |
"snippet": "\\textbf{${TM_SELECTED_TEXT}}$0" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+I", | |
"command": "editor.action.insertSnippet", | |
"when": "editorHasSelection && resourceExtname == .tex", | |
"args": { | |
"snippet": "\\textit{${TM_SELECTED_TEXT}}$0" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+U", | |
"command": "editor.action.insertSnippet", | |
"when": "editorHasSelection && resourceExtname == .tex", | |
"args": { | |
"snippet": "\\underline{${TM_SELECTED_TEXT}}$0" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+R", | |
"command": "editor.action.insertSnippet", | |
"when": "editorHasSelection && resourceExtname == .tex", | |
"args": { | |
"snippet": "\\autoref{${TM_SELECTED_TEXT}}$0" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+C", | |
"command": "editor.action.insertSnippet", | |
"when": "editorHasSelection && resourceExtname == .tex", | |
"args": { | |
"snippet": "\\cite{${TM_SELECTED_TEXT}}$0" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+B", | |
"command": "editor.action.insertSnippet", | |
"when": "!editorHasSelection && resourceExtname == .tex", | |
"args": { | |
"snippet": "\\textbf{$0}" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+I", | |
"command": "editor.action.insertSnippet", | |
"when": "!editorHasSelection && resourceExtname == .tex", | |
"args": { | |
"snippet": "\\textit{$0}" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+U", | |
"command": "editor.action.insertSnippet", | |
"when": "!editorHasSelection && resourceExtname == .tex", | |
"args": { | |
"snippet": "\\underline{$0}" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+R", | |
"command": "editor.action.insertSnippet", | |
"when": "!editorHasSelection && resourceExtname == .tex", | |
"args": { | |
"snippet": "\\autoref{$0}" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+C", | |
"command": "editor.action.insertSnippet", | |
"when": "!editorHasSelection && resourceExtname == .tex", | |
"args": { | |
"snippet": "\\cite{$0}" | |
} | |
}, | |
] |
This file contains hidden or 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
"latex-workshop.latex.autoClean.run": "onBuilt", | |
"latex-workshop.view.pdf.viewer": "tab", | |
"latex-workshop.view.pdf.internal.synctex.keybinding": "double-click", | |
"latex-workshop.latex.autoBuild.run": "onSave", | |
"files.autoSave": "afterDelay", | |
"files.autoSaveDelay": 30000, | |
"latex-workshop.latex.recipes": [ | |
{ | |
"name": "pdflatex ➞ biber ➞ pdflatex ➞ makeglossaries ➞ pdflatex × 2", | |
"tools": [ | |
"pdflatex", | |
"biber", | |
"pdflatex", | |
"makeglossaries", | |
"pdflatex", | |
"pdflatex", | |
] | |
}, | |
{ | |
"name": "latexmk 🔃", | |
"tools": [ | |
"latexmk" | |
] | |
}, | |
{ | |
"name": "lualatex ➞ biber ➞ lualatex", | |
"tools": [ | |
"lualatex", | |
"biber", | |
"lualatex" | |
] | |
}, | |
], | |
"latex-workshop.latex.tools": [ | |
{ | |
"name": "pdflatex", | |
"command": "pdflatex", | |
"args": [ | |
"-shell-escape", | |
"-interaction=nonstopmode", | |
"-file-line-error", | |
"-aux-directory=.", | |
"-output-directory=./..", | |
"%DOC%" | |
] | |
}, | |
{ | |
"name": "latexmk", | |
"command": "latexmk", | |
"args": [ | |
"-shell-escape", | |
"-interaction=nonstopmode", | |
"-file-line-error", | |
"-aux-directory=.", | |
"-output-directory=./..", | |
"-pdf", | |
"%DOC%" | |
] | |
}, | |
{ | |
"name": "lualatex", | |
"command": "lualatex", | |
"args": [ | |
"-interaction=nonstopmode", | |
"-file-line-error", | |
"-aux-directory=.", | |
"-output-directory=./..", | |
"%DOC%" | |
] | |
}, | |
{ | |
"name": "biber", | |
"command": "biber", | |
"args": [ | |
"%DOCFILE%" | |
] | |
}, | |
{ | |
"name": "makeglossaries", | |
"command": "makeglossaries", | |
"args": [ | |
"%DOCFILE%" | |
] | |
}, | |
], |
Comments for keybindings.json
Keyboard shortcuts for the following LaTeX commands:
\textbf
\textit
\underline
\autoref
\cite
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Comments for
settings.json
double-clicking
(originally it's by default set toCtrl + left-clicking
)Ctrl + Alt + J
latex-workshop.latex.recipes
&latex-workshop.latex.tools
): Specify paths for auxiliary files and pdf document with-aux-directory
and-output-directory
options (Then you can put-aux-directory
in the.gitignore
file)