diff --git a/.vscodeignore b/.vscodeignore new file mode 100644 index 0000000..8b92bec --- /dev/null +++ b/.vscodeignore @@ -0,0 +1,3 @@ +img +.github +.gitignore \ No newline at end of file diff --git a/extension.js b/extension.js index 24112a1..43d2391 100644 --- a/extension.js +++ b/extension.js @@ -34,7 +34,6 @@ exports.activate = function activate(context) { save = (arg) => { try { const doc = arg && arg.uri ? arg : vscode.window.activeTextEditor && vscode.window.activeTextEditor.document; - const uri = vscode.window.activeTextEditor.document.uri; if (!doc) errMsg('Saving html failed: invalid editor document!'); else if (doc.languageId !== 'markdown') @@ -42,8 +41,8 @@ exports.activate = function activate(context) { else if (doc.isUntitled) errMsg('Saving html failed: current untitled markdown document needs to be saved once first!'); else { - fs.writeFileSync(outputLocationOf(uri), asHTML(doc), 'utf8'); - infoMsg(`Html saved to ${outputLocationOf(uri)} !`); + fs.writeFileSync(outputLocationOf(doc.uri), asHTML(doc), 'utf8'); + infoMsg(`Html saved to ${outputLocationOf(doc.uri)} !`); } } catch (err) { errMsg('Saving html failed: ' + err.message); diff --git a/package.json b/package.json index 027078a..f7f3760 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Markdown+Math", "description": "LaTeX Math for Markdown ... with macros and more", "icon": "img/icon.png", - "version": "2.5.0", + "version": "2.5.1", "author": "Stefan Goessner", "publisher": "goessner", "keywords": [ diff --git a/triangle.html b/triangle.html new file mode 100644 index 0000000..89ac183 --- /dev/null +++ b/triangle.html @@ -0,0 +1,47 @@ + + + + + + + + + + + + +

The Right Triangle

+

Base Geometry

+

+

Let the right triangle hypothenuse be aligned with the coordinate system x-axis. +The vector loop closure equation running counter-clockwise then reads

+
aeα+be~α+cex=0a{\bold e}_\alpha + b\tilde{\bold e}_\alpha + c{\bold e}_x = \bold 0(1)

with

+
eα=(cosαsinα)ande~α=(sinαcosα){\bold e}_\alpha = \begin{pmatrix}\cos\alpha\\ \sin\alpha\end{pmatrix} \quad and \quad {\tilde\bold e}_\alpha = \begin{pmatrix}-\sin\alpha\\ \cos\alpha\end{pmatrix}

Resolving for the hypothenuse part cexc{\bold e}_x in the loop closure equation (1)

+
cex=aeα+be~α-c{\bold e}_x = a{\bold e}_\alpha + b\tilde{\bold e}_\alpha

and squaring

+
+

finally results in the Pythagorean theorem (2)

+
c2=a2+b2c^2 = + a^2 + + b^2(2)
+

More Triangle Stuff

+

Introducing the hypothenuse segments p=aexp={\bold a}\cdot{\bold e}_x and q=bexq={\bold b}\cdot{\bold e}_x, we can further obtain the following useful formulas.

+ + + + + + + + + + + + + + + + + +
segment psegment qheight harea
cp=a2cp = a^2cq=b2cq = b^2pq=h2pq = h^2ab=chab = ch
+ + \ No newline at end of file