我想改变一些页面部分的文本大小,例如,对于一个逐字块:
\begin{verbatim} <how to set the font size here to 10 pt? /> \end{verbatim}
Example:
\Large\begin{verbatim} <how to set font size here to 10 px ? /> \end{verbatim} \normalsize
\Large can be obviously substituted by one of:
\Large
\tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge
If you need arbitrary font sizes:
\begingroup \fontsize{10pt}{12pt}\selectfont \begin{verbatim} % how to set font size here to 10 px ? \end{verbatim} \endgroup
http://en.wikibooks.org/wiki/LaTeX/Formatting
use \alltt environment instead. Then set size using the same commands as outside verbatim environment.
\alltt
The use of the package \usepackage{fancyvrb} allows the definition of the fontsize argument inside Verbatim:
\usepackage{fancyvrb}
\begin{Verbatim}[fontsize=\small] print "Hello, World" \end{Verbatim}
The fontsize that you can specify are the common
To add exact fontsize you can use following. Worked for me since in my case predefined ranges (Large, tiny) are not match with the font size required to me.
\fontsize{10}{12}\selectfont This is the text you need to be in 10px
More info: https://tug.org/TUGboat/tb33-3/tb105thurnherr.pdf