LaTeX Assistant

approved

VSCode+LaTeX Workshop-like editing experience: snippets, auto-completion, smart newlines, bracket pairing, and more. - This plugin has not been manually reviewed by Obsidian staff.

2 stars52 downloadsUpdated 29d agoMIT

LaTeX Assistant

为 Obsidian 打造的轻量 LaTeX 编辑助手

English | 中文


中文

功能

功能说明
$ 自动配对$$|$,再按 $$$\n|\n$$
Slash 命令$$ 中间按 / → 搜索并插入 LaTeX 片段
Snippet 展开输入触发词自动弹出补全提示,Enter 展开;或输入完整触发词直接按 Tab
自定义片段设置页增删改查 + JSON 导入导出
数学感知仅在 $...$ $$...$$ 中激活

安装

  1. Releases 下载 main.jsmanifest.jsonstyles.css
  2. 放入 <vault>/.obsidian/plugins/latex-assistant/
  3. 重启 Obsidian,在设置中启用插件

使用

$ 自动配对

操作结果
$$|$ 光标在中间
再按 $$$\n|\n$$ 转为行间公式

Snippet 展开

输入触发词的前几个字母,自动弹出补全提示,按 Enter 展开;也可以输入完整触发词后直接按 Tab

补全弹窗

常用触发词:

输入展开
frac\frac{num}{den}
casescases 环境 2×2
bmatrix方括号矩阵
aligned多行对齐
sum求和
int积分
lim极限
sqrt根号

/ Slash 命令

$$ 中间按 / → 搜索片段 → Enter 插入。干净的 LaTeX 代码,光标自动落在第一个可编辑位置。

slash菜单

设置

设置项说明
语言English / 简体中文
$ 自动配对开关
Snippet 展开开关
Slash 命令开关
数学环境感知仅在公式内激活
自定义片段增删改查 / JSON 导入导出

开发

npm install --legacy-peer-deps
npm run dev        # watch
npm run build      # 生产构建

English

Features

FeatureDescription
$ auto-pairPress $$|$, press again → $$\n|\n$$
Slash command/ inside $$ → search & insert LaTeX snippet
Snippet expansionType trigger prefix → popup suggestions → Enter to expand; or type full trigger + Tab
Custom snippetsAdd/edit/delete + JSON import/export
Math-awareOnly activates inside $...$ $$...$$

Installation

  1. Download main.js, manifest.json, styles.css from Releases
  2. Place them in <vault>/.obsidian/plugins/latex-assistant/
  3. Restart Obsidian, enable the plugin in Settings

Usage

$ auto-pair

ActionResult
Press $$|$ cursor in the middle
Press $ again$$\n|\n$$ display math

Snippet expansion

Type a few letters of a trigger word to see completion suggestions. Press Enter to expand. Or type the full trigger and press Tab directly.

completion popup

Common triggers:

TriggerExpands to
frac\frac{num}{den}
casesCases environment 2×2
bmatrixBracket matrix
alignedAligned equations
sumSummation
intIntegral
limLimit
sqrtSquare root

/ Slash command

Press / inside $$ → search snippet → Enter to insert. Clean LaTeX, cursor lands at the first editable position.

slash menu

Settings

SettingDescription
LanguageEnglish / 简体中文
$ auto-pairToggle
Snippet expansionToggle
Slash commandToggle
Math-awareOnly in math mode
Custom snippetsCRUD / JSON import-export

Development

npm install --legacy-peer-deps
npm run dev        # watch
npm run build      # production build

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.