Search:   Help

Developers' side bar

Selected categories

Edit

Shared groups

Links

Polyglossia

Categories:
<< | Page list | >>

Polyglossia support

Table of contents (hide)

  1.   1.  LyX-relevant differences between polyglossia and babel:
    1.   1.1  Package setup
    2.   1.2  Languages file
  2.   2.  Categories

1.  LyX-relevant differences between polyglossia and babel:

1.1  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.

1.2  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

2.  Categories

Category: <category>

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2010-11-12 09:26 UTC