Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change font size on part of the page in LaTeX?

Tags:

latex

I would like to change the text size for some page part, e.g. for a verbatim block:

\begin{verbatim}     <how to set the font size here to 10 pt? /> \end{verbatim} 
like image 997
jwaliszko Avatar asked Jul 10 '10 18:07

jwaliszko


People also ask

How do I change the font size of one section in LaTeX?

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.

How do I change the font size in a paragraph in LaTeX?

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 , ...

How can I change the font of one word in LaTeX?

The font can also be changed for a specific element in the document. The command \fontfamily{qcr}\selectfont will set the TeX gyre cursor font typeface, whose fontcode is qcr , for the text inside the braces.

Can you change font size in LaTeX?

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 KOMA-script and memoir classes are more flexible when it comes to font sizes. Please see the documentation for more details.


1 Answers

\begingroup     \fontsize{10pt}{12pt}\selectfont     \begin{verbatim}           % how to set font size here to 10 px ?       \end{verbatim}   \endgroup 
like image 140
Alexey Malistov Avatar answered Oct 05 '22 20:10

Alexey Malistov