本文主要是介绍LaTex的层次结构,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
附代码
“`
%LaTex文档的基本结构,part chapter section subsection toc title…
\documentclass{book}%article,report,letter
\usepackage{amsmath}%宏包
%导言区
\begin{document}
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\title{This is book} %标题
\author{James Fang} %作者姓名
\date{} %删除title中默认的date
\maketitle %结束标题输入
\tableofcontents %LaTex对大小写敏感 %第一次编译并未将目录显示出,进行第二次编译则可正确显示。
%默认页码从第一页开始
\mainmatter %将页码更改至从正文开始第一页
\part{elementary} %书籍的部分
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\chapter{introduction} %章节安排
\section{first section}
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\subsection{I Like LaTex}
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\chapter{balababla}
\chapter{summary}
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\part{advanced}
\chapter{intro}
\chapter{conclusion}
\end{document}
完成效果如下
这里写链接内容
问题:
为什么有的段落会首行缩进两个字符有的不会?
eg: chapter,section,subsection 后第一段不会缩进
part,begin后直接输入 第一段会缩进
这篇关于LaTex的层次结构的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!