有中英文摘要的LaTeX中文模板!!!超实用

有中英文摘要的LaTeX中文模板!!!超实用目录LaTeX中文小模板先上代码代码说明编译结果 LaTeX中文小模板     由于本人受够了mathtype的公式在word文字里面上蹿下跳甚至都显示不完整的尿性,决定入坑LaTeX。本人是初学者,用的是Ctex套装。可以官网下载,建议下载ctex2.9的full版本。因为现在中文论文写的比较多,就先写了一个中文的模板。写的过程中参考了另一位博主,但是找不到了!…

目录

LaTeX中文小模板

先上代码

代码说明

编译结果

 


LaTeX中文小模板 

       由于本人受够了mathtype的公式在word文字里面上蹿下跳甚至都显示不完整的尿性,决定入坑LaTeX。本人是初学者,用的是Ctex套装。可以官网下载,建议下载ctex2.9的full版本。因为现在中文论文写的比较多,就先写了一个中文的模板。写的过程中参考了另一位博主,但是找不到了!!那就指名道姓一下:Simmel,感谢提供精美模板。。

        这个模板有中英文双摘要噢!!之前找了很久都没找到,就自己写了。。

先上代码

        这个这个。。。没有LaTeX的高亮,凑合看吧

%保存为UTF-8编码格式
%用xelatex编译

\documentclass[UTF8,a4paper,12pt]{ctexart}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.50cm]{geometry} %页边距
\CTEXsetup[format={\Large\bfseries}]{section} %设置章标题字号为Large,居左
%\CTEXsetup[number={\chinese{section}}]{section}
%\CTEXsetup[name={(,)}]{subsection}
%\CTEXsetup[number={\chinese{subsection}}]{subsection}
%\CTEXsetup[name={(,)}]{subsubsection}
%\CTEXsetup[number=\arabic{subsubsection}]{subsubsection}  %以上四行为各级标题样式设置,可根据需要做修改

%\linespread{1.5} %设置全文行间距


%\usepackage[english]{babel}
%\usepackage{float}     %放弃美学排版图表
\usepackage{fontspec}   %修改字体
\usepackage{amsmath, amsfonts, amssymb} % 数学公式相关宏包
\usepackage{color}      % color content
\usepackage{graphicx}   % 导入图片
\usepackage{subfigure}  % 并排子图
\usepackage{url}        % 超链接
\usepackage{bm}         % 加粗部分公式,比如\bm{aaa}aaa
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{epstopdf}
\usepackage{epsfig}
\usepackage{longtable}  %长表格
\usepackage{supertabular}%跨页表格
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{changepage}



%%%%%%%%%%%%%%%%%%%%%%%
% -- text font --
% compile using Xelatex
%%%%%%%%%%%%%%%%%%%%%%%
% -- 中文字体 --
%\setCJKmainfont{Microsoft YaHei}  % 微软雅黑
%\setCJKmainfont{YouYuan}  % 幼圆
%\setCJKmainfont{NSimSun}  % 新宋体
%\setCJKmainfont{KaiTi}    % 楷体
\setCJKmainfont{SimSun}   % 宋体
%\setCJKmainfont{SimHei}   % 黑体

% -- 英文字体 --
\setmainfont{Times New Roman}
%\setmainfont{DejaVu Sans}
%\setmainfont{Latin Modern Mono}
%\setmainfont{Consolas}
%
%
\renewcommand{\algorithmicrequire}{ \textbf{Input:}}     % use Input in the format of Algorithm
\renewcommand{\algorithmicensure}{ \textbf{Initialize:}} % use Initialize in the format of Algorithm
\renewcommand{\algorithmicreturn}{ \textbf{Output:}}     % use Output in the format of Algorithm
\renewcommand{\abstractname}{\textbf{\large {摘\quad 要}}} %更改摘要二字的样式
\newcommand{\xiaosi}{\fontsize{12pt}{\baselineskip}}     %\xiaosi代替设置12pt字号命令,不加\selectfont,行间距设置无效
\newcommand{\wuhao}{\fontsize{10.5pt}{10.5pt}\selectfont}

\usepackage{fancyhdr} %设置全文页眉、页脚的格式
\pagestyle{fancy}
\lhead{}           %页眉左边设为空
\chead{}           %页眉中间
\rhead{}           %页眉右边
%\rhead{\includegraphics[width=1.2cm]{1.eps}}  %页眉右侧放置logo
\lfoot{}          %页脚左边
\cfoot{\thepage}  %页脚中间
\rfoot{}          %页脚右边


%%%%%%%%%%%%%%%%%%%%%%%
%  设置水印
%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage{draftwatermark}         % 所有页加水印
%\usepackage[firstpage]{draftwatermark} % 只有第一页加水印
% \SetWatermarkText{Water-Mark}           % 设置水印内容
% \SetWatermarkText{\includegraphics{fig/ZJDX-WaterMark.eps}}         % 设置水印logo
% \SetWatermarkLightness{0.9}             % 设置水印透明度 0-1
% \SetWatermarkScale{1}                   % 设置水印大小 0-1

\usepackage{hyperref} %bookmarks
\hypersetup{colorlinks, bookmarks, unicode} %unicode



\title{\textbf{\Large{Carol的中文\LaTeX{}模板}}}
\author{ Carol\thanks{simmel} }
\date{\today}



