You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- some code restructuring for readability
- added context menu support for copying calculated values
- fixed css behaviour when table cells loose focus
- better css naming convention, providing more control over the appearance of calculation results and the last row containing calculations.
- added explanatory comments for example css snippet
Simple Table Math allows you to perform calculations (sum, average, minimum, maximum, subtraction, multiplication) on columns or rows of numbers within your Markdown tables.
11
+
The plugin allows you to perform calculations (sum, average, minimum, maximum, subtraction, multiplication) on columns or rows of numbers within your Markdown tables.
12
12
To trigger a calculation, place a special tag within a table cell.
13
13
14
14
The tag follows this format: `[operation][direction][start:end][currency]`
@@ -70,40 +70,41 @@ The tag follows this format: `[operation][direction][start:end][currency]`
70
70
***Optional Range Selection:** Target specific cells for your calculations.
71
71
***Currency Formatting:** Display results with currency symbols for better readability.
72
72
***Locale-Aware Formatting:** Respects your system's locale for number formatting by default, with an option to override.
73
-
***Copy Results:** When copying a cell containing a calculated value (using `Ctrl + C` or `⌘ + C`), the numerical result will be copied to your clipboard.
73
+
***Copy Results:** When copying a cell containing an operation (using `Ctrl + C` or `⌘ + C`) or the context menu, the calculated result will be copied to your clipboard.
74
74
75
75
## Settings
76
76
77
-
You can configure Simple Table Math in the Obsidian settings under "Simple Table Math".
77
+
You can configure the plugin in the Obsidian settings under "Simple Table Math".
78
78
The following options are available:
79
79
80
80
***Fractions:** Set the number of decimal places to display in the calculated results.
81
-
***Number formatting:** Enter a locale code (e.g., `en-US`, `de-DE`) to override the default number formatting. If left blank it will use the languagae defined for Obsidian.
81
+
***Number formatting:** Enter a locale code (e.g., `en-US`, `de-DE`) to override the default number formatting. If left blank, it will use the language defined for Obsidian.
82
+
***Highlight last row calculations:** Enable or disable styling for the last row in tables that contain calculations.
82
83
83
84
## CSS Look & Feel
84
85
85
-
Simple Table Math will add a CSS class `.stm-value` to every cell containing a calculated value.
86
+
Simple Table Math adds the CSS class `.stm-value` to every cell containing a calculated value.
86
87
You can use this class to style the cells in your tables. By default, these cells will be styled with a bolder font weight.
87
88
88
89
If the last row of a table contains calculations, it will be styled with a background color to make it easier to see the results.
89
90
You can disable this behavior in the plugin settings or write your own CSS snippet to override it.
90
91
91
-
You can find an example CSS snippet in the [snippet.css](https://github.com/eatcodeplay/obsidian-simple-table-math/blob/0.1.0/assets/snippet.css) file.
92
+
For the adventurous: any row that contains calculations will also get a `.stm-row` class.
93
+
94
+
You can find an example CSS snippet in the [snippet.css](https://github.com/eatcodeplay/obsidian-simple-table-math/blob/main/assets/snippet.css) file.
92
95
93
96
## Gotchas & Known Issues
94
97
95
-
***Any column found it the calculation path, will be included in the result.**
98
+
***Any column found in the calculation path will be included in the result.**
96
99
* If your headers contain numbers, make sure exclude them from calculations by using range selection.
97
-
***MOBILE:** Switching between Reading-Mode and Editing-Mode can result in the column not rerendering correctly.
98
-
* Touching/Clicking inside the table or outside should solve that.
99
100
100
101
## Installation
101
102
102
-
This Plugin is currently not available in the Obsidian Community Plugins.
103
-
You can install it manually by following the instructions below:
103
+
This plugin is currently not available in the Obsidian Community Plugins.
104
+
You can install it either by using [BRAT](https://obsidian.md/plugins?id=obsidian42-brat) or manually by following the instructions below:
104
105
105
106
1. Download the latest release from the [Releases](https://github.com/eatcodeplay/obsidian-simple-table-math/releases) page.
106
-
2. Extract the downloaded ZIP file into your Obsidian vault's plugins folder (e.g., `<your_vault>/.obsidian/plugins/obsidian-simple-table-math`).
107
+
2. Extract the downloaded ZIP content into a new folder in your Obsidian vault's plugins folder (e.g., `<your_vault>/.obsidian/plugins/obsidian-simple-table-math`).
107
108
3.**Note:** On some operating systems, the `.obsidian` folder might be hidden. Make sure to show hidden files in your file explorer.
0 commit comments