Go to page:

Search:   Help

Edit

FAQ /

# Fonts

Categories: FAQ, Fonts, FAQ, Fonts, FAQ, Fonts
<< | Page list | >>

Frequently Asked Questions related to Fonts and Font Handling

## § Fonts in the Output

### § How can I change the default font?

Go to Document→Settings→Fonts. You can select from a (hard-coded) list different fonts for Roman (Serif), Sans Serif and Monospaced (Typewriter).

The list of font sizes can be extended by choosing another document class (i.g. Document -> Settings -> Document Class, choose "article (more font sizes)" in Document class field)

You can also select which shape should be used as default font (normally, this is Roman).

If your preferred font is not in the list, set everything to "Default" in the font section and add to Document→Preamble something like:

\renewcommand{\familydefault}{pag}
\renewcommand{\rmdefault}{pag}

(the exact command is usually described in the documentation of the font package; please read that, there are considerable differences)

### § Can I use the normal system fonts?

Traditional LaTeX has its own font system, so you cannot use the fonts (e.g. TrueType, OpenType) that are installed on your system, but you have to use specific LaTeX fonts.

However, modern derivates of LaTeX such as XeTeX and LuaTeX provide easy access to the system fonts. Both LuaTeX and XeTeX are nowadays supported by LyX (as of version 2.0). System font selection is provided via Document→Settings...→Fonts→Use non-TeX fonts. Note that you need to have a fairly recent version of LuaTeX or XeTeX and the fontspec LaTeX package installed.

### § What is the difference between "noun" and "small caps" or "emphasized" and "italic"?

The concepts of "noun" and "emphasized" draw on the idea of "semantic markup" (as opposed to traditional "static" or "physical markup"). Semantic markup means that you do not mark a text element in a definite way ("this is italic" or "this uses small caps"), but you mark it as a semantic element ("this is a noun, i.e. a person name" or "this is to be emphasized").

How this really looks in the output can be (re-)decided at any time later, or it is determined by specific classes differently (so "emphasized" might mean "italic" in one class and "bold" in another). This has many practical advantages. If your publisher tells you "Please do not mark person names with small caps, but use italics" or "Please do not mark person names at all", you do not have to change any person name in your document, but simply change the definition of "noun", e.g. (to have no marking at all): \renewcommand*\noun[1]{#1}

The LyX philosophy is to encourage semantic markup. This is why the "semantic" elements are put prominently on the LyX toolbar.

Of course, the idea would be to have much more of such semantic elements. However, they have not yet been implemented in a proper way. Some elements are provided as "character styles" which can be accessed via "modules". Check out the "Logical Markup" module or the "Linguistics" module (the latter with semantic elements such as "Expression", "Concept", "Meaning"). But this is a different implementation in terms of the user interface, and those "insets" behave differently. A proper and unified semantic markup UI is yet a desideratum.

### § How can I change the font used in section headers?

Use one of the packages titlesec.sty or sectsty.sty.

The "KOMA script" classes allow customization of section and caption fonts as well. (See the KOMA script documentation for details.) E.g.

\setkomafont{subsubsection}{\sffamily \bfseries}

### § How can I change the font used in caption headers?

Use the packages caption.sty.

### § How does font size correspond to point size?

The font sizes available in Edit→Textstyle→Customized are called Normal, Large etc. Normal corresponds to the document font size (which you set in Document→Settings→Fonts).

Obviously, these sizes are relative. They often depend on the class. Below are the default sizes as defined in the base classes (article, book, report), for the default base size (10 pt):

CommandNominal Point SizeExact Point Size
\tiny55
\scriptsize77
\footnotesize88
\small99
\normalsize1010
\large1212
\Large1414.40
\LARGE1817.28
\huge2020.74
\Huge2424.88

### § How can I change to a 10.5pt font?

\usepackage{type1cm}
\renewcommand\normalsize{%
\@setfontsize\normalsize{10.5pt}{12pt}
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
\abovedisplayshortskip \z@ \@plus3\p@
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}\normalsize

Also, make sure that dvips use Postscript fonts instead of bitmap fonts.

### § How can I change to a 13pt font?

\usepackage{type1cm}
\renewcommand\normalsize{%
\@setfontsize\normalsize{13pt}{14.5pt}%
\abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
\abovedisplayshortskip \z@ \@plus3\p@
\belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}\normalsize

Also, make sure that dvips use Postscript fonts instead of bitmap fonts.

### § How can I get 10.5pt font with 12.5pt linespread?

\renewcommand{\normalsize}{\fontsize{10.5pt}{12.5pt}\selectfont}

Or embrace specific contents of your Document in TeX mode by

{\fontsize{10.5pt}{12.5pt}\selectfont
}

Note that this only affects normalsize font. The footnote, superscript etc are still based original definition or default fontsize.

To change other fonts' sizes, do analog redefinitions of \footnotesize, \scriptsize, \huge etc.

To change the sizes globally for all your documents, make a new size*.clo file (the size*.clo files can be found in the texmf/latex/base/ folder of your TeX installation; they define the font sizes for a specific default size, e.g. size12.clo defines the sizes in documents that use 12pt default size). Thus you can make a size13.clo by modifying size12.clo, for instance.

### § How can I change the font-size of my quotations?

\let\oldquote\quote
\renewcommand\quote{\small\oldquote}
\let\oldquotation\quotation
\renewcommand\quotation{\small\oldquotation}

replace \small with your preferred size

### § How do I get medieval numerals (old-style, hanging figures)?

First, your font needs to include old-style numbers.

To enable them for the whole document, select "Use Old Style Figures" in Document→Settings→Fonts (if this is greyed out, the selected font probably doesn't provide old style numbers).

To enable them only for certain figures in the document, use ERT:

\oldstylenums{4529}

## § Fonts in the LyX workarea

### § The math fonts in LyX itself look ugly, what can I do?

Possibly the fonts that are used by LyX to display math are not correctly installed.

Recent version of LyX use the BaKoMa fonts to display math. The current BaKoMa fonts are distributed with LyX and should be installed and set up automatically. If not, you can get the fonts (although the package is a bit outdated) here.

Some older rpm prepared by Paul Johnson for Linux users can be downloaded from here.

In case of Fedora, BaKoMa fonts are already included in the lyx-fonts package.

Intelligent OSes should install the fonts from the unpacked ZIP-archive automatically. In case it does not happen, you can manually copy the bakoma files to your fonts folder (on Linux: ~/.fonts in your user directory).

### § How can I check if LyX uses my fonts?

Run the command:

xset q

The font path should include a reference to your ~/.lyx/xfonts or the global share/lyx/xfonts directories.

You can add to the fontpath with a command such as this:

xset +fp ~/.lyx/xfonts