SciCodeNotes is a VS Code extension that attaches external notes to code and renders LaTeX formulas in the editor. It brings formulas, derivations, assumptions, references, and implementation rationale next to production code without moving that code into notebooks or bloating source comments.
Quick start
Rendered formulas appear beside their implementation:
Hovering the preview reveals its complete note:
The note body is stored outside the source file in LinksSciCodeNotes supports portable links:
Use the commands rather than constructing links manually. Following code changesA SciCodeNote is anchored to the selected code range rather than a line number, and normal edits are tracked automatically. When a file changes while VS Code is closed, moves between branches, or is substantially reorganized, SciCodeNotes attempts to find the original code again. If it cannot determine the location safely, the note becomes unresolved and remains available and editable. To reattach it:
Reattachment updates the anchor and clears the unresolved state. Deleting a source file does not delete its SciCodeNotes. Each source line can have at most one attached SciCodeNote; for multi-line selections, it occupies the last selected line. StorageEach workspace uses one storage location:
Settings
Set it through VS Code Settings, or add it to Rendering behavior. Plain-text previews are capped at 80 characters. With overflow disabled, a math preview taller than the editor line is scaled down to fit. If doing so requires a scale below 0.9, SciCodeNotes uses the same plain-text previews instead. Enable Storage location is selected through Keybindings
You can change or remove this keybinding in VS Code Keyboard Shortcuts. Why SciCodeNotesSciCodeNotes fills the gap between sidecar code annotations and source-level math preview. Annotation tools can keep rich notes outside source files, while math-hover tools can render TeX written inside source comments. SciCodeNotes combines both ideas: select a source range, bind it to an external Markdown note, and project that note back onto the source editor without modifying the code. A SciCodeNote can contain derivations, equations, assumptions, modeling rationale, references, tables, and other technical material. TeX in the external note is rendered directly in source hover, so mathematical knowledge remains close to the implementation while the full Markdown document remains separate. The core workflow is:
License |