Numerals gives you the power of an advanced calculator inside a math
code block, complete with currencies, units, variables, and math functions! Now you can perform calculations inline with your notes, and see both the input and the evaluated result. Numerals works with Live Preview as well as Reader view. Math expressions can be commented with #
, or descriptive sentences can be added between calculations.
- Units
1ft + 12in
→2ft
20 mi / 4 hr to m/s
→2.235 m / s
9.81 m/s^2 * 100 kg * 40 m
→39.24 kJ
- Currency
$1,000 * 2
→2,000 USD
£10 + £0.75
→10.75 GBP
- Math functions
sqrt
,sin
,cos
,abs
,log
, etc (see mathjs for full list)
- Hex, Binary, Octal, and other bases
0xff + 0b100
→259
hex(0xff + 0b100)
→"0x103"
- Natural Constants
e
,i
,pi
,speedOfLight
,gravitationConstant
,vacuumImpedance
,avogadro
- And many more (see mathjs: Constants and mathjs: Units for more)
Numerals utilizes the mathjs library for all calculations. Numerals implements a preprocessor to allow more human-friendly syntax, such as currency symbols and thousands separators. For all available functions and capabilities (which includes matrices, vectors, symbolic algebra and calculus, etc), see the mathjs documentation
Numerals has been tested with the default theme and most other top themes. It uses default values such that it should play nice with any other theme. There are 3 options to choose from:
- Answer is shown to the right of the input with a background color and a seperator.
- Distinctive style that seperates input from evaluated answers
- Answer to the right: answer is shown in the same line as the input, but right-aligned
- More subtle than 2-panes that works well with just a few calculations
- Answer is shown below the input, on the next line.
- Less compact vertically, but more compact horizontally
Choose between a consistent code block background color (left), or alternating rows to help track from input to result (right).
Numerals is not yet in the Obsidian community plugin list. The easiest way to try Numerals is by using the Obsidian BRAT plugin.
Using BRAT
- Ensure BRAT is installed
- Trigger the command
Obsidian42 - BRAT: Add a beta plugin for testing
- Enter this repository,
gtg922r/obsidian-numerals
- Activate Numerals plugin in community plugin list
- Support for mapping currency symbols to different currencies (currently
$
maps toUSD
) - Better Error handling (currently no indication of error line)
- Style Settings support for all colors and other style options
- Syntax highlighting of input
-
Support for additional currency symbols (currently only supports(added in 0.0.9)$
)
There are a number of other plugins that address math and calculation use cases in Obsidian.
- If you are primarily interested in evaluating math expressions and inserting the result into your notes, look into meld-cp/obsidian-calc
- If you are looking for a full-featured Computer Algebra System including plots and with similar code block rendering, consider Canna71/obsidian-mathpad: Computer Algebra System (CAS) for Obsidian.md
There are also a number of "calculator as notes" apps that acted as the inspiration for Numerals. If you are looking for a purpose-built app outside of Obsidian, consider: