diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2008-06-12 10:42:53 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2008-06-12 10:42:53 +0000 |
commit | 0d01365d53c456d246da0ca1f0b3cd9868f02b35 (patch) | |
tree | 01a655c8028e17cfb371456b299c1848fe08c05b /Master/texmf-dist/tex/context/base/enco-ini.mkiv | |
parent | 44f3714442da07fdfc36a7f2a8dcd5d4294c5d26 (diff) |
ConTeXt release 2008.05.21
git-svn-id: svn://tug.org/texlive/trunk@8691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/enco-ini.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/enco-ini.mkiv | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/enco-ini.mkiv b/Master/texmf-dist/tex/context/base/enco-ini.mkiv new file mode 100644 index 00000000000..cf29b0323d8 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/enco-ini.mkiv @@ -0,0 +1,94 @@ +%D \module +%D [ file=enco-ini, +%D version=2007.02.19, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Initialization, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=\PRAGMA] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D In the end we will cleanup enco-ini.tex! + +% could also be a new kind of table \definecharacter {name} {char} {fallback} + +\startruntimectxluacode + characters.context.rehash() +\stopruntimectxluacode + +\ctxlua{characters.context.define()} + +\startextendcatcodetable\ctxcatcodes \ctxlua{characters.context.activate()}\stopextendcatcodetable +\startextendcatcodetable\xmlcatcodesn\ctxlua{characters.context.activate()}\stopextendcatcodetable +\startextendcatcodetable\xmlcatcodese\ctxlua{characters.context.activate()}\stopextendcatcodetable +\startextendcatcodetable\xmlcatcodesr\ctxlua{characters.context.activate()}\stopextendcatcodetable + +% [[[\utfchar{8194}]]][[[\utfchar{8195}]]] \par +% $[[[\utfchar{8194}]]][[[\utfchar{8195}]]]$\par +% {\setcatcodetable\ctxcatcodes [[[\utfchar{8194}]]][[[\utfchar{8195}]]]}\par +% {\setcatcodetable\texcatcodes [[[\utfchar{8194}]]][[[\utfchar{8195}]]]}\par +% {\setcatcodetable\prtcatcodes [[[\utfchar{8194}]]][[[\utfchar{8195}]]]}\par +% \startXMLdata +% <oeps>((( )))</oeps> +% \stopXMLdata +% $\alpha\char945 \utfchar{945} abc 123$ + +\unprotect + +\newbox\accenttestbox + +\unexpanded\def\dobuildtextaccent#1#2% + {\begingroup + \global\setbox\accenttestbox\hbox{#1}% + \scratchcounter\ctxlua{characters.charcode(\number\accenttestbox)}% + \ifcase\scratchcounter\else\accent\scratchcounter\fi + \relax#2% + \endgroup} + +\useencoding[032,033,037] % fallbacks for some unicode chars, todo + +\setupencoding[\s!default=ec] % for the moment keep it this way, till fonts are there + +\protect \endinput + +When dealing with characters we have four cases to take into account when moving +from mkii to mkiv: + +1. <byte 200> => ref to slot 200 in current font +2. \char 200 => ref to slot 200 in current font +3. <active 200> => can (e.g.) map to another slot in current font +4. \namedglyph => can map to some slot in some font + +Using case 2 for special characters is doomed to fail because we are not going +to intercept these on the fly as happens automatically with traditional font +encoding handling. We could do that in a node pass but it's not worth the effort +because we seldom use this case in a document source. + +We can consider using utf as internal format for mkii. The main reason for not +doing this before was that it was slow. On the other hand, it would make dealing +with utility files easier. + +These are the only cases where char references are used: + +enco-def.tex : 46 : \definecharacter dotlessi {\char"10 } +enco-def.tex : 47 : \definecharacter dotlessj {\char"11 } +enco-def.tex : 54 : \definecharacter aeligature {\char26 } % "1A +enco-def.tex : 55 : \definecharacter AEligature {\char29 } % "1D +enco-def.tex : 58 : \definecharacter oeligature {\char27 } % "1B +enco-def.tex : 59 : \definecharacter OEligature {\char30 } % "1E +enco-def.tex : 61 : \definecharacter ssharp {\char25 } % "19 +enco-def.tex : 336 : \definecharacter Lstroke {\hsmash{\char32}L} +enco-def.tex : 337 : \definecharacter lstroke {\hsmash{\char32}l} +enco-def.tex : 338 : \definecharacter Ostroke {\char31 } % "1F +enco-def.tex : 339 : \definecharacter ostroke {\char28 } % "1C +enco-il2.tex : 147 : {\dontleavehmode{\char32l}} +enco-il2.tex : 152 : \hbox to\wd0{\hss\char32L}% +symb-eur.tex : 37 : \definesymbol [euro] [\getglyph{Euro}{\char160}] +symb-glm.tex : 61 : \definesymbol [xleftguillemot] [\getglyph{Guil}{\char19}] +symb-glm.tex : 62 : \definesymbol [xrightguillemot] [\getglyph{Guil}{\char20}] +symb-glm.tex : 64 : \definesymbol [xguilsingleleft] [\getglyph{Guil}{\char14}] +symb-glm.tex : 65 : \definesymbol [xguilsingleright] [\getglyph{Guil}{\char15}] + |