unicode in math

2008-09-10 Thread G. Milde
Dear LyX users,

with LyX 1.6, using unicode characters other than the first block is
possible also in math mode.  The character in question is either replaced
by a math-equivalent (if defined in the unicodesymbols file) or by
text in math with the text-equivalent.

This is a vast improvement over the silent failure in LyX 1.5, my thanks
go out to the relevant developer(s)!

However, there remain some inconsistencies:

* while A is typeset italic, Ä (and other accented characters) are not.
* while l is typeset italic, λ (and other Greek characters) are not.

So, the question is:

* should Ä be replaced with \A in math?
  
  More generally: should latin-1 supplement characters for which a math
  equivalent exists use this instead of a text-version?

* should λ be replaced with \lambda in math?

  More generally: 
  
  * should Greek characters from the Greek and Coptic
unicode block use the math-equivalent, or

  * should only Greek symbols (from Greek and Coptic and/or from
Mathematical Alphanumeric Symbols) be converted to math symbols?

and could these also show as italic in the LyX GUI?

Attached is a patch for Greek in math.

Günter
--- /usr/local/src/lyx-devel/lib/unicodesymbols	2008-07-29 14:34:04.0 +0200
+++ /home/milde/.lyx16/unicodesymbols-greek-math	2008-09-07 21:15:59.0 +0200
@@ -737,30 +737,30 @@
 0x038e \\textgreek{\char39U}textgreek  # GREEK CAPITAL LETTER UPSILON WITH TONOS
 0x038f \\textgreek{\char39W}textgreek  # GREEK CAPITAL LETTER OMEGA WITH TONOS
 0x0390 \\textgreek{\char242}textgreek  # GREEK SMALL LETTER IOTA WITH DIALYTKA
