How can I set the default sans serif font to the default in this example in XeLaTeX? I can only get Helvetica with





and I get an error if I use \setsansfont{CMU Sans Serif} in the preamble.

  • 1
    Your code is for pdflatex. XeLaTeX requires fontspec package, see my answer.
    – user56567
    Jul 20, 2014 at 20:31

1 Answer 1


You can use Latin Modern Sans Serif:


\setsansfont{Latin Modern Sans}

\textsf{A simple example}
  • OK, it works ... how do I set the default font for the entire document to sans serif? Jul 20, 2014 at 20:36
  • 7
    Put \setmainfont{Latin Modern Sans} in the preamble.
    – user56567
    Jul 20, 2014 at 20:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .