【发布时间】:2021-04-18 21:44:52
【问题描述】:
我正在为 LaTeX 的 VSCode 中的个人 sn-ps 设置文件。
有没有办法将占位符(语法:${1:foo})和普通花括号结合起来?
在我的示例中,我希望我的代码输出:
\fcolorbox {frame}{background}{text}
其中每个变量都是占位符。我生成的 sn-p 代码 (.json) 如下所示:
"Colorbox fcolorbox": {
"prefix": "colbox",
"body": [
"\\fcolorbox ${{1:frame}}${{2:background}}${{3:text}}"
],
"description": "Colorbox fcolorbox"
}
但不起作用,因为它将 $ 和 {} 输出并解释为 LaTeX 符号。 有没有办法解决这个问题并使占位符起作用?
【问题讨论】:
标签: visual-studio-code latex code-snippets vscode-snippets