-0x0391 \\textgreek{A}   textgreek  # GREEK CAPITAL LETTER ALPHA
-0x0392 \\textgreek{B}   textgreek  # GREEK CAPITAL LETTER BETA
-0x0393 \\textgreek{G}   textgreek  # GREEK CAPITAL LETTER GAMMA
-0x0394 \\textgreek{D}   textgreek  # GREEK CAPITAL LETTER DELTA
-0x0395 \\textgreek{E}   textgreek  # GREEK CAPITAL LETTER EPSILON
-0x0396 \\textgreek{Z}   textgreek  # GREEK CAPITAL LETTER ZETA
-0x0397 \\textgreek{H}   textgreek  # GREEK CAPITAL LETTER ETA
-0x0398 \\textgreek{J}   textgreek  # GREEK CAPITAL LETTER THETA
-0x0399 \\textgreek{I}   textgreek  # GREEK CAPITAL LETTER IOTA
-0x039a \\textgreek{K}   textgreek  # GREEK CAPITAL LETTER KAPPA
-0x039b \\textgreek{L}   textgreek  # GREEK CAPITAL LETTER LAMDA
-0x039c \\textgreek{M}   textgreek  # GREEK CAPITAL LETTER MU
-0x039d \\textgreek{N}   textgreek  # GREEK CAPITAL LETTER NU
-0x039e \\textgreek{X}   textgreek  # GREEK CAPITAL LETTER XI
-0x039f \\textgreek{O}   textgreek  # GREEK CAPITAL LETTER OMICRON
-0x03a0 \\textgreek{P}   textgreek  # GREEK CAPITAL LETTER PI
-0x03a1 \\textgreek{R}   textgreek  # GREEK CAPITAL LETTER RHO
-0x03a3 \\textgreek{S}   textgreek  # GREEK CAPITAL LETTER SIGMA
-0x03a4 \\textgreek{T}   textgreek  # GREEK CAPITAL LETTER TAU
-0x03a5 \\textgreek{U}   textgreek  # GREEK CAPITAL LETTER UPSILON
-0x03a6 \\textgreek{F}   textgreek  # GREEK CAPITAL LETTER PHI
-0x03a7 \\textgreek{Q}   textgreek  # GREEK CAPITAL LETTER CHI
-0x03a8 \\textgreek{Y}   textgreek  # GREEK CAPITAL LETTER PSI
-0x03a9 \\textgreek{W}   textgreek  # GREEK CAPITAL LETTER OMEGA
+0x0391 \\textgreek{A}   textgreek  # A # GREEK CAPITAL LETTER ALPHA
+0x0392 \\textgreek{B}   textgreek  # B # GREEK CAPITAL LETTER BETA
+0x0393 \\textgreek{G}   textgreek  \Gamma # GREEK CAPITAL LETTER GAMMA
+0x0394 \\textgreek{D}   textgreek  \Delta # GREEK CAPITAL LETTER DELTA
+0x0395 \\textgreek{E}   textgreek  # E # GREEK CAPITAL LETTER EPSILON
+0x0396 \\textgreek{Z}   textgreek  # Z # GREEK CAPITAL LETTER ZETA
+0x0397 \\textgreek{H}   textgreek  # H # GREEK CAPITAL LETTER ETA
+0x0398 \\textgreek{J}   textgreek  \Theta # GREEK CAPITAL LETTER THETA
+0x0399 \\textgreek{I}   textgreek  # I # GREEK CAPITAL LETTER IOTA
+0x039a \\textgreek{K}   textgreek  # K # GREEK CAPITAL LETTER KAPPA
+0x039b \\textgreek{L}   textgreek  \Lambda # GREEK CAPITAL LETTER LAMDA
+0x039c \\textgreek{M}   textgreek  # M # GREEK CAPITAL LETTER MU
+0x039d \\textgreek{N}   textgreek  # N # GREEK CAPITAL LETTER NU
+0x039e \\textgreek{X}   textgreek  \Xi # GREEK CAPITAL LETTER XI
+0x039f \\textgreek{O}   textgreek  # O # GREEK CAPITAL LETTER OMICRON
+0x03a0 \\textgreek{P}   textgreek  \Pi # GREEK CAPITAL LETTER PI
+0x03a1 \\textgreek{R}   textgreek  \Rho # GREEK CAPITAL LETTER RHO
+0x03a3 \\textgreek{S}   textgreek  \Sigma # GREEK CAPITAL LETTER SIGMA
+0x03a4 \\textgreek{T}   textgreek  # T # GREEK CAPITAL LETTER TAU
+0x03a5 \\textgreek{U}   textgreek  \Upsilon # GREEK CAPITAL LETTER UPSILON
+0x03a6 \\textgreek{F}   textgreek  \Phi # GREEK CAPITAL LETTER PHI
+0x03a7 \\textgreek{Q}   

Re: unicode in math

2008-09-10 Thread rgheck

G. Milde wrote:

Dear LyX users,

  

This looks more like something for devel

rh


with LyX 1.6, using unicode characters other than the first block is
possible also in math mode.  The character in question is either replaced
by a math-equivalent (if defined in the unicodesymbols file) or by
text in math with the text-equivalent.

This is a vast improvement over the silent failure in LyX 1.5, my thanks
go out to the relevant developer(s)!

However, there remain some inconsistencies:

* while A is typeset italic, Ä (and other accented characters) are not.
* while l is typeset italic, λ (and other Greek characters) are not.

So, the question is:

* should Ä be replaced with \A in math?
  
  More generally: should latin-1 supplement characters for which a math

  equivalent exists use this instead of a text-version?

* should λ be replaced with \lambda in math?

  More generally: 
  
  * should Greek characters from the Greek and Coptic

unicode block use the math-equivalent, or

  * should only Greek symbols (from Greek and Coptic and/or from

Mathematical Alphanumeric Symbols) be converted to math symbols?

and could these also show as italic in the LyX GUI?

Attached is a patch for Greek in math.

Günter
  




unicode in math

2008-09-10 Thread G. Milde
Dear LyX users,

with LyX 1.6, using unicode characters other than the first block is
possible also in math mode.  The character in question is either replaced
by a math-equivalent (if defined in the unicodesymbols file) or by
text in math with the text-equivalent.

