当前位置:网站首页>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
边栏推荐
- MySQL create Oracle exercise table
- Pytorch学习记录(四):参数初始化
- PyQy5学习(二):QMainWindow+QWidget+QLabel
- refused connection
- 多线程与高并发(3)——synchronized原理
- mysql如何将存储的秒转换为日期
- MySQL realizes master-slave replication / master-slave synchronization
- Golang implements Ping connectivity detection case through exec module
- 给yarn配置国内镜像加速器
- Step on the pit: Nacos uses startup CMD - M standalone startup error
猜你喜欢
PreparedStatement防止SQL注入
基于thymeleaf实现数据库图片展示到浏览器表格
delete和truncate
JVM系列(3)——内存分配与回收策略
‘EddiesObservations‘ object has no attribute ‘filled‘
Conda 虚拟环境管理(创建、删除、克隆、重命名、导出和导入)
Ora: 28547 connection to server failed probable Oracle net admin error
你不能访问此共享文件夹,因为你组织的安全策略阻止未经身份验证的来宾访问
Multithreading and high concurrency (2) -- detailed explanation of synchronized usage
Batch import of orange single micro service
随机推荐
The role of brackets' [] 'in the parameter writing method in MDN documents
金蝶EAS“总账”系统召唤“反过账”按钮
图解HashCode存在的意义
Understand the current commonly used encryption technology system (symmetric, asymmetric, information abstract, digital signature, digital certificate, public key system)
JVM系列(3)——内存分配与回收策略
Dva中在effects中获取state的值
Record a project experience and technologies encountered in the project
rsync实现文件服务器备份
Transposed convolution
Shell instruction learning 1
关于二叉树的遍历
线程的底部实现原理—静态代理模式
filebrowser实现私有网盘
Pilotage growth · ingenuity empowerment -- yonmaster developer training and pilotage plan is fully launched
Pytorch学习记录(七):处理数据和训练模型的技巧
Strategy for improving the conversion rate of independent stations | recovering abandoned users
Latex快速入门
Multithreading and high concurrency (1) -- basic knowledge of threads (implementation, common methods, state)
protected( 被 protected 修饰的成员对于本包和其子类可见)
MySQL query uses \ g, column to row