latex 字体大小设置

tex 设置字体大小命令由小到大依次为:

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

使用方法:可以通过如下方式设置文章正文的字体大小,\begin{document} \small
采用默认的时候,正文肢体的大小是\normalsize


http://www.purplecow.org/index.php/Using_verbatim_text_in_a_latex_beamer_presentation
LaTeX Beamer with verbatim blocks
Overview
Placing a normal \begin{verbatim} \end{verbatim} pair in a Beamer slide breaks with a message along the lines of "Paragraph ended before \@xverbatim was complete."
Fix
Declare the frame fragile first.
\begin{frame}[fragile]
Code
\begin{frame}[fragile]
\frametitle{My title}
\begin{verbatim}
My block of verbatim text ... ... ...
\end{verbatim}

\begin{itemize}
\item First point about slab of verbatim
\item Isn't verbatim great?
\end{itemize}
\end{frame}
Note on verbatim structure
Always use \begin{verbatim} and \end{verbatim}
This won't work:
\verbatim{
my
slab
of
text
}

LaTeX设置标题的字体大小通常依赖于所使用的文档类(如article, report, book等)以及可能使用的标题样式包(如titlesec)。不同文档类默认的标题大小和样式可能不同,但可以通过命令来调整标题的字体大小。 以下是一些基本的示例来展示如何在LaTeX设置标题的字体大小: 1. 使用文档类提供的命令: 在默认的article文档类中,可以使用 `\Large`, `\LARGE`, `\huge` 等命令来改变章节标题的字体大小。例如: ```latex \documentclass{article} \begin{document} \section{\huge 第一节} \subsection{\LARGE 第一小节} \end{document} ``` 2. 使用titlesec包: 如果你想要更灵活的控制,可以使用titlesec包来定义新的标题样式,包括字体大小。首先需要引入titlesec包,然后使用 `\titleformat` 和 `\titlespacing` 命令来设置标题样式和间距。例如: ```latex \documentclass{article} \usepackage{titlesec} \titleformat{\section}[block] {\normalfont\Large\bfseries}{\thesection.}{1em}{} \titlespacing*{\section}{0pt}{1ex plus 1ex minus .2ex}{1ex plus .2ex} \begin{document} \section{第一节} \subsection{第一小节} \end{document} ``` 3. 使用KOMA-Script类: KOMA-Script是一组提供更多自定义选项的文档类,例如scrartcl(用于文章),scrreprt(用于报告),scrbook(用于书籍)。它们提供了一套更为灵活的选项来调整标题的字体大小和其他样式设置。例如,使用scrartcl文档类时,可以通过 `\addtokomafont` 命令来设置标题的字体属性: ```latex \documentclass{scrartcl} \addtokomafont{section}{\Large} \begin{document} \section{第一节} \end{document} ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值