This is a vast improvement over the silent failure in LyX 1.5, my thanks
go out to the relevant developer(s)!

However, there remain some inconsistencies:

* while A is typeset italic, Ä (and other accented characters) are not.
* while l is typeset italic, λ (and other Greek characters) are not.

So, the question is:

* should Ä be replaced with \A in math?
  
  More generally: should latin-1 supplement characters for which a math
  equivalent exists use this instead of a text-version?

* should λ be replaced with \lambda in math?

  More generally: 
  
  * should Greek characters from the Greek and Coptic
unicode block use the math-equivalent, or

  * should only Greek symbols (from Greek and Coptic and/or from
Mathematical Alphanumeric Symbols) be converted to math symbols?

and could these also show as italic in the LyX GUI?

Attached is a patch for Greek in math.

Günter
--- /usr/local/src/lyx-devel/lib/unicodesymbols	2008-07-29 14:34:04.0 +0200
+++ /home/milde/.lyx16/unicodesymbols-greek-math	2008-09-07 21:15:59.0 +0200
@@ -737,30 +737,30 @@
 0x038e \\textgreek{\char39U}textgreek  # GREEK CAPITAL LETTER UPSILON WITH TONOS
 0x038f \\textgreek{\char39W}textgreek  # GREEK CAPITAL LETTER OMEGA WITH TONOS
 0x0390 \\textgreek{\char242}textgreek  # GREEK SMALL LETTER IOTA WITH DIALYTKA
