### File: latin3.pl ### Version 0.1, November 1, 1997 ### Written by Ross Moore ### includes macros in LaTeX's latin3.def ### Version 0.3, December 12, 1997 ### includes lower --> uppercase conversion tables ### ### ISO_8859-3 encoding information ### ## Copyright (C) 1997 by Ross Moore ## 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., 675 Mass Ave, Cambridge, MA 02139, USA. $CHARSET = 'iso-8859-3'; $INPUTENC = 'latin3'; #Character ranges for lower --> upper-case conversion $sclower = "\\261\\266\\271-\\274\\277\\340-\\366\\370-\\376"; $scupper = "\\241\\246\\251-\\254\\257\\300-\\326\\330-\\336"; #extra pattern match preceding lower --> upper-case conversion $scextra = "s/\\337/ss/g"; %extra_small_caps = ( '223' , 'ss' ); %low_entities = ( '177', '161' # ,'178', '162' # ,'179', '163' # ,'180', '164' # ,'181', '165' ,'182', '166' # ,'183', '167' # ,'184', '168' ,'185', '169' ,'186', '170' ,'187', '171' ,'188', '172' # ,'189', '173' # ,'190', '174' ,'191', '175' ,'224', '192' ,'225', '193' ,'226', '194' ,'227', '195' ,'228', '196' ,'229', '197' ,'230', '198' ,'231', '199' ,'232', '200' ,'233', '201' ,'234', '202' ,'235', '203' ,'236', '204' ,'237', '205' ,'238', '206' ,'239', '207' ,'240', '208' ,'241', '209' ,'242', '210' ,'243', '211' ,'244', '212' ,'245', '213' ,'246', '214' # ,'247', '215' ,'248', '216' ,'249', '217' ,'250', '218' ,'251', '219' ,'252', '220' ,'253', '221' ,'254', '222' # ,'255', '223' ); sub do_cmd_ss { join('', &iso_map("sz", "lig"), $_[0]);} sub do_cmd_i { join('', &iso_map("i", "nodot"), $_[0]);} sub do_cmd_textcurrency { join('', &iso_map("curren", ""), $_[0]);} sub do_cmd_textmalteseh { join('', &iso_map("h", "bar"), $_[0]);} sub do_cmd_textmalteseH { join('', &iso_map("H", "bar"), $_[0]);} sub do_cmd_textperiodcentered { join('', &iso_map("middot", ""), $_[0]);} sub do_cmd_textonehalf { join('', &iso_map("frac12", ""), $_[0]);} sub do_cmd_mathdegree { join('', &iso_map("deg", ""), $_[0]);} sub do_cmd_mathtwosuperior { join('', &iso_map("sup2", ""), $_[0]);} sub do_cmd_maththreesuperior { join('', &iso_map("sup3", ""), $_[0]);} sub do_cmd_S { join('', &iso_map("sect", ""), $_[0]);} sub do_cmd_hbar { join('', &iso_map("h", "bar"), $_[0]);} sub do_cmd_div { join('', &iso_map("divide", ""), $_[0]);} sub do_cmd_times { join('', &iso_map("times", ""), $_[0]);} sub do_cmd_minus { join('', &iso_map("shy", ""), $_[0]);} sub do_cmd_pounds { join('', &iso_map("pound", ""), $_[0]);} sub do_cmd_cdot { join('', &iso_map("middot", ""), $_[0]);} sub do_cmd_micron { join('', &iso_map("micro", ""), $_[0]);} %iso_8859_3_character_map = ( 'Aacute', 'Á', # capital A, acute accent # 'Abreve', 'Ã', # capital A, breve accent 'Acirc', 'Â', # capital A, circumflex accent 'Agrave', 'À', # capital A, grave accent 'Auml', 'Ä', # capital A, dieresis or umlaut mark 'Cdot', 'Å', # capital C, dot accent 'Ccirc', 'Æ', # capital C, caron accent 'Ccedil', 'Ç', # capital C, cedilla # 'ETH', 'Ð', # capital Eth, Icelandic 'Eacute', 'É', # capital E, acute accent 'Egrave', 'È', # capital E, grave accent 'Ecirc', 'Ê', # capital E, circumflex accent 'Euml', 'Ë', # capital E, dieresis or umlaut mark 'Gbreve', '«', # capital G, breve accent 'Gcirc', 'Ø', # capital G, circumflex accent 'Gdot', 'Õ', # capital G, dot accent 'Hstrok', '¡', # maltese H 'Hcirc', '¦', # capital H, circumflex accent 'Iacute', 'Í', # capital I, acute accent 'Icirc', 'Î', # capital I, circumflex accent 'Idot', '©', # capital I, dot accent 'Igrave', 'Ì', # capital I, grave accent 'Iuml', 'Ï', # capital I, dieresis or umlaut mark 'Jcirc', '¬', # capital J, circumflex accent 'Ntilde', 'Ñ', # capital N, tilde 'Oacute', 'Ó', # capital O, acute accent 'Ocirc', 'Ô', # capital O, circumflex accent 'Ograve', 'Ò', # capital O, grave accent 'Ouml', 'Ö', # capital O, dieresis or umlaut mark 'Scedil', 'ª', # capital S, cedil accent 'Scirc', 'Þ', # capital S, circumflex accent 'Uacute', 'Ú', # capital U, acute accent 'Ubreve', 'Ý', # capital U, breve accent 'Ucirc', 'Û', # capital U, circumflex accent 'Ugrave', 'Ù', # capital U, grave accent 'Uuml', 'Ü', # capital U, dieresis or umlaut mark 'Zdot', '¯', # capital Z, dot above 'aacute', 'á', # small a, acute accent # 'abreve', 'ã', # small a, breve accent 'agrave', 'à', # small a, grave accent 'acirc', 'â', # small a, circumflex accent 'amp', '&', # ampersand 'auml', 'ä', # small a, dieresis or umlaut mark 'ccirc', 'æ', # small c, circumflex accent 'cdot', 'å', # small c, dot accent 'ccedil', 'ç', # small c, cedilla 'eacute', 'é', # small e, acute accent 'ecirc', 'ê', # small e, circumflex accent 'egrave', 'è', # small e, grave accent # 'eth', 'ð', # small eth, Icelandic 'euml', 'ë', # small e, dieresis or umlaut mark 'gbreve', '»', # small g, breve accent 'gcirc', 'ø', # small g, circumflex accent 'gdot', 'õ', # small g, dot accent 'gt', '>', # greater than 'hstrok', '±', # maltese h 'hcirc', '¶', # small h, circumflex accent 'iacute', 'í', # small i, acute accent 'icirc', 'î', # small i, circumflex accent 'igrave', 'ì', # small i, grave accent 'iuml', 'ï', # small i, dieresis or umlaut mark 'inodot', '¹', # small i, circumflex accent 'jcirc', '¼', # small j, circumflex accent 'lt', '<', # less than 'ntilde', 'ñ', # small n, tilde 'oacute', 'ó', # small O, acute accent 'ocirc', 'ô', # small O, circumflex accent 'ograve', 'ò', # small O, grave accent 'ouml', 'ö', # small o, dieresis or umlaut mark 'quot', '"', # double quote 'scedil', 'º', # small s, cedil accent 'scirc', 'þ', # small s, circumflex accent 'szlig', 'ß', # small sharp s, German (sz ligature) 'uacute', 'ú', # small u, acute accent 'ubreve', 'ý', # small u, breve accent 'ucirc', 'û', # small u, circumflex accent 'ugrave', 'ù', # small u, grave accent 'uuml', 'ü', # small u, dieresis or umlaut mark 'zdot', '¿', # small z, dot above # These have HTML4 mnemonic names ... 'nbsp', ' ', # non-breaking space 'pound', '£', # pound sign 'curren', '¤', # currency sign 'sect', '§', # section mark 'shy', '­', 'sup2', '²', 'sup3', '³', 'micro', 'µ', 'middot', '·', 'frac12', '½', 'times', '×', 'divide', '÷', # These are character types without arguments ... 'grave' , "`", 'circ', '^', 'tilde', '~', 'breve', '¢', 'uml', '¨', 'deg', '°', 'acute' , "´", 'cedil', "¸", 'dot', 'ÿ' ); %iso_8859_3_character_map_inv = ( '>' , '\\ensuremath{>}', '<' , '\\ensuremath{<}', '&' , '&', '^' , '\\^{}', '~' , '\\~{}', '"' , '"', ' ' , '\\nobreakspace{}', '¡' , '\\textmalteseH{}', '¢' , '\\u{}', '£' , '\\pounds{}', '¤' , '\\textcurrency{}', # '¥' , '\\v{L}', '¦' , '\\^{H}', '§' , '\\S{}', '¨' , '\\"{}', '©' , '\\.{I}', 'ª' , '\\c{S}', '«' , '\\u{G}', '¬' , '\\^{J}', '­' , '\\-', # '®' , '\\v{Z}', '¯' , '\\.{Z}', # '°' , '\\mathdegree{}', '°' , '\\r{}', '±' , '\\textmalteseh{}', # '²' , '\\mathtwosuperior{}', '²' , '\\ensuremath{^{2}}', # '³' , '\\maththreesuperior{}', '³' , '\\ensuremath{^{3}}', '´' , '\\\'{}', 'µ' , '\ensuremath{\\micron}', '¶' , '\\^{h}', # '·' , '\\textperiodcentered{}', '·' , '\\ensuremath{\\cdot{}}', '¸' , '\\c{ }', '¹' , '{\\i}', 'º' , '\\c{s}', '»' , '\\u{g}', '¼' , '\\^{\\j}', # '½' , '\\textonehalf{}', '½' , '\\ensuremath{\\frac{1}{2}}', # '¾' , '\\v{z}', '¿' , '\\.{z}', 'À' , '\\`{A}', 'Á' , '\\\'{A}', 'Â' , '\\^{A}', # 'Ã' , '\\~{A}', 'Ä' , '\\"{A}', 'Å' , '\\.{C}', 'Æ' , '\\^{C}', 'Ç' , '\\c{C}', 'È' , '\\`{E}', 'É' , '\\\'{E}', 'Ê' , '\\^{E}', 'Ë' , '\\"{E}', 'Ì' , '\\`{I}', 'Í' , '\\\'{I}', 'Î' , '\\^{I}', 'Ï' , '\\"{I}', # 'Ð' , '\\DH{}', 'Ñ' , '\\~{N}', 'Ò' , '\\`{O}', 'Ó' , '\\\'{O}', 'Ô' , '\\^{O}', 'Õ' , '\\.{G}', 'Ö' , '\\"{O}', '×' , '\\ensuremath{\\times}', 'Ø' , '\\^{G}', 'Ù' , '\\`{U}', 'Ú' , '\\\'{U}', 'Û' , '\\^{U}', 'Ü' , '\\"{U}', 'Ý' , '\\u{U}', 'Þ' , '\\^{S}', 'ß' , '\\ss{}', 'à' , '\\`{a}', 'á' , '\\\'{a}', 'â' , '\\^{a}', # 'ã' , '\\~{a}', 'ä' , '\\"{a}', 'å' , '\\.{c}', 'æ' , '\\^{c}', 'ç' , '\\c{c}', 'è' , '\\`{e}', 'é' , '\\\'{e}', 'ê' , '\\^{e}', 'ë' , '\\"{e}', 'ì' , '\\`{\\i}', 'í' , '\\\'{\\i}', 'î' , '\\^{\\i}', 'ï' , '\\"{\\i}', # 'ð' , '\\dh{}', 'ñ' , '\\~{n}', 'ò' , '\\`{o}', 'ó' , '\\\'{o}', 'ô' , '\\^{o}', 'õ' , '\\.{g}', 'ö' , '\\"{o}', '÷' , '\\ensuremath{\\div}', 'ø' , '\\^{g}', 'ù' , '\\`{u}', 'ú' , '\\\'{u}', 'û' , '\\^{u}', 'ü' , '\\"{u}', 'ý' , '\\u{u}', 'þ' , '\\^{s}', 'ÿ' , '\\.{}' ); 1;