CTEX的一些常用技巧

下面总结一些在CTEX下常用的一些语法和技巧。

公式输入

行内公式

$a=b$
$y=\sum_{n=0}^{n=100}f(n)$

这是一个行内公式 a=b .
这又是一个行内公式 y=n=100n=0f(n) .

行间公式

% 方式1,不带标号,不推荐使用$$ $$的方式
\[
a=b+c \\
y=\sum_{n=0}^{n=100}f(n)
\]
% 方式2,带标号,不需要标号时,equation后面加*,(equation*)
\begin{equation}
a=b+c \\
y=\sum_{n=0}^{n=100}f(n)
\end{equation}

方式1:(行间公式sum的下标默认在正下方)

a=b+cy=n=0n=100f(n)

方式2:
a=b+c(1)
y=n=0n=100f(n)(2)

矩阵输入

%这是最推荐的方式,应该是带编号的
\begin{equation}
\left[
\begin{matrix}
r_2 \\
g_2 \\
b_2
\end{matrix}
\right]
=
M
\left[
\begin{matrix}
r_1 & 1 \\
g_2 & 2\\
b_2  &3\\
1 & 4
\end{matrix}
\right] 
\end{equation}

这是一个矩阵输入:

r2g2b2=Mr1g2b211234(3)

章节,段落

%标题
\section{一级标题}
\subsection{二级标题}
\subsubsection{三级标题}
%段落,这个会出现一个空行
\paragraph{}
%缩进与不缩进,一般放在段落开头
\indent
\noindent

插图

并排三张图的插图代码如下:

%h(here),t(top),b(bottom),p(page?浮动的意思),这几个字母用于表示选择图片位置的顺序
\begin{figure}[htbp]
%居中
\centering
%7.4cm是这个minipag的宽度,可以通过计算得到
\begin{minipage}[htbp]{7.4cm}
%horizon space,图片横向间隔
\hspace{0.1cm}
\begin{minipage}[htbp]{0.6cm}
\centering
\includegraphics[height=2.36cm]{fig/weight_1.eps}
\end{minipage}
\hspace{0.2cm}
\begin{minipage}[htbp]{6.5cm}
\centering
\includegraphics[height=3cm]{fig/weight_2.eps}
\end{minipage}
\end{minipage}
\hspace{0.2cm}
\begin{minipage}[htbp]{7.8cm}
\centering
\includegraphics[height=3cm]{fig/compensate_one_by_one.eps}
\end{minipage}
\begin{minipage}[htbp]{7.4cm}
\hspace{0.1cm}
\begin{minipage}[htbp]{0.6cm}
\centering
\centerline{(a)}
\end{minipage}
\hspace{0.2cm}
\begin{minipage}[htbp]{6.5cm}
\centering
\centerline{(b)}
\end{minipage}
%这幅图的label,论文别处可以通过这个label引用引用格式\ref{label}
\label{fig:figure4}
\caption{(a):WS-PSNR的权重因子图;(b):一幅等距圆柱投影全景图上的采样密度分布}
\end{minipage}
\hspace{0.3cm}
\begin{minipage}[htbp]{7.8cm}
\centering
\caption{依次进行亮度补偿,红色边框图像是基准图像}
\label{fig:figure5}
\end{minipage}
\end{figure}

插图效果如下:
这里写图片描述

表格

%%% 可在文中使用 表\ref{tab1} 引用表编号
\begin{table}[!t]
\footnotesize
\caption{表格标题}
\label{tab:table2}
\tabcolsep 10pt %space between two columns. 用于调整列间距
\centering
%如果使用\begin{tabular}{\textwidth}{cc}则不能自适应宽度
\begin{tabular}{cc}
\toprule
  第一列 & 第二列 \\\hline
  1 & 2\\
\bottomrule
\end{tabular}
\end{table}

引用

%论文中使用 \cite{1}的方式引用
\bibitem{1} 黎**, 王**, 张**, 等. 引用的标题. 中国科学: 信息科学, 2014, 44: 1–?, doi: xxxxxxxx

备注

以上总结是在投稿中文期刊《中国科学-信息科学》时的一些总结,其中编译器使用CCT&LaTex,仅供参考。

猜你喜欢

转载自blog.csdn.net/smallflyingpig/article/details/78497246