Debian Codegraph @

texmf-dist/doc/support/cluttex/src/app-options.sml

raw
1 structure AppOptions:
2 sig
3 structure DviDriver:
4 sig
5 datatype driver = DVIPDFMX | DVIPS | DVISVGM
6 val fromString: string -> driver option
7 end
8 datatype bibtex_or_biber = BIBTEX of string | BIBER of string
9 structure WatchEngine:
10 sig
11 datatype engine = FSWATCH | INOTIFYWAIT | AUTO
12 val fromString: string -> engine option
13 end
14 structure ColorMode:
15 sig
16 datatype mode = datatype Message.mode
17 val fromString: string -> mode option
18 end
19 structure SourceDateEpoch:
20 sig
21 datatype time = NOW | RAW of string
22 val fromString: string -> time option
23 end
24 type initial_options =
25 { engine: string option
26 , engine_executable: string option
27 , output: string option
28 , fresh: bool (* default: false *)
29 , max_iterations: int option
30 , start_with_draft: bool
31 , watch: WatchEngine.engine option
32 , color: ColorMode.mode option
33 , change_directory: bool option
34 , includeonly: string option
35 , make_depends: string option
36 , print_output_directory: bool (* default: false *)
37 , package_support: {minted: bool, epstopdf: bool, pdfx: bool}
38 , check_driver: DviDriver.driver option (* dvipdfmx | dvips | dvisvgm *)
39 , source_date_epoch: SourceDateEpoch.time option
40 , synctex: string option (* should be int? *)
41 , file_line_error: bool
42 , interaction: InteractionMode.interaction option (* batchmode | nonstopmode | scrollmode | errorstopmode *)
43 , halt_on_error: bool
44 , shell_escape: ShellEscape.shell_escape option
45 , jobname: string option
46 , fmt: string option
47 , output_directory: string option
48 , output_format: OutputFormat.format option (* pdf | dvi *)
49 , tex_extraoptions: string list
50 , dvipdfmx_extraoptions: string list
51 , makeindex: string option
52 , bibtex_or_biber: bibtex_or_biber option
53 , makeglossaries: string option
54 , config_file: string option
55 }
56 type options =
57 { engine: TeXEngine.engine
58 , engine_executable: string option
59 , output: string
60 , fresh: bool
61 , max_iterations: int
62 , start_with_draft: bool
63 , watch: WatchEngine.engine option
64 , change_directory: bool
65 , includeonly: string option
66 , make_depends: string option
67 , print_output_directory: bool
68 , package_support: {minted: bool, epstopdf: bool, pdfx: bool}
69 , check_driver: CheckDriver.driver option
70 , source_date_epoch: SourceDateEpoch.time option
71 , synctex: string option
72 , file_line_error: bool
73 , interaction: InteractionMode.interaction
74 , halt_on_error: bool
75 , shell_escape: ShellEscape.shell_escape option
76 , jobname: string
77 , fmt: string option
78 , output_directory: string
79 , output_format: OutputFormat.format
80 , tex_extraoptions: string list
81 , dvipdfmx_extraoptions: string list
82 , makeindex: string option
83 , bibtex_or_biber: bibtex_or_biber option
84 , makeglossaries: string option
85 }
86 val init: initial_options
87 end =
88 struct
89 structure DviDriver =
90 struct
91 datatype driver = DVIPDFMX | DVIPS | DVISVGM
92 fun fromString "dvipdfmx" = SOME DVIPDFMX
93 | fromString "dvips" = SOME DVIPS
94 | fromString "dvisvgm" = SOME DVISVGM
95 | fromString _ = NONE
96 end
97 datatype bibtex_or_biber = BIBTEX of string | BIBER of string
98 structure WatchEngine =
99 struct
100 datatype engine = FSWATCH | INOTIFYWAIT | AUTO
101 fun fromString "fswatch" = SOME FSWATCH
102 | fromString "inotifywait" = SOME INOTIFYWAIT
103 | fromString "auto" = SOME AUTO
104 | fromString _ = NONE
105 end
106 structure ColorMode =
107 struct
108 datatype mode = datatype Message.mode
109 fun fromString "always" = SOME ALWAYS
110 | fromString "auto" = SOME AUTO
111 | fromString "never" = SOME NEVER
112 | fromString _ = NONE
113 end
114 structure SourceDateEpoch =
115 struct
116 datatype time = NOW | RAW of string
117 fun fromString "now" = SOME NOW
118 | fromString s =
119 if String.size s > 0 andalso CharVector.all Char.isDigit s then
120 SOME (RAW s)
121 else
122 NONE
123 end
124 type initial_options =
125 { engine: string option
126 , engine_executable: string option
127 , output: string option
128 , fresh: bool (* default: false *)
129 , max_iterations: int option
130 , start_with_draft: bool
131 , watch: WatchEngine.engine option
132 , color: ColorMode.mode option
133 , change_directory: bool option
134 , includeonly: string option
135 , make_depends: string option
136 , print_output_directory: bool (* default: false *)
137 , package_support: {minted: bool, epstopdf: bool, pdfx: bool}
138 , check_driver: DviDriver.driver option (* dvipdfmx | dvips | dvisvgm *)
139 , source_date_epoch: SourceDateEpoch.time option
140 , synctex: string option (* should be int? *)
141 , file_line_error: bool
142 , interaction: InteractionMode.interaction option (* batchmode | nonstopmode | scrollmode | errorstopmode *)
143 , halt_on_error: bool
144 , shell_escape: ShellEscape.shell_escape option
145 , jobname: string option
146 , fmt: string option
147 , output_directory: string option
148 , output_format: OutputFormat.format option (* pdf | dvi *)
149 , tex_extraoptions: string list
150 , dvipdfmx_extraoptions: string list
151 , makeindex: string option
152 , bibtex_or_biber: bibtex_or_biber option
153 , makeglossaries: string option
154 , config_file: string option
155 }
156 type options =
157 { engine: TeXEngine.engine
158 , engine_executable: string option
159 , output: string
160 , fresh: bool
161 , max_iterations: int
162 , start_with_draft: bool
163 , watch: WatchEngine.engine option
164 , change_directory: bool
165 , includeonly: string option
166 , make_depends: string option
167 , print_output_directory: bool
168 , package_support: {minted: bool, epstopdf: bool, pdfx: bool}
169 , check_driver: CheckDriver.driver option
170 , source_date_epoch: SourceDateEpoch.time option
171 , synctex: string option
172 , file_line_error: bool
173 , interaction: InteractionMode.interaction
174 , halt_on_error: bool
175 , shell_escape: ShellEscape.shell_escape option
176 , jobname: string
177 , fmt: string option
178 , output_directory: string
179 , output_format: OutputFormat.format
180 , tex_extraoptions: string list
181 , dvipdfmx_extraoptions: string list
182 , makeindex: string option
183 , bibtex_or_biber: bibtex_or_biber option
184 , makeglossaries: string option
185 }
186 val init: initial_options =
187 { engine = NONE
188 , engine_executable = NONE
189 , output = NONE
190 , fresh = false
191 , max_iterations = NONE
192 , start_with_draft = false
193 , watch = NONE
194 , color = NONE
195 , change_directory = NONE
196 , includeonly = NONE
197 , make_depends = NONE
198 , print_output_directory = false
199 , package_support = {minted = false, epstopdf = false, pdfx = false}
200 , check_driver = NONE
201 , source_date_epoch = NONE
202 , synctex = NONE
203 , file_line_error = true
204 , interaction = NONE
205 , halt_on_error = true
206 , shell_escape = NONE
207 , jobname = NONE
208 , fmt = NONE
209 , output_directory = NONE
210 , output_format = NONE
211 , tex_extraoptions = []
212 , dvipdfmx_extraoptions = []
213 , makeindex = NONE
214 , bibtex_or_biber = NONE
215 , makeglossaries = NONE
216 , config_file = NONE
217 }
218 end;