Table of contents
2. Title and author information:
3. Paragraph and Text Formatting:
5.2.1 Example 1: Three-line grid
5.2.3 Setting the column spacing between tables
The following is an example of a complete LaTeX paper based on the SCI template , including annotations
\documentclass{sci}
% 导入必要的宏包
\usepackage{graphicx} % 用于插入图片
\usepackage{amsmath} % 用于数学公式
\usepackage{cite} % 用于管理参考文献引用
% 设置论文标题、作者和日期
\title{My Paper Title}
\author{Author A, Author B}
\date{\today}
\begin{document}
\maketitle % 生成标题
\begin{abstract}
This is the abstract of the paper.
\end{abstract}
\keywords{keyword1, keyword2, keyword3}
\section{Introduction}
This is the introduction section of the paper.
\section{Methodology}
This section describes the methodology used in the study.
\subsection{Data Collection}
The data collection process is explained in this subsection.
\subsection{Data Analysis}
The data analysis techniques are described in this subsection.
\section{Results}
The results of the study are presented in this section.
\begin{figure}
\centering
\includegraphics{image.png}
\caption{Figure Caption}
\label{fig:example}
\end{figure}
Figure \ref{fig:example} shows an example figure.
\section{Discussion}
The findings of the study are discussed in this section.
\section{Conclusion}
This section concludes the paper.
\section*{Acknowledgments}
Any acknowledgments can be included in this section.
\bibliographystyle{plain}
\bibliography{references} % 替换为你的参考文献文件名
\end{document}
When using LaTeX for dissertation editing, here are some guidelines for basic grammar and usage :
1. Create a document:
- Use the `\documentclass{}` command at the beginning of the document to specify the document category, such as `\documentclass{article}` means to create an article.
- Write the thesis content between `\begin{document}` and `\end{document}`.
2. Title and author information:
- Use the `\title{}` command to set the title, eg `\title{My Paper}`.
- Use the `\author{}` command to set the author information, such as `\author{John Doe}`.
- Use the `\date{}` command to set the date, eg `\date{\today}` (displays the current date).
\author[a]{S W}
\author[a]{G T\corref {cor1}}
\affiliation[a]{organization={xxxxx},
address line ={ },
city={xxxx},
postcode={xxxx},
country={China}}
\cortext[cor1]{Corresponding author}
\thanks{}
Corresponding authors can also be annotated using the command. Here's an example of how to include the corresponding author's information on the title page
\documentclass{article}
% 设置论文标题、作者和日期
\title{My Paper Title}
\author{Author A\thanks{Corresponding author: [email protected]}, Author B}
\date{\today}
\begin{document}
\maketitle % 生成标题
\begin{abstract}
This is the abstract of the paper.
\end{abstract}
\section{Introduction}
This is the introduction section of the paper.
\section{Methodology}
This section describes the methodology used in the study.
\section{Results}
The results of the study are presented in this section.
\section{Conclusion}
This section concludes the paper.
\end{document}
In the example above, the corresponding author's information
\thanks{}
is added in a footnote after the author's name using the command. You can\thanks{}
provide the corresponding author's contact details, such as an email address, in the command.
3. Paragraph and Text Formatting:
- Use blank lines to separate paragraphs.
- Use the `\section{}`, `\subsection{}` and `\subsubsection{}` commands to create heading hierarchies.
- Format text with commands such as `\textbf{}`, `\textit{}` and `\underline{}`.
- Use `\\` to create newlines.
4. List:
- Create an unordered list using the `itemize` environment, like:
\begin{itemize}
\item Item 1
\item Item 2
\end{itemize}
- Use the `enumerate` environment to create ordered lists.
5. Pictures and tables:
5.1 Insert picture
```
\usepackage{graphicx}
...
\includegraphics{image.png}
```
detailed:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.5\textwidth]{image.jpg}
\caption{这是一张图片的标题}
\label{fig:image}
\end{figure}
\end{document}
In the above example, it is assumed that the file name of the picture to be inserted is
image.jpg
. Use\includegraphics{}
the command to insert an image intofigure
the environment. Through the option[width=0.5\textwidth]
, set the width of the image to be half of the current text width. You can adjust this value as needed.In
figure
the environment, the command is also used\caption{}
to set the title of the picture, and\label{}
the command is used to add a tag to the picture for reference in the text. You can use the command to refer to this tag in the text\ref{}
to generate the corresponding image number.
5.2 Insert table
Use the `table` environment to create a table, the basic statement is as follows:
\begin{table}
\caption{Table Title}
\centering
\begin{tabular}{ccc}
\hline
Column 1 & Column 2 & Column 3 \\
\hline
Data 1 & Data 2 & Data 3 \\
\hline
\end{tabular}
\end{table}
5.2.1 Example 1: Three-line grid
Implementation code:
\begin{table}[htbp]
% 其中[htbp]就是浮动格式
% h 当前位置。将图形放置在正文文本中给出该图形环境的地方。如果本页所剩的页面不够,这一参数将不
起作用。
%t 顶部。将图形放置在页面的顶部。
%b 底部。将图形放置在页面的底部。
%p 浮动页。将图形放置在一只允许有浮动对象的页面上
\caption{table caption is above the table}
% 标题
\centering
%表格居中
\tiny
%设置表格字体% 其他字体设置【\tiny\scriptsize\footnotesize\small\normalsize
%large\Large\LARGE\huge\Huge】
\begin{tabular}{111}
% 1, c, r 单元格内容左对齐/居中/右对齐
\hline\noalign{\smallskip}
%画表格的一行,并且行距设置为smallskip
SIZE[\%] & COCO[\%] & VisDrone[\%] \\
%表格第一行内容
\noalign{\smallskip}\hline\noalign{\smallskip}
%画表格的一行,并且行距设置为smallskip
Small (0, 0.3) & 41.43 & 87.77 \\
Medium (0.3, 3) & 34.32 & 11.97 \\
$\textbf{Large(3, 100)} $ & 24.24 & 0.26 \\
%$\textbf{} $ 字体加粗
\noalign{\smallskip}\hline
%画表格的一行,并且行距设置为smallskip
\end{tabular}
\end{table}
5.2.2 Example 2:
Create the table as follows:
```latex
\begin{table}[htbp]
\centering
\caption{表格标题}
\label{tab:table_label}
\begin{tabular}{column_format}
\toprule
列1 & 列2 & 列3 \\
\midrule
数据1 & 数据2 & 数据3 \\
数据4 & 数据5 & 数据6 \\
\bottomrule
\end{tabular}
\end{table}
```
In the code above, you need to replace the following:
- `Table Title`: Replace with the table title you want to display.
- `tab:table_label`: Replace with the label of the table, so that the table can be referenced in the text.At `column_format`, you need to specify the column format of the table. Common column formats include:
- `l`: left-aligned column
- `c`: center-aligned column
- `r`: right-aligned columnYou can use these column formats as you like, e.g. `llc` means three columns, with the first two left-aligned and the last center-aligned.
In a table, use `&` to separate the contents of different columns, and `\\` to separate the contents of different rows.
You can also use `\toprule`, `\midrule` and `\bottomrule` to draw the horizontal lines of the table, which represent the top line of the table header, the line between the table header and the table content, and the bottom line of the table, respectively.
5.2.3 Setting the column spacing between tables
You can use \setlength
commands to set the spacing between table columns.
Example 1 : Set the spacing between table columns to 10pt:
\begin{tabular}{@{} p{2cm} @{} p{3cm} @{}}
\setlength{\tabcolsep}{10pt}
列1 & 列2 \\
内容1 & 内容2 \\
\end{tabular}
In the example above,
@{}
it is used to eliminate the default spacing between columns and instead\setlength{\tabcolsep}{10pt}
set the spacing between columns to 10pt. You can adjust\setlength
the value in the command to change the size of the column spacing according to your needs.
Example 2
When creating a table in LaTeX, \setlength
commands can be used to adjust the column spacing of the table. This command is used to set \tabcolsep
a parameter that controls the white space between columns. Here is a detailed example showing how to set the spacing between table columns:
\documentclass{article}
\begin{document}
\begin{table}[htbp]
\setlength{\tabcolsep}{10pt} % 设置列间距为10pt
\centering
\begin{tabular}{|c|c|c|}
\hline
列1 & 列2 & 列3 \\
\hline
内容1 & 内容2 & 内容3 \\
\hline
\end{tabular}
\caption{示例表格}
\label{tab:example}
\end{table}
\end{document}
In the above example, the column spacing is set to 10pt by
tabular
using the command before the environment .\setlength{\tabcolsep}{10pt}
You can adjust\setlength
the value in the command to change the size of the column spacing according to your needs. Note that this command is usually placed between\begin{table}
and\begin{tabular}
and sets the column spacing before the tabular environment.Additionally,
@{}
the spacing between columns can be further controlled using . For example,@{\hspace{10pt}}
an extra horizontal space of 10pt can be inserted between columns. You can use this form in a column definition in\begin{tabular}
a row@{}
to customize the spacing between columns.
Adjust row height and column spacing
Add the following command to the \begin{table}
environment \begin{tabular}
to set the line height:
\renewcommand\arraystretch{2}
Here set the row height to be twice the initial value.
Then use the following command to set the column spacing:
\tabcolsep=1cm
Here 1cm
you can modify it yourself, and there are other commonly used LaTeX length units pt、em
.
5.2.4 How to set the font and size in the latex table
In Latex, when a table exceeds half a column, you can consider setting the font size in the table to be smaller. The method is as follows:
1. \begintable[h]\tiny% Here, set the font of the table to tiny, and you can also set it to other sizes
2. \begintabular
3, \endtabular
4, \endtable
Latex Set the font size commands from small to large:
\tiny
\scriptsize
\footnotesize
\small
\normalsize
\large
\Large
\LARGE
\huge
\Huge
Set the font size of table titles:
Use \captionsetup{font=small}
to set the font size of the table title to small. You can choose different font sizes according to your needs, such as tiny
, scriptsize
, footnotesize
, small
, large
etc. You can adjust the font size options according to your needs. Note the introduction of \usepackage{caption}
\documentclass{article}
\usepackage{caption}
\begin{document}
\begin{table}[htbp]
\captionsetup{font=small} % 设置标题字体大小为 small
\caption{一个示例表格}
\centering
\begin{tabular}{cc}
\hline
列1 & 列2 \\
\hline
数据1 & 数据2 \\
数据3 & 数据4 \\
\hline
\end{tabular}
\end{table}
\end{document}
Sets the spacing between table headings and tables
\documentclass{article}
\usepackage{caption}
\begin{document}
\begin{table}[htbp]
\captionsetup[table]{skip=10pt} % 设置标题和表格之间的间距为 10pt
\caption{一个示例表格}
\centering
\begin{tabular}{cc}
\hline
列1 & 列2 \\
\hline
数据1 & 数据2 \\
数据3 & 数据4 \\
\hline
\end{tabular}
\end{table}
\end{document}
In the example above, use \captionsetup[table]{skip=10pt}
to set the spacing between the heading and the table to 10pt.
6. Citations and references:
- Use the `\label{}` command to add labels to chapters, figures, etc.
- Use the `\ref{}` command to refer to tags, eg `\ref{sec:intro}` refers to a section tag.
- Use BibTeX to manage references, create `.bib` files and use the `\cite{}` command to cite references.
7. Mathematical formula:
internal formula
这是一个行内公式:$f(x) = x^2$
最简单的行间公式:在写文章的时候,公式直接和文章联结。
在公式两边加上$,$a = b^2+\frac{n}{3}$
- Use `$...$` or `\(...\)` to embed formulas in text, eg `$E=mc^2$`.
Interline formula :
Use \[ ... \]
or use the `equation` environment to create stand-alone Hangjian equations, such as:
```
\begin{equation}
f(x) = x^2
\end{equation}
```
Superscripts and subscripts:
Use " ^
" for superscript and "_
" for subscript.
\[ x^2, x_1, x_{i,j} \]
Fraction:
Use \frac{numerator}{denominator}
to represent fractions.
\[ \frac{1}{2}, \frac{x+1}{x^2-1} \]
Prescribing:
Use \sqrt{expression}
to represent the square root.
\[ \sqrt{2}, \sqrt[n]{x} \]
Sum, integrate, limit:
Use \sum
, \int
, \lim
and other commands.
\[ \sum_{i=1}^n i, \int_a^b f(x)dx, \lim_{x \to \infty} f(x) \]
matrix:
Use matrix
the environment to represent matrices
\[
\begin{matrix}
1 & 2 \\
3 & 4
\end{matrix}
\]
piecewise function:
Use cases
the environment to represent piecewise functions.
\[
f(x) =
\begin{cases}
x, & \text{if } x > 0 \\
0, & \text{otherwise}
\end{cases}
\]
Greek alphabet:
Use specific commands to enter Greek letters.
\[ \alpha, \beta, \gamma, \Delta, \Omega \]
In LaTeX, Greek letters can be entered using specific commands. Here are some commonly used Greek letters and their corresponding commands:
Uppercase Greek letters:
- Alpha:
\Alpha
- Beta:
\Beta
- Gamma:
\Gamma
- Delta:
\Delta
- Epsilon:
\Epsilon
- Zeta:
\Zeta
- And:
\Eta
- Theta:
\Theta
- Iota:
\Iota
- Kappa:
\Kappa
- Lambda:
\Lambda
- In:
\Mu
- Not:
\Nu
- Xi:
\Xi
- Omicron:
\Omicron
- Pi:
\Pi
- Rho:
\Rho
- Sigma:
\Sigma
- Get:
\Tau
- Upsilon:
\Upsilon
- Phi:
\Phi
- Chi:
\Chi
- Psi:
\Psi
- Omega:
\Omega
Lowercase Greek letters:
- alpha:
\alpha
- beta:
\beta
- gamma:
\gamma
- delta:
\delta
- epsilon:
\epsilon
- varepsilon:
\varepsilon
- zeta:
\zeta
- and:
\eta
- theta:
\theta
- vartheta:
\vartheta
- iota:
\iota
- kappa:
\kappa
- lambda:
\lambda
- in:
\mu
- not:
\nu
- xi:
\xi
- pi:
\pi
- nest:
\varpi
- rho:
\rho
- varrho:
\varrho
- sigma:
\sigma
- varsigma:
\varsigma
- get:
\tau
- upsilon:
\upsilon
- phi:
\phi
- Varphi:
\varphi
- chi:
\chi
- psi:
\psi
- omega:
\omega
These commands can be used in math mode, such as
\alpha
,\beta
,\Gamma
, etc. You can select the corresponding Greek letter command to represent the Greek letter in the math formula according to your needs.
Above are some basic math formula syntax examples. There are more advanced mathematical commands and symbols in LaTeX that can be used to express complex mathematical formulas.