[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding support for ISO-8859-1 in printed manuals
From: |
Paulo Sequeira |
Subject: |
Re: Adding support for ISO-8859-1 in printed manuals |
Date: |
Fri, 24 Nov 2006 03:48:37 -0600 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
Karl Berry escribió:
Great. By the way, if you feel like it, I imagine it would not be too
hard to define most of Latin2 (= ISO-8859-2) and Latin9 (= ISO-8859-15).
Karl,
I'm attaching the patch for @documentencoding that provides the
character definitions inside texinfo.tex
I was delayed by some complications that arised from subtleties of TeX's
semantics (at times, I felt like if TeX was laughing at me because I
couldn't have them done right :) )
Implemented is the basic support for ISO-8859-1 and also for
ISO-8859-15. ISO-8859-2 will have to wait a little more.
I also fixed a bug that my original patch had: accute i (í) didn't get
typeset well in the table of contents. That was fixed by adding \ptexi
as a dummy word in the macros that write the .toc file.
The disclaimer form to address@hidden was also just sent.
Let me know of any corrections that need to be done.
--
Paulo Sequeira
Asegúrese que mis correos tengan una firma digital que usted haya
confirmado que es válida.
Mi Certificado de Identidad fue obtenido de CAcert
(http://www.cacert.org). Si recibe una advertencia de que mi firma no es
válida o confiable, pruebe instalando el certificado raíz de CAcert en
su aplicación de correo. Instrucciones sobre esto las puede encontrar en
http://wiki.cacert.org/wiki/BrowserClients
Para más información, le recomiendo leer la guía "Digital Signing" que
se encuentra en http://www.cacert.org/help.php
Index: texinfo.tex
===================================================================
RCS file: /sources/texinfo/texinfo/doc/texinfo.tex,v
retrieving revision 1.223
diff -r1.223 texinfo.tex
6c6
< \def\texinfoversion{2006-11-08.17}
---
> \def\texinfoversion{2006-11-24.02}
3575a3576
> \definedummyword\ptexi
7130,7132d7130
< % @documentencoding should change something in TeX eventually, most
< % likely, but for now just recognize it.
< \let\documentencoding = \comment
7133a7132,7315
> %% This macro sets the catcode of characters 128 through 255 to the
> %% specified number. -- PSG
>
> \def\setnonasciicharscatcode#1{
> \count255=128
> \loop\ifnum\count255<256
> \global\catcode\count255=#1
> \advance\count255 by 1
> \repeat
> }
>
> % @documentencoding sets the definition of non-ASCII characters
> % according to the specified encoding.
>
> %% First, make active non-ASCII characters in order for them to be
> %% correctly categorized when TeX reads the replacement text of
> %% @documentencoding. Trying to make them active when the macro is
> %% expanded, althought required also, is too late; funny, isn't it? --
> %% PSG
> \setnonasciicharscatcode\active
>
> \parseargdef\documentencoding{%
> % A message to be logged when using a character that isn't available
> % the default font encoding (OT1).
> \def\missingcharmsg##1{\message{Character missing in current font: ##1.}}
>
> \def\declaredencoding{\csname #1 \endcsname}
>
> % Supported encodings: names converted to tokens in order to be able
> % to compare them with \ifx.
>
> \def\latone{\csname ISO-8859-1 \endcsname}
> \def\latnine{\csname ISO-8859-15 \endcsname}
> \def\lattwo{\csname ISO-8859-2 \endcsname}
> \def\ascii{\csname US-ASCII \endcsname}
>
> \ifx \declaredencoding \ascii
> % ASCII: Nothing needs to be done
> \relax
>
> \else \ifx \declaredencoding \lattwo
> % Latin-2: Not yet implemented
> \relax
>
> \else % Latin-1 or Latin-9
> % Make characters active again when macro is expanded.
> \setnonasciicharscatcode\active
>
> % Character definitions for Latin-1 are used by default.
>
> \gdef^^a0{\nobreakspace}
> \gdef^^a1{\textexclamdown}
> \gdef^^a2{\textcent}
> \gdef^^a3{\pounds}
> \gdef^^a4{\missingcharmsg{general currency symbol}}
> \gdef^^a5{\missingcharmsg{pound sterling}}
> \gdef^^a6{\missingcharmsg{broken vertical bar}}
> \gdef^^a7{\S}
> \gdef^^a8{\"{}}
> \gdef^^a9{\copyright}
> \gdef^^aa{$^a$}
> \gdef^^ab{\missingcharmsg{left guillemot}}
> \gdef^^ac{$\lnot$}
> \gdef^^ad{\-}
> \gdef^^ae{\registeredsymbol}
> \gdef^^af{\={}}
>
> \gdef^^b0{$^\circ$}
> \gdef^^b1{$\pm$}
> \gdef^^b2{$^2$}
> \gdef^^b3{$^3$}
> \gdef^^b4{\'{}}
> \gdef^^b5{$\mu$}
> \gdef^^b6{\P}
>
> \gdef^^b7{$^.$}
> \gdef^^b8{\c\ }
> \gdef^^b9{$^1$}
> \gdef^^ba{$^o$}
>
> \gdef^^bb{\missingcharmsg{right guillemot}}
> \gdef^^bc{$1\over4$}
> \gdef^^bd{$1\over2$}
> \gdef^^be{$3\over4$}
> \gdef^^bf{?`}
>
> \gdef^^c0{\`A}
> \gdef^^c1{\'A}
> \gdef^^c2{\^A}
> \gdef^^c3{\~A}
> \gdef^^c4{\"A}
> \gdef^^c5{\r A}
> \gdef^^c6{\AE}
> \gdef^^c7{\c C}
> \gdef^^c8{\`E}
> \gdef^^c9{\'E}
> \gdef^^ca{\^E}
> \gdef^^cb{\"E}
> \gdef^^cc{\`I}
> \gdef^^cd{\'I}
> \gdef^^ce{\^I}
> \gdef^^cf{\"I}
>
> \gdef^^d0{\missingcharmsg{capital Eth}}
> \gdef^^d1{\~N}
> \gdef^^d2{\`O}
> \gdef^^d3{\'O}
> \gdef^^d4{\^O}
> \gdef^^d5{\~O}
> \gdef^^d6{\"O}
> \gdef^^d7{$\times$}
> \gdef^^d8{\O}
> \gdef^^d9{\`U}
> \gdef^^da{\'U}
> \gdef^^db{\^U}
> \gdef^^dc{\"U}
> \gdef^^dd{\'Y}
> \gdef^^de{\missingcharmsg{capital Thorn}}
> \gdef^^df{\ss}
>
> \gdef^^e0{\`a}
> \gdef^^e1{\'a}
> \gdef^^e2{\^a}
> \gdef^^e3{\~a}
> \gdef^^e4{\"a}
> \gdef^^e5{\r a}
> \gdef^^e6{\ae}
> \gdef^^e7{\c c}
> \gdef^^e8{\`e}
> \gdef^^e9{\'e}
> \gdef^^ea{\^e}
> \gdef^^eb{\"e}
> \gdef^^ec{\`\ptexi}
> \gdef^^ed{\'\ptexi}
> \gdef^^ee{\^\ptexi}
> \gdef^^ef{\"\ptexi}
>
> \gdef^^f0{\missingcharmsg{small eth}}
> \gdef^^f1{\~n}
> \gdef^^f2{\`o}
> \gdef^^f3{\'o}
> \gdef^^f4{\^o}
> \gdef^^f5{\~o}
> \gdef^^f6{\"o}
> \gdef^^f7{$\div$}
> \gdef^^f8{\o}
> \gdef^^f9{\`u}
> \gdef^^fa{\'u}
> \gdef^^fb{\^u}
> \gdef^^fc{\"u}
> \gdef^^fd{\'y}
> \gdef^^fe{\missingcharmsg{small thorn}}
> \gdef^^ff{\"y}
>
> % Test exactly which encoding is being declared.
> \ifx \declaredencoding \latone
> % Latin-1: Characters already set up for this encoding: relax.
> \relax
>
> \else \ifx \declaredencoding \latnine
> % Latin-9: Update characters that differ from Latin-1
>
> \gdef^^a4{\euro}
> \gdef^^a6{\v S}
> \gdef^^a8{\v s}
> \gdef^^b4{\v Z}
> \gdef^^b8{\v z}
> \gdef^^bc{\OE}
> \gdef^^bd{\oe}
> \gdef^^be{\"Y}
>
> \else
> \errmessage{Unknown document encoding}
>
> \fi % latin9
> \fi % latin1
> \fi % latin2
> \fi % ascii
> }
>
> %% Make non-ASCII characters just printable again for compatibility with
> %% existing Texinfo documents that may use them, even without declaring a
> %% document encoding -- PSG
> \setnonasciicharscatcode \other
psequeira.vcf
Description: Vcard
- Re: Adding support for ISO-8859-1 in printed manuals,
Paulo Sequeira <=