On 28.05.08, Abdelrazak Younes wrote:
> Helge Hafting wrote:
>> Abdelrazak Younes wrote:
>>> Jean-Marc Lasgouttes wrote:

>>>> How difficult would it be to support unicode in maths?

>>> In 1.5 forget about it. In 1.6 that would require a lot of work I
>>> guess.
>> This wasn't any generic unicode character, it was a delta which is  
>> normally used in math. The only strange thing about it was that it
>> was in unicode rather than spelled out \delta. 

Support for individuall unicode characters in math can be achieved easily
with lines like

% centered dot
\DeclareUnicodeCharacter{00B7}{\ifmmode\cdot\else\textperiodcentered\fi}

in the LaTeX preamble (from Herbert Voss' "de_math.lyx" tips)
without any change to the LyX code.

>> A simple table with unicode characters and their equivalent
>> math commands (\alpha, \beta, and so on) could translate any
>> non-ascii the users somehow manages to bring into mathed.

As with all common LaTeX problems, there should be a package providing
this kind of table.

And indeed, the package ucs comes with the option "mathletters"
which enables the use of unicode greek letters in the document replacing
them with greek symbols from the math alphabet (not recommended for
typesetting Greek text, though).

Unfortunately, with \usepackage[mathletters]{ucs}, the above definition
of the centered dot is lost and $5·4=20$ is printed as 5Δ4=20 :-(

There has also been discussion on this topic on the latex3 list
<http://osdir.com/ml/tex.latex.latex3/2003-01/msg00048.html>
and there is a package "inputenx" on CTAN with a "math" option that
depends on the experimental package 
"inpmath" <http://www.latex-project.org/code/experimental/inpmath.zip>

> Things are more complicated when you speak in terms of _current_ LyX  
> code :-)

> Basically, mathed does not use unicode but sepecial 8-bit codepoints  
> reflecting their associate modern font symbol codepoints.

See the attached lyx file for a minimal example that works in my lyx
1.5.5.

Günter

Attachment: math-inputenc-text.lyx
Description: application/lyx

Reply via email to