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 '14 at 20:31

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? – Medulla Oblongata Jul 20 '14 at 20:36
  • 6
    Put \setmainfont{Latin Modern Sans} in the preamble. – user56567 Jul 20 '14 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.