Matnlarga ishlov berish LaTex text Formatting


Changing the font size globally


Download 0.75 Mb.
bet2/18
Sana09.04.2023
Hajmi0.75 Mb.
#1344635
1   2   3   4   5   6   7   8   9   ...   18
Bog'liq
Matnlarga ishlov berish

Changing the font size globally
These commands are relative to the global font size of the document. When we choose a document class we are also setting a font size for the whole document. If it’s not declared, the default font size for most of the standard document classes is 10pt. This size becomes the setting for \normalsize option, and all the other size commands are adjusted accordingly. In standard classes (article, book, letter and report), there are three size options: 10pt, 11pt and 12pt. It can be changed by setting it as an argument to the document class: \documentclass[11pt]{article}. Following table shows the font size for all commands and for each size options for the standard document classes.


size

10pt

11pt

12pt

\tiny

5

6

6

\scriptsize

7

8

8

\footnotesize

8

9

10

\small

9

10

10.95

\normalsize

10

10.95

12

\large

12

12

14.4

\Large

14.4

14.4

17.28

\LARGE

17.28

17.28

20.74

\huge

20.74

20.74

24.88

\Huge

24.88

24.88

24.88

Other document classes might have different font size options. For instance, memoir class has 12 font sizes (9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 20pt, 25pt, 30pt, 36pt, 48pt and 60pt). It also has two more size commands: \miniscule for a smaller size than \tiny and \HUGE for a larger size than \Huge.

Packages for changing font size
If the font size you are looking for are not in these options, there are packages that can extend the sizing options. Extsizes package  adds more size options to standard document class packages. It supports 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt and 20pt options for article, book, letter, report and proc document classes. It can be used by adding ext to the document class name. (For example, \documentclass[14pt]{extbook})
If you need more sizing commands, moresize package  adds two more sizing options: \HUGE for a larger font size than \Huge and \ssmall to fill the gap between \scriptsize and \tiny. The first option has the size of 29.86pt and the latter option has the size of 6pt when used with the default 10pt option. This package must be used with a non-standard, scalable font, such as Latin Modern.
The default LaTeX font Computer Modern has individual files for a fixed set of font sizes, and it is not scalable to other sizes. It restricts the usage of fonts larger than \Huge and smaller than \tiny commands allow. To avoid any issues, you can use a vectorized version of the Computer Modern font, called Latin Modern , as the default font family. It enables these external packages to scale the fonts up or down to the arbitrary size we need. To enable Latin Modern, you can add
\usepackage{lmodern}
\usepackage[T1]{fontenc}
to the beginning of the document.
If you want to declare the font size manually, anyfontsize package  provides an option to scale the closest size available to the needed font size. Like the moresize package, this command only works with a non-standard, scalable font. If you need a size smaller than \tiny, larger than \Huge, or an exact size such as 19.5pt, you can use the syntax below:
\fontsize{size}{baselineskip}\selectfont
In this command, size represents the font size you need, and baselineskip is for the line spacing size between two successive lines. As a rule of thumb, baselineskip is usually 1.2x the font size. To activate the baselineskip, the text in the scope of the command needs to end with a \par, just like the usual font size commands. Following example shows the command in action.

Download 0.75 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   18




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling