Latex操作

(1)导言区
\documentclass[10pt]{article} %book,report,letter

标题:\title{内容}
作者:\author{}
日期:\date{}

(2)正文区
\begin{document}
\maketltle
\end{document}

(3)数学模式:
(a) f ( x ) f(x) f(x)(行内公式)

(b) f ( x ) f(x) f(x)(行间公式)

(5)中文处理办法:
\usepackage{ctex}

(6)产生带编号的行间公式:
见式\ref{eq:commutative}
\begin{equation}
a2=b2+c2\label{eq:commutative}
\end{equation}

(7)字体的设置

罗马字体设置:\textrm{Roman Family}

无衬线字体:\textsf{Sans Serif Family}

打字机字体:\texttt{Typewrite Family}

(8)粗细、宽度的设置

\textmd{Medium Series}

\textbf{boldface Series}

(9)字体形状设置

直立:\textup{Upright Shape}

斜体:\textit{Italic Shape}

伪斜体:\textsl{Slanted Shape}

小型大写\textsc{Small Caps Shape}

(10)中文字体
{\songti 宋体} \quad {\heiti 黑体} \quad {\fangsong 仿宋} \quad {\kaishu 楷书}

(11)字体大小
{\tiny Hello }\
{\scriptsize Hello }\
{\footnotesize Hello }\
{\small Hello }\
{\normalsize Hello }\
{\large Hello }\
{\Large Hello }\
{\LARGE Hello }\
{\huge Hello }\

%中文字号设置命令 \zihao{5}你好

(12)文档的基本结构
\begin{document}
\section{引言}
\subsection{子小节1}
\subsubsection{子小节11}
\end{document}

生成章节:\chapter{}

生成章节目录:\tableofcontents

换行:\par

产生新段落:\par

(13)特殊字符

空格字符:
(a)\quad:1em空白
(b)\qquad:2em空白
(c)\thinspace:1/6em空白
(d)\enspace:0.5em空白
(f)\:空格
(g)~:不能分割空格
(h)\kern:产生带有指定宽度的空白
(i)\hskip:产生带有指定宽度的空白
(j)\hspace:产生带有指定宽度的空白
(k)\hphantom:产生带有指定宽度的空白
(l)\hfill:产生弹性长度空白

控制符:
(a)#
(b)$
(c)%
(d){}
(f)~{}
(g)_{}
(h)^{}
(i)\textbackslash
(j)&

排版符号:
(a)#
(b)$
(c)%
(d){}
(f)~{}
(g)_{}
(h)^{}
(i)\textbackslash
(j)&

引号:
左单引号:`
右单引号:’
左双引号:``
右双引号:’’

连字符:


(14)插图
%导言区:\usepackage(graphicx)
%语法:\includegraphics[<选项>]{<文件名>}
%格式:EPS,PDF,PNG,JPEG,BMP

指定图像文件的搜索路径:\graphicspath{{figures/}},{{pics/}}

可选参数:
scale:缩放因子
height:高度
width:宽度
angle:旋转角度

(15)表格
%左对齐 居中对齐 右对齐
\begin{tabular}{l | c | r}
\hline
姓名 & 总分 &备注 \
\hline \hline
a & 22 & ww \
\hline
b & 33 & ww \
\end{tabular}

(16)浮动体
%使图片浮动
见图\ref{fig-lion}
\begin{figure}[htbp]
\centering
\caption{图片名称}\label{fig-lion}
\end{figure}

%使表格浮动
\begin{tabular}[h]

\end{tabular}

(17)数学公式
要使用宏包:
\usepackage{amsmath}
\usepackage{amssymb}

(a)下标:_
(b)希腊字母
α \alpha α β \beta β γ \gamma γ ϵ \epsilon ϵ π \pi π ω \omega ω Γ \Gamma Γ Δ \Delta Δ Θ \Theta Θ Π \Pi Π Ω \Omega Ω
(c)数学函数
KaTeX parse error: Undefined control sequence: \kog at position 1: \̲k̲o̲g̲ sin ⁡ \sin sin cos ⁡ \cos cos arcsin ⁡ \arcsin arcsin arccos ⁡ \arccos arccos ln ⁡ \ln ln
根号: x 3 \sqrt[3]{x} 3x
(d)分式
分 子 分 母 \frac{分子}{分母}
(e)矩阵
%matrix不带括号
%pmatrix带小括号
%bmatrix带中括号
%Bmatrix带大括号
%vmatrix带竖线
%Vmatrix带双竖线
\begin{matrix}
0 & 1\
1 & 0
\end{matrix}
常用省略号:\dots、\vdots、\ddots
跨列省略号:\hdotsfor
行内小矩阵:\samllmatrix
(f)多行公式
在\前使用**\notag**阻止编号
\begin{gather}
a+b=b+c \
ab
\end{gather}
(g)多个等号公式
\begin{equation}
\begin{split}
a &= b+c \
&= d+f
\end{split}
\begin{equation}

\begin{equation}
D(x) = \begin{cases}
1, & \text{如果} x \in \mathbb{Q}; \
0, & \text{如果} x \in \mathbb{R}\setminus\mathbb{Q}
\end{cases}
\begin{equation}

(18)参考文献
导言区:\bibliographystyle{plain}

\bibliography{test}

\notice{*}:显示所有参考文献

(19)自定义命令和环境

%使用\PRC相当于People’s Republic of \emph{China}
\newcommand\PRC{People’s Republic of \emph{China}}

%参数个数可以从1到9,使用时用 #1,#2,…,#9表示
\newcommand\loves[2]{#1 喜欢 #2}

\renewcommand:重定义命令

\newcommand:定义新环境

\renewcommand:重定义新环境

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值