Barocss Math Editor
Write and edit LaTeX formulas visually in Markdown and LaTeX documents. Open a formula beside your document, edit its mathematical structure, and apply the result to the original source.
Try the web editor · Editing guide
Start editing
- Open a Markdown (
.md) or LaTeX (.tex) document in VS Code.
- Place the cursor inside a formula, such as
$E=mc^2$.
- Press Alt+Enter on Windows/Linux or Option+Enter on macOS.
- Edit the formula in the visual editor beside your document.
- Select Apply to update the source, or Cancel to keep the original.
You can also right-click a formula and choose Barocss: Edit Formula, or run that command from the Command Palette.
What you can do
- Edit fractions, roots, powers, subscripts, brackets, matrices, and other supported mathematical structures.
- Type
^, _, or / after an operand or selection to create a power, subscript, or fraction immediately. The cursor moves to the next input slot.
- Type
(, [, { or | to open a fence. At its body end, use the matching closing key to move outside.
- Change an existing symbol from suggestions beside it. Choose with the arrow keys before pressing Enter, or click the replacement.
- Use the toolbar and suggestions to insert or change structures.
- Check the generated LaTeX source while editing.
- Select bare LaTeX and open it in the visual editor.
- Insert a new inline formula with Barocss: Insert Formula. This replaces the current selection when you apply it.
- Undo an applied change with one document Undo step.
The editing interface supports English and Korean, following your VS Code display language.
For example, x^2 creates a power. a+b/2 makes only b the numerator. Select a+b before typing / to use the whole expression. Use the arrow keys to leave a slot.
Commands
| Command |
Action |
Default shortcut |
| Barocss: Edit Formula |
Open the formula at the cursor or selected LaTeX |
Alt+Enter / Option+Enter |
| Barocss: Insert Formula |
Create an inline formula at the current selection |
Command Palette |
The default shortcut is active in Markdown and LaTeX documents. Change it in Preferences: Open Keyboard Shortcuts if another extension uses the same keys.
Source handling
The extension recognizes $…$, $$…$$, \(…\), \[…\], and supported math environments. For example:
An inline formula: $E=mc^2$.
$$
\frac{a}{b}+\sqrt{x}
$$
Apply updates the captured formula range. Dollar and backslash delimiters and the surrounding whitespace, including line breaks after $$, remain intact. The edited expression is serialized to LaTeX, so formatting, aliases, and comments inside a changed expression can be normalized. Cancel and an unchanged Apply preserve the original source.
If you change the source document while the visual editor is open, Apply is blocked. Close the visual editor and open the formula again to work from the current source.
Requirements and limits
- Requires VS Code 1.90 or later. This extension targets desktop VS Code.
- The visual editor opens in a separate editor panel beside the document.
- Open one formula or one selection at a time. Multiple cursors are not supported.
- This is a formula editor, not a complete TeX compiler. Unsupported commands and custom macros cannot be imported.
- Source detection skips common code and comment regions. It does not implement every Markdown dialect or TeX construct.
- No separate npm package, KaTeX installation, or TeX distribution is needed to use the extension.
Privacy and license
Formula editing runs locally. The extension does not send document content to a server.
MIT license. Copyright barocss.com. The extension includes the license and notices for bundled fonts.
한국어 안내
Markdown과 LaTeX 문서의 수식을 시각적으로 편집하고 원본 LaTeX에 적용할 수 있습니다.
- 수식 안에 커서를 놓습니다. 예:
$E=mc^2$
- Windows/Linux에서는 Alt+Enter, macOS에서는 Option+Enter를 누릅니다.
- 문서 옆에 열린 수식 편집기에서 수정합니다.
- 적용으로 원본을 수정하거나, 취소로 원본을 유지합니다.
명령 팔레트의 Barocss: Insert Formula로 새 인라인 수식을 넣을 수 있습니다. 텍스트가 선택되어 있으면 적용할 때 선택한 텍스트를 수식으로 바꿉니다. 적용한 변경은 문서에서 실행 취소 한 번으로 되돌릴 수 있습니다.
^, _, /를 입력하면 앞의 항이나 선택한 수식에 지수, 아래첨자, 분수를 바로 적용합니다. 커서는 다음 입력 칸으로 이동합니다. a+b/2는 b만 분자로 만듭니다. 전체를 분자로 쓰려면 a+b를 선택한 뒤 /를 누르세요. 화살표 키로 입력 칸을 벗어날 수 있습니다.
(, [, {, |는 빈 괄호를 만들고, 안쪽 끝에서 닫는 기호를 누르면 밖으로 이동합니다. 기존 기호 옆의 추천은 방향키로 후보를 고른 뒤 Enter를 누르거나 후보를 클릭해 적용합니다.
$$ 뒤의 줄바꿈과 수식 바깥 공백은 유지됩니다. 변경한 수식 내부의 문법과 서식은 정리될 수 있습니다. 편집 중 원본 문서를 바꾸면 적용이 차단됩니다. 수식 편집기를 닫고 다시 열어 주세요.
VS Code 1.90 이상이 필요합니다. 별도 npm 패키지나 TeX 설치 없이 동작하며, 문서 내용을 서버로 보내지 않습니다.