-0x0391 \\textgreek{A}   textgreek  # GREEK CAPITAL LETTER ALPHA
-0x0392 \\textgreek{B}   textgreek  # GREEK CAPITAL LETTER BETA
-0x0393 \\textgreek{G}   textgreek  # GREEK CAPITAL LETTER GAMMA
-0x0394 \\textgreek{D}   textgreek  # GREEK CAPITAL LETTER DELTA
-0x0395 \\textgreek{E}   textgreek  # GREEK CAPITAL LETTER EPSILON
-0x0396 \\textgreek{Z}   textgreek  # GREEK CAPITAL LETTER ZETA
-0x0397 \\textgreek{H}   textgreek  # GREEK CAPITAL LETTER ETA
-0x0398 \\textgreek{J}   textgreek  # GREEK CAPITAL LETTER THETA
-0x0399 \\textgreek{I}   textgreek  # GREEK CAPITAL LETTER IOTA
-0x039a \\textgreek{K}   textgreek  # GREEK CAPITAL LETTER KAPPA
-0x039b \\textgreek{L}   textgreek  # GREEK CAPITAL LETTER LAMDA
-0x039c \\textgreek{M}   textgreek  # GREEK CAPITAL LETTER MU
-0x039d \\textgreek{N}   textgreek  # GREEK CAPITAL LETTER NU
-0x039e \\textgreek{X}   textgreek  # GREEK CAPITAL LETTER XI
-0x039f \\textgreek{O}   textgreek  # GREEK CAPITAL LETTER OMICRON
-0x03a0 \\textgreek{P}   textgreek  # GREEK CAPITAL LETTER PI
-0x03a1 \\textgreek{R}   textgreek  # GREEK CAPITAL LETTER RHO
-0x03a3 \\textgreek{S}   textgreek  # GREEK CAPITAL LETTER SIGMA
-0x03a4 \\textgreek{T}   textgreek  # GREEK CAPITAL LETTER TAU
-0x03a5 \\textgreek{U}   textgreek  # GREEK CAPITAL LETTER UPSILON
-0x03a6 \\textgreek{F}   textgreek  # GREEK CAPITAL LETTER PHI
-0x03a7 \\textgreek{Q}   textgreek  # GREEK CAPITAL LETTER CHI
-0x03a8 \\textgreek{Y}   textgreek  # GREEK CAPITAL LETTER PSI
-0x03a9 \\textgreek{W}   textgreek  # GREEK CAPITAL LETTER OMEGA
+0x0391 \\textgreek{A}   textgreek  # A # GREEK CAPITAL LETTER ALPHA
+0x0392 \\textgreek{B}   textgreek  # B # GREEK CAPITAL LETTER BETA
+0x0393 \\textgreek{G}   textgreek  \Gamma # GREEK CAPITAL LETTER GAMMA
+0x0394 \\textgreek{D}   textgreek  \Delta # GREEK CAPITAL LETTER DELTA
+0x0395 \\textgreek{E}   textgreek  # E # GREEK CAPITAL LETTER EPSILON
+0x0396 \\textgreek{Z}   textgreek  # Z # GREEK CAPITAL LETTER ZETA
+0x0397 \\textgreek{H}   textgreek  # H # GREEK CAPITAL LETTER ETA
+0x0398 \\textgreek{J}   textgreek  \Theta # GREEK CAPITAL LETTER THETA
+0x0399 \\textgreek{I}   textgreek  # I # GREEK CAPITAL LETTER IOTA
+0x039a \\textgreek{K}   textgreek  # K # GREEK CAPITAL LETTER KAPPA
+0x039b \\textgreek{L}   textgreek  \Lambda # GREEK CAPITAL LETTER LAMDA
+0x039c \\textgreek{M}   textgreek  # M # GREEK CAPITAL LETTER MU
+0x039d \\textgreek{N}   textgreek  # N # GREEK CAPITAL LETTER NU
+0x039e \\textgreek{X}   textgreek  \Xi # GREEK CAPITAL LETTER XI
+0x039f \\textgreek{O}   textgreek  # O # GREEK CAPITAL LETTER OMICRON
+0x03a0 \\textgreek{P}   textgreek  \Pi # GREEK CAPITAL LETTER PI
+0x03a1 \\textgreek{R}   textgreek  \Rho # GREEK CAPITAL LETTER RHO
+0x03a3 \\textgreek{S}   textgreek  \Sigma # GREEK CAPITAL LETTER SIGMA
+0x03a4 \\textgreek{T}   textgreek  # T # GREEK CAPITAL LETTER TAU
+0x03a5 \\textgreek{U}   textgreek  \Upsilon # GREEK CAPITAL LETTER UPSILON
+0x03a6 \\textgreek{F}   textgreek  \Phi # GREEK CAPITAL LETTER PHI
+0x03a7 \\textgreek{Q}   

Re: unicode in math

2008-09-10 Thread rgheck

G. Milde wrote:

Dear LyX users,

  

This looks more like something for devel

rh


with LyX 1.6, using unicode characters other than the first block is
possible also in math mode.  The character in question is either replaced
by a math-equivalent (if defined in the unicodesymbols file) or by
text in math with the text-equivalent.

This is a vast improvement over the silent failure in LyX 1.5, my thanks
go out to the relevant developer(s)!

However, there remain some inconsistencies:

* while A is typeset italic, Ä (and other accented characters) are not.
* while l is typeset italic, λ (and other Greek characters) are not.

So, the question is:

* should Ä be replaced with \A in math?
  
  More generally: should latin-1 supplement characters for which a math

  equivalent exists use this instead of a text-version?

* should λ be replaced with \lambda in math?

  More generally: 
  
  * should Greek characters from the Greek and Coptic

unicode block use the math-equivalent, or

  * should only Greek symbols (from Greek and Coptic and/or from

Mathematical Alphanumeric Symbols) be converted to math symbols?

and could these also show as italic in the LyX GUI?

Attached is a patch for Greek in math.

Günter
  




unicode in math

2008-09-10 Thread G. Milde
Dear LyX users,

with LyX 1.6, using unicode characters other than the first block is
possible also in math mode.  The character in question is either replaced
by a math-equivalent (if defined in the "unicodesymbols" file) or by
"text in math" with the text-equivalent.

This is a vast improvement over the silent failure in LyX 1.5, my thanks
go out to the relevant developer(s)!

However, there remain some inconsistencies:

* while A is typeset italic, Ä (and other accented characters) are not.
* while l is typeset italic, λ (and other Greek characters) are not.

So, the question is:

* should Ä be replaced with \"A in math?
  
  More generally: should "latin-1 supplement" characters for which a math
  equivalent exists use this instead of a text-version?

* should λ be replaced with \lambda in math?

  More generally: 
  
  * should Greek characters from the "Greek and Coptic"
unicode block use the math-equivalent, or

  * should only Greek symbols (from Greek and Coptic" and/or from
"Mathematical Alphanumeric Symbols") be converted to math symbols?

and could these also show as italic in the LyX GUI?

Attached is a patch for Greek in math.

Günter
--- /usr/local/src/lyx-devel/lib/unicodesymbols	2008-07-29 14:34:04.0 +0200
+++ /home/milde/.lyx16/unicodesymbols-greek-math	2008-09-07 21:15:59.0 +0200
@@ -737,30 +737,30 @@
 0x038e "\\textgreek{\char39U}""textgreek" "" # GREEK CAPITAL LETTER UPSILON WITH TONOS
 0x038f "\\textgreek{\char39W}""textgreek" "" # GREEK CAPITAL LETTER OMEGA WITH TONOS
 0x0390 "\\textgreek{\char242}""textgreek" "" # GREEK SMALL LETTER IOTA WITH DIALYTKA
-0x0391 "\\textgreek{A}"   "textgreek" "" # GREEK CAPITAL LETTER ALPHA
-0x0392 "\\textgreek{B}"   "textgreek" "" # GREEK CAPITAL LETTER BETA
-0x0393 "\\textgreek{G}"   "textgreek" "" # GREEK CAPITAL LETTER GAMMA
-0x0394 "\\textgreek{D}"   "textgreek" "" # GREEK CAPITAL LETTER DELTA
-0x0395 "\\textgreek{E}"   "textgreek" "" # GREEK CAPITAL LETTER EPSILON
-0x0396 "\\textgreek{Z}"   "textgreek" "" # GREEK CAPITAL LETTER ZETA
-0x0397 "\\textgreek{H}"   "textgreek" "" # GREEK CAPITAL LETTER ETA
-0x0398 "\\textgreek{J}"   "textgreek" "" # GREEK CAPITAL LETTER THETA
-0x0399 "\\textgreek{I}"   "textgreek" "" # GREEK CAPITAL LETTER IOTA
-0x039a "\\textgreek{K}"   "textgreek" "" # GREEK CAPITAL LETTER KAPPA
-0x039b "\\textgreek{L}"   "textgreek" "" # GREEK CAPITAL LETTER LAMDA
-0x039c "\\textgreek{M}"   "textgreek" "" # GREEK CAPITAL LETTER MU
-0x039d "\\textgreek{N}"   "textgreek" "" # GREEK CAPITAL LETTER NU
-0x039e "\\textgreek{X}"   "textgreek" "" # GREEK CAPITAL LETTER XI
-0x039f "\\textgreek{O}"   "textgreek" "" # GREEK CAPITAL LETTER OMICRON
-0x03a0 "\\textgreek{P}"   "textgreek" "" # GREEK CAPITAL LETTER PI
-0x03a1 "\\textgreek{R}"   "textgreek" "" # GREEK CAPITAL LETTER RHO
-0x03a3 "\\textgreek{S}"   "textgreek" "" # GREEK CAPITAL LETTER SIGMA
-0x03a4 "\\textgreek{T}"   "textgreek" "" # GREEK CAPITAL LETTER TAU
-0x03a5 "\\textgreek{U}"   "textgreek" "" # GREEK CAPITAL LETTER UPSILON
-0x03a6 "\\textgreek{F}"   "textgreek" "" # GREEK CAPITAL LETTER PHI
-0x03a7 "\\textgreek{Q}"   "textgreek" "" # GREEK CAPITAL LETTER CHI
-0x03a8 "\\textgreek{Y}"   "textgreek" "" # GREEK CAPITAL LETTER PSI
-0x03a9 "\\textgreek{W}"   "textgreek" "" # GREEK CAPITAL LETTER OMEGA
+0x0391 "\\textgreek{A}"   "textgreek" "" # "A" # GREEK CAPITAL LETTER ALPHA
+0x0392 "\\textgreek{B}"   "textgreek" "" # "B" # GREEK CAPITAL LETTER BETA
+0x0393 "\\textgreek{G}"   "textgreek" "" "\Gamma" # GREEK CAPITAL LETTER GAMMA
+0x0394 "\\textgreek{D}"   "textgreek" "" "\Delta" # GREEK CAPITAL LETTER DELTA
+0x0395 "\\textgreek{E}"   "textgreek" "" # "E" # GREEK CAPITAL LETTER EPSILON
+0x0396 "\\textgreek{Z}"   "textgreek" "" # "Z" # GREEK CAPITAL LETTER ZETA
+0x0397 "\\textgreek{H}"   "textgreek" "" # "H" # GREEK CAPITAL LETTER ETA
+0x0398 "\\textgreek{J}"   "textgreek" "" "\Theta" # GREEK CAPITAL LETTER THETA
+0x0399 "\\textgreek{I}"   "textgreek" "" # "I" # GREEK CAPITAL LETTER IOTA
+0x039a "\\textgreek{K}"   "textgreek" "" # "K" # GREEK CAPITAL LETTER KAPPA
+0x039b "\\textgreek{L}"   "textgreek" "" "\Lambda" # GREEK CAPITAL LETTER LAMDA
+0x039c "\\textgreek{M}"   "textgreek" "" # "M" # GREEK CAPITAL LETTER MU
+0x039d "\\textgreek{N}"   "textgreek" "" # "N" # GREEK CAPITAL LETTER NU
+0x039e "\\textgreek{X}"   "textgreek" "" "\Xi" # GREEK CAPITAL LETTER XI
+0x039f "\\textgreek{O}"   "textgreek" "" # "O" # GREEK CAPITAL LETTER OMICRON
+0x03a0 "\\textgreek{P}"   "textgreek" "" "\Pi" # GREEK CAPITAL LETTER PI
+0x03a1 "\\textgreek{R}"   "textgreek" "" "\Rho" # GREEK CAPITAL LETTER RHO
+0x03a3 "\\textgreek{S}"   

