File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,11 @@ module Printers =
77
77
{ ContentType = " text/html" ; Data = sb.ToString() }
78
78
)
79
79
80
+ // add svg printer
81
+ addDisplayPrinter( fun ( x : SvgOutput ) ->
82
+ { ContentType = " image/svg+xml" ; Data = x.Svg }
83
+ )
84
+
80
85
// add html printer
81
86
addDisplayPrinter( fun ( x : HtmlOutput ) ->
82
87
{ ContentType = " text/html" ; Data = x.Html }
Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ type HtmlOutput =
32
32
Html: string ;
33
33
}
34
34
35
+ type SvgOutput =
36
+ {
37
+ Svg: string ;
38
+ }
39
+
35
40
type GenericChartWithSize =
36
41
{
37
42
Chart: ChartTypes .GenericChart ;
@@ -97,6 +102,9 @@ type Util =
97
102
static member Latex ( str ) =
98
103
{ Latex = str}
99
104
105
+ static member Svg ( str ) =
106
+ { Svg = str}
107
+
100
108
/// Wraps a LatexOutput around a string in order to send to the UI.
101
109
static member Math ( str ) =
102
110
{ Latex = " $$" + str + " $$" }
You can’t perform that action at this time.
0 commit comments