VsCode LaTeX 用户代码片段
增加代码片段可以在日常写文档的过程中,提高效率。因为很多写作的内容都是重复的,没必要每次都要去写一次。代码片段很好的解决了这个问题。
snippets
分享我的Vscode LaTeX的代码片段:
复制直接使用即可。
在VSCode中,按ctrl+shift+P弹出搜索,输入snippets,找到或者输入latex,进入latex.json,粘贴进去就可以了。
{
"compile setting":{
"prefix": "compile",
"body": ["%!TEX program = ${1:xelatex} -> bibtex -> xelatex -> ${1:xelatex}"],
"description": "set default the compile order"
},
"insert figure":{
"prefix": "figure",
"body":["\\begin{figure}[htbp]\n\t\\centering\n\t\\includegraphics[width=${1}\\textwidth]{picture/${2}}\n\t\\caption{${3}}\n\t\\label{${4}}\n\\end{figure}"],
"description": "insert figure snippet"
},
"insert table":{
"prefix": "table",
"body":["\\begin{table}[${1:htbp}]\n\t\\centering\n\t\\caption{${2:caption}}\n\t\t\\begin{tabular}{${3:c|c}}\n\t\t\\hline\n\t\t${4:column1 & col

最低0.47元/天 解锁文章
2409





