Как изменить размер шрифта latex

Простой в использовании онлайн редактор LaTeX. Не требует установки, поддерживает совместную работу в реальном времени, контроль версий, сотни шаблонов LaTeX и многое другое.

Contents

  • 1 Introduction
  • 2 Font sizes
  • 3 Font families
  • 4 Font styles
  • 5 Putting it all together
  • 6 Reference guide
  • 7 Further reading

Introduction

LaTeX normally chooses the appropriate font and font size based on the logical structure
of the document (e.g. sections). In some cases, you may want to set fonts and sizes by hand.

The following example shows how to use the smallest available font size in LaTeX (tiny) and the small caps (textsc{...}) font style:

This is a simple example, {tiny this will show different font sizes} and also textsc{different font styles}.

 Open this example in Overleaf

The following image shows the output produced by the example above:
FontStyles.png

Font sizes are identified by special names, the actual size is not absolute but relative to the font size declared in the documentclass statement (see Creating a document in LaTeX).

In the following example, {huge huge font size} declares that the text inside the braces must be formatted in a huge font size. For a complete list of available font sizes see the reference guide.

In this example the {huge huge font size} is set and 
the {footnotesize Foot note size also}. There's a fairly 
large set of font sizes.

 Open this example in Overleaf

The following image shows the output produced by the example above:
FontSizesOLV2.png

Font families

By default, in standard LaTeX classes the default style for text is usually a Roman (upright) serif font. To use other styles (families) such as sans serif, typewriter (monospace) etc. you need to use some specific LaTeX commands, as shown in the example below:

In this example, a command and a switch are used. 
texttt{A command is used to change the style 
of a sentence}.

sffamily
A switch changes the style from this point to 
the end of the document unless another switch is used.

 Open this example in Overleaf

The following image shows the output produced by the example above:

UsingFontStyles2.png

You can set up the use of sans font as a default in a LaTeX document by using the command:

 renewcommand{familydefault}{sfdefault}

Similarly, for using roman font as a default:

 renewcommand{familydefault}{rmdefault}

Font styles

The most common font styles in LaTeX are bold, italics and underlined, but there are a few more.

In the following example the textsl command sets the text in a slanted style which makes the text look a bit like italics, but not quite. See the reference guide for a complete list of font styles.

Part of this text is written textsl{in a different 
font style} to highlight it.

 Open this example in Overleaf

The following image shows the output produced by the example above:

UsingSlantedText.png

If you want to go back to «normal» font style (default for the LaTeX class you are using), this can be done by using the textnormal{...} command or the normalfont switch command.

Putting it all together

The following example combines together the various LaTeX code fragments used in this article.

documentclass{article}
begin{document}
%Example of different font sizes and types
This is a simple example, {tiny this will show different font sizes} and also textsc{different font styles}. 

vspace{1cm}

%Example of different font sizes and types
In this example the {huge huge font size} is set and the {footnotesize Foot note size also}. There's a fairly large set of font sizes.

vspace{1cm}

%Example of different font sizes and types
In this example, a command and a switch are used. texttt{A command is used to change the style of a sentence}.

sffamily
A switch changes the style from this point to the end of the document unless another switch is used.
rmfamily

vspace{1cm}

%Example of different font sizes and types
Part of this text is written textsl{in different font style} to highlight it.
end{document}

 Open this example in Overleaf

Reference guide

Font sizes

Command Output
tiny F-tiny.png
scriptsize F-scriptsize.png
footnotesize F-footnotesize.png
small F-small.png
normalsize F-normalsize.png
large F-large.png
Large F-large2.png
LARGE F-large3.png
huge F-huge.png
Huge F-huge2.png

Default font families

typeface = family command switch command output
serif (roman) textrm{Sample Text 0123} rmfamily F-textrm.png
sans serif textsf{Sample Text 0123} sffamily F-textsf.png
typewriter (monospace) texttt{Sample Text 0123} ttfamily F-texttt.png

Font styles

style command switch command output
medium textmd{Sample Text 0123} mdseries F-textmd.png
bold textbf{Sample Text 0123} bfseries F-textbf.png
upright textup{Sample Text 0123} upshape F-textrm.png
italic textit{Sample Text 0123} itshape F-textit2.png
slanted textsl{Sample Text 0123} slshape F-textsl.png
small caps textsc{Sample Text 0123} scshape F-textsc.png

