On 2010-11-27, Jürgen Spitzmüller wrote:
> Guenter Milde wrote:
>> On 2010-11-26, Jürgen Spitzmüller wrote:
>> > Guenter Milde wrote:
>> >> Both xelatex and luatlaex can use TeX fonts and PSNFSS:
>> > OK, I tried this now. The two engines indeed seem to be able to deal with
>> > these font packages. However, as soon as the fontspec package is loaded,
>> > it doesn't work anymore (and there will always be LM in the output).

>> LM is the fontspec default. If it is really used, depends on the loading
>> order. The following gives Bookman output here.

>> \documentclass{minimal}
>> \usepackage{fixltx2e}
>> \usepackage{fontspec}
>> \usepackage{bookman}
>> \usepackage[T1]{fontenc}
>> \usepackage[utf8]{inputenc}
>> \begin{document}
>> Hallo Welt!
>> \end{document}

> And fontenc seems to be needed as well.

For T1 encoded fonts, yes.

However, this was only for the sake of argument. In praxi, it
does not make sense to load both, but rather select between

 fontspec: Unicode-encoded fonts ("non-tex fonts", "system fonts")
   (TeX encoding EU1 or EU2 (Experimental Unicode))

   * font setup via fontspec commands
   * works only with xetex or luatex engines

or 

 fontenc: TeX encoded fonts (T1, T<n>, OT<n>, LGR, LY, ...)

   * font setup via packages (lmodern, tgtermes, arev, ...)
     or NFSS commands
   * works with tex, etex, pdftex, xetex, and luatex engines


>> > fontspec is automatically loaded at least by xltxtra and polyglossia.
>> > So if we provide tex fonts support with XeTeX, we will have to use
>> > babel and omit xltxtra. We can do that, but do we really want to
>> > provide such a limited choice?

>> I don't know whether it is really usefull. Maybe some day people want to
>> use LuaTeX with some font that only exists in TeX encoding...

>> But you could keep the "use non-TeX fonts" (or better "use System fonts"
>> or "use fontspec") button and make "\usepackage{fontspec}" as well as the
>> choice of babel vs. polyglossia dependent on its setting.

> The latter is no good idea, IMHO. Who will understand that whether babel or 
> polyglossia is used depends on the font choice?

Font setup package and language setup package are inter-dependent: 

babel
  with some languages (Greek, Russian, ...), babel requires fontenc and
  employs NFSS commands for font encoding switches.

polyglossia
  always requires fontspec (language-independent)
  provides a "hook" to select language-dependent fonts via fontspec.

The problem is, how to present this mutual dependency to the user...

Also, since fontenc is now luatex-save, I don't know which language setup
package is better to use with LuaLaTeX output.


>> xltxtra is no longer recommended by its author. The recommended parts of
>> it are moved to fontspec now.

>> It changes the math setup and super- and subscripting in a way that
>> should not be forced on the user without choice.

>> Also, it loads fixltx2e.sty, which you did not want to load whithout a
>> means to disable it!

> At the time when I wrote this code, I read that the two packages
> (xunicode and xltxtra) should always be loaded with every XeTeX
> document. So I did.

So did I. 
(But things moved with the LuaLaTeX support of fontspec.)

> But I will happily remove it if it is not really necessary.

>> AFAIK, xunicode should not be used with luatex.

> It isn't.

Fine. 

I don't know whether it is needed with XeTeX either:

  The package provides access to latin accents and many other characters
  in the Unicode lower plane [xunicode README]

via the "established" LaTeX macros. Are there places, where LyX's XeTeX
export uses macros instead of Unicode characters?
But we could also decide to leave it in -- just in case or so that ERT
marcros will not break by switching from pdftex to xetex.


Thanks for your work,

Günter

Reply via email to