gtg922r / obsidian-numerals

An obsidian plugin which turns a math code block into a full featured calculator
Other
389 stars 7 forks source link

[FEAT] named/unnamed collections to do sums/stats on #49

Closed RonnyPfannschmidt closed 2 months ago

RonnyPfannschmidt commented 1 year ago

on occasion i want to make nicely grouped listings of expected expenses and turn them into something reasonably easy to track

example

## travel expenses
```math

berlin {
  hotel = 140€
  food = 40€
}

leipzig {
  hotel = 120€
  food = 40€
}

gasoline = 200€

totals = sums(berlin, leipzig, gasoline)


from that i would love to see a output that breaks each of the amppings down to single sum and then a grand total
AndriiPetrovDev commented 6 months ago

Yeah, really need a feature to combine lines somehow

gtg922r commented 6 months ago

Summing a preceding group of lines is generally covered in FR #18 . The somewhat unique part of this request is the labelling/naming of the group. Starting to work on support for this, so feel free to comment in #18 with any thoughts on syntax - I'm still struggling with that part. I like your proposed syntax, however it conflicts with math.js (underlying math engine) which I generally try to avoid.

gtg922r commented 2 months ago

Closing with public release of Numerals 1.5

This specific use case can be covered by:

```math
## travel expenses
hotel = 140€
food = 40€
berlin = @total

hotel = 120€
food = 40€
leipzig = @total

gasoline = 200€

totals = berlin + leipzig + gasoline