97 In the example given above, the ASCII formulation of the quantifier can be |
102 In the example given above, the ASCII formulation of the quantifier can be |
98 augmented with a graphical version by the following definition. |
103 augmented with a graphical version by the following definition. |
99 |
104 |
100 \I@isa |
105 \I@isa |
101 syntax |
106 syntax |
102 "GBall" :: "pttrn => 'a set => bool => bool" ("(3Â_Î_./ _)" 10) |
107 "GBall" :: "pttrn => 'a set => bool => bool" |
|
108 ("(3Â_Î_./ _)" 10) |
103 translations |
109 translations |
104 "ÂxÎA. P" == "!x:A. P" |
110 "ÂxÎA. P" == "!x:A. P" |
105 \I@isa |
111 \I@isa |
106 |
112 |
107 With this approach, the operators can still be entered in ASCII form, which is |
113 With this approach, the operators can still be entered in ASCII form, which is |
108 important for the usability of old (pure ASCII) Isabelle files, while they are |
114 important for the usability of old (pure ASCII) Isabelle files, while they are |
109 displayed in the new graphical form. The additional level of syntax |
115 displayed in the new graphical form. The additional level of syntax |
110 translations introduced in this way may interfere with other translation rules |
116 translations introduced in this way may interfere with other translation rules |
111 and should therefore be designed carefully. |
117 and should therefore be designed carefully. |
112 |
118 |
|
119 |
|
120 \pagebreak |
113 |
121 |
114 \subsection{User commands} |
122 \subsection{User commands} |
115 \label{commands} |
123 \label{commands} |
116 |
124 |
117 |
125 |
289 character. Thus to enforce a conversion, append a blank character behind it, and |
301 character. Thus to enforce a conversion, append a blank character behind it, and |
290 to prohibit it even if a blank character follows, you may insert a double |
302 to prohibit it even if a blank character follows, you may insert a double |
291 \I@\E\E@\E@@\I@, i.e. the string becomes `\I@|\E\E@\E@@\E\E@\E@@ \I@'. |
303 \I@\E\E@\E@@\I@, i.e. the string becomes `\I@|\E\E@\E@@\E\E@\E@@ \I@'. |
292 |
304 |
293 You may also redefine the critical entries of the conversion tables in the file |
305 You may also redefine the critical entries of the conversion tables in the file |
294 \bt{config/conv-tables.inp}. The entry for the `\I@|\I@' character |
306 \bt{config/conv-tables.inp}. The entry for the `\I@|\I@' character, for example, |
295 looks like |
307 looks like |
296 \I@isa |
308 \I@isa |
297 > "\|\ " "|" "\mbox{$\vee$}" |
309 > "\|\ " "|" "\mbox{$\vee$}" |
298 \I@isa |
310 \I@isa |
299 The first string, which (as described by the verbose comments in that file) |
311 The first string, which (as described by the verbose comments in that file) |
300 is the lex expression for the ASCII input, could be adapted to require an |
312 is the lex expression for the ASCII input, could be adapted to require an |
301 additional blank character before the `\I@|\I@', for example. |
313 additional blank character before the `\I@|\I@'. |
302 |
314 |
303 Most of these amibiguity problems can be avoided if you decide to employ the |
315 Most of these amibiguity problems can be avoided if you decide to employ the |
304 graphical font for your Isabelle source files. In this case, we recommend |
316 graphical font for your Isabelle source files. In this case, we recommend |
305 using this font as early as possible, in order to avoid later conversions. |
317 using this font as early as possible, in order to avoid later conversions. |
306 For the conversion of old files, the tool \bt{a2isa} is provided. It |
318 For the conversion of old files, the tool \bt{a2isa} is provided. It |
360 (\bt{gmake} is the gnu version of \bt{make}) and then \bt{gmake}. |
373 (\bt{gmake} is the gnu version of \bt{make}) and then \bt{gmake}. |
361 |
374 |
362 If you want to adapt the configuration of the font (keyboard bindings or |
375 If you want to adapt the configuration of the font (keyboard bindings or |
363 conversion tables used by \bt{isa2latex}), change directory to\\ |
376 conversion tables used by \bt{isa2latex}), change directory to\\ |
364 \bt{\$ISABELLE8BIT/config} , |
377 \bt{\$ISABELLE8BIT/config} , |
365 edit the files \bt{key-table.inp} respectively \bt{conv-tables.inp}, |
378 edit the files \bt{key-table.inp} and \bt{conv-tables.inp} |
|
379 as described below, |
366 and run \bt{gmake} in this directory to generate new versions of |
380 and run \bt{gmake} in this directory to generate new versions of |
367 \bt{isa2latex}, editor support, and documentation. |
381 \bt{isa2latex}, editor support, and documentation. |
368 |
382 |
369 For adapting the conversion table of \bt{a2isa}, change directory to \\ |
383 For adapting the conversion table of \bt{a2isa}, change directory to \\ |
370 \bt{\$ISABELLE8BIT/c-sources/a2isa}, edit the file \bt{lex.x} |
384 \bt{\$ISABELLE8BIT/c-sources/a2isa}, edit the file \bt{lex.x} |
371 accordingly, and run \bt{gmake} there. |
385 accordingly, and run \bt{gmake} there. |
|
386 |
|
387 %%%% FRANZ |
|
388 \subsubsection{Configuring conversion tables and keyboard bindings} |
|
389 %\label{subsub:gens} |
|
390 |
|
391 The 8bit package comes along with several perl% |
|
392 \footnote{the scripts are written in perl4. In order to run them with later |
|
393 versions of perl, you have to patch the scripts in some places since perl4 |
|
394 and later versions differ in the way they expand backslashes.} scripts that |
|
395 allow you to configure the package for your own needs in a convenient way. |
|
396 |
|
397 Keyboard bindings and the major behaviour of the converter \bt{isa2latex} are |
|
398 controlled by the two configuration files \bt{key-table.inp} and |
|
399 \bt{conv-tables.inp} which reside in the directory \bt{\$ISABELLE8BIT/config}. |
|
400 As these files contain a lot of comments, their formats are rather |
|
401 self explanatory. |
|
402 |
|
403 To change the conversions performed by \bt{isa2latex}, you just |
|
404 have to alter the file \bt{conv-tables.inp}. This file mainly contains the |
|
405 conversion tables for single characters in the code ranges 32 -- 127 and |
|
406 (usually) 161 -- 255. The last part of the configuration file describes how the |
|
407 lexical analyser of the converter \bt{isa2latex} treats special character |
|
408 sequences. It is most likely that you change this part of the configuration |
|
409 file. |
|
410 In order to activate your changes, you have to run the Makefile with \bt{gmake}. |
|
411 This invokes the perl script \bt{gen-isa2latex} with \bt{conv-tables.inp} as |
|
412 an argument. See the man page on \bt{gen-isa2latex} for more details about |
|
413 command line arguments. According to the configuration file, the perl script |
|
414 patches specific portions of the C source of the |
|
415 converter in the directory \bt{\$ISABELLE8BIT/c-sources/isa2latex} and |
|
416 calls the C compiler to generate a new binary for \bt{isa2latex}. |
|
417 |
|
418 If you want to alter the keyboard bindings for the various editors and the |
|
419 terminal, you have to change the configuration file \bt{key-table.inp}. |
|
420 The file contains as its main part a table relating keystrokes to the |
|
421 keyboard codes to be generated. Then run the Makefile with \bt{gmake}. |
|
422 For every editor that the 8bit package supports, \bt{gmake} starts a perl script |
|
423 that patches the start up file for the specific editor. For example, for the |
|
424 \bt{vim} editor the script \bt{gen-isavim} is started, which patches the shell |
|
425 script |
|
426 \bt{\$ISABELLE8BIT/vim/isavim}. As the last action, the perl script |
|
427 \bt{gen-isadoc} is invoked which generates some \bt{.dvi} files for reference |
|
428 cards which document the new keyboard mapping. |
|
429 %%%% FRANZ |
372 |
430 |
373 \subsection{Management of alternative sources} |
431 \subsection{Management of alternative sources} |
374 |
432 |
375 If you retain ASCII versions of logical operators for compatibility reasons, |
433 If you retain ASCII versions of logical operators for compatibility reasons, |
376 as described in subsection \ref{compat}, you may want to export versions of your |
434 as described in subsection \ref{compat}, you may want to export versions of your |
377 Isabelle theories that contain no 8bit characters. To support this, a patching |
435 Isabelle theories that contain no 8bit characters. To support this, a patching |
378 mechanism is provided as follows. Encapsulate each section of your files dealing |
436 mechanism is provided as follows. Encapsulate each section of your files dealing |
379 solely with the 8bit font with suitable begin and end pragmas (some pair of |
437 solely with the 8bit font with suitable begin and end pragmas (some pair of |
380 unique comment lines) and configure three configuration files analogously to\\ |
438 unique comment lines) and configure three configuration files analogously to\\ |
381 \bt{\$ISABELLE8BIT/isa-patches/HOL/\{extract|clean|add\}-HOL.cfg}. |
439 \bt{\$ISABELLE8BIT/isa-patches/HOL/\{extract|clean|add\}-HOL.cfg}. |
382 Then you can call the \bt{patcher} with the first file to extract and store to |
440 You can call the \bt{patcher} than with the first file to extract and store to |
383 a file, the second to remove, and the third to re-add the 8bit section of the |
441 a file, the second to remove, and the third to re-add the 8bit section of the |
384 Isabelle files. See also the man page of \bt{patcher}. |
442 Isabelle files. See also the man page of \bt{patcher}. |
385 |
443 |
386 |
|
387 \end{document} |
444 \end{document} |
388 |
445 |
389 |
446 |