latex学习
程序员文章站
2023-12-25 21:40:21
...
latex是写论文时常用的排版工具
下面是一些常用的语句
- 常见结构
-
\documentclass[10pt]{article} \begin{document} Helloworld \end{document}
-
- 添加文章标题和作者新息等
-
\documentclass[10pt]{article} \title{My first document} \date{2013-09-01} \author{John Doe} \begin{document} \maketitle \newpage Helloworld \end{document}
-
- 另起一页
- \newpage
- 是否标注页码
-
\documentclass{article} \title{My first document} \date{2013-09-01} \author{John Doe} \begin{document} \pagenumbering{gobble} \maketitle \newpage \pagenumbering{arabic} Hello World! \end{document}
-
- section 和 paragraph
- section是加了序号的片段,paragraphs是没有加序号的片段
-
\section{} \subsection{} \subsubsection{} \paragraph{} \subparagraph{}
-
\documentclass{article} \title{Title of my document} \date{2013-09-01} \author{John Doe} \begin{document} \maketitle \pagenumbering{gobble} \newpage \pagenumbering{arabic} \section{Section} Hello World! \subsection{Subsection} Structuring a document is easy! \end{document}
-
\documentclass{article} \begin{document} \section{Section} Hello World! \subsection{Subsection} Structuring a document is easy! \subsubsection{Subsubsection} More text. \paragraph{Paragraph} Some more text. \subparagraph{Subparagraph} Even more text. \section{Another section} \end{document}
- 这里写abstract的时候可以用paragraphs,写具体分段的时候,可以用section
- 常见的符号
- 间隔一行
- \\
- 也可以使用\vspace{2cm}
-
Alternatively you can use the \vspace{} command to leave vertical space. The amount of space you leave is dictated by what value you give it. For instance, \vspace{2cm} leaves a 2cm gap. The command \hspace{} works in the same way, only it leaves a horizontal space.
-
- 字体加粗
- \textbf{astract}
- 1
- 段首缩排
- \indent
- 可以使用\hspace{1cm}
- 一个例子
-
\thispagestyle{plain} \begin{center} \Large \textbf{Thesis Title} \vspace{0.4cm} \large Thesis Subtitle \vspace{0.4cm} \textbf{Author Name} \vspace{0.9cm} \textbf{Abstract} \end{center} Lorem ipsum dolor...
-
- 在文章中添加图片
-
\documentclass{article} \usepackage{graphicx} \graphicspath{ {./images/} } \begin{document} Sun rises in the east and sets in the west. \includegraphics{sun} There's a picture of Sun above \end{document}
即开头用\usepackage{graphicx} \graphicspath{{./images/}} 在需要插入图片的地方用\includegraphics{sun}
-
-
位置
-
居中:\centering
-
左右:\raggedleft \raggedright
-
- 相关链接
- latex指导手册