LaTex(PART VIII)文档类和页面布局相关
2017-10-21 21:26
344 查看
文档类
在进行源文件处理之前,需要知道所处理的文件的类型,此时documentclass命令派上了用场。
格式:
\documentclass[options]{class}
实例:
\documentclass[UTF8]{ctexart}
class
选项 | 含义 |
---|---|
ctexart | 支持中文的article |
article | 排版科技期刊、短报告、程序文档、邀请函等。 |
report | 排版多章节的长报告、短篇的书籍、博士论文等。 |
book | 排版书籍。 |
slides | 排版幻灯片。其中使用了较大的sans serif 字体。也可以考虑使 |
选项 | 含义 |
---|---|
10pt, 11pt, 12pt | 设置文档所使用的字体的大小。如果没有声明任何选项,缺省将使用10pt 字体。 |
a4paper, letterpaper, … | 定义纸张的大小,缺省的设置为letterpaper。此外,还可以使用a5paper,b5paper,executivepaper 和legalpaper。 |
fleqn | 设置该选项将使数学公式左对齐,而不是中间对齐。 |
leqno | 设置该选项将使数学公式的编号防置于左侧。 |
titlepage, notitlepage | 指定是否在文档标题(document title)后开始一新页。article 文档类缺省不开始新页,而book 文档类则相反。 |
onecolumn, twocolumn | 指定LATEX 以单列(one column)或双列(two column)方式排版文档。 |
twoside, oneside | 指定LATEX 排版的文档为双面或单面格式。article 和report 缺省使用单面格式,而book 则缺省使用双面格式。需要注意的是该选项仅作用于文档的式样。twoside选项不会通知你的打印机让以得到双面的打印输出。 |
openright, openany | 此选项决定新的章是仅仅在右边页(奇数页)还是在下一可用页开始。该选项对article 文档类不起作用,因为该类中并没有定义“章”(Chapter)。report 类中新的一章开始于下一可用页,而book 类中新的一章总是开始于右边页。 |
utf8 | 支持中文的编码 |
页面样式:
LaTex支持三种预定的页面布局方式style | 含义 |
---|---|
plain | 页眉为空,页脚由居中的的页码组成。这是默认的页面式样。 |
headings | 页眉由当前的章节标题和页码组成,页脚为空。 |
empty | 设置页眉、页脚均为空 |
比如fancy需要导包fancyhdr
代码如下:
\usepackage{fancyhdr}%设置页脚页眉需要的包 \pagestyle{fancy}
命令
\pagestyle{style}
设置页面布局样式
设置当前页面的布局样式
\thispagestyle{style}
完整的代码:
\documentclass[UTF8]{ctexart}
\usepackage{fancyhdr}%设置页脚页眉需要的包 \pagestyle{fancy}
\author{哈巴狗}
\title{我的论文标题}
%这里是页眉
\lhead{西安电子科技大学}%左边
%\chead{中间}%中间
\rhead{硕士研究生毕业设计}%右边
%这里是页脚
%\lfoot{左边}%页脚左边
\cfoot{第\thepage页}%页脚中间
%\rfoot{右边}%页脚右边
\renewcommand{\headrulewidth}{0.4pt}%页眉
\renewcommand{\headwidth}{\textwidth}
\renewcommand{\footrulewidth}{0.4pt}
\newcommand{\enabstractname}{Abstract}
\newenvironment{enabstract}{%
\par\small
\noindent\mbox{}\hfill{\bfseries \enabstractname}\hfill\mbox{}\par
\vskip 2.5ex}{\par\vskip 2.5ex}
\begin{document}
\maketitle%输出标题
\newpage%另起一页
\tableofcontents%命令输出论文目录
\newpage
\begin{enabstract}
This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English. This is the abstract in English.
\centering
\textbf{Keywords:} Abstract, \LaTeXe, English
\end{enabstract}
\newpage%另起一页
\begin{abstract}
这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,
\newline%另起一行
\centering%使得关键字居中
\textbf{关键字:}摘要、\LaTeX、中文
\end{abstract}
\newpage%另起一页
\thispagestyle{empty}
\section{第一章,一级标题} 这是第一章
\subsection{二级标题} 第一章二级标题标题
\subsubsection{三级标题}
\subsubsection{三级标题}
\subsubsection{三级标题}
\subsection{二级标题} 第一章二级标题标题
\subsubsection{三级标题}
\subsubsection{三级标题}
\subsubsection{三级标题}
\newpage
\section{第二章,一级标题} 这是第一章
\subsection{二级标题} 第二章二级标题标题
\subsubsection{三级标题}
\subsubsection{三级标题}
\subsubsection{三级标题}
\subsection{二级标题} 第二章二级标题标题
\subsubsection{三级标题}
\subsubsection{三级标题}
\subsubsection{三级标题}
\end{document}
相关文章推荐
- LaTex(PART XVII)布局相关(II)页面相关参数
- 20个不错的CSS页面布局相关资源推荐
- 20个不错的CSS页面布局相关资源推荐
- 20个不错的CSS页面布局相关资源推荐
- Android页面布局之其他布局相关属性
- <div+css页面布局课堂笔记>5---与盒子相关的CSS属性第二部分
- 20个不错的CSS页面布局相关资源推荐
- Salesforce Lightning 在页面布局中添加相关列表tab
- 页面布局技巧&&js相关知识点&&乱七八糟
- 移动端页面布局相关问题
- <div+css页面布局课堂笔记>4---与盒子相关的CSS属性
- LaTex(PART XVI)布局相关(I)首行缩进和水平距离和垂直距离
- 20个不错的CSS页面布局相关资源推荐
- HTML5——CSS3页面布局相关知识总结
- 20个不错的CSS页面布局相关资源推荐
- <div+css页面布局课堂笔记>6---与盒子相关的CSS属性第三部分
- 基本的页面设计元素布局比例
- chapter6 网站设计和页面布局
- 手机端页面自适应解决方案—rem布局
- CSS Float 以及相关布局模式