Numerals

by RyanC
5
4
3
2
1
Score: 69/100
Trending Plugin

Description

Category: Coding & Technical Tools

The Numerals plugin is a powerful tool that enables users to perform mathematical calculations and insert the results into their Obsidian notes. With this plugin, you can write complex math expressions in Markdown code blocks and evaluate them instantly. The plugin also offers advanced features such as result annotation, autocompletion of functions and variables, and style settings for customization. Additionally, Numerals supports mapping currency symbols to different currencies and allows users to specify the format of rendered results. Overall, this plugin is an excellent choice for anyone who needs to perform complex calculations or visualize data in their Obsidian notes.

Reviews

No reviews yet.

Stats

618
stars
65,553
downloads
20
forks
1,259
days
1
days
1
days
43
total PRs
0
open PRs
7
closed PRs
36
merged PRs
113
total issues
36
open issues
77
closed issues
40
commits

Latest Version

a day ago

Changelog

🎉 Numerals 1.10.2 🎉

The first new Numerals release in a year, with major new features as well as behind-the-scenes clean-up!

Big additions are inline calculations, cross-note references, better note-wide variables, inline suggestions, click-to-edit rendered blocks, and a refreshed README for users discovering Numerals through Obsidian.

Highlights

  • 🧮 Inline calculations - Use Numerals directly in normal sentences with inline code:

    • `#: 3ft * 4ft` -> 12 ft^2
    • `#=: 2 * (3ft + 4ft)` -> 2 * (3 ft + 4 ft) = 14 ft
  • 🔗 Cross-note references - Reference frontmatter and Dataview metadata from other notes:

    • [[Client Settings]].hourlyRate * 8hr
    • [[config]].rates.hourly * [[invoice]].hours
  • 🧾 Better note-wide variables - $ variables now work across math blocks and inline expressions:

    • Define $rate = $150/hr once
    • Use it later with `#: $rate * 40hr`
  • ⏮️ Inline @prev support - Chain inline calculations together:

    • `#: 100 * 1.2`
    • `#: @prev * 1.08`
  • Inline auto-complete - Suggestions now work inside inline Numerals expressions, including variables, functions, constants, cross-note properties, and Greek letters.

  • 🖱️ Click rendered blocks to edit - In Live Preview, click or tap rendered Numerals math blocks to jump back to the matching source line.

  • 🛠️ Large reliability pass - This release includes major internal cleanup, stricter TypeScript, Obsidian community review fixes, better lifecycle cleanup, and a modernized release workflow.

Inline Numerals

You can now calculate directly in prose:

The total cost is `#: $150/hr * 8hr`.

Or show the equation and result:

The room perimeter is `#=: 2 * (12ft + 10ft)`.

Inline calculations work in Live Preview and Reading mode, and support the same units, currencies, functions, frontmatter values, Dataview values, and formatting behavior as math blocks.

Cross-note references

Use another note metadata inside calculations:

```math
hours = 12 hr
subtotal = [[Client Settings]].rates.hourly * hours
tax = subtotal * [[Client Settings]].taxRate
total = subtotal + tax =>
```

Nested properties are supported with dot notation:

[[config]].rates.hourly

Cross-note references work in math blocks and inline calculations, and rerender when referenced metadata changes.

Complete change list

Added:

  • Inline calculation support with `#:` result mode and `#=:` equation mode.
  • Inline calculations in Live Preview and Reading mode.
  • Inline auto-complete suggestions.
  • Inline @prev.
  • Note-global $ variables shared between math blocks and inline expressions.
  • Cross-note references using [[note]].property.
  • Nested cross-note property access.
  • Setting to enable or disable cross-note references.
  • Settings tab icon for newer Obsidian versions.

Changed:

  • Refreshed the README around the stable feature set, with glanceable examples for Obsidian users.
  • Upgraded mathjs to 15.2.0.
  • Changed license to MIT.
  • Refactored the rendering and evaluation pipeline.
  • Enabled TypeScript strict mode.
  • Migrated to ESLint flat config with Obsidian plugin rules.
  • Stopped bundling Dataview and now use the runtime Dataview API when available.
  • Modernized beta and production release workflows.
  • Moved the legacy source colocated Numerals test into the Jest-covered tests/ directory.

