On 12.06.08, Pavel Sanda wrote:
> > > > Question to the developers: Would it be possible to pass the tilde '~'
> > > > to LaTeX as-is if the language is set to polutonikogreek?
> > 
> > > please correct me if i'm wrong, but i think this is wrong direction.
> > > how will you determine nonbreak. space vs tilde accent then?
> > 
> > The same way as polutonikogreek.def: \nobreakspace vs. ~

> before sinking into this issue i still don't understand why polutonikogreek 
> is needed, see below.

It is not just the accents but also hyphenation patterns etc. 

The distinction is similar to german and ngerman (i.e. old and new
spelling), only that the reform in Greece was 20 years earlier).

OTOH, it can be a big timesave if you can input "strange" characters as a
combination of ASCII chars. Comparable to the input of math, where I
would not like to search for an integral sign in a unicode chart every
time I need an integral. This is what I like about the WYSIWYM feature:
input and on-screen rendering are optimized for editing but printout is
optimized for a good reading experimence.


> i would like to summarize the my understanding of the problems i
> encountered, please comment on:

> 1. Screen painting.
---------------------

> after installing unicode fonts for X displaying ancient greek letters
> works in lyx without problems.

... if they are input as unicode chars.

> 2. LaTeX typeseting.
----------------------

> after installing unicode packages for tex fonts and input encoding
> utf8x the documents with ancient greek letters obtained in document via
> copy & paste from e.g. wikipedia or through symbols dialog in lyx 1.6
> work without problems, no switch to polutonikogreek needed, just greek
> language is enough.

* "unicode tex fonts" is a problematic term, as standard TeX/LaTeX
  currently does not handle unicode-encoded fonts.
  
  There is an extended font encoding in Omega and full unicode support in
  XeTeX.
  
  However, many fonts exist parallel in a "unicode encoding" (as
  OpenType, postscript or TrueType fonts) and as a set of virtual LaTeX
  fonts. Examples are Latin Modern, Bera/Arev/DejaVu, Kerkis, or the
  TeX-Gyre fonts.
  
  Typesetting Greek with utf8x and (pdf)latex depends on the availability
  of LGR encoded Greek fonts. Then, all greek unicode chars (including
  the accented and double-accented ones) are typeset correctly.
  
  So, I would formulate it as: 
  
  after installing the suitable fonts and the ucs package, documents with
  accented Greek letters obtained via copy & paste from (e.g. wikipedia)
  or through symbols dialog (in lyx 1.6) work without problems if 
  Document>Settings>Language>Encoding is set to utf8x.

* Hyphenation and babel generated strings (like "Chapter" or "Table of
  Contents") depend on the setting of "greek" vs. "polutonikogreek".

  Just greek language is *not* enough!


> 3. Input of ancient greek letters into the document.
------------------------------------------------------

>   a) pasting the (whole) unicode character from outside works

>   b) using the keystroke of ~+char does not work - instead of accented
>      character we get two characters.

>   c) using lfun accent-tilde+char basically(*) works as far as screen
>      painting concerened, but fails badly once you try to typeset the
>      document.

> the key issue is why 3c fails. guessing from the output the culprit is
> that when accent-tilde is used with some char, it does not produce
> 'single' character but it produces combined unicode character (i.e.
> accent char+normal char). iirc this is correct from the unicode point
> of view - single accented char is equivalent to combining char + normal
> letter. this works on the screen, however utf8x is not able to decode
> the second case unless we use \unicodecombine macro in tex output.

This it the situation with accent-tilde under utf8 input encodings
(utf8 as well as utf8x) where a combining-char + char is translated to 
"<combining-char>{<char>}".

In "traditional" 7 or 8 bit encodings, it is exported to LaTex as
"\<accent>{<char>}" which works well with "greek" but results in wrong
output with "polutonikogreek".

> i see more ways how this could be fixed, but we should firstly agree
> that THIS is the culprit.

It is one of the problems.

Conclusion
----------
please comment on:

1. LyX handling of combining-chars (whether input via accent-* lfuns or
   other means) needs fixing -- independently of Greek support.
   
   I'd like to continue discussion of combining-chars in a separate
   thread.
  
2. LyX should support the language variant polutonikogreek.
   
   + Consesus abaout the GUI name is needed. (Suggestion Greek (polytonic))
   
   + add a line to LYXDIR/languages (patch exists)
   
   + the GUI name needs to be translated into all supported languages
     (easy but some work to do)
   
   + The tilde (~) is re-defined as an accent char in polutonikogreek
     (similar to " in german).
     
     How should this be supported in LyX?  
     
     - not at all (input non-breakable space or ERT to get a tilde)
     
     - insert verbatim (instead of converting to \textasciitilde) if
       the current language is polutonikogreek
       
     - any other ideas?


Günter

Reply via email to