% kb2lex.tex An idea of Bernard Gaulle 07/19/92 % V1.3 of 03/08/95 % 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 keyboard.dat in which % the user has specified the special 8-bit characters he is using via % his own keyboard. 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 own needs. % 2- TeX or LaTeX this file (with any TeX V3.14xxx motor) % 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 keyboard.dat. 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