obsidian-numerals

An obsidian plugin which turns a math code block into a full featured calculator

OTHER License

Stars
404

Bot releases are visible (Hide)

obsidian-numerals - 1.5.1 Latest Release

Published by github-actions[bot] 4 months ago

🧪 Numerals 1.5.1 - New Beta 🧪

  • Adds a new "directive" (i.e. a Numerals-specific command): @hideRows (#31)
    • A math block with @hideRows on a row (with nothing else), will only render lines that have => at the end of them ("result annotation")

image

obsidian-numerals - 1.5.0

Published by github-actions[bot] 4 months ago

🚀 Numerals 1.5 - Biggest Update Yet! 🚀

Introducing some of the most requested features including the ability to:

  • sum previous lines with @sum or @total
  • reference note frontmatter properties
  • use global variables between blocks
  • insert calculation results directly into your notes

Also new convenience features such as Greek letter auto-completion and custom currency support. Upgrade now and take your note-taking calculations to the next level!

Detailed Updates

⭐️ Sums and Totals of Previous Lines

  • New feature and syntax for summing a group of lines: @sum or @total (closes #18, #49, #36)
  • When Numerals encounters @total or @sum it inserts the sum of all previous lines up until the last blank line or comment
  • Can use in a calculation or unit conversion

2024-06-11 Sum and Totals Example

⭐️ Values in Note Frontmatter

Numerals can now reference note frontmatter or dataview inline values. Set the numerals property on a page to share specific properties with all math blocks on a page.

In order to access metadata, you need to tell Numerals to make the value available by:

  1. Set the numerals metadata value (either frontmatter or dataview inline property) to the name of the value you want to include, or a list of values
    • Frontmatter of numerals: other_metadata_name, or numerals: [metadata_1, metadata_2]
    • inline value: [numerals:: other_metadata_name]
  2. Set the metadata value of numerals to all: will index all metadata and make it available to dataview
  3. Enable "Always Process All Frontmatter" in the Numerals settings

2024-06-11 Note Properties Available Example

Numerals is able to write back to dataview values, through use of Result Insertion

⭐️ Note-wide Global Variables

Any variable name preceeded by an $ symbol will be made available to all math blocks on a page (closes #34)
2024-06-11 Numerals Global Scope Example

⭐️ Result Insertion - Store Results in Raw Text

Using the new @[...] syntax (for example: @[profit]), Numerals will insert the results of a calculation into the raw text of your notes. (closes #22)
2024-06-11 Numerals Result Insertion Example

⭐️ Greek Letter Auto-complete

  • Add greek letter auto-completion after typing :. e.g. :mu in a math block will offer μ as an auto-complete suggestion (closes #69)
  • Greek letters can be used in any variable name. They also work with subscripting when in math-tex block.

⭐️ Custom Currency Support

  • Add custom currency support. In Numerals setting, user can set a currency symbol and name. (closes #54, #52, #61)
  • Allows for example: ₿100 / day * 3 hours → 12.5 BTC if you set ₿ as the custom currency:
    2024-05-24 Numerals Custom Currency Mapping Screenshot
obsidian-numerals - 1.4.1

Published by gtg922r 8 months ago

🧪 Beta Release 1.4.1 🧪 (Bug fix only)

  • Fixes bug with result insertion. Result insertion can now be used on the same line as initial assignment to a variable:
a = 1
b = 2
@[result] = a + b

Once rendered, will become:

a = 1
b = 2
@[result::3] = a + b
obsidian-numerals - 1.4.0

Published by gtg922r 8 months ago

🧪 Beta Release 1.4 🧪

Support for frequently requested features!

  • "Sum" (or "Total") feature
  • Page "Globals" (i.e. shared variables)
  • Result Insertion: Calculation result added to note source using dataview syntax

🚧 Note to Beta Testers: Supporting sums/totals requires some additional pre-processing by Numerals. "Globals" is dependent on when blocks get rendered. Please report any bugs you see as I may have missed some corner cases! 🚧

Numerals 1.4 (Beta) includes support for one of the most commonly requested features: The ability to quickly sum previous lines. Numerals now offers a magic variable @sum or @total, which will always be populated with the sum of all previous lines up to a blank line or header/comment. As a magic variable it can be used in equations, conversions, or assignment to other variables.

Numerals 1 4 Beta Screenshot Sum-Total

Numerals 1.4 (Beta) includes support for "globals" - variable values that keep their value across code blocks. This should be considered experimental - please report any issues! In a code block, create a new variable prefixed with a $. That variable will be available in later math codeblocks.

Warning: Numerals can't ensure a consistent ordering of math block evaluation. If you assigned a value to a global in multiple code blocks you may get unexpected results. Its best to only assign the value in one place.

Numerals 1 4 Beta Screenshot - Globals

Numerals 1.4 (Beta) has 🚨 experimental 🚨 support for "result insertion". Wrapping a variable name in @[...] (e.g. @[result]), will tell Numerals to insert the value of the variable into the source of the note itself using dataview notation (e.g. variable::value). This allows you to ensure calculation results are saved to the source of the note (in case you ever use outside of Obsidian), as well as setting dataview values using Numerals.

Numerals 1 4 Beta Screenshot - Result Insertion

Numerals 1.4 (Beta) also adds a convenience feature for autocomplete of greek characters, by typing : in a math block and then starting to type the name of the character. Greek characters are fully supported by Numerals' math engine, so you can name your variables using math characters. This includes in -tex mode, where subscript support is also included, and ω_n will render as $ω_n$
Numerals 1 4 Beta Screenshot Greek
Note: this feature can be disabled in settings if it conflicts with any autocomplete tools you already have

obsidian-numerals - 1.3.1

Published by github-actions[bot] about 1 year ago

Beta Release

  • Fixes annoying math-tex rendering bug for some users (#60, #57, #45)
obsidian-numerals - 1.3.0

Published by github-actions[bot] about 1 year ago

🎉 Beta Release 1.3 🎉

  • Access frontmatter or dataview inline variables inside code blocks
  • Math code block auto-update after metadata or settings change
  • Render subscripts in TeX mode
obsidian-numerals - 1.2.1

Published by github-actions[bot] over 1 year ago

Beta release

  • Switch font colors to be based on --code- variants. Should allow for better consistency with themes
  • Please open an issue if this negatively affects any styling
obsidian-numerals - 1.2.0

Published by github-actions[bot] over 1 year ago

🎉 Numerals 1.2

  • Adds auto-completion to all variables with an option to auto-complete on all functions and constants!
  • Adds user setting to specify rendered number formatting
  • Fixes bugs with comma decimal separators: #19, #23, #28
  • Fixes a bug causing issues on iOS

Auto-completion Suggestions

By default, Numerals will provide auto-completion suggestions for variables that have been defined in a particular math codeblock. Turning on Include Functions and Constants in Suggestions will also provide suggestions for all functions, math constants, and physical constants supported in Numerals.

Auto-completion of Functions

Formatting Options

  • System Formatted: Use your local system settings for number formatting
  • Fixed: No thousands separator and full precision
  • Exponential: Always use exponential notation.
  • Engineering: Exponential notation with exponent a multiple of 3.
  • Formatted: Forces a specific type of formatted notation.

    • Formatted: 100,000.1
    • Formatted: 100.000,1
    • Formatted: 100 000,1
    • Formatted: 1,00,000.1
  • Note: math-tex mode will always use period as decimal separator, regardless of locale.
obsidian-numerals - 1.0.10

Published by github-actions[bot] over 1 year ago

Release Changes

  • Adds user setting to specify rendered number formatting
  • Fixes bugs with comma decimal separators: #19, #23, #28

Formatting Options

  • System Formatted: Use your local system settings for number formatting
  • Fixed: No thousands separator and full precision
  • Exponential: Always use exponential notation.
  • Engineering: Exponential notation with exponent a multiple of 3.
  • Formatted: Forces a specific type of formatted notation.

    • Formatted: 100,000.1
    • Formatted: 100.000,1
    • Formatted: 100 000,1
    • Formatted: 1,00,000.1

Note:  math-tex  mode will always use period as decimal separator, regardless of locale.

obsidian-numerals - 1.0.9

Published by github-actions[bot] over 1 year ago

Rewrite result annotation regex which was crashing Numerals on iOS

obsidian-numerals - 1.0.8

Published by github-actions[bot] almost 2 years ago

Add support for auto-completion suggestions (#15)

obsidian-numerals - 1.0.7

Published by github-actions[bot] almost 2 years ago

Renamed "emitted" syntax to "Result Annotation"

Result Annotation:
=> at the end of a line (but before a comment) will tell Numerals that a result should be highlighted. Any line in that code block without a => annotation will be rendered faintly (or hidden depending on settings).

obsidian-numerals - 1.0.6

Published by github-actions[bot] almost 2 years ago

Fixed bug in settings loading for all new users

obsidian-numerals - 1.0.5

Published by github-actions[bot] almost 2 years ago

  • Code cleanup to address PR comments for community plugin list
  • Adds initial support for Style Settings (#13)
  • Adds initial support for Calca style result annotation (#4). Add => after a line to hide (or dim) all other lines in the block
  • includes a bugfix for syntax highlighting as well as resetting settings when upgrading from older versions
obsidian-numerals - 1.0.4

Published by github-actions[bot] almost 2 years ago

Minor tweaks to fix TypeScript errors and avoid potential bugs

obsidian-numerals - 1.0.3

Published by gtg922r almost 2 years ago

Manifest tweak

obsidian-numerals - 1.0.2

Published by gtg922r almost 2 years ago

Update description in manifest

obsidian-numerals - 1.0.1

Published by gtg922r almost 2 years ago

Minor settings tweak and metadata updates for plugin submission

obsidian-numerals - 1.0.0

Published by gtg922r almost 2 years ago

Initial 1.0 release, ready for plugin store submission

obsidian-numerals - 0.0.12: TeX Rendering and Syntax Highlighting! Also better error messages

Published by gtg922r almost 2 years ago

Numerals now supports TeX style rendering and Syntax Highlighting of math blocks!

Either go to settings to change the default render style, or force the render style for a specific math block by using math-plain, math-tex, or math-highlight

Numerals Render Style Comparison

Better Error Messages

Error messages are now reported in the line where the error occurred to better troubleshoot any issues.
Numerals Error Reporting

This is the last major release before 1.0 and submitted to plugin store!

Related Projects