On 2010-11-09, Jürgen Spitzmüller wrote:
> Guenter Milde wrote:

> Günter, could you set up a document with this comparision and outline exactly
> where polyglossia and babel differ (in terms of what LyX must output/can
> support)?

> I do not have time to dive into the polylossia documentation right now,
> but if your statement is correct, it would be probably easier than I
> thought, and the documentation would help implementing it.

LyX-relevant differences between polyglossia and babel:

Package setup
=============

Babel:

  \usepackage[<otherlanguages>,<defaultlanguage>]{babel}

  * the language options can be given as global document options or
    in the babel call.

  * the *last* language becomes the document language.

Polyglossia:

  \usepackage{polyglossia}
  \setdefaultlanguage{<defaultlanguage>}
  \setotherlanguages{<otherlanguages>}

  * The language options must be given in setup macros after loading
    polyglossia.

    (Earlier versions allowed also language-options with the *first*
    language as document language, but this has been deprecated since
    long and removed in the current polyglossia version.)

  * Possibly, still add the document language (with the "babel name") to
    the documentoptions if the "global" check box is checked (for use by
    other packages).

    Alternatively, disable this check box with XeTeX documents and
    teach the users to add the document language "by hand" to the
    custom document options.


Languages file
===============

Some languages are not (yet) supported by polyglossia:

  'af':           'afrikaans',
  'de_at':        'naustrian',
  'de_at_1901':   'austrian',
  'fr_ca':        'canadien',
  'grc_ibycus':   'ibycus', (Greek Ibycus encoding)
  'sr-latn':      'serbian script=latin'
  'vi':           'vietnam',


Some languages are new or differently named:

  # code          Polyglossia-name       comment
  'cop':          'coptic',
  'de':           'german', # new spelling (de_1996)
  'de_1901':      'ogerman', # old spelling
  'dsb':          'lsorbian',
  'el_polyton':   'polygreek',
  'fa':           'farsi',
  'grc':          'ancientgreek',
  'hsb':          'usorbian',
  'sh-cyrl':      'serbian', # Serbo-Croatian, Cyrillic script
  'sh-latn':      'croatian', # Serbo-Croatian, Latin script
  'sq':           'albanian',
  'sr':           'serbian', # Cyrillic script (sr-cyrl)
  'th':           'thai',

The "encoding" field of the "languages" is irrelevant: 

 always use UTF-8 (xetex)
 
The "latex options" should be ignored (or replaced by "polyglossia
options")

For use with polyglossia, we could consider either 

 * a modified copy of "languages"
 
 * a second file only containing the languages with changes overwriting
   the "languages" settings.
   
   (shorter, but how can we disable languages then?)
   

I volunteer to prepare a "languages-polyglossia" (or similar called) file.

Günter
 


Reply via email to