Re: unicode in math

2008-09-10 Thread rgheck

G. Milde wrote:

Dear LyX users,

  

This looks more like something for devel

rh


with LyX 1.6, using unicode characters other than the first block is
possible also in math mode.  The character in question is either replaced
by a math-equivalent (if defined in the "unicodesymbols" file) or by
"text in math" with the text-equivalent.

This is a vast improvement over the silent failure in LyX 1.5, my thanks
go out to the relevant developer(s)!

However, there remain some inconsistencies:

* while A is typeset italic, Ä (and other accented characters) are not.
* while l is typeset italic, λ (and other Greek characters) are not.

So, the question is:

* should Ä be replaced with \"A in math?
  
  More generally: should "latin-1 supplement" characters for which a math

  equivalent exists use this instead of a text-version?

* should λ be replaced with \lambda in math?

  More generally: 
  
  * should Greek characters from the "Greek and Coptic"

unicode block use the math-equivalent, or

  * should only Greek symbols (from Greek and Coptic" and/or from

"Mathematical Alphanumeric Symbols") be converted to math symbols?

and could these also show as italic in the LyX GUI?

Attached is a patch for Greek in math.

Günter
  




unicode in math (was: Lyx crashes everytime I try to open my document)

2008-06-02 Thread G. Milde
On 29.05.08, G. Milde wrote:
 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.

Unfortunately, this fails if the character in question is the first
character in a math array or equationarray (and similar).
See attached file math-inputenc-test.lyx.

