LaTex(PART VI) 摘要和关键字

本文介绍了一个使用 LaTeX 排版系统的中文论文模板,详细展示了如何编写包含中英文摘要、关键词以及多级标题的文章结构。该模板适用于撰写学术论文,并提供了页眉页脚的设置方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

摘要

命令
\begin{abstract}
\end{abstract}
示例代码
 \begin{abstract}
这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,
 \end{abstract}
中英文摘要共存:

由于此时是中文环境,需要定义一个新的英文摘要

\newcommand{\enabstractname}{Abstract}
\newenvironment{enabstract}{%
    \par\small
    \noindent\mbox{}\hfill{\bfseries \enabstractname}\hfill\mbox{}\par
    \vskip 2.5ex}{\par\vskip 2.5ex}  
示例代码:
\begin{enabstract}
    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.

    \centering
    \textbf{Keywords:} Abstract, \LaTeXe, English
  \end{enabstract}

关键字

命令
\textbf{关键字:}摘要、\LaTeX、中文

完整示例代码:

\documentclass[UTF8]{ctexart}
\usepackage{fancyhdr}%设置页脚页眉需要的包
\pagestyle{fancy}
\author{哈巴狗} 
\title{我的论文标题}
%这里是页眉
\lhead{西安电子科技大学}%左边
%\chead{中间}%中间
\rhead{硕士研究生毕业设计}%右边
%这里是页脚
%\lfoot{左边}%页脚左边
\cfoot{\thepage}%页脚中间
%\rfoot{右边}%页脚右边
\renewcommand{\headrulewidth}{0.4pt}%页眉
\renewcommand{\headwidth}{\textwidth}
\renewcommand{\footrulewidth}{0.4pt}
\newcommand{\enabstractname}{Abstract}
\newenvironment{enabstract}{%
    \par\small
    \noindent\mbox{}\hfill{\bfseries \enabstractname}\hfill\mbox{}\par
    \vskip 2.5ex}{\par\vskip 2.5ex}  
\begin{document}
  \maketitle%输出标题
  \newpage%另起一页
  \tableofcontents%命令输出论文目录
  \newpage
  \begin{enabstract}
    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.    This is the abstract in English.

    \centering
    \textbf{Keywords:} Abstract, \LaTeXe, English
  \end{enabstract}

  \newpage%另起一页
  \begin{abstract}
这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,这是中文摘要,
  \newline%另起一行

  \centering%使得关键字居中
  \textbf{关键字:}摘要、\LaTeX、中文
  \end{abstract}
  \newpage%另起一页

  \section{第一章,一级标题} 这是第一章
    \subsection{二级标题} 第一章二级标题标题
      \subsubsection{三级标题}
      \subsubsection{三级标题}
      \subsubsection{三级标题}
     \subsection{二级标题} 第一章二级标题标题
      \subsubsection{三级标题}
      \subsubsection{三级标题}
      \subsubsection{三级标题}
  \newpage

  \section{第二章,一级标题} 这是第一章
    \subsection{二级标题} 第二章二级标题标题
      \subsubsection{三级标题}
      \subsubsection{三级标题}
      \subsubsection{三级标题}
     \subsection{二级标题} 第二章二级标题标题
      \subsubsection{三级标题}
      \subsubsection{三级标题}
      \subsubsection{三级标题}
\end{document} 
### 如何在LaTeX中编译含有中文关键字的文档 为了使 LaTeX 文档能够正确处理并显示中文字符,通常需要引入特定宏包来支持多语言环境。一种常见的方式是利用 `ctex` 宏集,它提供了便捷的方式来设置中文排版环境。 #### 使用 CTeX 编译含中文关键词的文档 首先,在文档开头处加载 `ctex` 宏包: ```latex \documentclass{article} \usepackage{ctex} % 加载CTeX宏包以支持中文输入[^1] ``` 接着按照常规方式编写正文部分即可正常插入中文文字以及技术术语等。如果希望进一步定制字体样式或其他细节,则可以通过修改 `\setCJKmainfont{}` 其他相关指令实现更精细控制。 对于包含代码片段的情况,当涉及到带有中文注解或变量名时,推荐采用如下方法展示源码列表: ```latex % 导言区加入listings与xcolor两个宏包用于语法高亮 \usepackage{xcolor} \usepackage{listings} % 配置lstlisting环境参数以便更好地呈现Matlab代码中的中文内容 \lstset{ language=Matlab, basicstyle=\ttfamily\footnotesize, keywordstyle=\bfseries\color{blue}, commentstyle=\itshape\color{green!50!black}, stringstyle=\rmfamily\slshape\color{red}, showstringspaces=false,% 不显示字符串中的空格 numbers=left,% 显示行号的位置 numbersep=8pt,% 行号距离左侧边界的宽度 frame=single,% 给整个代码框加上边框 breaklines=true,% 自动折行功能 extendedchars=\true,% 支持特殊字符编码 inputencoding=utf8/x-ltx,% 设置utf8编码格式 escapeinside={(*@}{@*)}% 转义到LaTeX模式 } \begin{document} 这里是普通的文本描述... \begin{lstlisting}[caption={示例程序}] function y = myFunction(x) % 这是一个简单的函数定义 (*@\textcolor{red}{这是中文注释}@*) y = sin(x); % 计算正弦值 end \end{lstlisting} 继续后续的文字说明... \end{document} ``` 上述配置不仅实现了对 Matlab 代码的基本着色效果,还特别针对其中可能出现的汉字进行了妥善处理,确保其能被清晰识别而不至于引起编译错误。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值