File tree 8 files changed +395
-27
lines changed
8 files changed +395
-27
lines changed Original file line number Diff line number Diff line change 5
5
}
6
6
}
7
7
8
+ /* Monospace is easier to read when entering lots of symbols */
9
+
10
+ input {
11
+ font-family : monospace;
12
+ }
13
+
14
+ /* Displayed formulas are centred. */
15
+
16
+ .displayedformula {
17
+ text-align : center;
18
+ }
8
19
9
20
/* Code entry stuff */
10
21
24
35
overflow : hidden;
25
36
resize : none;
26
37
}
38
+ .defnsat-entry input {
39
+ width : 100%
40
+ }
27
41
28
42
.defnsat-parseresult {
29
43
grid-column : 1 ;
74
88
75
89
/* Natural deduction stuff */
76
90
77
- /* input { */
78
- /* font-family: "DejaVu Sans Mono", "Linux Libertine O", "serif"; */
79
- /* } */
80
-
81
91
.vertical {
82
92
display : flex;
83
93
flex-direction : column;
146
156
}
147
157
148
158
.comment {
149
- color : # 164 ; /* FIXME: dark mode? */
159
+ color : # 164 ;
150
160
font-style : italic;
151
161
white-space : nowrap;
152
- /* padding-left: 0.8em; */
153
162
}
154
163
155
164
@media (prefers-color-scheme : dark) {
191
200
192
201
.resetbutton {
193
202
padding : 0 ;
194
- border : solid # ddd 1px ;
195
- font-size : 50 % ;
196
- border-radius : 3 px ;
203
+ /* border: solid #ddd 1px;*/
204
+ font-size : 60 % ;
205
+ border-radius : 2 px ;
197
206
margin-right : 0.3em ;
207
+ opacity : 0.7 ;
198
208
}
199
209
200
210
/* ------------------------ */
235
245
}
236
246
237
247
.assumptionbox {
238
- border-radius : 0.4em 0.4em 0 0 ;
239
- border-top : 1px solid # ddd ;
240
- border-left : 1px solid # ddd ;
241
- border-right : 1px solid # ddd ;
242
- display : flex;
243
- flex-direction : column;
244
- margin-left : 0.5em ; margin-right : 0.5em
248
+ border-radius : 0.4em 0.4em 0 0 ;
249
+ border-top : 1px solid # ddd ;
250
+ border-left : 1px solid # ddd ;
251
+ border-right : 1px solid # ddd ;
252
+ display : flex;
253
+ flex-direction : column;
254
+ margin-left : 0.5em ; margin-right : 0.5em
245
255
}
246
256
247
257
.assumption {
248
- border-bottom : 1px solid # ddd ;
249
- margin-bottom : 1.2em ;
250
- color : # 555 ;
251
- font-style : italic;
252
- padding-left : 0.5em
258
+ border-bottom : 1px solid # ddd ;
259
+ margin-bottom : 1.2em ;
260
+ color : # 555 ;
261
+ font-style : italic;
262
+ padding-left : 0.5em
253
263
}
Original file line number Diff line number Diff line change 1
1
open Widgets
2
2
3
+ module Formula_validator = struct
4
+ open Fol_formula
5
+
6
+ type config = unit
7
+
8
+ let read_config _ = Some ()
9
+ let placeholder _ = " <formula>"
10
+ let validate _ str =
11
+ match Formula. of_string str with
12
+ | Ok f ->
13
+ Ok (" Formula is: " ^ Formula. to_string f)
14
+ | Error (`Parse err ) ->
15
+ Error (Parser_util.Driver. string_of_error err)
16
+ end
17
+
3
18
let () =
4
19
Ulmus. attach_all " lmt" Slakemoth_widget. component;
5
20
Ulmus. attach_all " tickbox" Tickbox. component;
6
21
Ulmus. attach_all " textbox" Textbox. component;
7
- Ulmus. attach_all " entrybox" (Validating_entry. component (module Validating_entry. Null_Validator ));
22
+ Ulmus. attach_all " entrybox"
23
+ (Validating_entry. component (module Validating_entry. Null_Validator ));
24
+ Ulmus. attach_all " formulaentry"
25
+ (Validating_entry. component (module Formula_validator ));
8
26
9
27
Ulmus. attach_all " rules" Natural_deduction.Rules. from_rules;
10
28
Ulmus. attach_all " rules-display" Natural_deduction.Rules. display_rules;
Original file line number Diff line number Diff line change @@ -229,6 +229,9 @@ let figcaption ?attrs = normal_element "figcaption" ?attrs
229
229
let div ?attrs = normal_element " div" ?attrs
230
230
let main ?attrs = normal_element " main" ?attrs
231
231
232
+ let details ?attrs = normal_element " details" ?attrs
233
+ let summary ?attrs = normal_element " summary" ?attrs
234
+
232
235
(* 4.5 Text level semantics *)
233
236
let a ?attrs = normal_element " a" ?attrs
234
237
let em ?attrs = normal_element " em" ?attrs
Original file line number Diff line number Diff line change 3
3
include Html_sig. S
4
4
(* * Supports the generic HTML generation interface. *)
5
5
6
+ val details : _ normal_element
7
+ val summary : _ normal_element
8
+
6
9
val raw_text : string -> _ t
7
10
(* * [raw_text str] produces a document consisting of [str] without
8
11
escaping any of the HTML-sensitive characters. FIXME: better
You can’t perform that action at this time.
0 commit comments