TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I really like the Ubuntu sans font, I want it be the section and title font as a replacement of Linux-Biolinum?

With Ubuntu 12.04 LTS + Texlive 2012, how to figure this out?

share|improve this question
up vote 4 down vote accepted

Use XeTeX, it comes with TeXLive 2012 and can use any system font automatically.

Here is a MWE that should work on Ubuntu. Copy to a new file, save as test.tex and compile it with xelatex test.tex from your console:

% !TEX TS-program = xelatex
% !TEX encoding =UTF-8 Unicode

\usepackage{fontspec} % Allows font customization

\setmainfont{Ubuntu} % Main document font


A one-line test.

share|improve this answer
Xelatex error The font "Ubuntu Regular" cannot be found. – KOF Feb 13 '13 at 14:14
Try \setmainfont{Ubuntu}. You have to look for the font's name in the system directory. Sorry, I got to no Ubuntu machine to check right now... – mcbetz Feb 13 '13 at 14:17
Also, see this longer explanation for Lyx: askubuntu.com/a/8331/78383 – mcbetz Feb 13 '13 at 14:19
the ubuntu font does exist. thanks – KOF Feb 13 '13 at 14:40
@KOF: Fine! If my answer works for you, you may tick the solved button so everyone sees that it's been solved. – mcbetz Feb 13 '13 at 14:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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