Fixed:

  • Dataview phantom metadata keys causing undefined symbol errors.
  • Currency setting changes requiring restart.
  • Inline widgets briefly appearing in Source mode.
  • Tiny non-zero values rendering as 0 or -0.
  • Large numbers in syntax-highlighted input rendering in scientific notation.
  • Result insertion targeting the wrong editor in split panes.
  • Event listener leaks and double rendering.
  • Hidden frontmatter evaluation errors.
  • Re-enable/reload issues around custom math units.
  • Obsidian Community Plugin review warnings.

Removed:

  • One-off agent planning and architecture documents, unused config stubs, and unreferenced PR screenshots from the repository.
  • Legacy beta manifest flow in favor of modern BRAT release assets.

🙏 Acknowledgements

Hat tip to @andersfischernielsen for the suggestion and initial implementation of click-through on math blocks!

README file from

Github

Numerals

Obsidian Downloads GitHub release Prerelease

Numerals turns Obsidian notes into living calculations. Use math blocks or inline expressions to calculate with units, currencies, variables, functions, frontmatter, Dataview metadata, and values from other notes.

Numerals Lemonade Stand - Side by Side

At a Glance

Feature Example
Inline calculations `#: 3ft * 4ft` -> 12 ft^2
Show-your-work equations `#=: 2 * (3ft + 4ft)` -> 2 * (3 ft + 4 ft) = 14 ft
Full math blocks math<br>20 mi / 4 hr to m/s<br> -> 2.235 m / s
Units and conversions 100 km/hr in mi/hr -> 62.137 mi / hr
Currency math $100/hr * 3 days -> 7,200 USD
Note-wide variables $rate = $150/hr, then `#: $rate * 40hr`
Cross-note references [[Client Settings]].rates.hourly * 8hr
Result insertion @[profit] = revenue - expenses writes @[profit::10 USD]

Quick Start

Add a math code block anywhere in a note:

```math
revenue = $2,400
expenses = $850
profit = revenue - expenses =>
```

Or calculate directly in a sentence:

The project total is `#: $150/hr * 8hr`.

Use equation mode when the calculation itself is important:

The room perimeter is `#=: 2 * (12ft + 10ft)`.

Core Features

Inline Calculations

Inline Numerals expressions are ordinary inline code with a trigger prefix:

Syntax Renders as Best for
`#: 3ft * 4ft` 12 ft^2 Showing just the answer
`#=: 3ft * 4ft` 3 ft * 4 ft = 12 ft^2 Showing the expression and answer

Inline calculations work in Live Preview and Reading mode. They support the same math engine, number formatting, units, currency symbols, variables, frontmatter, and Dataview values as math blocks.

Math Blocks

Numerals math blocks are ideal for longer calculations:

```math
# Lemonade stand
cups = 120
price = $1.50
revenue = cups * price
lemons = $18
sugar = $7
profit = revenue - lemons - sugar =>
```

Use => to highlight important results. Lines without a highlighted result can be dimmed or hidden depending on your settings.

Units, Currency, and Functions

Numerals uses mathjs for calculations and adds Obsidian-friendly preprocessing for currency symbols and readable number input.

Type Examples
Units 1ft + 12in -> 2 ft
Conversions 72 degF to degC -> 22.222 degC
Currency $1,000 * 2 -> 2,000 USD
Rates $100/hr * 3 days -> 7,200 USD
Functions sqrt(144), sin(pi/2), log(1000, 10)
Bases 0xff + 0b100 -> 259
Fractions fraction(1/3) + fraction(1/4) -> 7/12

Currency symbols can be customized in settings.

Note-Wide Variables

Prefix a variable or function with $ to make it available across the whole note:

```math
$rate = $150/hr
$discount(x) = x * 0.9
```

Estimate: `#: $rate * 40hr`
Discounted: `#: $discount($rate * 40hr)`

Note-wide variables work across math blocks and inline expressions.

Previous Results

Use @prev to refer to the previous result:

```math
base = 100
base * 1.2
@prev * 1.08
```

Inline expressions can use @prev too:

First year: `#: 100 * 1.2`
Second year: `#: @prev * 1.08`

Totals

Use @total or @sum to add previous results up to the last blank line or heading/comment:

```math
$12
$18
$25
@total =>
```

Frontmatter and Dataview Metadata

Numerals can read selected note properties from frontmatter:

---
numerals: [price, quantity]
price: 29.99
quantity: 150
---

`#=: price * quantity`

Use numerals: all to expose all frontmatter properties to Numerals. $-prefixed frontmatter values are automatically available as note-wide variables.

Dataview inline fields and metadata can also be used in calculations when Dataview is installed.

Cross-Note References

Reference frontmatter and Dataview metadata from other notes with [[note]].property:

```math
hours = 12 hr
subtotal = [[Client Settings]].rates.hourly * hours
tax = subtotal * [[Client Settings]].taxRate
total = subtotal + tax =>
```

Nested properties use dot notation:

[[config]].rates.hourly
[[project/invoice]].lineItems.total

Cross-note references work in math blocks and inline expressions. When referenced metadata changes, Numerals rerenders dependent inline values.

Result Insertion

Use @[label] to write a result back into the raw note as Dataview-style inline metadata:

```math
@[profit] = $2,400 - $850
```

Numerals updates the source text to:

@[profit::1,550 USD]

Auto-Complete

Auto-complete suggestions work in math blocks and inline Numerals expressions. Suggestions can include:

  • Variables from the current block
  • Note-wide $ variables
  • Frontmatter and Dataview metadata
  • Cross-note properties after [[note]].
  • mathjs functions and constants
  • Greek letters by typing :, such as :mu -> μ

Click to Edit in Live Preview

Rendered math blocks remain easy to edit. Click or tap a rendered Numerals line in Live Preview to focus the matching source line.

Display Options

Numerals is designed to fit naturally with Obsidian themes and supports multiple render styles.

Render Style

Choose a default render style in settings, or set it per block:

Block language Style
math Uses your configured default
math-plain Plain text
math-tex TeX-style rendering
math-highlight Syntax-highlighted input

Numerals Render Style Side by Side

Layouts

Choose how results appear next to calculations:

  • Two panes: input and result in separate columns.
  • Answer to the right: compact inline result display.
  • Answer below: result appears on the next line.

Numerals 2 Panes Numerals answer right Numerals answer below

Number Formatting

Configure how rendered numbers are displayed:

  • System formatted: follows your local system separators.
  • Fixed: full precision with no thousands separator.
  • Exponential: scientific notation.
  • Engineering: exponent is a multiple of 3.
  • Formatted: choose a specific thousands/decimal style.

Installation

Install Numerals from Obsidian's Community Plugins browser.

Pre-Release Testing

To test upcoming releases before they reach the stable Obsidian directory:

  1. Install the BRAT plugin.
  2. Run Obsidian42 - BRAT: Add a beta plugin for testing.
  3. Enter gtg922r/obsidian-numerals.
  4. Enable Numerals in Community Plugins.

Development

Numerals is an Obsidian community plugin written in TypeScript and bundled with esbuild.

Local Commands

npm install
npm run dev
npm test
npm run lint
npm run build

Versioning

Update the version number in package.json:

npm run version:patch
npm run version:minor
npm run version:major

These commands only update package.json. Stable release metadata is updated by the production release script.

Mathjs Symbol Suggestions

Auto-complete suggestions for mathjs functions and constants are kept as a static list in src/mathjsUtilities.ts.

When upgrading mathjs, run:

npm run symbols:check

If the check finds intentional changes, run:

npm run symbols:update

Review the generated diff and adjust explicit exclusions in scripts/mathjs-symbols.ts for documented symbols that should not appear in suggestions.

Releases

Create a pre-release for BRAT users:

npm run release:beta

Promote a tested version to the stable Obsidian release channel:

npm run release

Production releases update manifest.json and versions.json, build the project, commit stable release metadata, and promote the matching GitHub release. GitHub Actions generates release assets from the tag, including a tag-matched manifest.json, and creates GitHub Artifact Attestations for uploaded files.

Other Obsidian calculation plugins may fit different workflows:

  • obsidian-calc for calculator-style expression evaluation and result insertion.
  • obsidian-mathpad for a fuller computer algebra system inside Obsidian.

