[Tex/LaTex] Several questions about migrating to XeLaTeX

babellanguagespolyglossiaxetex

I am using LaTeX for years now but I am considering to migrate to XeLaTeX.

The main reason for this change is the babel package which change a lot the layout of my documents according to my language (French). For example, the itemize environment in LaTeX/Babel (in French) is completely different from the original (LaTeX/Babel/English). I prefer the original layout and I don't like the changes made by babel authors of the French option1. XeLaTeX (with Polyglossia and French language selected) does not change the layout (AFAIK).

For example, here are two screenshots. At the left, there is the LaTeX/Babel/French way of itemize. At the right, there is the same text with XeLaTeX/polyglossia/French. For me, there are no doubts the second (right side) is better.

LaTeX/babel/FrenchXeLaTeX

However, I have several questions about XeLaTeX. I don't know it at all, so please excuse the naivety.

  1. Is the default font in XeLaTeX the same than the one in LaTeX? In my screenshot the XeLaTeX font seems a little bit thicker.
    -> Related question : is it still usefull to call lmodern package with XeLaTeX?
  2. Is the csquotes package still working with XeLaTeX?
  3. For writing with XeLaTeX, I add these three packages calls after the document class : fontspec, xunicode, polyglossia (with the command \setmainlanguage{french}). Is it sufficient? Do I miss something?
  4. With the three package mentioned in question 3, do I have correct ligature and hyphenation for French?

I am also interested by documentations explaining how to migrate from LaTeX to XeLaTeX.


1. I believe it is not the job of the language package to decide the layout of the document.

Best Answer

The default font for fontspec is Latin Modern; by itself, XeLaTeX doesn't change the standard font layout of LaTeX.

Now to your questions.

  1. Don't trust screenshots too much. This is what I get with pdflatex

    pdflatex

    and this is what I get with xelatex

    xelatex

    The source file is

    \documentclass{article}
    \usepackage{ifxetex}
    \ifxetex
      \usepackage{fontspec}
      \usepackage{polyglossia}
      \setmainlanguage{french}
    \else
      \usepackage[T1]{fontenc}
      \usepackage[utf8]{inputenc}
      \usepackage[french]{babel}
      \usepackage{lmodern}
    \fi
    
    \usepackage{lipsum}
    
    \begin{document}
    \noindent
    Typeset with \ifxetex\verb|xelatex|\else\verb|pdflatex|\fi\\
    \lipsum[2]
    \end{document}
    

    The difference you see probably depends on the PDF viewer and its treatment of OpenType fonts.

  2. Yes, csquotes works also with XeLaTeX. It could have some glitches, though. Without any clear example it's difficult to say.

  3. Don't load xunicode. It's already loaded by fontspec.

  4. Yes. You lose of course some features of the French module for babel. Check the documentation.

Just for information, calling

\usepackage[french]{babel}
\frenchbsetup{StandardLayout=true}

restores the standard layout. If you only want the standard itemize environment, call

\usepackage[french]{babel}
\frenchbsetup{
  ReduceListSpacing=false,
  StandardItemizeEnv=true,
  StandardItemLabels=true
}
Related Question