LaTeX 常用语法

发布时间:2026/7/19 19:19:46
LaTeX 常用语法 标题用罗马数字排序在宏包后加\renewcommand\thesection{\Roman {section}}插入大写罗马数字\uppercase\expandafter{\romannumeral4}插入小写罗马数字\romannumeral20空行\\多行公式一个编号直接用公式右对齐 使公式等号对齐begin{equation} \begin{aligned} ab\\ cd \end{aligned} \end{equation}设置页眉和页脚\usepackage{fancyhdr} \pagestyle{plain}emply没有页眉、页脚plain没有页眉页脚居中headings没有页脚页眉包含章节标题和页码图注中“图一”改成“Fig. 1” 加上“caption”宏包\usepackage{caption} \begin{document} \captionsetup[figure]{labelfont{bf},labelformat{default},labelsepperiod,name{Fig.}}删去默认时间\date{}顶格\noindent{}图片宽度\columnwidth列宽的倍数\textwidth页面大小的倍数句子中的所有字母大写\MakeUppercase{}句子中的所有字母小写\MakeLowercase{}下划线\_图表位置紧跟正文引入宏包\usepackage{float}使用[H]强制图片固定在当前位置多行公式居中对齐\begin{equation} \begin{gathered} 公式1\\ 公式2 \end{gathered} \end{equation}公式字体缩小\begin{small} \begin{equation} 公式 \end{equation} \end{small} 如果希望编号不变小在整个代码最前面加 \makeatletter \renewcommand{\maketag}[1]{\hbox{\mth\normalsize\normalfont#1}}% \makeatother