Numerals is also inspired by calculator-as-notes apps such as Numi, Numbr, and Soulver.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Obsidian matrix
4 years ago by Jonas Mohr
Desmos
4 years ago by Nigecat
Embed graphs directly into your obsidian notes
Latex Suite
4 years ago by artisticat1
Make typesetting LaTeX as fast as handwriting through snippets, text expansion, and editor enhancements
Obsidian Columns
4 years ago by Trevor Nichols
Obsidian Math+
4 years ago by Oscar Capraro
This is an Obsidian plugin for taking math notes using Excalidraw.
Function Plot
4 years ago by leonhma
A obsidian.md plugin for rendering maths graphs.
Advanced Codeblock
4 years ago by Lijyze
An obsidian plugin that give additional features to code blocks.
Mathpad
4 years ago by Gabriele Cannata
Computer Algebra System (CAS) for Obsidian.md
Obsidian asciimath
3 years ago by widcardw
Asciimath support for Obsidian (based on asciimath-parser)
ProgressBar
3 years ago by Wei Zhang
Code block plugin for Obsidian generating a progress bar
Codeblock Customizer
3 years ago by mugiwara
Codeblock Customizer plugin for Obsidian
HK Code Block
3 years ago by Heekang Park
Obsidian plugin developed by Heekang Park; Make code block looking good on reading view
Latex Matrices
3 years ago by Daniele Susino
An obsidian plugin to create latex matrices.
MathLive
3 years ago by Dan Zilberman
The must-have plugin for math in Obsidian
Typst Renderer
3 years ago by fenjalien
Renders typst code blocks in Obsidian into images using Typst through the power of WASM!
Code Styler
3 years ago by Mayuran Visakan
A plugin for Obsidian.md for styling codeblocks and inline code
CodeBlock Tabs
3 years ago by Jemin Mau
Create tab group for contiguous codeblocks.
MLIR Syntax Highlight
3 years ago by Lewuathe
Math Booster
3 years ago by Ryota Ushio
A powerful indexing & referencing system for theorems & equations in your Obsidian vault.
Codeblock Template
3 years ago by Super10
A template plugin that allows for the reuse of content within Code Blocks!一个可以把Code Block的内容重复利用模板插件!
No more flickering inline math
3 years ago by Ryota Ushio
No longer disturbed by flickering inline math in Obsidian.
Calctex
3 years ago by Mike
An Obsidian plugin for automatic calculation of LaTeX formulas.
Todo.txt Codeblocks
3 years ago by Benjamin Nguyen
Manage your tasks inside Obsidian codeblocks according to the Todo.txt specification.
CSV Codeblock
3 years ago by elrindir
Plugin for obsidian to render csv syntax in codeblocks.
Auto-\displaystyle Inline Math
2 years ago by Ryota Ushio
An Obsidian.md plugin to automatically make all inline maths \displaystyle.
Minitabs
2 years ago by ssjy1919
Obsidian tabs
Mathematica Plot
2 years ago by Marcos Nicolau
Insert functions on Obsidian using Wolfram Mathematica!
MathLive in Editor Mode
2 years ago by MizarZh
MathLive input in editor mode.
Math Indicator Changer
2 years ago by Ori Replication
Latex Environments
6 years ago by Zach Raines
Quickly insert and change latex environments within math blocks in Obsidian.
ABC Music Notation
5 years ago by Til Blechschmidt
Plugin which renders music notations from code blocks
Embedded Code Title
5 years ago by tadashi-aikawa
It is an Obsidian plugin which can embeds title to code blocks.
Linter
5 years ago by Victor Tao
An Obsidian plugin that formats and styles your notes with a focus on configurability and extensibility.
Quick LaTeX
5 years ago by joeyuping
Meld Calc
5 years ago by meld-cp
IMSwitch in Math Block
a year ago by XXM
MathType
a year ago by slateblua
Type math faster
Collapsible Code Blocks
a year ago by Bradley Wyatt
Obsidian Plugin that makes code blocks collapsible in reading and edit view as well as enabling scroll-able code blocks.
Command Line
a year ago by Steven Stallion
Copy command lines from your notes to the clipboard.
Project Euler Stats
a year ago by Artem Korsakov
Get statistics from Project Euler.
YAML Table
a year ago by dainakai
Replace Pencil
10 months ago by penyt
🐧 An obsidian plugin that can easily replace the custom variable in the code block.
Calculite
10 months ago by Holo
Standard calculator plugin for Obsidian.
Code Blocks commands
8 months ago by dragonish
Provide commands to insert code blocks with markup, and support triggering commands with backticks.
Quick Matrix
6 months ago by Charlie Flowe
Plugin for Obsidian.md that allows for faster interactions with matrices in LaTeX
LaTeX Panel Helper
5 months ago by Luster
A powerful and convenient LaTeX symbol panel for Obsidian to enhance your mathematical and scientific note-taking efficiency.
Typst Mate
3 months ago by azyarashi
Render math expressions with Typst instead of MathJax in Obsidian.
Segerlab
a month ago by Semyon Kononchuk
Renders calculator views within notes from JSON data copied from the Segerlab app.