\begin{document}

\maketitle
%\tableofcontents

\begin{abstract}
这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。

这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。这里是中文摘要。
\end{abstract}

\begin{center}
\large{\textbf{Abstract}}
\end{center}

\begin{adjustwidth}{1cm}{1cm}
\hspace{1.5em}Here is the first par. of abstract.Here is the first par. of abstract.Here is the first par. of abstract.Here is the first par. of abstract.Here is the first par. of abstract.Here is the first par. of abstract.Here is the first par. of abstract.Here is the first par. of abstract.Here is the first par. of abstract.Here is the first par. of abstract.Here is the first par. of abstract.

\noindent\hspace{1.5em}Here is the second par. of abstract.Here is the second par. of abstract.Here is the second par. of abstract.Here is the second par. of abstract.Here is the second par. of abstract.Here is the second par. of abstract.Here is the second par. of abstract.Here is the second par. of abstract.
\end{adjustwidth}

\thispagestyle{empty}       %本页不显示页码
\newpage                    %分页
%\tableofcontents\thispagestyle{empty}
\newpage
\setcounter{page}{1}        %从下面开始编页,页脚格式为导言部分设置的格式


\section{第一部分}
这是第一部分
\subsection{第一部分的子部分}
这里是第一部分的子部分

\section{第二部分}
这里是第二部分
\subsection{第二部分的子部分}
这里是第二部分的子部分

\section{一些工具}
插入公式
\begin{equation}\label{eq}
  \gamma _2^{\text{C}} = \frac{
  
  {
  
  {P_{RT}}g}}{
  
  {
  
  {P_{BT}}d_{_{
  
  {B_2}2}}^{ - \alpha } + {N_0}}}
\end{equation}

%插入图片
%\begin{figure}[H]   %*表示可跨栏,如果不需要可去掉
%\centering
%\subfigure[$\sum {
  
  {I_C}}  < {I_B}$]{
%  \includegraphics[width=7cm]{1.eps}}
%  %\hspace{0cm}      %两张图片之间的距离
%%\hfill               %撑满整行
%\centering
%\subfigure[$\sum {
  
  {I_C}}  > {I_B}$]{
%  \includegraphics[width=7cm]{2.eps}}
%\caption{系统的模式选择}\label{fig}
%\end{figure}

插入表格
\begin{table}[H] \wuhao             %局部字体设置大小
   \centering
  \caption{系统模型符号}\label{tab}
  \begin{tabular}{c|c}
    \toprule                  %设置为顶线默认格式 加粗
    % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
    符号 & 说明 \\
    \hline                  %普通横线
    ${
  
  {B_1}\mbox{、}{B_2}}$ & 基站的下标表示 \\
    ${C_1}\mbox{、}{C_2}$ & 蜂窝用户的下标表示 \\
    $D$ & D2D用户的下标表示 \\
    $R$ & 中继用户的下标表示 \\
    ${P_{it}}\left( {i = B,C,D,R} \right)$ & 终端$i$的发射功率 \\
    ${d_{ij}}(i,j = {B_k},{C_k},1,2,R;i \ne j,k = 1,2)$ & 设备$i$到设备$j$的距离 \\
    ${h_{ij}}(i,j = {B_k},{C_k},1,2,R;i \ne j,k = 1,2)$ &$i$-$j$ 链路的信道系数\\
    ${n_i}\left( {
  
  {n_i}\sim N\left( {\mu ,{N_0}} \right)} \right)$ & 高斯白噪声 \\
    ${P_{ij}} = {P_{iT}}d_{ij}^{ - \alpha }$ & 终端$j$收到的终端$i$发送的信号功率\\
    $\alpha$ & 路径衰落系数 \\
    \bottomrule                %设置为底线默认格式
  \end{tabular}
\end{table}

引用:图\ref{fig},式\eqref{eq},表\ref{tab}

\end{document}

代码说明

  • 保存时选择UTF-8格式
  • 编译用xelatex
  • 如果编译不通过,尝试在菜单栏中Document-Document Settings-Formate的下拉栏中选择UTF8
  • 摘要部分的英文摘要没有在环境内写,但是现在很多中文论文需要英文的摘要。。就强行加了一个英文摘要,目前还没有找到更好的解决办法
  • 本代码所列出来的宏包比较多,并不是都用得到,只是为了方便
  • 公式部分在mathtype中打好直接复制进LaTeX,如果公式中有中文,强转格式会报错,那就在中文外面套上\mbox{}即可
  • 代码中给了插入图片的内容,但是是eps格式,不好上传。如果要编译这段代码,可自行将eps格式的文件与源文件(.tex)放在同一个目录下。下文将给出图片的编译结果
  • jpg格式的图片在LaTeX环境中没有eps格式的清晰,但也可以实现
  • 跨页表格或长表格本人暂时还没有吃透,会继续努力的

相关博客

中文模板之更改章节样式

设置文本居中左对齐,居中右对齐

编译结果

 

预览

预览

 

预览

 

       最后最后!!希望大家不再被排版所困扰,专注于文章内容的撰写~~~

       后续会对代码的每一部分做一些简单介绍

今天的文章有中英文摘要的LaTeX中文模板!!!超实用分享到此就结束了,感谢您的阅读。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/7637.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注