Edit Links |
FAQ /
ChangeFontUsingLatex
<< | Page list | >>
§ 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). 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?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. While LuaTeX has not yet been tested, XeTeX is known to work with LyX and will get increasing support as of version 2.0. Look here for more information. § 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. \documentclass[smallheadings]{scrreprt}
\setkomafont{subsubsection}{\sffamily \bfseries}
\addtokomafont{captionlabel}{\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):
§ 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?Add this to the preamble: \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
<your content>
}
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?Add to the preamble: \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}
<< | FAQ.PageList | >> |