[英]How to change font size on part of the page in LaTeX?
我想更改某些页面部分的文本大小,例如逐字逐字块:
\begin{verbatim}
<how to set the font size here to 10 pt? />
\end{verbatim}
\begingroup
\fontsize{10pt}{12pt}\selectfont
\begin{verbatim}
% how to set font size here to 10 px ?
\end{verbatim}
\endgroup
例:
\Large\begin{verbatim}
<how to set font size here to 10 px ? />
\end{verbatim}
\normalsize
\\Large
可以明显替代以下之一:
\tiny
\scriptsize
\footnotesize
\small
\normalsize
\large
\Large
\LARGE
\huge
\Huge
如果您需要任意字体大小:
使用package \\usepackage{fancyvrb}
允许在Verbatim中定义fontsize参数:
\begin{Verbatim}[fontsize=\small]
print "Hello, World"
\end{Verbatim}
您可以指定的fontsize是常见的
\tiny
\scriptsize
\footnotesize
\small
\normalsize
\large
\Large
\LARGE
\huge
\Huge
要添加精确的字体大小,您可以使用以下内容。 为我工作,因为在我的情况下,预定义的范围(大、小)与我所需的字体大小不匹配。
\fontsize{10}{12}\selectfont This is the text you need to be in 10px
http://en.wikibooks.org/wiki/LaTeX/Formatting
请改用\\alltt
环境。 然后使用与外部逐字环境相同的命令设置大小。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.