bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #46083] DeclareUnicodeCharacter breaks if used twice for same c


From: Gavin Smith
Subject: Re: [bug #46083] DeclareUnicodeCharacter breaks if used twice for same character
Date: Fri, 9 Oct 2015 21:51:36 +0100

On 2 October 2015 at 23:29, Oliver Heimlich <address@hidden> wrote:
> On 03.10.2015 00:12, Karl Berry wrote:
>>     \DeclareUnicodeCharacter{00A0}{\ }
>>
>> FWIW, A0 is supposed to be a no-break space.  That's \tie, not "\ ".
>>
>>     \DeclareUnicodeCharacter{03C0}{$\pi$}
>>
>> Can you please send me your list of added characters?  I know well that
>> many math characters are missing, and I'd like to add them.  (Except,
>> better to use \ensuremath\pi than $\pi$, in case the character is used
>> inside @math.)
>
> I am not an expert in Tex and obviously your declarations are better
> than mine. ;-) You can find my full list here, the declarations of pi
> and following are not covered in TexInfo 6:
> http://hg.code.sf.net/p/octave/interval/file/7bf783828c2d/doc/manual.texinfo#l13

I've added these characters and uploaded the texinfo.tex file to
http://ftp.gnu.org/gnu/texinfo/.

> It is a free extension for GNU Octave licensed under GPL Version 3 or
> later. I can't rely on the texinfo.tex in GNU Octave, because I want to
> support multiple versions of Octave. I hesitate to include a copy in my
> package, because it would impact the release size and I am too lazy to
> maintain updates to that file.

I really don't know what to suggest. It occurred to me that you've got
a problem that doesn't exist for the Octave manual itself, because
they have different manuals in different releases. I really see no
reason why your manual should depend on the same texinfo.tex version
as theirs. If you do it would be advisable to not use any features
introduced after the oldest one you want to support. This doesn't help
you with the Unicode characters, though.

If it's not too much trouble, one possibility is to have two separate
pieces of text each time you have an equation or somesuch where you
want to use these Unicode characters, using @iftex and @ifnottex along
with a raw @tex block. The raw @tex block could have the plain TeX
codes for the symbols you want, while the @ifnottex block would have
the UTF-8 characters as before. I'd guess as well that using the TeX
codes in math mode in a @tex block would give nicer formatting of
mathematical formulae.

I don't like the idea of encouraging the use of
\DeclareUnicodeCharacter in raw @tex blocks. But there's still the
problem of how people can use Unicode characters in Texinfo files when
they haven't been supported. There are hundreds and thousands of
characters that people may wish to use in the future, so this is a big
problem.

I think the best solution is whenever somebody needs to use an
unsupported character, they get it included in the official
texinfo.tex file, which would make them easily available for others.
Ideally, blocks of characters would be added at once (for example, all
math symbols, or all letters of a particular alphabet), which should
reduce the amount of work needed in the long term compared with one or
two characters being added at a time --- of course, that depends on
someone taking the time to do that.

I can see the position of texinfo.tex with respect to UTF-8 changing
from "A few Unicode characters are supported, isn't that cool" to "The
Unicode support is woefully incomplete." It'll probably get there
gradually, even if it's not our intention, as the expectations of
document writers increase. I'm not sure what we do if someone tells us
that they really want to have the Chinese character for waterfall, or
a character for a picture of an ice cream in their document. Probably
some kind of on-demand loading of character definition files and fonts
would be needed.

> P.S. If you are interested, you can find a HTML version of above
> mentioned manual here:
> http://octave.sourceforge.net/interval/package_doc/index.html

I must say I like the CSS styling of those web pages.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]