一、安装
安装过程见下面链接
https://blog.csdn.net/Nicolecocol/article/details/136968456
对TexStudio进行设置
打开TexStudio->设置->构建->默认编译器->XeLatex(方便处理中文)
注意:Latex在编译过程中会产生许多过程文件,因此每创建一个文档就单独放在一个文件夹中
\documentclass{article}
\usepackage{ctex}
\begin{document}
你好,\LaTeX 。
\end{document}
二、Latex源文件基本结构
% 导言区
\documentclass{article}%article,book,report,letter
\title{My First Document}
\author{Lei}
\date{\today}
%正文区(文稿区)
\begin{document}
\maketitle %显示导言区内容
Hello World!
%here is my big formula
let $f(x)$ be defined by the formula $f(x)=3x^2+x-1$%由$包围的称为数学模式
$$f(x)=3x^2+x-1$$ which is a polynomial of degree 2.
\end{document}
%注
%letter类没有\maketitle命令
%空一行可以让文本另起一行
%单$包围表示行内公式
%双$包围表示行间公式
三、Latex中的中文处理方法
1、检查构建命令是否是XeLaTex,编译器的默认字体编码是否是UTF8
2、在\documentclass{article}后面插入\usepackage{ctex}
注:如果显示未定义,需要在导言区用\newcommand进行命令定义
在终端输入texdoc ctex可以打开ctex使用手册
在终端输入texdoc lshort-zh可以打开使用手册
\documentclass{ctexart}等价于\documentclass{article}和\usepackage{ctex}连用相同
% 导言区
%\documentclass{article}%article,book,report,letter
\documentclass{ctexart}%ctexbook,ctexreport
%\usepackage{ctex}
\newcommand\degree{^\circ}
\title{\heiti 杂谈勾股定理}
\author{\kaishu 张三}
\date{\today}
%正文区(文稿区)
\begin{document}
\maketitle %显示导言区内容
Hello World!
勾股定理可以用现代语言表述如下:
直角三角形斜边的平方等于两腰的平方和。
可以用符号语言表示为:设三角形 $ABC$ ,其中$\angle C=90\degree$,则有:
\begin{equation}
AB^2=BC^2 +AC^2.
B=A+C
\end{equation}%用于产生带编号的行间公式
\end{document}
四、字体字号设置
% 导言区
%\documentclass{article}%article,book,report,letter
\documentclass[12pt]{ctexart}%ctexbook,ctexreport
%\usepackage{ctex}
\newcommand{\myfont}{\textit{\textbf{\textsf{Fancy Text}}}}
%正文区(文稿区)
\begin{document}
%字体族的设置(罗马字体、无衬线字体、打字机字体)
\textrm{Roman Family} \textsf{Sans Serif Family} \texttt{Typewriter Family}%字体命令
{\rmfamily Roman Family} {\sffamily San Serif Family} {\ttfamily Typewriter Family}%字体说明,用{}限定说明范围
{\sffamily with the rapid development of Internet of Things (IoT) and next-generation communication technologies, resource-constrained mobile devices (MDs) fail to meet the demand of resource-hungry and compute-intensive applications.}
{\ttfamily To cope with this challenge, with the assistance of mobile-edge computing (MEC), offloading complex tasks from MDs to edge cloud servers (CSs) or central CSs can reduce the computational burden of devices and improve the efficiency of task processing. }
%字体系列设置(粗细、宽度)
\textmd{Medium Series} \textbf{Boldface Series}
{\mdseries Medium Series} {\bfseries Boldface Series}
%字体形状设置(直立,斜体,伪斜体、小型大写)
\textup{Upright Shape} \textit{Italic shape}
\textsl{Slanted Shape} \textsc{Small caps Shape}
{\upshape Upright Shape}{\itshape Italic shape} {\slshape Slanted Shape} {\scshape Small caps Shape}
% 中文字体
{\songti 宋体}\quad {\heiti 黑体}\quad {\fangsong 仿宋}\quad {\kaishu 楷书}
中文字体的\textbf{粗体}与\textit{斜体}
%字体大小
{\tiny He11o}\\
{\scriptsize Hello}\\
{\footnotesize Hello}\\
{\small Hello}\\
{\normalsize Hello}\\
{\large Hello}\\
{\Large Hello}\\
{\LARGE Hello}\\
{\huge Hello}\\
{\Huge Hello}\\
%中文字号设置命令
\zihao{-0} 你好! \zihao{5} 你好!
\myfont
\end{document}
五、撰写提纲
\documentclass{ctexbook}
%=======设置标题的格式========
\ctexset{
section = {
format = \zihao{-4} \heiti \raggedright,
name = {,、},
number = \chinese{section},
beforeskip = 1.0ex plus 0.2ex minus 0.2ex,
afterskip = 1.0ex plus 0.2ex minus 0.2ex,
aftername = \hspace{0pt}
},
subsection = {
format = \zihao{5} \heiti \raggedright,
name = {,、},
number = \arabic{subsection},
beforeskip = 1.0ex plus 0.2ex minus 0.2ex,
afterskip = 1.0ex plus 0.2ex minus 0.2ex,
aftername = \hspace{0pt}
},
subsubsection = {
format = \zihao{5} \songti \raggedright,
name = {,、},
number = \arabic{subsection}.\arabic{subsubsection},
beforeskip = 1.0ex plus 0.2ex minus 0.2ex,
afterskip = 1.0ex plus 0.2ex minus 0.2ex,
aftername = \hspace{0pt}
}
}
\begin{document}
\section{引言}
近年来,随着逆向工程和三维重建技术的发展和应用,获取现实世界中物体的三维数据的方法越来越多的关注和研究。很多研究机构和商业公司都陆续推出了自己的三维重建系统。
\section{实验方法}
\section{实验结果}
\subsection{数据}
\subsection{图表}
\subsubsection{实验条件}
\subsubsection{实验过程}
\subsection{结果分析}
\section{结论}
\section{致谢}
\tableofcontents%产生目录
\chapter{绪论}
\section{研究的目的和意义}
\section{国内外研究现状}
\subsection{国外研究现状}
\subsection{国内研究现状}
\section{研究内容}
\section{研究方法与技术路线}
\subsection{研究内容}
\subsection{技术路线}
\chapter{实验与结果分析}
\section{引言}
\section{实验方法}
\section{实验结果}
\subsection{数据}
\subsection{图表}
\subsubsection{实验条件}
\subsubsection{实验过程}
\subsection{结果分析}
\section{结论}
\section{致谢}
\end{document}
六、特殊字符
\documentclass{article}
\usepackage{ctex} % 中文处理宏包
\usepackage{xltxtra}%提供了针对XeTeX的改进并且加入了XeTex的LOGO
\usepackage{texnames}%一些LOGO
\usepackage{mflogo}
% 正文区(文稿区)
\begin{document}
\section{空白符号}
% 空行分段,多个空行等同1个
% 自动缩进,绝对不能使用空格代替
% 英文中多个空格处理为1个空格,中文中空格将被忽略
% 汉字与其它字符的间距会自动由XeLaTeX处理
% 禁止使用中文全角空格
Are you wiser than others? definitely no. in some ways, may it is true. what can you achieve? a luxurious house? a brillilant car?an admirable career? who knows?
近年来,随着逆向工程和 in someways 三维重建技术的发展和应用,获取现实世界中物体的三维数据的方法越来越多的关注和研究,很多研究机构和商业公司都陆续推出了自己的三维重建系统,
% 1em(当前字体中M的宽度)
a\quad b
% 2em
a\qquad b
% 约为1/6个em
a\,b a\thinspace b
% 0.5个em
a\enspace b
% 空格
a\ b
% 硬空格
a~b
% 1pc=12pt=4.218mm
a\kern 1pc b
a\kern -1em b
a\hspace{35pt}b
%占位宽度
a\hphantom{xyz}b
%弹性长度
a\hfill b
\section{\LaTeX 控制符}
\# \$ \% \{ \} \~ \{ \_ \{ \^ \} \textbackslash \&
\section{排版符号}
\S \P \dag \ddag \copyright \pounds
\section{\TeX 标志符号}
% 基本符号
\TeX{} \LaTeX{} \LaTeXe{}
%xltxtra宏提供
\XeLaTeX
% texnames宏包提供
\AmSTeX{} \AmS-\LaTeX{}
\BibTeX{} \LuaTeX{}
% mflogo宏包提供
\METAFONT{} \MF{} \MP{}
\section{引号}
` ' `` '' 你好`` ''
\section{连字符}
- -- ---
\section{非英文字符}
\oe \OE \ae \AE \aa \AA \o \O \l \L \ss \SS !` ?`
\section{重音符号(以o为例)}
\`o \'o \^o \''o \~o \=o \.o \u{o} \v{o} \H{o} \r{o} \t{o} \b{o} \c{o} \d{o}
\end{document}
七、插入图片
% 导言区
\documentclass{ctexart} % ctexbook, ctexrep
%\usepackage{ctex}
% 导言区:\usepackage{graphicx}
% 语法:\includegraphics[<选项>]{<文件名>}
% 格式:EPS, PDF, PNG, JPEG, BMP
\usepackage{graphicx}
\graphicspath{{D:/ruanjian/texlive/test/}} % 图片在当前目录下的 figures 目录
% 正文区(文稿区)
\begin{document}
\LaTeX{}中的插图:
\includegraphics{i1}
\includegraphics{i2}
\includegraphics{i3}
%更改尺寸
\includegraphics[scale=0.3]{i1}
\includegraphics[scale=0.03]{i2}
\includegraphics[scale=0.3]{i3}
\includegraphics[height=2cm]{i1}
\includegraphics[height=2cm]{i2}
\includegraphics[height=2cm]{i3}
\includegraphics[width=2cm]{i1}
\includegraphics[width=2cm]{i2}
\includegraphics[width=2cm]{i3}
\includegraphics[height=0.1\textheight]{i1}
\includegraphics[height=0.1\textheight]{i2}
\includegraphics[height=0.1\textheight]{i3}
\includegraphics[width=0.2\textwidth]{i1}
\includegraphics[width=0.2\textwidth]{i2}
\includegraphics[width=0.2\textwidth]{i3}
\includegraphics[angle=-45, width=0.2\textwidth]{i1}
\includegraphics[width=0.2\textwidth]{i2}
\includegraphics[angle=45, width=0.2\textwidth]{i3}
\end{document}
八、插入表格
% 导言区
\documentclass{ctexart} % ctexbook, ctexrep
%\usepackage{ctex}
% \begin{tabular}[<垂直对齐方式>]{<列格式说明>}
% <表项> & <表项> & ... & <表项> \\
% ......
% \end{tabular}
% 用\\表示换行
% 用&表示不同的列
% l-本列左对齐
% c-本列居中对齐
% r-本列右对齐
% p{<宽>}-本列宽度固定,能够自动换行
% 正文区(文稿区)
\begin{document}
\begin{tabular}{|l|| c| c| c| p{1.5cm}|}%l左对齐;c居中对齐,r右对齐,空格不起作用
%内容……
\hline
姓名 & 语文 & 数学 & 外语 & 备注 \\
\hline \hline
张三 & 87 & 100 & 93 & 优秀 \\
\hline
李四 & 75 &64 & 52 & 补考另行通知 \\
\hline
王二 & 80 & 82 & 78 & \\
\hline
\end{tabular}
\end{document}
九、表格和图片的混用
\documentclass{ctexart}
\usepackage{graphicx}
\graphicspath{{D:/ruanjian/texlive/test/}} % 图片在当前目录下的 figures 目录
% 浮动体
% 实现灵活分页(避免无法分割的内容产生的页面留白)
% 给图表添加标题
% 交叉引用
% figure环境(table环境与之类似)
% \begin{figure}[<允许位置>]
% < 任意内容 >
% \end{figure}
% <允许位置>参数(默认tbp)
% h,此处(here)-代码所在的上下文位置
% t,页顶(top)-代码所在页面或之后页面的顶部
% b,页底(bottom)-代码所在页面或之后页面的底部
% p,独立一页(page)-浮动页面
% 标题控制(caption、bicaption等宏包)
% 并排与子图表(subcaption、subfig、floatrow等宏包)
% 绕排(picinpar、wrapfig等宏包)
% 正文区(文稿区)
\begin{document}
\LaTeX{}中\TeX 风景见图\ref{fig-landscape}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.3]{i1}
\caption{\TeX 风景}\label{fig-landscape}
\end{figure}
所作的笔记如下(图\ref{fig-tikz})
\begin{figure}[htbp]% 允许各个位置
\centering
\includegraphics[scale=0.3]{i2}
\caption{\LaTeX 中的绘图}\label{fig-tikz}
\end{figure}
当然,在\LaTeX{}中也如以使用表格\ref{tab-score}所示的表格
\begin{table}[h]
\centering
\caption{考试成绩}\label{tab-score}
\begin{tabular}{|l|c|c|c|r|}
\hline
姓名 & 语文 & 数学 & 外语 & 备注 \\
\hline
张三 & 87 & 100 & 93 & 优秀 \\
\hline
李四 & 75 & 64 & 52 & 补考另行通知 \\
\hline
王二 & 80 & 82 & 78 & \\
\hline
\end{tabular}
\end{table}
\end{document}
十、公式的插入
% 导言区
\documentclass{article}%ctexbook, ctexrep
\usepackage{ctex}
\usepackage{amsmath}
% 正文区(文稿区)
\begin{document}
\section{简介}
\LaTeX{}将排版内容分为文本模式和数学模式。文本模式用于普通文本排版,数学模式用于数学公式排版。
\section{行内公式}
\subsection{美元符号}
交换律是 $a+b=b+a$,如 $1+2=2+1$
\subsection{小括号}
交换律是 \(a+b=b+a\),如 \(1+2=2+1\)
\subsection{math环境}
交换律是 \begin{math}
a+b=b+a
\end{math}
如,\begin{math}
1+2=2+1
\end{math}
\section{上下标}
\subsection{上标}
$3x^{20}-x+2=0$
$3x^{3x^{20}-x+2}-x+2=0$
\subsection{下标}
$a_0,a_1,a_2,...,a_{100},a_{3x^{20}-x+2}$
\section{希腊字母}
$\alpha$
$\beta$
$\gamma$
$\epsilon$
$\pi$
$\omega$
$\Gamma$
$\Delta$
$\Theta$
$\Pi$
$\Omega$
$ \aleph^3+\beta^2+\gamma=0$
\section{数学函数}
$\log$
$\sin$
$\cos$
$\arcsin$
$\arccos$
$\ln$
$\sin^2x+\cos^2x=1$
$y = \arcsin x$
$y = \sin^{-1} x$
$y = \log_2 x$
$y = \ln x$
$\sqrt{2}$
$\sqrt{x^2 + y^2}$
$\sqrt{2 + \sqrt{2}}$
$\sqrt[4]{x}$
\section{分式}
大约是原体积的$3/4$。
大约是原体积的$\frac{3}{4}$。
$\frac{x}{x^2 + x + 1}$
$\frac{\sqrt{x-1}}{\sqrt{x+1}}$
$\frac{1}{1 + \frac{1}{x}}$
$\sqrt{\frac{x}{x^2 + x + 1}}$
\section{行间公式}
\subsection{美元符号}
交换律是 $a+b=b+a$,如 $1+2=2+1=3$
交换律是
\[a+b=b+a\]
如
\[1+2=2+1=3\]
\subsection{displaymath环境}
交换律是
\begin{displaymath}
a+b=b+a
\end{displaymath}
如
\begin{displaymath}
1+2=2+1=3.
\end{displaymath}
\subsection{自动编号公式equation环境}
交换律见式\ref{eq:commutative}
\begin{equation}
a+b=b+a \label{eq:commutative}
\end{equation}
\subsection{不编号公式equation*环境}
交换律见式\ref{eq:commutative2}:
\begin{equation*}
a+b=b+a \label{eq:commutative2}
\end{equation*}
公式的编号与交叉引用也是自动实现的,大家在排版中,要习惯于采用自动化的方式处理诸如图、表、公式的编号与交叉引用
\begin{equation}
x^5 - 7x^3 + 4x = 0 \label{eq:pol}
\end{equation}
\end{document}
十一、矩阵
% 使用ctexart文档类,适合中文短文、报告等,此外还支持ctexbook、ctexrep等文档类
\documentclass{ctexart}
% 若使用ctexart文档类,通常无需再单独使用ctex宏包,若使用标准LaTeX文档类(如article)则需要
%\usepackage{ctex}
% 引入amsmath宏包,它提供了丰富的数学公式排版功能,对于矩阵排版必不可少
\usepackage{amsmath}
\newcommand{\adots}{\mathinner{\mkern2mu%
\raisebox{0.1em}{.}\mkern2mu\raisebox{0.4em}{.}%
\mkern2mu\raisebox{0.7em}{.}\mkern1mu}}
% 正文区开始
\begin{document}
% 使用\[ \]来显示一个无编号的行间公式
\[
% matrix环境生成没有定界符的矩阵
\begin{matrix}
0 & 1 \\
1 & 0
\end{matrix}\qquad
% pmatrix环境生成带小括号的矩阵
\begin{pmatrix}
0 & -i \\
i & 0
\end{pmatrix} \qquad
% bmatrix环境生成带中括号的矩阵
\begin{bmatrix}
0 & -1 \\
1 & 0
\end{bmatrix} \qquad
% Bmatrix环境生成带大括号的矩阵
\begin{Bmatrix}
1 & 0 \\
0 & -1
\end{Bmatrix} \qquad
% vmatrix环境生成带单竖线的矩阵(常用于表示行列式)
\begin{vmatrix}
a & b \\
c & d
\end{vmatrix} \qquad
% Vmatrix环境生成带双竖线的矩阵
\begin{Vmatrix}
a & b \\
c & d
\end{Vmatrix} \qquad
\]
% 可以使用上下标
\[
A = \begin{pmatrix}
a_{11}^2 & a_{12}^2 & a_{13}^2 \\
0 & a_{22} & a_{23} \\
0 & 0 & a_{33}
\end{pmatrix}
\]
% 常用省略号:\dots、\vdots、\ddots 、\adots
\[
A = \begin{bmatrix}
a_{11} & \dots & a_{1n} \\
\adots & \ddots & \vdots \\
0 & & a_{nn}
\end{bmatrix}_{n\times n}
\]
% 分块矩阵(矩阵嵌套)
\[
\begin{pmatrix}
\begin{matrix}1&0\\0&1\end{matrix} & \text{\Large 0} \\
\text{\Large 0} & \begin{matrix}1&0\\0&-1\end{matrix}
\end{pmatrix}
\]
% 三角矩阵
\[
\begin{pmatrix}
a_{11} & a_{12} & \cdots & a_{1n} \\
& a_{22} & \cdots & a_{2n} \\
& & \ddots & \vdots \\
\multicolumn{2}{c}{\raisebox{1.3ex}[0pt]{\Huge 0}} & & a_{nn} \\
\end{pmatrix}
\]
% 跨列的省略号:\hdotsfor{<列数>}
\[
\begin{pmatrix}
1 & \frac{1}{2} & \dots & \frac{1}{n} \\
\hdotsfor{4} \\
m & \frac{m}{2} & \dots & \frac{m}{n}
\end{pmatrix}
\]
% 行内小矩阵 (smallmatrix) 环境
复数 \(z = (x,y)\) 也可用矩阵
\[
\left(
\begin{smallmatrix}
x & -y \\
y & x
\end{smallmatrix}
\right)
\]来表示。
% array环境(类似于表格环境tabular)
\[
\begin{array}{r|r}
\frac{1}{2} & 0 \\
\hline
0 & -\frac{a}{bc} \\
\end{array}
\]
\[
\begin{array}{c@{\hspace{-5pt}}l}
% 第1行,第1列
\left(
\begin{array}{ccc|ccc}
a & \cdots & a & b & \cdots & b \\
& \ddots & \vdots & \vdots & \vdots & \adots \\
& & a & b \\ \hline
& & & c & \cdots & c \\
& & & & \vdots & \vdots \\
\multicolumn{3}{c|}{\raisebox{2ex}[0pt]{\Huge 0}}
& c & \cdots & c
\end{array}
\right)
&
% 第1行第2列
\begin{array}{l}
\left. \rule{0mm}{7mm} \right\}p\\
\\
\left. \rule{0mm}{7mm} \right\}q \\
\end{array}
\\[-5pt]
% 第2行第1列
\begin{array}{cc}
\underbrace{\rule{17mm}{0mm}}_m & \underbrace{\rule{17mm}{0mm}}_m \\
\end{array}
& % 第2行第2列
\end{array}
\]
\end{document}
十二、数学公式排版
\documentclass{ctexart}%ctexbook, ctexrep
%\usepackage{ctex}
\usepackage{amsmath}
\usepackage{amssymb}
% 正文区(文稿区)
\begin{document}
%gather 和gather*环境(可以使用\\换行)
%带编号
\begin{gather}
a+b=b+a \\
ab ba
\end{gather}
\begin{gather*}
3+5 = 5+3 = 8 \\
3 \times 5 = 5 \times 3
\end{gather*}
\begin{gather}
3^2 + 4^2 = 5^2 \notag \\
5^2 + 12^2 = 13^2 \notag \\
a^2 + b^2 = c^2
\end{gather}
% align 和align* 环境(用 & 进行对齐)
% 带编号
\begin{align}
x &= t + \cos t + 1 \\
y &= 2\sin t
\end{align}
% 不带编号
\begin{align*}
x &= t & x &= \cos t & x &= t \\
y &= 2t & y &= \sin(t+1) & y &= \sin t
\end{align*}
% split 环境(对齐采用 align 环境的方式,编号在中间)
\begin{equation}
\begin{split}
\cos 2x &= \cos^2 x - \sin^2 x \\
&= 2\cos^2 x - 1
\end{split}
\end{equation}
% cases 环境
% 每行公式中使用 & 分隔为两部分,通常表示值和后面的条件
\begin{equation}
D(x) = \begin{cases}
1, & \text{如果 } x \in \mathbb{Q}; \\
0, & \text{如果 } x \in \mathbb{R}\setminus\mathbb{Q}.
\end{cases}
\end{equation}
\end{document}
十三、参考文献1
将选项->设置->构建->默认文献工具->BibTex
创建新文件,在下文件中编写文献的详细信息
\documentclass{ctexart}%ctexbook, ctexrep
\usepackage[round]{natbib}%ctex
\bibliographystyle{plainnat}%plain unsrt alpha abbrv
% 正文区(文稿区)
\begin{document}
这是一个参考文献的引用:\citet{mittelbach2004}
这是另一个参考文献的引用:\citep{article}
这是第三篇参考文献的引用:\cite{mittelbach2004}
\bibliography{cite1,cite2}
\nocite{*}%排版未参考文献,不能全部显示参考文献时,清理过程文件
% 一次管理,一次使用
% 参考文献格式:
%\begin{thebibliography}{编号样本}
% \bibitem[记号]{引用标志}文献条目1
% \bibitem[记号]{引用标志}文献条目2
% ......
%\end{thebibliography}
% 其中文献条目包括:作者,题目,出版社,年代,版本,页码等。
% 引用时候可以采用:\cite{引用标志1,引用标志2,...}
% 引用一篇文章\cite{article1} 引用一本书\cite{book1}等等
%\begin{thebibliography}{99}
% \bibitem{article1}陈立辉, 苏伟, 蔡川, 陈晓云. \emph{基于LaTeX的Web数学公式提取方法研究}[J]. 计算机科学, 2014(06)
% \bibitem{book1}William H. Press, Saul A. Teukolsky,
% William T. Vetterling, Brian P. Flannery,
% \emph{Numerical Recipes 3rd Edition:
% The Art of Scientific Computing},
% Cambridge University Press, New York, 2007.
% \bibitem{latexGuide} Kopka Helmut, W. Daly Patrick,
% \emph{Guide to \LaTeX}, $4^{th}$ Edition.
% Available at \texttt{http://www.amazon.com}.
% \bibitem{latexMath} Graetzer George, \emph{Math Into \LaTeX}, Birkh\"auser Boston; 3 edition (June 22, 2000).
%\end{thebibliography}
\end{document}
参考文献:
%文件名:cite1
@BOOK{mittelbach2004,
title = {The {\LaTeX} Companion},
publisher = {Addison-Wesley},
year = {2004},
author = {Frank Mittelbach and Michel Goossens},
series = {Tools and Techniques for Computer Typesetting},
address = {Boston},
edition = {Second}
}
%文件名:cite2
@BOOK{article,
title = {边缘计算},
publisher = {mine},
year = {2025},
author = {pl},
series = {Tools and Techniques for Computer Typesetting},
address = {Boston},
edition = {Second}
}
@BOOK{no,
title = {未参考文献},
publisher = {mine},
year = {2025},
author = {pl},
series = {Tools and Techniques for Computer Typesetting},
address = {Boston},
edition = {Second}
}
@misc{patashnik1988designing,
title={Designing BIBTEX styles},
author={Patashnik, Oren},
year={1988},
publisher={February}
}
十四、参考文献2
打开设置——>构建——>元命令——>biber
未看:打开设置——>命令——>Biber--> biber.exe -l zh_pinyin texfile(指定按拼音排序)
\documentclass{ctexart}%ctexbook, ctexrep
%\usepackage{ctex}
% biblatex/biber
% 新的TEX参考文献排版引擎
% 样式文件(参考文献样式文件--bbx文件, 引用样式文件--cbx文件)使用LATEX编写
% 支持根据本地化排版,如:
% biber -l zh_pinyin texfile, 用于指定按拼音排序
% biber -l zh_stroke texfile, 用于按笔画排序
\usepackage[style=caspervector,backend=biber,utf8]{biblatex}
%\usepackage[style=numeric,backend=biber]{biblatex}
\addbibresource{cite1.bib}
% 正文区(文稿区)
\begin{document}
% 一次管理,多次应用
无格式化引用\cite{biblatex}
带方括号的引用\parencite{a1-1}
上标引用\supercite{6-1}
\nocite{*}
\printbibliography[title={参考文献}]
\end{document}
参考文献
%文件名:cite1
@article{biblatex,
author = {Author, A.},
title = {Title},
journal = {Journal},
year = {2020},
volume = {1},
number = {1},
pages = {1-10},
}
@article{a1-1,
author = {Author, B.},
title = {Another Title},
journal = {Another Journal},
year = {2021},
volume = {2},
number = {2},
pages = {11-20},
}
@article{6-1,
author = {Author, C.},
title = {Yet Another Title},
journal = {Yet Another Journal},
year = {2022},
volume = {3},
number = {3},
pages = {21-30},
}
@BOOK{mittelbach2004,
title = {The {\LaTeX} Companion},
publisher = {Addison-Wesley},
year = {2004},
author = {Frank Mittelbach and Michel Goossens},
series = {Tools and Techniques for Computer Typesetting},
address = {Boston},
edition = {Second}
}
浙公网安备 33010602011771号