summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/mex/utf8mex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:46:29 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:46:29 +0000
commit34cf2bced7210d5c38431cd36ed4e73999cf0444 (patch)
treef34316ebc264344b217ffcd924c57c2c4bb63d02 /Master/texmf-dist/tex/mex/utf8mex
parentadc8aaaf59099761577342d1050abb05625eeffc (diff)
trunk/Master/texmf-dist/tex/mex
git-svn-id: svn://tug.org/texlive/trunk@617 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/mex/utf8mex')
-rw-r--r--Master/texmf-dist/tex/mex/utf8mex/utf8-pl.tex119
-rw-r--r--Master/texmf-dist/tex/mex/utf8mex/utf8mex.ini33
-rw-r--r--Master/texmf-dist/tex/mex/utf8mex/utf8plsq.tex65
3 files changed, 217 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/mex/utf8mex/utf8-pl.tex b/Master/texmf-dist/tex/mex/utf8mex/utf8-pl.tex
new file mode 100644
index 00000000000..d6aa7590a84
--- /dev/null
+++ b/Master/texmf-dist/tex/mex/utf8mex/utf8-pl.tex
@@ -0,0 +1,119 @@
+%
+% utf8-pl.tex
+%
+% This file implements the conversion from UTF8 to PL
+% encoding (used by PLR fonts).
+%
+% Copyright (C) 2004 Wlodek Bzyl, <matwb@univ.gda.pl>
+%
+% This program is free software; you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either version 2 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program; if not, write to the Free Software
+% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+\ifx\mubyte\undefined
+ \errhelp{Sorry, you can't use this file without encTeX ver. Jun. 2004.}
+ \errmessage{The encTeX extension of TeX is not found}
+ \endinput \fi
+
+% first, we set the identity mapping in xord/xchr:
+
+\count255=128
+\loop \xordcode\count255=\count255
+ \xchrcode\count255=\count255
+ \advance\count255 by 1
+\ifnum \count255<256 \repeat
+
+
+% next, we remove the current conversion table, if exists:
+
+{\catcode`\^^@=12
+\gdef\clearmubytes{\bgroup \count255=1
+ \loop \uccode`X=\count255
+ \uppercase{\mubyte XX\endmubyte}%
+ \advance\count255 by1
+ \ifnum\count255<256 \repeat
+ \mubyte ^^@^^@\endmubyte
+ \egroup}
+}
+\clearmubytes
+
+
+% include these files first, so we can redefine some characters later
+
+\input utf8math
+\input utf8unkn
+\input utf8plsq
+
+
+% create the conversion table:
+
+
+% uppercase letters
+
+\mubyte ^^81 ^^c4^^84\endmubyte % Aogonek
+\mubyte ^^82 ^^c4^^86\endmubyte % Cacute
+\mubyte ^^86 ^^c4^^98\endmubyte % Eogonek
+\mubyte ^^8a ^^c5^^81\endmubyte % Lslash
+\mubyte ^^8b ^^c5^^83\endmubyte % Nacute
+\mubyte ^^d3 ^^c3^^93\endmubyte % Oacute
+\mubyte ^^91 ^^c5^^9a\endmubyte % Sacute
+\mubyte ^^9b ^^c5^^bb\endmubyte % Zdotaccent
+\mubyte ^^99 ^^c5^^b9\endmubyte % Zacute
+
+% lowercase letters
+
+\mubyte ^^a1 ^^c4^^85\endmubyte % aogonek
+\mubyte ^^a2 ^^c4^^87\endmubyte % cacute
+\mubyte ^^a6 ^^c4^^99\endmubyte % eogonek
+\mubyte ^^aa ^^c5^^82\endmubyte % lslash
+\mubyte ^^ab ^^c5^^84\endmubyte % nacute
+\mubyte ^^f3 ^^c3^^b3\endmubyte % oacute
+\mubyte ^^b1 ^^c5^^9b\endmubyte % sacute
+\mubyte ^^bb ^^c5^^bc\endmubyte % zdotaccent
+\mubyte ^^b9 ^^c5^^ba\endmubyte % zacute
+
+% non-characters
+
+\chardef\erq="27
+\mubyte \erq ^^e2^^80^^99\endmubyte % right single quotation mark
+
+% there's no \elqq, \elq, they are the same
+% Unicode character as \crqq, \crq
+
+\chardef\endash="7B
+\chardef\emdash="7C
+\mubyte \endash ^^e2^^80^^93\endmubyte % en dash
+\mubyte \emdash ^^e2^^80^^94\endmubyte % em dash
+
+\chardef\utfinvexclamation="3C
+\chardef\utfinvquestion="3E
+\mubyte \utfinvexclamation ^^c2^^a1\endmubyte % inverted exclamation mark
+\mubyte \utfinvquestion ^^c2^^bf\endmubyte % inverted question mark
+
+\chardef\utfligatureff="0B
+\chardef\utfligaturefi="0C
+\chardef\utfligaturefl="0D
+\chardef\utfligatureffi="0E
+\chardef\utfligatureffl="0F
+\mubyte \utfligatureff ^^ef^^ac^^80\endmubyte % latin small ligature ff
+\mubyte \utfligaturefi ^^ef^^ac^^81\endmubyte % latin small ligature fi
+\mubyte \utfligaturefl ^^ef^^ac^^82\endmubyte % latin small ligature fl
+\mubyte \utfligatureffi ^^ef^^ac^^83\endmubyte % latin small ligature ffi
+\mubyte \utfligatureffl ^^ef^^ac^^84\endmubyte % latin small ligature ffl
+
+
+% finally, make the tables work
+
+\mubytein=1 \mubyteout=3
+
+\endinput
diff --git a/Master/texmf-dist/tex/mex/utf8mex/utf8mex.ini b/Master/texmf-dist/tex/mex/utf8mex/utf8mex.ini
new file mode 100644
index 00000000000..7a1a6423e57
--- /dev/null
+++ b/Master/texmf-dist/tex/mex/utf8mex/utf8mex.ini
@@ -0,0 +1,33 @@
+%% June 2004 W\l{}odek Bzyl (public domain)
+%% UTF8MeX
+%% MeX format for UTF-8 encoded files
+%%
+%% Requires:
+%% - version 7.5.3 of Web2C implementation of TeX
+%% - `utf8math.tex', `utf8raw.tex, `utf8unkn.tex'
+%% (these files belong to the EncTeX package:
+%% ftp://math.feld.cvut.cz/pub/olsak/enctex/)
+%%
+\ifx\pdfoutput\undefined \else
+ \ifx\pdfoutput\relax \else
+ %
+ % We're building the Mex format with the pdfetex engine (started 2004).
+ \input pdftexconfig
+ \pdfoutput=0
+ %
+ % pdfTeX related primitives are no longer hidden by default
+ % (started 2005). Uncomment and recreate the format files by running
+ % "fmtutil --all" resp. "fmtutil-sys --all" to revert to the old
+ % (2004) behaviour.
+ % \input pdftex-dvi.tex
+ %
+ \fi
+\fi
+%
+% the usual format initialization.
+\input mex
+\input utf8-pl
+%\input plaina4 % set \hsize and \vsize for A4 %not important, needs cslatex (SW)
+\everyjob=\expandafter{\the\everyjob
+ \message{This is UTF8MeX Version 0.1 13.VI.2004 (W. Bzyl)}}
+\dump
diff --git a/Master/texmf-dist/tex/mex/utf8mex/utf8plsq.tex b/Master/texmf-dist/tex/mex/utf8mex/utf8plsq.tex
new file mode 100644
index 00000000000..a8f1d999543
--- /dev/null
+++ b/Master/texmf-dist/tex/mex/utf8mex/utf8plsq.tex
@@ -0,0 +1,65 @@
+%
+% utf8plsq.tex
+%
+% UTF-8 characters expanding to control sequences which
+% are independent on internal TeX encoding.
+%
+% Note: the control sequences: \plqq, \prqq, \flqq, \frqq
+% are defined in mex1.tex.
+%
+% Copyright (C) 2004 Wlodek Bzyl, <matwb@univ.gda.pl>
+%
+% This program is free software; you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either version 2 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program; if not, write to the Free Software
+% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+% punctuation
+
+\let\nbsp~
+\mubyte \nbsp ^^c2^^a0\endmubyte % no-break space
+\mubyte \quad ^^e2^^80^^83\endmubyte % em space
+\mubyte \plqq ^^e2^^80^^9e\endmubyte % double low-9 quotation mark
+\mubyte \prqq ^^e2^^80^^9d\endmubyte % double high-9 quotation mark
+\mubyte \flqq ^^c2^^ab\endmubyte % left-pointing double angle quotation mark
+\mubyte \frqq ^^c2^^bb\endmubyte % right-pointing double angle quotation mark
+\mubyte \dots ^^e2^^80^^a6\endmubyte % horizontal ellipsis
+\mubyte \- ^^c2^^ad\endmubyte % soft hyphen
+\def\utfhyphen{\discretionary{-}{-}{-}} % hyphenchar?
+\mubyte \utfhyphen ^^e2^^80^^90\endmubyte % hyphen
+
+% latin 1 characters
+
+\mubyte \ss ^^c3^^9f\endmubyte % latin small letter sharp s
+\mubyte \AA ^^c3^^85\endmubyte % latin capital letter a with ring above
+\mubyte \aa ^^c3^^a5\endmubyte % latin small letter a with ring above
+\mubyte \AE ^^c3^^86\endmubyte % latin capital ligature ae
+\mubyte \ae ^^c3^^a6\endmubyte % latin small ligature ae
+\mubyte \OE ^^c5^^92\endmubyte % latin capital ligature oe
+\mubyte \oe ^^c5^^93\endmubyte % latin small ligature oe
+\mubyte \O ^^c3^^98\endmubyte % latin capital letter o slash
+\mubyte \o ^^c3^^b8\endmubyte % latin small letter o slash
+
+% other text symbols
+
+\mubyte \dag ^^e2^^80^^a0\endmubyte % dagger
+\mubyte \ddag ^^e2^^80^^a1\endmubyte % double dagger
+\mubyte \S ^^c2^^a7\endmubyte % section sign
+\mubyte \P ^^c2^^b6\endmubyte % pilcrow sign
+
+% control sequences for Polish \leq and \geq symbols
+
+\mubyte \xle ^^e2^^89^^a4\endmubyte % less-than or equal to
+\mubyte \xge ^^e2^^89^^a5\endmubyte % greater-than or equal to
+
+\endinput