## File: kb2lex.tex

package info (click to toggle)
tetex-french 4.02-1
• area: non-free
• in suites: hamm
• size: 3,572 kB
• ctags: 137
• sloc: ansic: 1,455; makefile: 74; csh: 43; sh: 31
 file content (100 lines) | stat: -rw-r--r-- 4,765 bytes parent folder | download
 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 % kb2lex.tex An idea of Bernard Gaulle 07/19/92 % V1.6 of 97/10/10 % Copyright GUTenberg-Bernard Gaulle as in french.doc % % Running this code will produce two files: kbtex7a8.lex and kbtex8a7.lex % These files are the result of the understanding of xxx.kbc in which % the user has specified the special 8-bit characters he is using via % his own keyboard. "xxx" is generally provided by the file keyboard.dat. % A document typed in with this encoding can't be send % to anyone else except people having exactly the same keyboard. % kb2lex is a way to produce programs that will allow to translate .tex % files from 8-bit to single 7-bit ASCII standard that everyone normally % is able to use. % % Of course you need the (Unix) pgm "lex" to generate the appropriate pgms. % But if you don't have it, I've given in this directory kbtex7a8.c and % kb8a7.c that were produced on my machine with the default keyboard.dat. % % 1- Configurate your keyboard.dat to your input encoding ("xxx"). % You can create your own keyboard.dat and even define new a xxx.kbc file. % 2- TeX or LaTeX this file (with any TeX V3.14xxx engine) % if not OK go back to 1- for corrections (notice that it must run % with the distributed keyboard.dat) % All processed characters are displayed to your screen (and in the .log % file). Check if no character is displayed in TeX hexadecimal format % (^^xx). In which case, you must be aware that these will never be % converted to 7-bit. Since you can't display it as usual on your screen % and probably you can't also input it asis, you should chose to delete % them from xxx.kbc. Do it and rerun this step. % 3- Type in: % (as i type in Unix but may need to be adapted...) % lex -v kb8to7.lex;cc -o kb8to7 lex.yy.c -ll % and: lex -v kb7to8.lex;cc -o kb7to8 lex.yy.c -ll;rm lex.yy.c % (if any pb on your platform try flex instead of lex) % 4- Test kb7to8 and kb8to7 to your modified kbto.tex file: % kb7to8