Further reading

For more information see:

  • Font typefaces
  • Supporting modern fonts with XeLaTeX
  • Bold, italics and underlining
  • Text alignment
  • Multiple columns
  • Paragraph formatting
  • Line breaks and blank spaces
  • International language support
  • The not so short introduction to LaTeX2ε

Learn how to change the font size in a LaTeX document.


  1. Changing the font size locally
  2. Changing the font size globally
  3. Packages for changing font size

Changing the font size locally

When working on a LaTeX document, the easiest way to change the font size is by using these predefined commands:

Huge
huge
LARGE
Large
large
normalsize
small
footnotesize
scriptsize
tiny

These commands change the font size locally. They can be used in two different ways: We can declare their scope inside a text within curly braces, such as {huge these words are larger}. We can also create an environment by writing our text inside begin{huge} and end{huge} commands.

Sometimes, we might want to consider the line spacing when changing the font size. Ending our commands with a paragraph includes the adjusting of the baselineskip, which specifies the minimum space between two successive lines in a paragraph. We can add a paragraph using par command or adding a new line character at the end of the text. Following example shows the line space adjusting:

begin{huge}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam maximus mauris quis viverra imperdiet.par
end{huge}

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 packageOpens in a new tab. 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 packageOpens in a new tab. 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 ModernOpens in a new tab., 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 packageOpens in a new tab. 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.

{fontsize{30pt}{36pt}selectfont 30pt} 
{Huge Huge} 
{fontsize{15pt}{18pt}selectfont 15pt} 
{tiny tiny} 
{fontsize{3pt}{3.6pt}selectfont 3pt}

If you need to use a certain font size again and again, you can also define a new font size command. Following piece of code creates a new font size command called myfontsize.

newcommandmyfontsize{fontsize{15pt}{18pt}selectfont}

Normal size {myfontsize My font size}

Summary

  • Change the font size of a piece of text using these commands, from the largest to the smallest: Huge, huge, LARGE, Large, large, normalsize, small, footnotesize, scriptsize, and tiny.
  • Set the font size of the whole document by adding an option to the documentclass command. (10pt, 11pt, and 12pt are available on most classes.)
  • Extsizes package makes more sizes from 8pt to 20pt available for the whole document.
  • Moresize package adds two more size commands: HUGE and ssmall.
  • With anyfontsize package, we can set the font size specifically by using fontsize{size}{baselineskip}selectfont command.

When creating a document in LaTeX, we need different font sizes. There are two ways to change the font size in LaTeX.

First, you can change the font size of the entire document or at the global level which will affect all parts of the document such as headings, normal text, etc.

And secondly changing the font size locally or a particular element or a small sentence affects it where you need it.

Change the font size on a global level

Normally Latex has a global level font size of 10pt which is the default font size of the document. Standard classes (Article, Book, Report, Letter) support three font sizes 10pt, 11pt, and 12pt, and these font sizes are passed as optional arguments in square brackets to the Document class. like this

documentclass[12pt]{article}

Below are examples of default 10pt and 12pt font sizes.

documentclass{article}
usepackage{lipsum}
begin{document}
  begin{center}  
   lipsum[1] 
  end{center} 
end{document}

Output :

Default 10pt font size in latex.
documentclass[12pt]{article}
usepackage{lipsum}
begin{document}
  begin{center}  
   lipsum[1] 
  end{center} 
end{document}

Output :

12pt font size output in latex.

In the above example, you can see the output difference between 10pt(default) and 12pt font sizes. Usually, these font sizes are enough for the global level, but if you want to use more font sizes, you can use the extsizes package. This package gives you the option to use 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 20pt sizes.

documentclass[9pt]{article}
usepackage{lipsum}
usepackage{extsizes}
begin{document}
  begin{center}  
   lipsum[1] 
  end{center} 
end{document}

Output :

9pt font size output in latex.

Change the font size locally

LaTeX has several commands to change the font size locally, of which normalsize is the default size. The commands are given below

  {Huge LaTeXhelp} 
  {huge LaTeXhelp} 
  {LARGE LaTeXhelp} 
  {Large LaTeXhelp} 
  {large LaTeXhelp} 
  {normalsize LaTeXhelp} % Default size
  {small LaTeXhelp} 
  {footnotesize LaTeXhelp} 
  {scriptsize LaTeXhelp} 
  {tiny LaTeXhelp} 

