-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathoef-mode.el
3677 lines (3274 loc) · 191 KB
/
oef-mode.el
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; oef-mode.el --- Major mode for editing oef (wims) templates
;;; -*- coding: utf-8 -*-
;; Copyright 2017-2023 Raoul HATTERER
;; Author: Raoul Hatterer <[email protected]>
;; Version: "20231014.1731"
;; previous Version: "20231014.0413"
;; Maintainer: Raoul Hatterer <[email protected]>
;; Created: July 2017
;; Keywords: languages
;; URL: http://github.com/raoulhatterer/oef-mode
;; Package-Requires: ((emmet-mode)(company-mode)(rainbow-mode)(yafolding)(wrap-region)(expand-region)(cl-lib))
;; News:
;; Package-Type: multi
;; License: GNU General Public License >= 2
;; Distribution: This file is not part of Emacs
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;==============================================================================
;; The WWW Interactive Multipurpose Server (WIMS) project is designed for
;; supporting intensive mathematical exercises via the Internet
;; or in a computer-equipped classroom with server-side interactivity,
;; accessible at the address http://wims.unice.fr.
;; oef-mode is a mode for editing exercises (online exercise format) files
;; witch should have ".oef" extension to be recognized.
;; On linux you have to run `xdg-mime install oef-mime.xml' in a Terminal
;; and then restart your session to define .oef as a new type of files.
;;==============================================================================
;;; manually installation:
;;==============================================================================
;; This section is a tutorial on how to install oef-mode Emacs package manually.
;; First method for trying: "Load the File Manually"
;; To use the package, all you have to do is to make Emacs load the file 'oef-mode.el'.
;; alt+x load-file then give the file path.
;; Now, Emacs is aware of the package. To activate, call “oef-mode” (with alt+x).
;; Other method: "Load File at Startup"
;; * Emacs (Linux):
;; If you want Emacs to load the file 'oef-mode.el' when it starts, put the file 'oef-mode.el'
;; in the dir "~/.emacs.d/lisp/", (create that directory if it doesn't exist).
;; By convention, the dir ~/.emacs.d/lisp/ is for packages you manually installed.
;; Then put the following (without ;;) in your Emacs init file "~/.emacs"
;;vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
;; (add-to-list 'load-path "~/.emacs.d/lisp/") ;; Tell Emacs where is your personal elisp lib dir
;; (load "oef-mode") ;; load the packaged named oef (best not to include the ending “.el” or “.elc”)
;;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;; before the line (package-initialize).
;; * aquamacs (OSX):
;; If you want aquamacs to load the file 'oef-mode.el' when it starts, put the file 'oef-mode.el'
;; in the dir "~/Library/Preferences/Aquamacs Emacs/Packages/lisp/"
;; (create that directory if it doesn't exist).
;; Then put the following (without ;;) in your aquamacs init file
;; "~/Library/Preferences/Aquamacs Emacs/Preferences.el"
;; not in ~/.emacs witch is deprecated -- meaning 'should not be used for new installations,
;; but will continue to be supported' -- in Aquamacs on OS X)
;;vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
;; (add-to-list 'load-path "~/Library/Preferences/Aquamacs Emacs/Packages/lisp/oef-mode/")
;; ;Tell Emacs where is your personal elisp lib dir
;; (load "oef-mode")
;; ; load the packaged named oef-mode (best not to include the ending “.el” or “.elc”)
;;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;; before the line (package-initialize).
;; How to Debug Aquamacs if you need to:
;; Past the following command in a terminal:
;; /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -nw --debug-init
;;==============================================================================
;;; Recommended packages:
;;==============================================================================
;; * emmet-mode
;; Minor mode for writing HTML and CSS markup.
;; `oef-edit-in-browser' is bound to `C-c C-c' and emmet-mode is bound to `C-c C-c w'
;; Which means it's going to block `oef-edit-in-browser'. To fix this add this in your init file:
;; (require 'emmet-mode)
;; (eval-after-load "emmet-mode"
;; '(define-key emmet-mode-keymap (kbd "C-c C-c") 'oef-edit-in-browser))
;; (eval-after-load "emmet-mode"
;; '(define-key emmet-mode-keymap (kbd "C-c w") 'emmet-wrap-with-markup))
;; (add-hook 'sgml-mode-hook 'emmet-mode) ;; Auto-start on any markup modes
;; ;; `emmet-mode' will automatically start with oef-mode
;; (add-hook 'html-mode-hook 'emmet-mode)
;; (add-hook 'css-mode-hook 'emmet-mode)
;; (add-hook 'web-mode-hook 'emmet-mode)
;; * company-mode
;; `Company-mode' is a modular completion framework.
;; To use company-mode in all buffers, add the following line to your init file:
;; (require 'company)
;; (add-hook 'after-init-hook 'global-company-mode)
;; * `rainbow-mode'
;; add to your init file:
;; (require 'rainbow-mode)
;; (add-to-list 'rainbow-html-colors-major-mode-list 'oef-mode) ;
;; (add-hook 'oef-mode-hook 'rainbow-mode) ; Auto-start HTML and CSS colorization
;; * `yafolding'
;; Folding code blocks based on indentation
;; Automatically installed and launch
;; * `wrap-region'
;; add to your init file:
;; (require 'wrap-region)
;; (add-hook 'oef-mode-hook 'wrap-region-mode)
;; * `expand-region'
;; add to your init file:
;; (require 'expand-region)
;; (global-set-key (kbd "C-=") 'er/expand-region)
;;==============================================================================
;;; Code:
(unless (featurep 'aquamacs); subdir inclusion so oef-mode dir will be included to emacs load path
(let ((default-directory "~/.emacs.d/"))
(normal-top-level-add-subdirs-to-load-path)))
(require 'cl-lib)
;;---- KILL-ALL-LOCAL-VARIABLES-------------------------------------------------
(kill-all-local-variables)
;; This function eliminates all the buffer-local variable bindings of the current buffer
;; except for variables marked as permanent and local hook functions that have a non-nil
;; permanent-local-hook property (see Setting Hooks).
;; As a result, the buffer will see the default values of most variables.
;; This function also resets certain other information pertaining to the buffer: it sets
;; the local keymap to nil, the syntax table to the value of (standard-syntax-table),
;; the case table to (standard-case-table), and the abbrev table to the value of fundamental-mode-abbrev-table.
;; The very first thing this function does is run the normal hook change-major-mode-hook.
;;---- AUTO-START --------------------------------------------------------------
(add-hook 'sgml-mode-hook 'oef-mode-hook)
(defun oef-mode-hook ()
"(De)Activation of some (un)usefull minor modes."
(auto-fill-mode -1)
(yafolding-mode 1)
(autoload 'LaTeX-math-mode "latex" "LaTeX-math-mode" t)
(LaTeX-math-mode)
(flycheck-mode -1) ; TODO implement Syntax checking for oef-mode
)
;;---- CONSTS ------------------------------------------------------------------
(defconst oef-mode-version "20231014.1731"
"Oef-mode version. For maintainer: Has to be generated by `(format-time-string \"%Y%m%d.%H%M\")' in *scratch* and past here before commit")
;; (format-time-string "%Y%m%d.%H%M") evaluation in *scratch* buffer
;;---- GROUPS ------------------------------------------------------------------
(defgroup oef nil
"Mode for editing OEF (wims) files"
:group 'languages
:prefix "oef-mode"
:link '(url-link :tag "Site" "http://wims.unice.fr")
:link '(url-link :tag "Repository" "https://github.com/raoulhatterer/oef-mode"))
(defgroup oef-faces nil
"Faces for syntax highlighting."
:group 'oef ; CUSTOMIZE > PROGRAMMING > LANGUAGE > OEF > OEF-FACES
:group 'faces) ; CUSTOMIZE > FACES > OEF-FACES
;;---- FACES -------------------------------------------------------------------
(defface oef-font-function-name-face
'((t (:foreground "orange red")))
"Face for functions"
:group 'oef-faces)
(defface oef-font-equal-face
'((t :inherit oef-font-function-name-face))
"Face for equal sign"
:group 'oef-faces)
(defface oef-font-command-face
'((t :inherit oef-font-function-name-face))
"Face for commands"
:group 'oef-faces)
(defface oef-font-answer-command-face
'((t
(:box
(:line-width 2 :color "#FFF2F2" :style nil)
:background "#FFF2F2"
:inherit
(oef-font-command-face))))
"Face for answer command"
:group 'oef-faces)
(defface oef-font-hint-command-face
'((t
(:box
(:line-width 1 :color "orange red" :style nil)
:inherit
(oef-font-command-face))))
"Face for hint command"
:group 'oef-faces)
(defface oef-font-statement-command-face
'((t
(:height 1.2 :weight extra-bold :inherit
(oef-font-answer-command-face))))
"Face for statement command"
:group 'oef-faces)
(defface oef-font-statement-face
'((t (:background "grey90")))
"Face for statement"
:group 'oef-faces)
(defface oef-font-positivenumber-face
'((t (:foreground "#555555")))
"Face for positive number"
:group 'oef-faces)
(defface oef-font-documentation-face
'((t :inherit (font-lock-doc-face oef-font-statement-face)))
"Face for documentation"
:group 'oef-faces)
(defface oef-font-htag-face
'((t (:foreground "snow4")))
"Face for h1 h2 h3 tags"
:group 'oef-faces)
(defface oef-font-litag-face
'((t (:foreground "magenta")))
"Face for li tags"
:group 'oef-faces)
(defface oef-font-h1text-lightbg-face
'((t
(:width normal :height 1.1 :weight bold :underline
(:color "red" :style line)
:foreground "black")))
"Face for sections between h1 tags when the background is light"
:group 'oef-faces)
(defface oef-font-h1text-darkbg-face
'((t
(:width normal :height 1.1 :weight bold :underline
(:color foreground-color :style line)
:foreground "white")))
"Face for sections between h1 tags when the background is dark"
:group 'oef-faces)
(defface oef-font-h1text-face
'((t
(:inherit
(oef-font-h1text-lightbg-face))))
"Face for sections between h1 tags"
:group 'oef-faces)
(defface oef-font-h2text-lightbg-face
'((t
(:width normal :height 1.1 :weight bold :foreground "black")))
"Face for sub-sections between h2 tags when the background is light"
:group 'oef-faces)
(defface oef-font-h2text-darkbg-face
'((t
(:width normal :height 1.05 :weight bold :foreground "white")))
"Face for sub-sections between h2 tags when the background is dark"
:group 'oef-faces)
(defface oef-font-h2text-face
'((t
(:inherit
(oef-font-h2text-lightbg-face))))
"Face for sub-sections between h2 tags"
:group 'oef-faces)
(defface oef-font-h3text-face
'((t
(:width normal :underline
(:color foreground-color :style line)
)))
"Face for sub-sub-sections between h3 tags"
:group 'oef-faces)
(defface oef-font-answer-type-face
'((t (:foreground "#CC9900")))
"Face for answer type and options"
:group 'oef-faces)
(defface oef-font-control-face
'((t (:foreground "#FF8C00")))
"Face for controls commands: for if else"
:group 'oef-faces)
(defface oef-font-comment-face
'((t :inherit font-lock-comment-face))
"Face for comments"
:group 'oef-faces)
(defface oef-font-warning-face
'((t :inherit font-lock-warning-face))
"Face for warning"
:group 'oef-faces)
(defface oef-font-type-face
'((t :inherit font-lock-type-face))
"Face for type"
:group 'oef-faces)
(defface oef-font-keyword-face
'((t :inherit font-lock-keyword-face))
"Face for keywords"
:group 'oef-faces)
(defface oef-font-variable-name-face
'((t :inherit font-lock-variable-name-face))
"Face for variables"
:group 'oef-faces)
(defface oef-font-formula-braces-face
'((t :background "LemonChiffon2"))
"Face for mathematical formulas"
:group 'oef-faces)
(defface oef-font-mark-face
'((t :background "Yellow"))
"Face for html mark tag"
:group 'oef-faces)
(defface oef-font-draw-face
'((t :foreground "sea green"))
"Face for draw commands"
:group 'oef-faces)
;;---- VARS --------------------------------------------------------------------
(defcustom oef-line-spacing 0.1
"Additional space to put between lines when displaying an `oef-mode' buffer."
:group 'oef)
(defcustom oef-these-phrases-are-made-of-words-not-keywords
'("la solution" "de solution" "en solution" "une solution" "d'une solution" "des conditions" "tout point" "du point" "plusieurs points" "ses points" "un point")
"You can add your own phases here."
:group 'oef)
(defcustom oef-author "First Name, Last Name"
"Author name"
:group 'oef)
(defcustom oef-email "your@email"
"Author email"
:group 'oef)
(defcustom oef-language "fr"
"Language"
:group 'oef)
(defvar oef-grabed-word-for-goto nil
"This variable is used to navigate in the buffer.")
(defvar oef-answers-index nil
"This variable is used to navigate in the buffer.")
(defvar oef-menu-answers-options ; "STAR BLANK TYPE" or "BLANK BLANK BLANK OPTION" in the menu DONE
'("type=" "option=" "weight=" "* type=default"
"* type=raw"
" option=noaccent" " option=nocase" " option=nodigit" " option=nomathop" " option=noparenthesis" " option=nopunct" " option=noquote" " option=nospace" " option=reaccent" " option=singlespace" " option=symtext"
"* type=numeric"
" option=comma" " option=absolute" " option=nonstop noanalyzeprint" " option=noanalyzeprint nonstop" " option=nonstop" " option=noanalyzeprint"
"* type=function"
" option=integer"
"* type=equation"
" option=eqsign=yes"
"* type=algexp"
"* type=litexp"
"* type=formal"
"* type=case"
" option=noreaccent"
"* type=nocase"
"* type=atext"
"* type=checkbox"
"* type=radio"
"* type=flashcard"
"* type=multipleclick"
" option=nolegend"
" option=split"
" option=shuffle"
" option=sort"
" option=eqweight"
" option=sort split"
" option=sort eqweight"
"* type=menu"
" option=shuffle multiple=1"
" option=shuffle multiple=2"
" option=shuffle multiple=3"
" option=shuffle multiple=4"
" option=shuffle multiple=5"
" option=shuffle multiple=6"
" option=shuffle multiple=7"
" option=shuffle multiple=8"
" option=sort multiple=1"
" option=sort multiple=2"
" option=sort multiple=3"
" option=sort multiple=4"
" option=sort multiple=5"
" option=sort multiple=6"
" option=sort multiple=7"
" option=sort multiple=8"
"* type=mark"
" option=color"
"* type=click"
"* type=multipleclick"
"* type=flashcard"
" option=show"
"* type=chembrut"
"* type=chemdraw"
"* type=chemclick"
"* type=chemeq"
"* type=chset"
"* type=clickfill"
"* type=dragfill"
"* type=clicktile"
"* type=clock"
"* type=compose"
"* type=complex"
"* type=coord"
"* type=correspond"
"* type=crossword"
"* type=draw"
"* type=geogebra"
"* type=javacurve"
"* type=jmolclick"
"* type=jsxgraph"
"* type=jsxgraphcurve"
"* type=keyboard"
"* type=matrix"
"* type=numexp"
"* type=puzzle"
"* type=range"
"* type=reorder"
"* type=set"
"* type=fset"
"* type=aset"
"* type=units"
"* type=sigunits"
"* type=symtext"
"* type=time"
"* type=wlist"
)
"Used for a dedicated submenu thanks to `oef-get-answers-options'.")
(defvar oef-answers-options nil
"`oef-answers-options' used for highlighting and for completion (`oef-completions'). It is automatically build from the variable `oef-menu-answers-options' a list of answers types and options.")
(defvar oef-definitions-commands ; in the menu DONE
'("title{«Exercise Title»}"
"language{«en or fr»}"
"author{«forename1»,«name1»;«forename2»,«name2»}"
"email{«email1»,«email2»}"
"format{html}"
"css{<style></style>}"
"keywords{«keyword1»,«keyword2»}"
"credits{«acknowledgement of those who contributed to the document or exercise, whether through ideas or in a more direct sense»}"
"description{«forTheStudent»}"
"observation{«forTheTeacher»}"
"precision{1000}"
"range{«n1..n2»}"
"computeanswer{«yes» or «no»}"
"steps{«&opt:choice1,»«reply1»
«&opt:choice2,»«reply2»,«reply3»
«&opt:choice3»}"
"nextstep{<>}"
"statement{«message»}"
"answer{«message»}{«goodAnswer»}{«&opt:type=»}{«&opt:option=»}{«&opt:weight=»}"
"choice{«message»}{«goodAnswers»}{«badAnswers»}{«&opt:option=»}{«&opt:weight=»}"
"condition{«message»}{«conditions»}{«&opt:option=»}{«&opt:weight=»}"
"solution{«solution»}"
"hint{«hint»}"
"help{«popupHelp»}"
"feedback{«condition»}{«message»}"
"conditions{«conditionsNumbers»}"
"latex{}"
"embed{«reply1»,«&opt:option»}"
)
"In this variable we have the definitions of `oef-commands'. Used to get `oef-commands' (thanks to `oef-get-list-commands-names') for highlighting. Also used to get the 'Commands menu' (thanks to `oef-get-menu-commands')."
)
(defvar oef-commands nil
"`oef-commands' is automatically build for highlighting and completion from `oef-definitions-commands' a list of commands definitions.")
(defvar oef-definitions-special-commands ; in the menu DONE
'(
"special{imagefill «parameters»}"
"special{expandlines «parameters»}"
"special{help «parameters»}"
"special{tabs2lines «parameters»}"
"special{rename «parameters»}"
"special{tooltip «parameters»}"
"special{codeinput «parameters»}"
"special{imageinput «parameters»}"
"special{mathmlinput «parameters»}"
"special{drawinput «parameters»}"
)
"In this variable we have the definitions of `oef-special-commands'. Used to get `oef-special-commands' (thanks to `oef-get-list-commands-names') for highlighting. Also used to get the 'Special Commands menu' (thanks to `oef-get-menu-special-commands')."
)
(defvar oef-special-commands nil
"`oef-special-commands' is automatically build from `oef-definitions-special-commands' a list of special commands definitions.")
(defvar oef-doc-commands ; used for highlighting DONE ; in the menu INPROGRESS
'("calcform"
"comment"
"def"
"define"
"docform"
"form"
"draw"
"embed"
"exercise"
"tool"
"help"
"adm"
"fold"
"for"
"form"
"if"
"ifval"
"link"
"ref"
"href"
"reload"
;;"slib"
"tooltip"
"while")
)
(defvar oef-storage-types
'("real" "complex" "text" "integer" "rational" "function" "matrix" )
"List of Oef Variable Types. Used for highlighting and completion. See also `oef-menu-exo-init-types' and `oef-menu-doc-init-types'."
)
(defvar oef-menu-exo-init-types ; in the menu DONE
'(
"complex{=}"
"function{=}"
"integer{=}"
"matrix{=}"
"rational{=}"
"real{=}"
"text{=}"
)
"In this variable we have the definitions of variables initialization commands to be used in an exercise. Used to get the 'Initialization menu' (thanks to `oef-get-exo-init-types'). See also `oef-storage-types' and `oef-menu-doc-init-types'."
)
(defvar oef-menu-doc-init-types ; in the menu DONE
'(
"def{complex =}"
"def{function =}"
"def{integer =}"
"def{matrix =}"
"def{rational =}"
"def{real =}"
"def{text =}"
)
"In this variable we have the definitions of variables initialization commands to be used in a document. Used to get the 'Initialization menu' (thanks to `oef-get-doc-init-types'). See also `oef-storage-types' and `oef-menu-exo-init-types'."
)
(defvar oef-defined-variables ; in the menu DONE
'("reply " "choice" "step" "sc_reply" "reply_" "help_subject" "oef_firstname" "oef_lastname" "oef_login" "oef_now" "oef_lang" )
"Used for highlighting and completion and for a submenu `Defined_Variables'."
)
(defvar oef-comparison-operators ; "=" "<" ">" tested in another place ; in the menu DONE
'("==" "<=" ">=" "isin" "notin" "iswordof" "notwordof" "isvarof" "notvarof" "isvariableof" "notvariableof" "isitemof" "notitemof" "islineof" "notlineof" "issamecase" "notsamecase" "issametext" "notsametext" "or" "and")
"Used for highlighting and completion and for a submenu `Comparisons'."
)
(defvar oef-language-reserved-words ; in the menu DONE
'("to" "of" "within" "in" "into" "by" "internal")
"Used for highlighting and completion and for a submenu `Comparisons'."
)
(defvar oef-definitions-wims-functions ; in the menu DONE
'( "wims(append «parameters»)"
"wims(nonempty «parameters»)"
"wims(getopt «parameters»)"
"wims(replace «parameters»)"
"wims(embraced «parameters»)"
"wims(randitem «parameters»)"
"wims(text «parameters»)"
"wims(select «parameters»)"
"wims(upper «parameters»)"
"wims(nospace «parameters»)"
"wims(sort «parameters»)"
"wims(makelist «parameters»)"
"wims(for «parameters»)"
"wims(values «parameters»)"
"wims(rows2lines «parameters»)"
"wims(lines2items «parameters»)"
"wims(items2words «parameters»)"
"wims(tolower «parameters»)"
)
"Used for highlighting and completion and for a submenu `Wims Functions'."
)
(defvar oef-wims-functions nil
"`oef-wims-functions' is automatically build from `oef-definitions-wims-functions' a list of wims functions definitions.")
(defvar oef-definitions-slib-algebra ; in the menu DONE
'("slib(algebra/partitionconj «parameters»)"
"slib(algebra/partitiondraw «parameters»)"
"slib(algebra/partitionlex «parameters»)"
"slib(algebra/slopedraw «parameters»)"
)
"Used for highlighting and completion and for a submenu `Algebra' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-analysis ; in the menu DONE
'("slib(analysis/inversedomain «parameters»)"
"slib(analysis/odejs «parameters»)"
"slib(analysis/odejs2 «parameters»)"
"slib(analysis/odephase «parameters»)"
"slib(analysis/rungekutta «parameters»)"
"slib(analysis/slope.js «parameters»)"
"slib(analysis/slopefield «parameters»)"
"slib(analysis/slopefield_img «parameters»)"
"slib(analysis/slopefield_js «parameters»)"
)
"Used for highlighting and completion and for a submenu `Analysis' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-chemistry ; in the menu DONE
'("slib(chemistry/atom «parameters»)"
"slib(chemistry/brut2html «parameters»)"
"slib(chemistry/chemeq_add «parameters»)"
"slib(chemistry/chemeq_compare «parameters»)"
"slib(chemistry/chemeq_components «parameters»)"
"slib(chemistry/chemeq_el «parameters»)"
"slib(chemistry/chemeq_equilibrium «parameters»)"
"slib(chemistry/chemeq_mass «parameters»)"
"slib(chemistry/chemeq_rev «parameters»)"
"slib(chemistry/chemeq_rq «parameters»)"
"slib(chemistry/chemeq_tex «parameters»)"
"slib(chemistry/chemshow «parameters»)"
"slib(chemistry/cram «parameters»)"
"slib(chemistry/jmolbutton «parameters»)"
"slib(chemistry/jmolcheckbox «parameters»)"
"slib(chemistry/jmolradiogroup «parameters»)"
"slib(chemistry/jmolshow «parameters»)"
"slib(chemistry/jmolshow_init «parameters»)"
"slib(chemistry/leftind «parameters»)"
"slib(chemistry/molarmass «parameters»)"
"slib(chemistry/molecule «parameters»)"
"slib(chemistry/moleculeViewer «parameters»)"
"slib(chemistry/newman «parameters»)"
)
"Used for highlighting and completion and for a submenu `Chemistry' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-circuits ; in the menu DONE
'("slib(circuits/complist «parameters»)"
"slib(circuits/comppos «parameters»)"
"slib(circuits/draw «parameters»)"
"slib(circuits/drawcomp «parameters»)"
"slib(circuits/drawwire «parameters»)"
"slib(circuits/range «parameters»)"
)
"Used for highlighting and completion and for a submenu `Circuits' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-data ; in the menu DONE
'("slib(data/columnsort «parameters»)"
"slib(data/randline «parameters»)"
"slib(data/random «parameters»)"
"slib(data/randrec «parameters»)"
)
"Used for highlighting and completion and for a submenu `Data' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-draw ; in the menu DONE
'("slib(draw/balance «parameters»)"
"slib(draw/brokenlinegraph «parameters»)"
"slib(draw/clock «parameters»)"
"slib(draw/convpixel «parameters»)"
"slib(draw/domino «parameters»)"
"slib(draw/drtgraduee «parameters»)"
"slib(draw/graphviz «parameters»)"
"slib(draw/graphvizpoints «parameters»)"
"slib(draw/meter «parameters»)"
"slib(draw/polygon «parameters»)"
"slib(draw/radar «parameters»)"
"slib(draw/randpolygon «parameters»)"
"slib(draw/range «parameters»)"
"slib(draw/repdroite «parameters»)"
"slib(draw/repere «parameters»)"
"slib(draw/thermometer «parameters»)"
)
"Used for highlighting and completion and for a submenu `Draw' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-function ; in the menu DONE
'("slib(function/bounds «parameters»)"
"slib(function/bounds2 «parameters»)"
"slib(function/integrate «parameters»)"
)
"Used for highlighting and completion and for a submenu `Function' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-games ; in the menu DONE
'("slib(games/chessboard «parameters»)"
"slib(games/chessimage «parameters»)"
"slib(games/chessmv «parameters»)"
)
"Used for highlighting and completion and for a submenu `Games' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-geogebra ; in the menu DONE
'("slib(geo2D/geogebra «parameters»)"
"slib(geo2D/geogebra3 «parameters»)"
"slib(geo2D/geogebracommand «parameters»)"
"slib(geo2D/geogebraoption «parameters»)"
"slib(geo2D/ggb2jsxgraph «parameters»)"
"slib(geo2D/jsxgraph «parameters»)"
"slib(geo3D/3Dviewer «parameters»)"
"slib(geo3D/CaR «parameters»)"
"slib(geo3D/Convex3D «parameters»)"
"slib(geo3D/draw «parameters»)"
"slib(geo3D/drawtile «parameters»)"
"slib(geo3D/off2jmol «parameters»)"
"slib(geo3D/off2xyz «parameters»)"
"slib(geo3D/polyhedra «parameters»)"
"slib(geo3D/polyhedradual «parameters»)"
"slib(geo3D/threeD «parameters»)"
)
"Used for highlighting and completion and for a submenu `Geogebra' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-graph ; in the menu DONE
'("slib(graph/connexcomponent «parameters»)"
"slib(graph/connexity «parameters»)"
"slib(graph/distance «parameters»)"
"slib(graph/draw «parameters»)"
"slib(graph/drawcc «parameters»)"
"slib(graph/drawtree «parameters»)"
"slib(graph/gpt «parameters»)"
"slib(graph/graphviz «parameters»)"
"slib(graph/path «parameters»)"
"slib(graph/randomconnex «parameters»)"
"slib(graph/randomeuler «parameters»)"
"slib(graph/randtree «parameters»)"
"slib(graph/shortpath «parameters»)"
)
"Used for highlighting and completion and for a submenu `Graph' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-graphpaper ; in the menu DONE
'("slib(graphpaper/correct_milli «parameters»)"
"slib(graphpaper/func «parameters»)"
"slib(graphpaper/func_milli «parameters»)"
"slib(graphpaper/imgpoints «parameters»)"
"slib(graphpaper/millimetre «parameters»)"
"slib(graphpaper/strings «parameters»)"
"slib(graphpaper/tograph «parameters»)"
"slib(graphpaper/whereclick «parameters»)"
)
"Used for highlighting and completion and for a submenu `Graphpaper' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-lang ; in the menu DONE
'("slib(lang/enword2ipa «parameters»)"
"slib(lang/epd2ipa «parameters»)"
"slib(lang/fname «parameters»)"
"slib(lang/fraccord «parameters»)"
"slib(lang/frapostrophe «parameters»)"
"slib(lang/frartdef «parameters»)"
"slib(lang/frcodcoi «parameters»)"
"slib(lang/frverbconj «parameters»)"
"slib(lang/images «parameters»)"
"slib(lang/randomword «parameters»)"
"slib(lang/sampa2ipa «parameters»)"
"slib(lang/swac «parameters»)"
)
"Used for highlighting and completion and for a submenu `Lang' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-life ; in the menu DONE
'("slib(life/frcommodity «parameters»)"
)
"Used for highlighting and completion and for a submenu `Life' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-list ; in the menu DONE
'("slib(list/selshuf «parameters»)"
)
"Used for highlighting and completion and for a submenu `List' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-matrix ; in the menu DONE
'("slib(matrix/concate «parameters»)"
"slib(matrix/det «parameters»)"
"slib(matrix/givenrank «parameters»)"
"slib(matrix/inverse «parameters»)"
"slib(matrix/invertible «parameters»)"
"slib(matrix/itriangular «parameters»)"
"slib(matrix/non0 «parameters»)"
"slib(matrix/orthogonal «parameters»)"
"slib(matrix/random «parameters»)"
"slib(matrix/trace «parameters»)"
"slib(matrix/transpose «parameters»)"
"slib(matrix/triangular «parameters»)"
"slib(matrix/unimodular «parameters»)"
)
"Used for highlighting and completion and for a submenu `Matrix' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-media ; in the menu DONE
'("slib(media/audio «parameters»)"
"slib(media/dewplayer «parameters»)"
"slib(media/player «parameters»)"
"slib(media/player_mp3_multi «parameters»)"
"slib(media/video «parameters»)"
)
"Used for highlighting and completion and for a submenu `Media' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-numeration ; in the menu DONE
'("slib(numeration/babylonien «parameters»)"
"slib(numeration/basep «parameters»)"
"slib(numeration/ecriturenombre «parameters»)"
"slib(numeration/egyptien «parameters»)"
)
"Used for highlighting and completion and for a submenu `Numeration' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-oef ; in the menu DONE
'("slib(oef/blank «parameters»)"
"slib(oef/codelim «parameters»)"
"slib(oef/codename «parameters»)"
"slib(oef/env «parameters»)"
"slib(oef/insfilename «parameters»)"
"slib(oef/newfile «parameters»)"
"slib(oef/postsrc «parameters»)"
"slib(oef/presrc «parameters»)"
)
"Used for highlighting and completion and for a submenu `OEF' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-polynomial ; in the menu DONE
'("slib(polynomial/random «parameters»)"
)
"Used for highlighting and completion and for a submenu `Polynomial' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-set ; in the menu DONE
'("slib(set/subset «parameters»)"
)
"Used for highlighting and completion and for a submenu `Set' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-stat ; in the menu DONE
'("slib(stat/1d «parameters»)"
"slib(stat/arithmean «parameters»)"
"slib(stat/beta «parameters»)"
"slib(stat/betacdf «parameters»)"
"slib(stat/betainv «parameters»)"
"slib(stat/betapdf «parameters»)"
"slib(stat/binomial «parameters»)"
"slib(stat/binomialcdf «parameters»)"
"slib(stat/binomialinv «parameters»)"
"slib(stat/binomialpdf «parameters»)"
"slib(stat/cauchy «parameters»)"
"slib(stat/cauchycdf «parameters»)"
"slib(stat/cauchyinv «parameters»)"
"slib(stat/cauchypdf «parameters»)"
"slib(stat/chi2 «parameters»)"
"slib(stat/chi2cdf «parameters»)"
"slib(stat/chi2inv «parameters»)"
"slib(stat/chi2pdf «parameters»)"
"slib(stat/correlation «parameters»)"
"slib(stat/covariance «parameters»)"
"slib(stat/dataproc «parameters»)"
"slib(stat/deviation «parameters»)"
"slib(stat/discretelaw «parameters»)"
"slib(stat/effectif «parameters»)"
"slib(stat/empiric «parameters»)"
"slib(stat/expo «parameters»)"
"slib(stat/exponential «parameters»)"
"slib(stat/exponentialcdf «parameters»)"
"slib(stat/exponentialinv «parameters»)"
"slib(stat/exponentialpdf «parameters»)"
"slib(stat/fisher «parameters»)"
"slib(stat/fishercdf «parameters»)"
"slib(stat/fisherinv «parameters»)"
"slib(stat/fisherpdf «parameters»)"
"slib(stat/freq «parameters»)"
"slib(stat/gamma «parameters»)"
"slib(stat/gammacdf «parameters»)"
"slib(stat/gammainv «parameters»)"
"slib(stat/gammapdf «parameters»)"
"slib(stat/geomean «parameters»)"
"slib(stat/geometric «parameters»)"
"slib(stat/geometric1 «parameters»)"
"slib(stat/geometric1cdf «parameters»)"
"slib(stat/geometric1inv «parameters»)"
"slib(stat/geometric1pdf «parameters»)"
"slib(stat/geometriccdf «parameters»)"
"slib(stat/geometricinv «parameters»)"
"slib(stat/geometricpdf «parameters»)"
"slib(stat/harmonic «parameters»)"
"slib(stat/histo «parameters»)"
"slib(stat/hypergeometric «parameters»)"
"slib(stat/hypergeometriccdf «parameters»)"
"slib(stat/hypergeometricinv «parameters»)"
"slib(stat/hypergeometricpdf «parameters»)"
"slib(stat/laplace «parameters»)"
"slib(stat/laplacecdf «parameters»)"
"slib(stat/laplaceinv «parameters»)"
"slib(stat/laplacepdf «parameters»)"
"slib(stat/linearcong «parameters»)"
"slib(stat/logistic «parameters»)"
"slib(stat/logisticcdf «parameters»)"
"slib(stat/logisticinv «parameters»)"
"slib(stat/logisticpdf «parameters»)"
"slib(stat/lognormal «parameters»)"
"slib(stat/lognormalcdf «parameters»)"
"slib(stat/lognormalinv «parameters»)"
"slib(stat/lognormalpdf «parameters»)"
"slib(stat/median «parameters»)"
"slib(stat/multinomial «parameters»)"
"slib(stat/nbin «parameters»)"
"slib(stat/nbincdf «parameters»)"
"slib(stat/nbininv «parameters»)"
"slib(stat/nbinpdf «parameters»)"
"slib(stat/normal «parameters»)"
"slib(stat/normalcdf «parameters»)"
"slib(stat/normalinv «parameters»)"
"slib(stat/normalpdf «parameters»)"
"slib(stat/pascal «parameters»)"
"slib(stat/pascalcdf «parameters»)"
"slib(stat/pascalinv «parameters»)"
"slib(stat/pascalpdf «parameters»)"
"slib(stat/poisson «parameters»)"
"slib(stat/poissoncdf «parameters»)"
"slib(stat/poissoninv «parameters»)"
"slib(stat/poissonpdf «parameters»)"
"slib(stat/posdiscretelaw «parameters»)"
"slib(stat/prod «parameters»)"
"slib(stat/quadratic «parameters»)"
"slib(stat/random «parameters»)"
"slib(stat/range «parameters»)"
"slib(stat/student «parameters»)"
"slib(stat/studentcdf «parameters»)"
"slib(stat/studentinv «parameters»)"
"slib(stat/studentpdf «parameters»)"
"slib(stat/sum «parameters»)"
"slib(stat/variance «parameters»)"
"slib(stat/weibull «parameters»)"
"slib(stat/weibullcdf «parameters»)"
"slib(stat/weibullinv «parameters»)"
"slib(stat/weibullpdf «parameters»)"
)
"Used for highlighting and completion and for a submenu `Stat' in the menu `Script_Library'."
)
(defvar oef-definitions-slib-text ; in the menu DONE
'("slib(text/approximation «parameters»)"
"slib(text/balloon «parameters»)"
"slib(text/cdecomment «parameters»)"
"slib(text/comblin «parameters»)"
"slib(text/crossword «parameters»)"
"slib(text/cutchoice2 «parameters»)"
"slib(text/cutchoices «parameters»)"
"slib(text/markerror «parameters»)"
"slib(text/markgroup «parameters»)"
"slib(text/marktext «parameters»)"
"slib(text/marktextpartial «parameters»)"
"slib(text/markword «parameters»)"
"slib(text/matrixhtml «parameters»)"
"slib(text/matrixinsert «parameters»)"
"slib(text/matrixtex «parameters»)"
"slib(text/maximamatrix «parameters»)"
"slib(text/octavematrix «parameters»)"
"slib(text/sigunits «parameters»)"
"slib(text/spirale «parameters»)"