(This is usually not a problem with characters like the centered dot
(Malzeichen) or \textdegree.)

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

There are two packages supporting unicode in math (at least partially):

1. Package ucs and its utf8x font encoding together with 
   \SetUnicodeOption{mathletters} in the LaTeX preamble.
   
   + simple, all requirements are part of TeXLive (and probabely most
 other standard TeX distributions)
 
   - Not suited for Greek text
   - set of math unicode chars not easily extendable,
 5·3 becomes 5Δ3.
 
   see attachment math-inputenc-ucs-test.lyx

2. The experimental package inpmath
   http://www.latex-project.org/code/experimental/inpmath.zip
   
   + extensible 
   + works also parallel to LGR encoding for Greek text
   
   - experimental package not in TeXLive
   - no pre-defined MathMeaning for Greek symbols

   see attachment math-inpmath-test.lyx
   
All attachements work with my lyx 1.5.5 on Debian (after installing
inpmath).

Günter



math-inputenc-test.lyx
Description: application/lyx


math-inputenc-ucs-test.lyx
Description: application/lyx


math-inpmath-test.lyx
Description: application/lyx


unicode in math (was: Lyx crashes everytime I try to open my document)

2008-06-02 Thread G. Milde
On 29.05.08, G. Milde wrote:
 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.

Unfortunately, this fails if the character in question is the first
character in a math array or equationarray (and similar).
See attached file math-inputenc-test.lyx.

(This is usually not a problem with characters like the centered dot
(Malzeichen) or \textdegree.)

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

There are two packages supporting unicode in math (at least partially):

1. Package ucs and its utf8x font encoding together with 
   \SetUnicodeOption{mathletters} in the LaTeX preamble.
   
   + simple, all requirements are part of TeXLive (and probabely most
 other standard TeX distributions)
 
   - Not suited for Greek text
   - set of math unicode chars not easily extendable,
 5·3 becomes 5Δ3.
 
   see attachment math-inputenc-ucs-test.lyx

2. The experimental package inpmath
   http://www.latex-project.org/code/experimental/inpmath.zip
   
   + extensible 
   + works also parallel to LGR encoding for Greek text
   
   - experimental package not in TeXLive
   - no pre-defined MathMeaning for Greek symbols

   see attachment math-inpmath-test.lyx
   
All attachements work with my lyx 1.5.5 on Debian (after installing
inpmath).

Günter



math-inputenc-test.lyx
Description: application/lyx


math-inputenc-ucs-test.lyx
Description: application/lyx


math-inpmath-test.lyx
Description: application/lyx


unicode in math (was: Lyx crashes everytime I try to open my document)

2008-06-02 Thread G. Milde
On 29.05.08, G. Milde wrote:
> 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.

Unfortunately, this fails if the character in question is the first
character in a math array or equationarray (and similar).
See attached file math-inputenc-test.lyx.

(This is usually not a problem with characters like the centered dot
(Malzeichen) or \textdegree.)

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

There are two packages supporting unicode in math (at least partially):

1. Package ucs and its utf8x font encoding together with 
   \SetUnicodeOption{mathletters} in the LaTeX preamble.
   
   + simple, all requirements are part of TeXLive (and probabely most
 other standard TeX distributions)
 
   - Not suited for Greek text
   - set of math unicode chars not easily extendable,
 5·3 becomes 5Δ3.
 
   see attachment math-inputenc-ucs-test.lyx

2. The experimental package inpmath
   http://www.latex-project.org/code/experimental/inpmath.zip
   
   + extensible 
   + works also parallel to LGR encoding for Greek text
   
   - experimental package not in TeXLive
   - no pre-defined MathMeaning for Greek symbols

   see attachment math-inpmath-test.lyx
   
All attachements work with my lyx 1.5.5 on Debian (after installing
inpmath).

Günter



math-inputenc-test.lyx
Description: application/lyx


math-inputenc-ucs-test.lyx
Description: application/lyx


math-inpmath-test.lyx
Description: application/lyx