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

匿名 (未验证) 提交于 2019-12-03 01:23:02

问题:

I'd like to change text size for some page part, e.g. for verbatim block:

\begin{verbatim}     \end{verbatim} 

Regards

回答1:

\begingroup     \fontsize{10pt}{12pt}\selectfont     \begin{verbatim}           % how to set font size here to 10 px ?       \end{verbatim}   \endgroup 


回答2:

Example:

\Large\begin{verbatim}     \end{verbatim} \normalsize 

\Large can be obviously substituted by one of:

\tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge 

If you need arbitrary font sizes:



回答3:

The use of the package \usepackage{fancyvrb} allows the definition of the fontsize argument inside Verbatim:

\begin{Verbatim}[fontsize=\small] print "Hello, World" \end{Verbatim} 

The fontsize that you can specify are the common

\tiny  \scriptsize   \footnotesize  \small \normalsize \large \Large \LARGE \huge \Huge 


回答4:

http://en.wikibooks.org/wiki/LaTeX/Formatting

use \alltt environment instead. Then set size using the same commands as outside verbatim environment.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!