\documentstyle[12pt,cp]{aufsatz} \selectlanguage{USenglish} \begin{document} \section*{Using code pages in \TeX\ (the {\tt cptex} macro package)\hfill{\footnotesize March 28, 1994}} \section{Introduction} Now you can simply type all your national and special characters in \TeX\ as you normally type it with your keyboard and see it on the screen. The only thing you must do is to input the {\tt cp.tex} file (Plain-\TeX) or to include the suitable {\tt cp\it nnn\/}-option in your {\tt\bs documentstyle}-command, where {\it nnn\/} is the number of the code page you are using with your computer. Currently the following code pages are available: \begin{tabular}{@{}l@{ }l@{}} $\bullet$ CP 437\hfill: & The DOS and OS/2 code page 437 (U.~S. PC encoding).\\ $\bullet$ CP 850\hfill: & The DOS and OS/2 code page 850 (International PC encoding).\\ $\bullet$ CP 8859\hfill: & The ANSI code page ISO-8859-1 (Latin 1)\\ & used by Microsoft Windows and most Unix systems.\\ $\bullet$ CP 8859w\hfill: & The ANSI code page ISO-8859-1 (Latin 1)\\ & with extensions from Microsoft Windows.\\ \end{tabular} \section{Registration} If you like this \TeX\ macro package, please send me a fee about \$\,25 or more for registration, so that I can make them better and create more \TeX-macros. If you send \$\,50 or more you will receive additional macros for a fine {\tt\bs slashfrac} and for using PostScript fonts and colors (needed by {\tt cpps}!). Please state the version of the software that you currently have. Send check or money order to: \begin{tabular}[t]{@{}l@{}} Martin Kr\"amer\\ Adolf-Kolping-Stra\ss{}e 4\\ D--49179 Ostercappeln\\ (Germany)\\ \end{tabular} My e-mail address is: kraemer@mathematik.Uni-Osnabrueck.DE P.~S.: If you have some nice pictures from {\it Marina Sirtis\/} ({\it Counselor Deanna Troi\/} in STTNG), please mail me. \newpage \section{List of files} This package contains the following files: \begin{tabular}{@{}ll@{}} \tt cpdoc.tex & This documentation as \LaTeX-file\\ \tt cpdoc.dvi & This documentation as DVI-file\\ \tt cptable.ps & A sample PostScript-file with tables of the code pages\\ \tt cpemtex.zip & Some {\tt .bat}- and {\tt .cmd}-files for em\TeX-installation\\ \tt lamac.tex & Some macro extensions from \LaTeX\ for use with Plain-\TeX\\ \tt cp.tex & The main Plain-\TeX\ input file\\ \tt cpps.tex & The Plain-\TeX\ input file for use with PostScript-DVI-drivers\\ \tt cp.sty & The main style option file\\ \tt cp437.sty & The style option file for code page 437\\ \tt cp850.sty & The style option file for code page 850\\ \tt cp8859.sty & The style option file for code page 8859\\ \tt cp8859w.sty & The style option file for code page 8859w\\ \tt cpps.sty & The style option file for use with PostScript-DVI-drivers\\ \end{tabular} \section{Installation} To use this macro package you need a \TeX\ executable program from version 3 on, i.~e.\ a \TeX\ with full 8-bit character support. To install the package just copy all the {\tt .tex}- and {\tt .sty}-files in your {\sl texinputs\/}-directory. If you want to use the PostScript-option {\tt cpps}, you need additionally the style file {\tt colors.sty} and some macros for using PostScript-fonts in \LaTeX\ which you can get from me (see Registration). \subsection{Installation notes for em\TeX} To use this package with em\TeX\ you must first rebuild the {\tt .fmt}-files with options ``{\tt-8 -o -r}'' to enable full 8-bit character support. For this purpose you can use the included {\tt .bat}- and {\tt .cmd}-files for DOS and OS/2. Just unzip the {\tt cpemtex.zip}-file with the option {\tt-d} and copy the files from the created {\tt tex8fmts}- and {\tt btex8fmt}-directories in the {\tt emtex\bs texfmts}- and {\tt emtex\bs btexfmts}-directories respectively and execute the copied {\tt .bat}- or {\tt .cmd}-files. \section{Features} The code page styles offer a lot of features against the standard \TeX-macros for typing national and special characters. Some of these things are listed below: \begin{itemize} \item The non-math version of the commands for national and special characters work now correctly also in math mode (with respect of {\sl displaystyle}, {\sl textstyle}, {\sl scriptstyle\/} and {\sl scriptscriptstyle\/}). \item The special math constructs used for some characters work also properly in text mode with the correct font selection. \item The commands work properly in the protect modes of {\tt\bs write} and {\tt\bs edef}/{\tt\bs xdef}. The commands expand simply to itselves with proper spacing after control sequences consisting of letters in protected write mode. \item The control sequences consisting of letters ignore also a following empty pair of braces (``{\tt\{\}}'') for easy usage and proper kerning (e.~g.\ {\tt\bs ss\{\}} is always correct: {\tt Stra\bs ss\{\}e} or {\tt Flu\bs ss\{\}\char32}). \item All commands for national characters work properly in any combination of {\tt\bs lowercase} and {\tt\bs uppercase} (e.~g.\ {\tt\bs uppercase\{\bs ae\{\} \"a \ss{}\}} produces ``{\tt\bs AE\{\} \"A \bs SS\{\}}''). \item The additional code page characters work fine in {\sl verbatim\/}-environments, they just produce their layouts. And most of them work also fine in {\sl tt}-style, i.~e.\ then they have the same width. \end{itemize} \section{Usage} To use the {\tt cptex} macro package just put an ``{\tt\bs input cp}''-command at the beginning of your document (Plain-\TeX) or put the suitable {\tt cp\it nnn\/}-option in your {\tt\bs documentstyle}-command, where {\it nnn\/} is the number of the code page you are using with your computer. The main {\tt cp}-option selects by default no code page as the {\tt cp.tex}-file does. If you are using also the file {\tt german.sty}, then it must be loaded before any {\tt cp\it xxx\/}-file to work correctly. \subsection{Selecting a code page} With the command {\tt\bs selectcodepage[{\it opt1}, {\it opt2}, {\it\dots}]\{{\it number\/}\}} you select the code page {\it number\/} with options {\it opt1}, {\it opt2}, {\it\dots}. The option-list can be left out. The command sets implicitly a language-specific option (see {\tt\bs selectlanguage}) if specified in the code page and {\tt german.sty} is used. This can be overriden by the option {\tt original}. The {\tt\bs selectlanguage}-command from {\tt german.sty} will also activate or deactivate a given language-specific option. The {\tt cp\it nnn\/}-options select by default the code page {\it nnn\/} with no explicit options. \subsubsection{Common options for all code pages} The following options are available for all code pages: \begin{tabular}{@{}ll@{}} \tt original & Resets original meanings for the specific code page\\ \tt german & Language-specific option for German (see specific code page)\\ \tt ascii & Using true ASCII instead of \TeX's ASCII version (this affects\\ & the characters {\tt *}, {\tt <}, {\tt >}, {\tt \bs\{}, {\tt |} and {\tt \bs\}} to work also fine in non-math mode)\\ \tt fullascii & Using full ASCII with apostrophe and grave accent instead of quotes\\ \tt vert & Using {\tt\bs vert} instead of broken vertical line\\ & (only available if character 124 is a broken vertical line)\\ \end{tabular} This options can be also used with the dummy code page {\tt texascii}, which is defined in {\tt cp.tex} or {\tt cp.sty}. \subsubsection{Code page 437 (U.~S. PC encoding)} This code page is used by DOS and OS/2. The corresponding style option {\tt cp437} enables the full 256 character set (except {\sc TAB}, {\sc LF} and {\sc CR}, which keep their special meanings -- but the symbols are accessible via macros). In Plain-\TeX\ the male/female symbols and the musical notes are currently not available. The following options are available: \begin{tabular}{@{}ll@{}} \tt german & Using es-zet instead of beta\\ \tt emdash & Using em-dash instead of graphic symbol for horizontal line\\ \tt neg & Using logical not instead of end of line symbol\\ \tt Vert & Using {\tt\bs vert} and {\tt\bs Vert} instead of the corresponding graphic symbols\\ \end{tabular} \subsubsection{Code page 850 (International PC encoding)} This code page is used by DOS and OS/2. The corresponding style option {\tt cp850} enables the full 256 character set (except {\sc TAB}, {\sc LF} and {\sc CR}, which keep their special meanings -- but the symbols are accessible via macros). In Plain-\TeX\ the male/female symbols and the musical notes are currently not available. The following options are available: \begin{tabular}{@{}ll@{}} \tt emdash & Using em-dash instead of graphic symbol for horizontal line\\ \tt Vert & Using {\tt\bs vert} and {\tt\bs Vert} instead of the corresponding graphic symbols\\ \end{tabular} \subsubsection{Code page ISO-8859-1 (Latin 1)} This ANSI code page is used by Microsoft Windows and most Unix systems. The corresponding style option {\tt cp8859} enables all defined characters in the upper half of the character set. The undefined charcters are made invalid, i.~e.\ they produce a \TeX-error if encountered. The following option is available: \begin{tabular}{@{}ll@{}} \tt german & Using german right quote instead of english left quote\\ \end{tabular} \subsubsection{Code page ISO-8859-1 (Latin 1) with extensions} This code page is a superset of the standard ANSI code page with some additional characters used by Microsoft Windows. The corresponding style option {\tt cp8859w} enables all defined characters in the upper half of the character set. The undefined charcters are made invalid, i.~e.\ they produce a \TeX-error if encountered. The following option is available: \begin{tabular}{@{}ll@{}} \tt german & Using german right quotes instead of english left quotes\\ \end{tabular} \subsection{Character layout improvements} To improve the quality of the printed characters you have the following possibilities: \begin{enumerate} \item If you have the \AmSTeX-fonts available, then include a macro with the definitions for the additional \AmSTeX-symbols before including any {\tt cp\it xxx\/}-file. \item If you are using a PostScript-DVI-driver, then include also the {\tt cpps.tex}-file (after the {\tt cp.tex}-file) in your document (Plain-\TeX) or the {\tt cpps}-option in your {\tt\bs documentstyle}-command. \item Use possibilities 1 and 2 together. This gives nearly a perfect layout for all characters. \end{enumerate} \section{Future enhancements} The following tasks will be implemented in a future version of this package: \begin{itemize} \item Implementing an option for making some special characters (accents and the surd-symbol) to work as the corresponding macros. \item Making some character layout improvements with \LamSTeX-fonts. \item Support for the new \TeX\ DC/EC-fonts. \item Full support for PostScript fonts. \item New code pages (e-mail me your wishes). \item Support for VM/CMS-\TeX\ (if someone has an EBCDIC-\TeX\ with 8-bit character support, then please e-mail me for some testing). \item Adding a program to convert \TeX-files between the code pages. \end{itemize} \end{document}