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}
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.
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 , ...
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.
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.
\begingroup \fontsize{10pt}{12pt}\selectfont \begin{verbatim} % how to set font size here to 10 px ? \end{verbatim} \endgroup
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With