-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMathML.types.ps1xml
More file actions
60 lines (57 loc) · 1.56 KB
/
MathML.types.ps1xml
File metadata and controls
60 lines (57 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!-- Generated with EZOut 2.0.6: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
<Types>
<Type>
<Name>MathML</Name>
<Members>
<ScriptMethod>
<Name>ToString</Name>
<Script>
$this.svg.OuterXml
</Script>
</ScriptMethod>
<ScriptProperty>
<Name>ID</Name>
<GetScriptBlock>
<#
.SYNOPSIS
Gets a MathML id
.DESCRIPTION
Gets the ID attribute on a MathML element.
MathML does not need to have an identifier, but it certainly can help.
#>
return $this.Math.id
</GetScriptBlock>
<SetScriptBlock>
<#
.SYNOPSIS
Sets a MathML id
.DESCRIPTION
Sets the ID attribute on a MathML element.
MathML does not need to have an identifier, but it certainly can help.
#>
$this.Math.setAttribute("id", "$args")
</SetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>SVG</Name>
<GetScriptBlock>
<#
.SYNOPSIS
Gets MathML as SVG
.DESCRIPTION
Gets a MathML equation within an SVG
.LINK
https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/foreignObject
#>
[xml]@"
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" font-size="3em">
<foreignObject x="0%" y="0%" width="100%" height="100%">
$($this.OuterXml)
</foreignObject>
</svg>
"@
</GetScriptBlock>
</ScriptProperty>
</Members>
</Type>
</Types>