From ab89966a05d9ec396360224d30c5647dd01dbab9 Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Sun, 4 Jan 2026 16:11:29 +0400 Subject: [PATCH 1/4] feature: add decibel and percent --- assets/script.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assets/script.js b/assets/script.js index 0ec2a3b..c65a46e 100644 --- a/assets/script.js +++ b/assets/script.js @@ -6,6 +6,7 @@ document.addEventListener("DOMContentLoaded", function() { "\\squared": "{^{2}}", "\\cubed": "{^{3}}", "\\per": "/", + "\\percent": "\\%", "\\tera": "T", "\\giga": "G", "\\mega": "M", @@ -22,6 +23,14 @@ document.addEventListener("DOMContentLoaded", function() { "\\ampere": "\\text{A}", "\\kelvin": "\\text{K}", "\\mol": "\\text{mol}", + "\\bel": "\\text{B}", + "\\dezibel": "\\text{dB}", + "\\dB": "\\text{dB}", + "\\dBm": "\\text{dBm}", + "\\dBu": "\\text{dBu}", + "\\dBW": "\\text{dBW}", + "\\dBi": "\\text{dBi}", + "\\dBd": "\\text{dBd}", "\\candela": "\\text{cd}", "\\newton": "\\text{N}", "\\hertz": "\\text{Hz}", From f950a19d34111aa356d57c919cbd6e3c22bb45d8 Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Sun, 4 Jan 2026 16:35:34 +0400 Subject: [PATCH 2/4] feature: add qtyrange command --- assets/script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/script.js b/assets/script.js index c65a46e..250418e 100644 --- a/assets/script.js +++ b/assets/script.js @@ -2,6 +2,7 @@ document.addEventListener("DOMContentLoaded", function() { var macros = { ",": (context) => context.future()?.text === " " ? "{\\char`,}" : "\\char`,", "\\qty": "{#1\\,\\mathrm{#2}}", + "\\qtyrange": "{#1 - #2\\,\\mathrm{#3}}", "\\unit": "{\\mathrm{#1}}", "\\squared": "{^{2}}", "\\cubed": "{^{3}}", From a7a03c084a49374663872c35716e6c01e8217557 Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Sun, 4 Jan 2026 17:51:50 +0400 Subject: [PATCH 3/4] fix: dash type --- assets/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/script.js b/assets/script.js index 250418e..353885a 100644 --- a/assets/script.js +++ b/assets/script.js @@ -2,7 +2,7 @@ document.addEventListener("DOMContentLoaded", function() { var macros = { ",": (context) => context.future()?.text === " " ? "{\\char`,}" : "\\char`,", "\\qty": "{#1\\,\\mathrm{#2}}", - "\\qtyrange": "{#1 - #2\\,\\mathrm{#3}}", + "\\qtyrange": "{#1--#2\\,\\mathrm{#3}}", "\\unit": "{\\mathrm{#1}}", "\\squared": "{^{2}}", "\\cubed": "{^{3}}", From 119d01a760ef67356d826bcb028dafae175fd482 Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Sun, 4 Jan 2026 17:59:32 +0400 Subject: [PATCH 4/4] fix: rendering problem with dash --- assets/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/script.js b/assets/script.js index 353885a..5ba40fd 100644 --- a/assets/script.js +++ b/assets/script.js @@ -2,7 +2,7 @@ document.addEventListener("DOMContentLoaded", function() { var macros = { ",": (context) => context.future()?.text === " " ? "{\\char`,}" : "\\char`,", "\\qty": "{#1\\,\\mathrm{#2}}", - "\\qtyrange": "{#1--#2\\,\\mathrm{#3}}", + "\\qtyrange": "{#1\\text{--}#2\\,\\mathrm{#3}}", "\\unit": "{\\mathrm{#1}}", "\\squared": "{^{2}}", "\\cubed": "{^{3}}",