Document Classesbeamer | Different Font Size for a specific Line

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
shva
Posts: 4
Joined: Sun Aug 07, 2011 9:09 pm

beamer | Different Font Size for a specific Line

Post by shva »

Hi all,

I am using the beamer class and quite happy about it. But now there is a little problem: can I change the font size of a specific sentence which is different from the font size of the rest of text? Thanks very much!

Shva

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

beamer | Different Font Size for a specific Line

Post by Stefan Kottwitz »

Hi Shva,

welcome to the board!

There are standard LaTeX commands for different font sizes. In increasing order: \tiny, \scriptsize, \footnotesize, \small, \normalsize (default), \large, \Large, \LARGE, \huge and \Huge.

They switch the size, but their effect can be limited by grouping with braces. So you could write, for example:

Code: Select all

normal text

{\Large Large sentence }

normal text
Beamer even offers smaller size commands: \Tiny and \TINY.

For arbitrary sizes, have a look at Increase font size, standard sizes are explained here: LaTeX font sizes.

Note, inter line spacing depends on the font size, so I usually don't mix different font sizes in the same paragraph.

Stefan
LaTeX.org admin
shva
Posts: 4
Joined: Sun Aug 07, 2011 9:09 pm

beamer | Different Font Size for a specific Line

Post by shva »

Thanks Stefan. But is it possible to specify the font weight associated with the sentence? For example, I would like to have the sentence's font weight set to 9pt, while the rest of the text is 10pt set by preamble.

Shva
Stefan_K wrote:Hi Shva,

welcome to the board!

There are standard LaTeX commands for different font sizes. In increasing order: \tiny, \scriptsize, \footnotesize, \small, \normalsize (default), \large, \Large, \LARGE, \huge and \Huge.

They switch the size, but their effect can be limited by grouping with braces. So you could write, for example:

Code: Select all

normal text

{\Large Large sentence }

normal text
Stefan
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

beamer | Different Font Size for a specific Line

Post by Stefan Kottwitz »

Just like I said:

Code: Select all

{\small sentence}
or

Code: Select all

\small sentence \normalsize
or do the same with

Code: Select all

\fontsize{9}{11}\selectfont
instead of \small.

Stefan
LaTeX.org admin
shva
Posts: 4
Joined: Sun Aug 07, 2011 9:09 pm

Re: beamer | Different Font Size for a specific Line

Post by shva »

Thanks Stefan. It works:)
Post Reply