当前位置:网站首页>Latex quick start
Latex quick start
2022-04-23 05:52:00 【Lin Zi 520】
List of articles
1. Type of article
- article :article
- The report :report
- book :book
- If you write a paper, use “ article ” article
- Chinese articles : ctexart
- Chinese Fonts :UTF8
Code :
\documentclass[UTF8]{
ctexart}
2. Introduce macro package
In the paper , May contain formula 、 form 、 Pictures, etc , It needs to be explained at the beginning . That's the way to explain Macro package
, Add macro package to write formula , Making forms , Put pictures .
Code :
\usepackage{
Macro package 1, Macro package 2,...}
More commonly used is by mathtools,amsmath,graphicx,array And so on. , Write it out :
\usepackage{
mathtools,amsmath,graphicx,array}
3. Start writing documents
Create a “ Document environment ”, In this environment, only the contents of documents are put , What macro packages and document types are outside this
- The establishment of the environment
\begin{
Environment name }
The content of the whole paper !!!
\end{
Environment name }
- For example, the document environment is
\begin{
document}
mathematical modeling
\end{
document}
About “\”:
- \begin{ Environment name } \end{ Environment name } yes “ Environmental Science ”. They all use “\” Let's start with , Distinguish between simple words , It is used to control typesetting .
- \document and \usepackage All are “ command ”
document Writing in an environment
- First , A blank line is required between editor segments , In this way, the segmentation of text can be output , Otherwise, the output text is a paragraph ( The two carriage returns are changing sections ).
- Several commands about Fonts / Environmental Science
In bold :\textbf{ Content }
Font size :\normalsize\large\Large\LARGE\huge\Huge
The font size is in an environment or {} In between
In the middle :\begin{center} Content \end{center}
Common keywords :
\title{
Title name }
\author{
The author's name }
\date{
date }
\maketitle
First level chapter :\section{
First level chapter name }
Secondary chapter :\subsection{
Second level chapter name }
Level III chapter :\subsubsection{
Third level chapter name }
\tableofcontents
\begin{
abstract}
Summary content
\end{
abstract}
\begin{
itemize}
\item The first thing
\item The second thing
\end{
itemize}
\begin{
equation}
The formula
\end{
equation}
% Formulas in this environment cannot be wrapped
\begin{
align*}
& y=a+b \\
& y=b+c
\end{
align*}
Formula environment without automatic numbering , You can add... After the environment name *
Or add \nonumber
, Such as
\begin{
equation*}
The formula 1
\end{
equation*}
% perhaps
\begin{
equation}\nonumber
The formula 1
\end{
equation}
There are also several abbreviations for this environment :
$$ The formula 1$$
% perhaps
\[ The formula \]
The above is “ The formula between lines ”, That is, insert a formula between two lines , It looks something like this . In line formula $ The formula $
for example :
for example :
We can know that Newton obtained the relationship between force and mass and acceleration of object as $F=ma$
The formula between lines can be :
We can know that Newton obtained the relationship between force and mass and acceleration of object as :
\begin{
equation}
F=ma
\end{
equation}
Output results :
Formula command
Insertion of tables
latex The input of the form in is relatively complex , We don't need too complicated... For the time being , Here is a simple point .
Normal table environment tabular:
\begin{
tabular}{
|l|c|r|}
\hline
indicators 1 & indicators 2 & indicators 3 \\
\hline
be at the left side & In the middle & be at the right
\hline
\end{
tabular}
Making of three line watch ( Need to use booktabs Macro package )
\begin{
table}
\centering
\caption{
subject }
\begin{
tabular}{
cccc}
\toprule
& indicators 1 & indicators 2 & indicators 3 \\
\midrule
programme 1 & 1 & 0.5 & 100 \\
programme 2 & 2 & 0.6 & 110 \\
\bottomrule
\end{
tabular}
\end{
table}
Picture insertion
\section{
The insertion of pictures }
use figure Environmental Science
\begin{
figure}[H]
\centering
\includegraphics[width=8cm,height=3cm]{
a.png}
\caption{
picture }
\end{
figure}[H]
Symbol & And \:
- Symbol
&
It usually means “ alignment ” Something like that , It is usually used when there are multiple rows of data , In case of alignment in a certain position . - Symbol
\\
It's line breaking , This is usually used when multiple lines of data need to wrap . Matrix environment 、 Multiline formulas are often used , Tables often encounter these two symbols . - If you just want to type in the text
&
Words , Just use\&
, Will be output&
. If you want to output\
, Then use\verb|\|
, There are other special symbols , Most of the output you want is “\ Symbol ”
command label
label
It's a label command
label{#1:#2}
, among #1 Represents the first parameter , Explain what type this thing is , There are three types :eq
The formula 、tab
form 、fig
picture ;
#2 That's the name .
For example, name it “niudun”:
\section{
command label}
\begin{
equation}
F=ma \label{
eq:niudun}
\end{
equation}
If you want to quote , Just use \ref{eq:niudun}
, The place of this command will be replaced by the number of the formula introduced
By formula (\ref{
eq:niudun}), We can get ...
Empathy , Tables and pictures can also be quoted in this way , There's no problem at all .
版权声明
本文为[Lin Zi 520]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230543037007.html
边栏推荐
- io. lettuce. core. RedisCommandExecutionException: ERR wrong number of arguments for ‘auth‘ command
- POI exports to excel, and the same row of data is automatically merged into cells
- Error 2003 (HY000) when Windows connects MySQL: can't connect to MySQL server on 'localhost' (10061)
- 2-軟件設計原則
- filebrowser实现私有网盘
- excel获取两列数据的差异数据
- 尚硅谷 p290 多态性练习
- 对象转map
- Add days to date
- Pilotage growth · ingenuity empowerment -- yonmaster developer training and pilotage plan is fully launched
猜你喜欢
随机推荐
Postfix变成垃圾邮件中转站后的补救
金蝶EAS“总账”系统召唤“反过账”按钮
Golang implements Ping connectivity detection case through exec module
mysql如何将存储的秒转换为日期
基于ssm 包包商城系统
实操—Nacos安装与配置
PyQy5学习(三):QLineEdit+QTextEdit
PyEMD安装及简单使用
Pytorch——数据加载和处理
【华为机试】考试得分总数(如何处理答错的情况?回溯一次,代表答错一题)
数字图像处理基础(冈萨雷斯)二:灰度变换与空间滤波
The role of brackets' [] 'in the parameter writing method in MDN documents
refused connection
创建线程的三种方式
The list attribute in the entity is empty or null, and is set to an empty array
POI exports to excel, and the same row of data is automatically merged into cells
Strategy for improving the conversion rate of independent stations | recovering abandoned users
创建二叉树
MySQL的锁机制
Pytorch learning record (XI): data enhancement, torchvision Explanation of various functions of transforms