% Copyright 1993, 1994, 1995, 1996 Alan Jeffrey, % copyright 1998, 1999, 2002 the fontinst maintenance team and % any individual authors listed elsewhere in this file. % All rights reserved. % % This file is part of the fontinst system version 1.9. % ----------------------------------------------------- % % It may be distributed under the terms of the LaTeX Project Public % License, as described in lppl.txt in the base LaTeX distribution. % Either version 1.2 or, at your option, any later version. % %%% ==================================================================== %%% @TeX-font-encoding-file{ %%% author = {Alan Jeffrey and Ulrik Vieth and %%% Lars Hellstr{\"o}m}, %%% version = "1.910", %%% date = "2002-07-31", %%% time = "21:45:37 +02:00", %%% filename = "ot1.etx", %%% email = "fontinst@cogs.susx.ac.uk", %%% URL = "http://www.tug.org/applications/fontinst/", %%% checksum = "", %%% codetable = "ISO/ASCII", %%% keywords = "encoding, math, TeX, PostScript", %%% supported = "yes", %%% abstract = "This is the old TeX text encoding as a TeX %%% font encoding file, for use with the fontinst %%% utility.", %%% package = "fontinst", %%% dependencies = "fontinst.sty, fontdoc.sty", %%% } %%% ==================================================================== \relax \documentclass[twocolumn]{article} \usepackage{fontdoc}[2002/03/16] \title{The \TeX\ text encoding vector} \author{Alan Jeffrey\and Ulrik Vieth\and Lars Hellstr\"om} \date{31 July 2002\\Version 1.921} \begin{document} \maketitle \section{Introduction} This document describes the \TeX\ text (\texttt{OT1}) encoding---or rather the \texttt{OT1} encodings, since the Computer Modern font family alone provide examples of no less than five different \texttt{OT1} encodings. The exact encoding of fonts produced using this file is controlled through the two integers \texttt{ligaturing} (relevant values are $0$, $1$, and $2$) and \texttt{italicizing} (relevant values are $0$ and $1$). \texttt{ligaturing} controls roughly how many ligature characters and ligaturing instructions there are in the font. \texttt{italicizing} controls whether the font contains a dollar or pound sign. This file also makes use of five macros in forming the names of glyphs, so that this can be configured. \begin{itemize} \item \verb|\lc{A}{a}| should return the name of a lower-case glyph, for example `\texttt{a}' or `\texttt{Asmall}'. \item \verb|\uc{A}{a}| should return the name of an upper-case glyph, for example `\texttt{A}' or `\texttt{Amedium}'. \item \verb|\lclig{FI}{fi}| should return the name of a lower-case ligature, for example `\texttt{fi}' or `\texttt{FIsmall}'. \item \verb|\uclig{FI}{fi}| should return the name of an upper-case ligature, for example `\texttt{FI}' or `\texttt{FImedium}'. \item \verb|\digit{zero}| should return the name of a digit, for example `\texttt{zero}' or `\texttt{zerooldstyle}'. % \item \verb|\currency| should be the name of the currency glyph, either % `\texttt{sterling}' or `\texttt{dollar}'. \end{itemize} These should all expand in the mouth, otherwise you may get error messages! For example, to get the standard upper and lower case font, you should define: \begin{verbatim} \setcommand\lc#1#2{#2} \setcommand\uc#1#2{#1} \setcommand\lclig#1#2{#2} \setcommand\uclig#1#2{#1} \setcommand\digit#1{#1} \end{verbatim} To get a caps and small caps font with old style digits and letter spacing, you should define: \begin{verbatim} \setcommand\lc#1#2{#1small} \setcommand\uc#1#2{#1} \setcommand\lclig#1#2{#2small} \setcommand\uclig#1#2{#1spaced} \setcommand\digit#1{#1oldstyle} \end{verbatim} To get an all-caps font with medium-cap composite letters and letter spacing, you should define: \begin{verbatim} \setcommand\lc#1#2{#1} \setcommand\uc#1#2{#1} \setcommand\lclig#1#2{#1spaced} \setcommand\uclig#1#2{#1spaced} \setcommand\digit#1{#1} \end{verbatim} This document describes the upper and lower case encoding. \showbranches \encoding \needsfontinstversion{1.917} \begincomment\section{Default values}\endcomment \comment{The \textit{ligaturing} default depends on whether \textit{monowidth} is set mainly because that causes the default installation of fonts to be slightly more intelligent.} \ifisint{monowidth}\then \setint{ligaturing}{0} \Else \setint{ligaturing}{2} \Fi \setint{italicizing}{0} \setcommand\lc#1#2{#2} \setcommand\uc#1#2{#1} \setcommand\lclig#1#2{#2} \setcommand\uclig#1#2{#1} \setcommand\digit#1{#1} % \comment{The following trickery was introduced to make the change % from monowidth implying typewriter to monowidth not implying % typewriter less abrupt.} % \ifisint{monowidth}\then % \ifisint{typewriter}\then \Else % \ifnumber{\int{monowidth}}={9876}\then \Else % \fontinstwarningnoline{ot1.etx}{% % Set the typewriter integer to get a typewriter font,% % \messagebreak % set monowidth to 9876 to get a monowidth font,% % \messagebreak % or set both to get a monowidth typewriter font% % } % \setint{typewriter}{0} % \Fi % \Fi % \Fi \setint{italicslant}{0} \ifisglyph{space}\then \setint{interword}{\width{space}} \Else\ifisglyph{i}\then \setint{interword}{\width{i}} \Else \setint{interword}{333} \Fi\Fi \ifisint{monowidth}\then \setint{stretchword}{0} \setint{shrinkword}{0} \Else \setint{stretchword}{\scale{\int{interword}}{600}} \setint{shrinkword}{\scale{\int{interword}}{240}} \Fi \ifisglyph{x}\then \setint{xheight}{\height{x}} \Else \setint{xheight}{500} \Fi \setint{quad}{1000} \ifisint{monowidth}\then % \ifnumber{\int{ligaturing}}={0}\then % \setint{extraspace}{0} % \Else \setint{extraspace}{\int{interword}} % \Fi \Else \setint{extraspace}{\scale{\int{interword}}{240}} \Fi \begincomment \section{Font dimensions and coding scheme} \endcomment \setfontdimen{1}{italicslant} % italic slant \setfontdimen{2}{interword} % interword space \setfontdimen{3}{stretchword} % interword stretch \setfontdimen{4}{shrinkword} % interword shrink \setfontdimen{5}{xheight} % x-height \setfontdimen{6}{quad} % quad \setfontdimen{7}{extraspace} % extra space after . \ifnumber{\int{ligaturing}}={2}\then \setstr{codingscheme}{TEX TEXT} \Else\ifnumber{\int{ligaturing}}={1}\then \setstr{codingscheme}{TEX TEXT WITHOUT F-LIGATURES} \Else \setstr{codingscheme}{TEX TYPEWRITER TEXT} \Fi\Fi \begincomment \section{The encoding} There are 130 glyphs in this encoding. 128 of these are in Knuth's CM encoding, and the other two are `\l' and `\L', which are composite letters in CM, but are single glyphs in almost every other font. \endcomment \setslot{Gamma} \comment{The greek letter `$\Gamma$'.} \endsetslot \setslot{Delta} \comment{The greek letter `$\Delta$'.} \endsetslot \setslot{Theta} \comment{The greek letter `$\Theta$'.} \endsetslot \setslot{Lambda} \comment{The greek letter `$\Lambda$'.} \endsetslot \setslot{Xi} \comment{The greek letter `$\Xi$'.} \endsetslot \setslot{Pi} \comment{The greek letter `$\Pi$'.} \endsetslot \setslot{Sigma} \comment{The greek letter `$\Sigma$'.} \endsetslot \setslot{Upsilon} \comment{The greek letter `$\Upsilon$' named `\texttt{Upsilon1}' by Adobe.} \endsetslot \setslot{Phi} \comment{The greek letter `$\Phi$'.} \endsetslot \setslot{Psi} \comment{The greek letter `$\Psi$'.} \endsetslot \setslot{Omega} \comment{The greek letter `$\Omega$'.} \endsetslot \ifnumber{\int{ligaturing}}<{2}\then \setslot{arrowup} \comment{An upwards-facing arrow `$\uparrow$'.} \endsetslot \setslot{arrowdown} \comment{A downwards-facing arrow `$\downarrow$'.} \endsetslot \setslot{quotesingle} \comment{The `neutral' single quotation mark `\texttt{\char`\'}', for use with monowidth fonts.} \endsetslot \setslot{exclamdown} \comment{The Spanish punctuation mark `!`'.} \endsetslot \setslot{questiondown} \comment{The Spanish punctuation mark `?`'.} \endsetslot \Else \setslot{\lclig{FF}{ff}} \ligature{LIG}{\lc{I}{i}}{\lclig{FFI}{ffi}} \ligature{LIG}{\lc{L}{l}}{\lclig{FFL}{ffl}} \comment{The `ff' ligature. It should be two characters wide in a monowidth font.} \endsetslot \setslot{\lclig{FI}{fi}} \comment{The `fi' ligature. It should be two characters wide in a monowidth font.} \endsetslot \setslot{\lclig{FL}{fl}} \comment{The `fl' ligature. It should be two characters wide in a monowidth font.} \endsetslot \setslot{\lclig{FFI}{ffi}} \comment{The `ffi' ligature. It should be three characters wide in a monowidth font.} \endsetslot \setslot{\lclig{FFL}{ffl}} \comment{The `ffl' ligature. It should be three characters wide in a monowidth font.} \endsetslot \Fi \setslot{\lc{dotlessI}{dotlessi}} \comment{A dotless i `\i', used to produce accented letters such as `\=\i'.} \endsetslot \setslot{\lc{dotlessJ}{dotlessj}} \comment{A dotless j `\j', used to produce accented letters such as `\=\j'. Most non-\TeX\ fonts do not have this glyph.} \endsetslot \setslot{grave} \comment{The grave accent `\`a'.} \endsetslot \setslot{acute} \comment{The acute accent `\'a'.} \endsetslot \setslot{caron} \comment{The caron or h\'a\v cek accent `\v a'.} \endsetslot \setslot{breve} \comment{The breve accent `\u a'.} \endsetslot \setslot{macron} \comment{The macron accent `\=a'.} \endsetslot \setslot{ringfitted} \comment{The ring accent `\aa', fitted to be the same width as an upper case `A'.} \endsetslot \setslot{cedilla} \comment{The cedilla accent `\c a'.} \endsetslot \setslot{\lc{SS}{germandbls}} \comment{The letter `\ss'.} \endsetslot \setslot{\lc{AE}{ae}} \comment{The letter `\ae'. This is a single letter, and should not be faked with `ae'.} \endsetslot \setslot{\lc{OE}{oe}} \comment{The letter `\oe'. This is a single letter, and should not be faked with `oe'.} \endsetslot \setslot{\lc{Oslash}{oslash}} \comment{The letter `\o'.} \endsetslot \setslot{\uc{AE}{ae}} \comment{The letter `\AE'. This is a single letter, and should not be faked with `AE'.} \endsetslot \setslot{\uc{OE}{oe}} \comment{The letter `\OE'. This is a single letter, and should not be faked with `OE'.} \endsetslot \setslot{\uc{Oslash}{oslash}} \comment{The letter `\o'.} \endsetslot \ifnumber{\int{ligaturing}}<{1}\then \setslot{visiblespace} \comment{A visible space glyph `\texttt{\char`\ }'.} \endsetslot \Else \setslot{lslashslash} \ligature{LIG}{\lc{L}{l}}{\lc{Lslash}{lslash}} \ligature{LIG}{\uc{L}{l}}{\uc{Lslash}{lslash}} \comment{The slash used to make `\l' and `\L'. Since most fonts do not have a separate glyph for this, I've added ligatures to `\l' and `\L'.} \endsetslot \Fi \setslot{exclam} \ligature{LIG}{quoteleft}{exclamdown} \comment{The exclamation mark `!'.} \endsetslot \ifnumber{\int{ligaturing}}>{0}\then \setslot{quotedblright} \comment{An English double closing quote mark `\,''\,'.} \endsetslot \Else \setslot{quotedbl} \comment{The `neutral' quotation mark `\texttt{\char`\"}', included for use in monowidth fonts, or for setting computer programs.} \endsetslot \Fi \setslot{numbersign} \comment{The hash sign `\#'.} \endsetslot \ifnumber{\int{italicizing}}={0}\then \setslot{dollar} \comment{The dollar sign `\$'.} \endsetslot \Else \setslot{sterling} \comment{The pound sign `\pounds'.} \endsetslot \Fi \setslot{percent} \comment{The percent sign `\%'.} \endsetslot \setslot{ampersand} \comment{The ampersand sign `\&'.} \endsetslot \setslot{quoteright} \ifnumber{\int{ligaturing}}>{0}\then \ligature{LIG}{quoteright}{quotedblright} \Fi \comment{The English closing quotation mark `\,'\,'.} \endsetslot \setslot{parenleft} \comment{The opening parenthesis `('.} \endsetslot \setslot{parenright} \comment{The closing parenthesis `)'.} \endsetslot \setslot{asterisk} \comment{The raised asterisk `*'.} \endsetslot \setslot{plus} \comment{The addition sign `+'.} \endsetslot \setslot{comma} \comment{The comma `,'.} \endsetslot \setslot{hyphen} \ifnumber{\int{ligaturing}}>{0}\then \ligature{LIG}{hyphen}{rangedash} \Fi \comment{The hyphen `-'.} \endsetslot \setslot{period} \comment{The full point `.'.} \endsetslot \setslot{slash} \comment{The forward oblique `/'.} \endsetslot \setslot{\digit{zero}} \comment{The number zero `0'. This (and all the other numerals) may be old style or ranging digits.} \endsetslot \setslot{\digit{one}} \comment{The number one `1'.} \endsetslot \setslot{\digit{two}} \comment{The number two `2'.} \endsetslot \setslot{\digit{three}} \comment{The number three `3'.} \endsetslot \setslot{\digit{four}} \comment{The number four `4'.} \endsetslot \setslot{\digit{five}} \comment{The number five `5'.} \endsetslot \setslot{\digit{six}} \comment{The number six `6'.} \endsetslot \setslot{\digit{seven}} \comment{The number seven `7'.} \endsetslot \setslot{\digit{eight}} \comment{The number eight `8'.} \endsetslot \setslot{\digit{nine}} \comment{The number nine `9'.} \endsetslot \setslot{colon} \comment{The colon punctuation mark `:'.} \endsetslot \setslot{semicolon} \comment{The semi-colon punctuation mark `;'.} \endsetslot \ifnumber{\int{ligaturing}}<{2}\then \setslot{less} \comment{The less-than sign `$<$'.} \endsetslot \setslot{equal} \comment{The equals sign `='.} \endsetslot \setslot{greater} \comment{The greater-than sign `$>$'.} \endsetslot \Else \setslot{exclamdown} \comment{The Spanish punctuation mark `!`'.} \endsetslot \setslot{equal} \comment{The equals sign `='.} \endsetslot \setslot{questiondown} \comment{The Spanish punctuation mark `?`'.} \endsetslot \Fi \setslot{question} \ligature{LIG}{quoteleft}{questiondown} \comment{The question mark `?'.} \endsetslot \setslot{at} \comment{The at sign `@'.} \endsetslot \setslot{\uc{A}{a}} \comment{The letter `{A}'.} \endsetslot \setslot{\uc{B}{b}} \comment{The letter `{B}'.} \endsetslot \setslot{\uc{C}{c}} \comment{The letter `{C}'.} \endsetslot \setslot{\uc{D}{d}} \comment{The letter `{D}'.} \endsetslot \setslot{\uc{E}{e}} \comment{The letter `{E}'.} \endsetslot \setslot{\uc{F}{f}} \comment{The letter `{F}'.} \endsetslot \setslot{\uc{G}{g}} \comment{The letter `{G}'.} \endsetslot \setslot{\uc{H}{h}} \comment{The letter `{H}'.} \endsetslot \setslot{\uc{I}{i}} \comment{The letter `{I}'.} \endsetslot \setslot{\uc{J}{j}} \comment{The letter `{J}'.} \endsetslot \setslot{\uc{K}{k}} \comment{The letter `{K}'.} \endsetslot \setslot{\uc{L}{l}} \comment{The letter `{L}'.} \endsetslot \setslot{\uc{M}{m}} \comment{The letter `{M}'.} \endsetslot \setslot{\uc{N}{n}} \comment{The letter `{N}'.} \endsetslot \setslot{\uc{O}{o}} \comment{The letter `{O}'.} \endsetslot \setslot{\uc{P}{p}} \comment{The letter `{P}'.} \endsetslot \setslot{\uc{Q}{q}} \comment{The letter `{Q}'.} \endsetslot \setslot{\uc{R}{r}} \comment{The letter `{R}'.} \endsetslot \setslot{\uc{S}{s}} \comment{The letter `{S}'.} \endsetslot \setslot{\uc{T}{t}} \comment{The letter `{T}'.} \endsetslot \setslot{\uc{U}{u}} \comment{The letter `{U}'.} \endsetslot \setslot{\uc{V}{v}} \comment{The letter `{V}'.} \endsetslot \setslot{\uc{W}{w}} \comment{The letter `{W}'.} \endsetslot \setslot{\uc{X}{x}} \comment{The letter `{X}'.} \endsetslot \setslot{\uc{Y}{y}} \comment{The letter `{Y}'.} \endsetslot \setslot{\uc{Z}{z}} \comment{The letter `{Z}'.} \endsetslot \setslot{bracketleft} \comment{The opening square bracket `['.} \endsetslot \ifnumber{\int{ligaturing}}>{0}\then \setslot{quotedblleft} \comment{An English double opening quote mark `\,``\,'.} \endsetslot \Else \setslot{backslash} \comment{The backwards oblique `$\backslash$'.} \endsetslot \Fi \setslot{bracketright} \comment{The closing square bracket `]'.} \endsetslot \setslot{circumflex} \comment{The circumflex accent `\^ a'.} \endsetslot \ifnumber{\int{ligaturing}}>{0}\then \setslot{dotaccent} \comment{The dot accent `\.a'.} \endsetslot \Else \setslot{underscore} \comment{The ASCII underline character `\texttt{\char`\_}', usually set on the baseline.} \endsetslot \Fi \setslot{quoteleft} \ifnumber{\int{ligaturing}}>{0}\then \ligature{LIG}{quoteleft}{quotedblleft} \Fi \comment{The English opening single quotation mark `\,`\,'.} \endsetslot \setslot{\lc{A}{a}} \comment{The letter `{a}'.} \endsetslot \setslot{\lc{B}{b}} \comment{The letter `{b}'.} \endsetslot \setslot{\lc{C}{c}} \comment{The letter `{c}'.} \endsetslot \setslot{\lc{D}{d}} \comment{The letter `{d}'.} \endsetslot \setslot{\lc{E}{e}} \comment{The letter `{e}'.} \endsetslot \setslot{\lc{F}{f}} \ifnumber{\int{ligaturing}}<{2}\then \Else \ligature{LIG}{\lc{I}{i}}{\lclig{FI}{fi}} \ligature{LIG}{\lc{F}{f}}{\lclig{FF}{ff}} \ligature{LIG}{\lc{L}{l}}{\lclig{FL}{fl}} \Fi \comment{The letter `{f}'.} \endsetslot \setslot{\lc{G}{g}} \comment{The letter `{g}'.} \endsetslot \setslot{\lc{H}{h}} \comment{The letter `{h}'.} \endsetslot \setslot{\lc{I}{i}} \comment{The letter `{i}'.} \endsetslot \setslot{\lc{J}{j}} \comment{The letter `{j}'.} \endsetslot \setslot{\lc{K}{k}} \comment{The letter `{k}'.} \endsetslot \setslot{\lc{L}{l}} \comment{The letter `{l}'.} \endsetslot \setslot{\lc{M}{m}} \comment{The letter `{m}'.} \endsetslot \setslot{\lc{N}{n}} \comment{The letter `{n}'.} \endsetslot \setslot{\lc{O}{o}} \comment{The letter `{o}'.} \endsetslot \setslot{\lc{P}{p}} \comment{The letter `{p}'.} \endsetslot \setslot{\lc{Q}{q}} \comment{The letter `{q}'.} \endsetslot \setslot{\lc{R}{r}} \comment{The letter `{r}'.} \endsetslot \setslot{\lc{S}{s}} \comment{The letter `{s}'.} \endsetslot \setslot{\lc{T}{t}} \comment{The letter `{t}'.} \endsetslot \setslot{\lc{U}{u}} \comment{The letter `{u}'.} \endsetslot \setslot{\lc{V}{v}} \comment{The letter `{v}'.} \endsetslot \setslot{\lc{W}{w}} \comment{The letter `{w}'.} \endsetslot \setslot{\lc{X}{x}} \comment{The letter `{x}'.} \endsetslot \setslot{\lc{Y}{y}} \comment{The letter `{y}'.} \endsetslot \setslot{\lc{Z}{z}} \comment{The letter `{z}'.} \endsetslot \ifnumber{\int{ligaturing}}>{0}\then \setslot{rangedash} \ligature{LIG}{hyphen}{punctdash} \comment{The number range dash `1--9'. In a monowidth font, this might be set as `\texttt{1{-}9}'.} \endsetslot \setslot{punctdash} \comment{The punctuation dash `Oh---boy.' In a monowidth font, this might be set as `\texttt{Oh{-}{-}boy.}'} \endsetslot \setslot{hungarumlaut} \comment{The long Hungarian umlaut `\H a'.} \endsetslot \Else \setslot{braceleft} \comment{The opening curly brace `\{'.} \endsetslot \setslot{bar} \comment{The ASCII vertical bar `$|$'. This is included for compatibility with typewriter fonts used for computer listings.} \endsetslot \setslot{braceright} \comment{The closing curly brace `\}'.} \endsetslot \Fi \setslot{tilde} \comment{The tilde accent `\~a'.} \endsetslot \setslot{dieresis} \comment{The umlaut or dieresis accent `\"a'.} \endsetslot \begincomment \section{Non-standard ligatures} The `\l' and `\L' glyphs are not usually in the ot1 encoding, but they're needed for fonts which don't have a special `lslashslash' glyph. \endcomment \nextslot{"8A} \setslot{\uc{Lslash}{lslash}} \comment{The letter `\L'.} \endsetslot \nextslot{"AA} \setslot{\lc{Lslash}{lslash}} \comment{The letter `\l'.} \endsetslot \endencoding \section{Changes} 1999/10/18: Introduced the \texttt{typewriter} integer and made changes for \verb|\showbranches|. (LH) 1999/11/07: Removed the ``if \texttt{typewriter} then \texttt{monowidth}'' implication. Changed \texttt{fontdimen(7)} to zero in monowidth typewriter fonts. (LH) 2002/07/31: Major update. The \verb|\currency| and \textit{typewriter} parameters were removed---instead the \textit{ligaturing} and \textit{italicizing} parameters were added. \verb|\setfontdimen| interface used for setting fontdimens. (LH) \end{document}