These are things I’ve done in my “Urban Off Gridding for Laypersons” TiddlyWiki.
G’day,
I’ve been finding myself doing way too much arithmetic with my calculator lately, mostly trying to figure out the wattage or items I’ve purchased (i.e. Amps x Volts = Watts) and the cost of devices plugged into AC outlets (i.e. Device Wattage x Hours x Utility Rate).
If finally dawned on me: why am I entering all of these amounts in tiddlers (for information purposes) and entering the majority of those amounts again in a calculator to then copy final totals into my tiddlers ?
Way too much work, so I decided to learn a few TiddlyWiki things to make life a little easier and the results a little prettier. These things include:
Learning about basic math operators
Learning about just enough CSS to setup a custom tooltip class
Learning about macros
Pass values to the macros
Do math operators
Return a value wrapped with “tooltip stuff” to show information related to the value
Should you be interested in any of that stuff, the 4 screenshots further below will let you know where to find the “goodies(?)” in my “Urban Off Gridding for Laypersons” TiddlyWiki .
Cheers !
Design Results: a value calculated via macro appears with a blue-ish border, indicating that more info is available as a tooltip when the mouse pointer hovers over the value.

The WikiText Macro call to make the “magic” happen (AmpsToWatts, first parameter is Amps, second parameter is Volts, result is Watts).

The “Energy Info” Macros

The CSS Magic for the custom tooltip (slightly modified version of the “Basic Tooltip" from w3schools.com)

<div class="tooltip"><<wattage>> W<div class="tooltip"><<wattage>> W<sup>?</sup>\define WhRate() 0.01118\define WHCv(W:0 H:1)<$calc>round(($W$ * $H$ * <<WhRate>>),4)</$calc>\end\define WHC(W:0 H:1)<!-- 🔴 WATTS x HOURS x RATE/WATTHOUR = ◾COST◾ --><$vars cost=<<WHCv $W$ $H$>>><div class="tooltip"><<cost>> $<span class="tooltiptext">Cost (<<cost>> $) <br>= <br>Watts ($W$ W) <br>x Hours ($H$ h) <br>x Rate ($(WhRate)$ $/Wh)</span></div></$vars>\end