All font size in latex.
You can use these font sizes in LaTeX inline or as an environment. Above shows how to change font size inline and below are some examples by environment.

documentclass{article}
begin{document}
  begin{huge}
   LaTeXhelp
  end{huge}
  begin{large}
   LaTeXhelp
  end{large}
end{document}

Output :

change font size inline and environment in latex.

An important point here is that to change the font of a paragraph the gap between two successive lines is not adjusted well, in that case, you can use the par command at the end of the text it adjusts baselineskip . take a look

documentclass{article}
begin{document}
  textbf{The gap between lines not adjusted}\[4pt]
  begin{huge}
   Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text
  end{huge}
end{document}

Output :

line spacing not adjusted.

In the output above you can see that the line spacing is too bad to not use the par command. Using this command in the example below, the line spacing is adjusted very well. And you can also use this command for inline font change at the end of the text.

documentclass{article}
begin{document}
  textbf{The gap between lines adjusted}\[4pt]
  begin{huge}
   Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text
   par
  end{huge}
end{document}

Output :

line spacing adjusted.

Change font size using package

LaTeX has a package called anyfontsize to manually change the font size, by which you can use smaller than tiny and larger than Huge, and you can also use exact sizes like 3.5pt, 4.6pt, 15.5pt, etc.using this command below

{fontsize{size}{baselineskip}selectfont TEXT}

This command takes two arguments. Here in the place of size you need to put the font size as per your need and in the place of baselineskip, you have to put how much space between two successive lines. And the most important baselineskip is always 1.2x the font size you use.

