const fieldName = "theme"; // Your field with linksconst oldPrefix = "Thoughts/01 Themes/";const newPrefix = "Digital Garden/Topics/";const relatedLinks = dv.current()[fieldName];if (Array.isArray(relatedLinks)) { // Map over the links, replace the path, and output only clickable links dv.el("span", relatedLinks .map(link => { if (link && link.path) { let newPath = link.path.startsWith(oldPrefix) ? link.path.replace(oldPrefix, newPrefix) : link.path; return dv.fileLink(newPath); } }) .filter(Boolean).join(", ") // Remove any undefined/null items );} else { dv.el(dv.current().theme);}
Theorem
If I is an interval, then
m∗(I)=ℓ(I)
Proof
Suppose I=[a,b]. Then I⊂(a−ϵ,b+ϵ) for all ϵ>0. But then we have
m∗(I)≤ℓ(a−ϵ,b+ϵ)=b−a+2ϵ
Thus we have m∗(I)≤b−a.
Now we show b−a≤m∗(I). Let {In}n be a collection of open intervals such that [a,b]⊂⋃nIn.
Now, since [a,b] is compact (by the Heine-Borel theorem), there exists a finite subcover {Jk}k=0m⊂{In}n such that [a,b]⊂⋃k=0mJk
Since a∈⋃k=0mJk, there exists k1 such that a∈Jk1. Rearranging intervals, I let k1=1 and a∈J1=(a1,b1). If b1<b, then b1∈[a,b]. So ther eis some k2 such that b1∈Jk2. By rearranging again, I assume k2=2. So b1∈J2=(a2,b2).
Continuing in the same manner, we conclude that there exists a K,1≤K≤m such that b<bK. And for all k∈{1,2,…,K−1} we have bk≤b and ak+1≤bk<bk+1.