3

According to LyX Wiki, I can define my font size by means of this code (in case of 10.5pt) :

\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  

But how can I calculate this value in case of 14pt, 16pt, 18pt?

2
  • 1
    do you want to have a document wide normal fontsize of 14pt?
    – user2478
    Jan 18, 2012 at 9:51
  • No; my normal my normal fontsize is 12pt; but the fontsize of : section(18pt); susection(16pt); subsubsection(14pt) ;
    – Ould_Euler
    Jan 23, 2012 at 5:17

4 Answers 4

6

Note that defining the font size manually like this is not the normal way to do it and only for advanced users. You should use a package or class for changing the font size globally. If you simply want a larger font use \large, \Large, \LARGE, \huge, or \Huge. With LaTeX it is not common to specify the font size of a piece of text in points.

You can set the default (global) font size by using the 10pt, 11pt or 12pt class options. For more font sizes see the following threads:
Making default font size 16pt
How to specify font size less than 10pt (or more than 12pt)?

1
  • Thank you Martin; i have a thesis with the following font size specification : textsize(12pt); section(18pt); susection(16pt); subsubsection(14pt) ; how i get it?
    – Ould_Euler
    Jan 23, 2012 at 5:12
3

If the normal fontsize is 12pt, you can redefine the section headers:

\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\fontsize{18pt}{19pt}\selectfont\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\fontsize{16pt}{17pt}\selectfont\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\fontsize{14pt}{15pt}\selectfont\bfseries}}
\makeatother
2
  • Is there really no easier way that using \@startsection? Jan 23, 2012 at 17:01
  • 1
    if you want the old behaviour of \large et al then there is no other way. However, it is not a big deal to redefine that commands or using package titlesec which does the same
    – user2478
    Jan 23, 2012 at 17:56
2

You could have a look at the .clo files of LaTeX (size*.clo, bk*.clo) and at the .clo files of extsizes.

For example, from size14.clo of extsizes:

\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xivpt{17}%
   \abovedisplayskip 14\p@ \@plus3\p@ \@minus7\p@
   \abovedisplayshortskip \z@ \@plus4\p@
   \belowdisplayshortskip 7\p@ \@plus4\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}
1

The koma-script classes have an option fontsize that can take any value; fontsize=14pt should do what you want.

You must log in to answer this question.

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