documentclass{article}
usepackage{mathptmx}
usepackage{anyfontsize}
begin{document}
  {fontsize{40pt}{48pt}selectfont 40pt,} 
  {Huge It's Huge,} 
  {fontsize{20pt}{24pt}selectfont 30pt,} 
  {tiny It's tiny,} 
  {fontsize{3.5pt}{4.2pt}selectfont 3.5pt,}
end{document}

Output :

change font size using package in latex.

I want to create a TeX document for which the first (summary) page is documentclass[10pt]{article}, but for which the rest of the document is documentclass[12pt]{article}. Is there an easy way to do this?

Stefan Kottwitz's user avatar

asked Oct 14, 2010 at 19:07

4

You can change font size using fontsize{10}{12}selectfont (the first number is the pt size of the font, the second number the space in pts between lines: this becomes the value of baselineskip), but in general I think it’s better to try using things like tiny, small, scriptsize, normalsize, footnotesize, large, Large, LARGE, huge and Huge (and the corresponding environments (e.g., begin{small} ... end{small}). I think footnotesize would give you a 10pt font in a document with 12pt set in its document class options.

And if the summary page is done using a special environment, like begin{abstract} ... end{abstract} likely what you want can be done a completely different way, such as by using the abstract package. (It’s hard to give concrete advice without knowing more about the details of the summary page, however.)

answered Oct 14, 2010 at 19:56

frabjous's user avatar

frabjousfrabjous

40k9 gold badges94 silver badges93 bronze badges

The following will locally reconfigure everything as if a different size agrument had been given to the document class. I assume not every setting will be effective though. But at least all the sizing macros will be appropriately redefined.

documentclass[12pt,a4paper]{book} 

usepackage{lipsum}

newenvironment{localsize}[1]
{%
  clearpage
  letorignewcommandnewcommand
  letnewcommandrenewcommand
  makeatletter
  input{bk#1.clo}%
  makeatother
  letnewcommandorignewcommand
}
{%
  clearpage
}

begin{document}
lipsum
begin{localsize}{10}
  lipsum
end{localsize}
end{document}

Note: This is based on loading the original size definitions of the book class named bk10.clo, bk11.clo, bk12.clo, so 10, 11, 12 are the possible arguments, corresponding to the options 10pt, 11pt, 12pt of the document class.

For using with another class (for instance article), the prefix bk used in

  input{bk#1.clo}%

needs to be replaced by the one used by the respective class (for instance size). Some classes like memoir support a wider range of sizes.

answered Dec 21, 2012 at 22:12

Stephan Lehmke's user avatar

Stephan LehmkeStephan Lehmke

24.1k3 gold badges84 silver badges138 bronze badges

9

If you are using a KOMA-Script class you can change the basic font size inside the document:

documentclass[10pt]{scrartcl}
begin{document}
parbox[t]{.5textwidth}{%
  section*{10pt}
  raggedright
  tiny tinypar
  scriptsize scriptsizepar
  footnotesize footnotesizepar
  small smallpar
  normalsize normalsizepar
  large largepar
  Large Largepar
  LARGE LARGEpar
  huge hugepar
  Huge Hugepar
}%
KOMAoptions{fontsize=12pt}
parbox[t]{.5textwidth}{%
  section*{12pt}
  raggedright
  tiny tinypar
  scriptsize scriptsizepar
  footnotesize footnotesizepar
  small smallpar
  normalsize normalsizepar
  large largepar
  Large Largepar
  LARGE LARGEpar
  huge hugepar
  Huge Hugepar
}
end{document}

KOMA-Script example

If you are not using a KOMA-Script class, you can use the KOMA-Script package scrextend:

documentclass[10pt,a4paper]{article}
usepackage{scrextend}
begin{document}
parbox[t]{.5textwidth}{%
  section*{10pt}
  raggedright
  tiny tinypar
  scriptsize scriptsizepar
  footnotesize footnotesizepar
  small smallpar
  normalsize normalsizepar
  large largepar
  Large Largepar
  LARGE LARGEpar
  huge hugepar
  Huge Hugepar
}%
KOMAoptions{fontsize=12pt}
parbox[t]{.5textwidth}{%
  section*{12pt}
  raggedright
  tiny tinypar
  scriptsize scriptsizepar
  footnotesize footnotesizepar
  small smallpar
  normalsize normalsizepar
  large largepar
  Large Largepar
  LARGE LARGEpar
  huge hugepar
  Huge Hugepar
}
end{document}

standard class example

Caveat: Not all length depending on the basic font size will be changed, if you use KOMAoptions{fontsize=…}. For example, if a package uses code like

 newlength{foo}
 setlength{foo}{2baselineskip}

length foo will not be influenced by the change of fontsize. So using option fontsize inside the document (or even in the document preamble) is not the exactly the same like using 10pt, 11pt, 12pt or fontsize as optional argument of documentclass. It is only more or less close to it.

answered Nov 9, 2017 at 9:10

Schweinebacke's user avatar

A ConTeXt solution:

  • If you want the footnotes, headers and footers, etc in the first page to correspond to 10pt and rest of the document to correspond to 12pt:
setupbodyfont[10pt]
starttext
Abstract
page
setupbodyfont[12pt]
....
stoptext
  • If you want all the footnotes, headers and footnotes, etc. to correspond to 12pt font size
setupbodyfont[12pt]
starttext
start
switchtobodyfont[10pt]
Abstract: ...
stop
page
Rest of the document
stoptext

answered Oct 15, 2010 at 18:29

Aditya's user avatar

AdityaAditya

61.7k3 gold badges127 silver badges261 bronze badges

An easy way would be to create a 10pt document for the summary and include its pdf output within the 12pt document. You could use the pdfpages package for that purpose.

If you really wish to use just one document, you could redefine normalsize and all the other size macros like footnotesize, scriptsize etc. you can find the definition inside the .clo files like size10.clo.

But I would choose the easier way, splitting the document code.

answered Oct 14, 2010 at 21:46

Stefan Kottwitz's user avatar

Stefan KottwitzStefan Kottwitz

225k82 gold badges662 silver badges817 bronze badges

If the normal size is 12pt, the text enclosed in the group will be in 10pt. The text size of the header and the footer will keep unaltered.

begingroup
footnotesize
input{first_page_content.tex}
endgroup
clearpage

answered Jul 31, 2017 at 15:56

user3020344's user avatar

I want to create a TeX document for which the first (summary) page is documentclass[10pt]{article}, but for which the rest of the document is documentclass[12pt]{article}. Is there an easy way to do this?

Stefan Kottwitz's user avatar

asked Oct 14, 2010 at 19:07

4

You can change font size using fontsize{10}{12}selectfont (the first number is the pt size of the font, the second number the space in pts between lines: this becomes the value of baselineskip), but in general I think it’s better to try using things like tiny, small, scriptsize, normalsize, footnotesize, large, Large, LARGE, huge and Huge (and the corresponding environments (e.g., begin{small} ... end{small}). I think footnotesize would give you a 10pt font in a document with 12pt set in its document class options.

And if the summary page is done using a special environment, like begin{abstract} ... end{abstract} likely what you want can be done a completely different way, such as by using the abstract package. (It’s hard to give concrete advice without knowing more about the details of the summary page, however.)

answered Oct 14, 2010 at 19:56

frabjous's user avatar

frabjousfrabjous

40k9 gold badges94 silver badges93 bronze badges

The following will locally reconfigure everything as if a different size agrument had been given to the document class. I assume not every setting will be effective though. But at least all the sizing macros will be appropriately redefined.

documentclass[12pt,a4paper]{book} 

usepackage{lipsum}

newenvironment{localsize}[1]
{%
  clearpage
  letorignewcommandnewcommand
  letnewcommandrenewcommand
  makeatletter
  input{bk#1.clo}%
  makeatother
  letnewcommandorignewcommand
}
{%
  clearpage
}

begin{document}
lipsum
begin{localsize}{10}
  lipsum
end{localsize}
end{document}

Note: This is based on loading the original size definitions of the book class named bk10.clo, bk11.clo, bk12.clo, so 10, 11, 12 are the possible arguments, corresponding to the options 10pt, 11pt, 12pt of the document class.

For using with another class (for instance article), the prefix bk used in

  input{bk#1.clo}%

needs to be replaced by the one used by the respective class (for instance size). Some classes like memoir support a wider range of sizes.

answered Dec 21, 2012 at 22:12

Stephan Lehmke's user avatar

Stephan LehmkeStephan Lehmke

24.1k3 gold badges84 silver badges138 bronze badges

9

If you are using a KOMA-Script class you can change the basic font size inside the document:

documentclass[10pt]{scrartcl}
begin{document}
parbox[t]{.5textwidth}{%
  section*{10pt}
  raggedright
  tiny tinypar
  scriptsize scriptsizepar
  footnotesize footnotesizepar
  small smallpar
  normalsize normalsizepar
  large largepar
  Large Largepar
  LARGE LARGEpar
  huge hugepar
  Huge Hugepar
}%
KOMAoptions{fontsize=12pt}
parbox[t]{.5textwidth}{%
  section*{12pt}
  raggedright
  tiny tinypar
  scriptsize scriptsizepar
  footnotesize footnotesizepar
  small smallpar
  normalsize normalsizepar
  large largepar
  Large Largepar
  LARGE LARGEpar
  huge hugepar
  Huge Hugepar
}
end{document}

KOMA-Script example

If you are not using a KOMA-Script class, you can use the KOMA-Script package scrextend:

documentclass[10pt,a4paper]{article}
usepackage{scrextend}
begin{document}
parbox[t]{.5textwidth}{%
  section*{10pt}
  raggedright
  tiny tinypar
  scriptsize scriptsizepar
  footnotesize footnotesizepar
  small smallpar
  normalsize normalsizepar
  large largepar
  Large Largepar
  LARGE LARGEpar
  huge hugepar
  Huge Hugepar
}%
KOMAoptions{fontsize=12pt}
parbox[t]{.5textwidth}{%
  section*{12pt}
  raggedright
  tiny tinypar
  scriptsize scriptsizepar
  footnotesize footnotesizepar
  small smallpar
  normalsize normalsizepar
  large largepar
  Large Largepar
  LARGE LARGEpar
  huge hugepar
  Huge Hugepar
}
end{document}

standard class example

Caveat: Not all length depending on the basic font size will be changed, if you use KOMAoptions{fontsize=…}. For example, if a package uses code like

 newlength{foo}
 setlength{foo}{2baselineskip}

length foo will not be influenced by the change of fontsize. So using option fontsize inside the document (or even in the document preamble) is not the exactly the same like using 10pt, 11pt, 12pt or fontsize as optional argument of documentclass. It is only more or less close to it.

answered Nov 9, 2017 at 9:10

Schweinebacke's user avatar

A ConTeXt solution:

  • If you want the footnotes, headers and footers, etc in the first page to correspond to 10pt and rest of the document to correspond to 12pt:
setupbodyfont[10pt]
starttext
Abstract
page
setupbodyfont[12pt]
....
stoptext
  • If you want all the footnotes, headers and footnotes, etc. to correspond to 12pt font size
setupbodyfont[12pt]
starttext
start
switchtobodyfont[10pt]
Abstract: ...
stop
page
Rest of the document
stoptext

answered Oct 15, 2010 at 18:29

Aditya's user avatar

AdityaAditya

61.7k3 gold badges127 silver badges261 bronze badges

An easy way would be to create a 10pt document for the summary and include its pdf output within the 12pt document. You could use the pdfpages package for that purpose.

If you really wish to use just one document, you could redefine normalsize and all the other size macros like footnotesize, scriptsize etc. you can find the definition inside the .clo files like size10.clo.

But I would choose the easier way, splitting the document code.

answered Oct 14, 2010 at 21:46

Stefan Kottwitz's user avatar

Stefan KottwitzStefan Kottwitz

225k82 gold badges662 silver badges817 bronze badges

If the normal size is 12pt, the text enclosed in the group will be in 10pt. The text size of the header and the footer will keep unaltered.

begingroup
footnotesize
input{first_page_content.tex}
endgroup
clearpage

answered Jul 31, 2017 at 15:56

user3020344's user avatar

Changing the font size in LaTeX can be done on two levels, either affecting the whole document or parts/elements of it. Using a different font size on a global level will affect all normal-sized text as well as the size of headings, footnotes, etc. By changing the font size locally, however, a single word, a few lines of text, a large table or a heading throughout the document may be modified.

Changing the font size on a document-wide level

The standard classes, article, report and book support 3 different font sizes, 10pt, 11pt, 12pt (by default 10pt). The font size is set through the optional argument, e.g.:

documentclass[12pt]{report}

In most cases, the available font sizes for the standard classes are sufficient.

 
Other font sizes

Should you require a different font size for your document, use the extsizes package. It allows for the following font sizes: 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 20pt.

The documentclass names are slightly different from the standard classes:

%Article
documentclass[9pt]{extarticle}
%Report
documentclass[14pt]{extreport}

 
The KOMA-script and memoir class

The KOMA-script and memoir classes are more flexible when it comes to font sizes. Please see the documentation for more details.

Changing the font size locally

LaTeX knows several font size modifier-commands (from biggest to smallest):

Huge
huge
LARGE
Large
large
normalsize (default)
small
footnotesize
scriptsize
tiny

font-size2

A table of the exact font sizes in points can be found on wikibooks.

A good rule of thumb is don’t use too many different sizes and don’t make things too small/big.

There are two possible ways to use these font size modifier commands, inline or as environment:

% inline
{Large This is some large textpar}

% environment
begin{footnotesize}
...
end{footnotesize}

The par at the end of the inline example adjusts baselineskip, the minimum space between the bottom of two successive lines. See the example in Rob’s comment below.

 
A few more options

The moresize package adds two more to the list above, HUGE and ssmall. The latter fills the gap between scriptsize and tiny.

While using HUGE, LaTeX displays a warning saying the font size is not available for the standard font and that it was replaced by the next smaller (Huge). When using another font type, such as the Adobe Times Roman equivalent available in the PSNFSS package (see example below), however, you can benefit from that font size.

documentclass[11pt]{report}
usepackage{mathptmx}
usepackage[11pt]{moresize}
...
{HUGE A huge text}

{ssmall Can you still read this ``ssmall'' text?}

moresize-example1

Note: The figure is scaled and therefore does not show the actual font size. It illustrates the difference between the font sizes.

Still not enough?

Here is alternative, more flexible approach. The anyfontsize package scales the next bigger/smaller font size available to whatever size you like.

The two arguments to fontsize are the actual font size and the size of the baseline-skip. The baseline-skip should be set to roughly 1.2x the font size.

fontsize{size}{baselineskip}

The following example shows font size 50pt/5pt and compares them with Huge and tiny.

documentclass[11pt]{report}
usepackage{mathptmx}
usepackage{anyfontsize}
usepackage{t1enc}
...
{fontsize{50}{60}selectfont Foo}{fontsize{5}{6}selectfont bar!}
{Huge Foo}{tiny bar!}

anyfontsize

That’s more like it! Again, this only works with a non-standard font type. And again, it does not show the actual font size. Try it with LaTeX!

Source with more details: here and there.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Как изменить размер шрифта iphone
  • Как изменить размер шрифта gmail
  • Как изменить размер шрифта bootstrap
  • Как изменить размер шрифт на телефоне хуавей
  • Как изменить размер шрифт на телефоне xiaomi

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии