latex中文简易模板,课程论文使用

##效果图
latex中文简易模板,课程论文使用_第1张图片
latex中文简易模板,课程论文使用_第2张图片
latex中文简易模板,课程论文使用_第3张图片
本教程一定要配合代码来看,下面有附录源码了,代码文件也已上传CSDN资源戳这里下载资料文件
##tex安装
看这个链接就可以了
我安装的是texlive,自带的texwork还挺好用,如果打开模板中文是乱码,是utf8编码和gbk编码的问题,右下角更换编码方式,参加下面常见问题1。
##从头到尾的奶妈式教程

  1. \documentclass[UTF8,a4paper,11pt]{article}
    这是latex最基本命令,设置文档格式
    这里面中间有讲哦
    这里的UTF8选项是用于中文编码->戳这里看性感ctex在线中文编码
  2. \usepackage{…}
    使用宏包->戳这里看常用宏包
    本教程所用宏包的用途
    1. ctex——中文支持
    2. fancyhdr——设置页眉页脚戳这里看页眉页脚设置
    3. multicol——单双栏混排
    4. lastpage——用于获得最大页数
    5. geometry——用于设置页边距戳这里看geometry使用规则
    6. graphfig——插入图像(集合subfigure,float,graphics)你懂吧,戳了自己看
      一般来说,完整版texlive已经有各种宏包,如果要额外加,戳这个教程看宏包安装注意自己复制sty文件的话需要texhash!!
  3. 定义页边距:根据各人喜好设置就行
  4. 页眉页脚:重定义plain类型,由于每页默认plain,就一致了。如果有特殊就在那一页定义并应用一个fancy
  5. 标题摘要关键词等等 ,自己照着调就可以了
  6. 目录页如果不想单独一页的话可以吧\newpage改成\par
  7. 引用的文献的…照着做挺好,我没有研究
  8. 列表戳这里->列表有3种用法
  9. 插入图片有点麻烦,目前我推荐简单的论文采用graphfig包,简单的子图插入很方便->性感graphfig在线插图figure*和figure不同的地方在于可以跨栏(通栏)
  10. 表格很麻烦,给你个教程自己体会,table环境和figure近似
  11. 公式通过mathtype,mathtype菜单栏preference->cut and copy preference设置好后直接复制粘贴就好

##常见问题

  1. utf-8还是GBK
    utf-8编码是国际编码,英语字符占1一个字节,中文字符则用3个字节来编码;而GBK是国家编码,无论中英文都用2个字节。国际上通用utf-8,外文网站查看utf-8无需额外操作,如果要查看GBK则需要额外的中文解码器。所以,考虑到程序猿的特性,个人建议utf-8。两种编码可以在线转->性感utf-8 && GBK在线转化
  2. 双栏情况下不能顺利插入单栏图片
    戳这里看解决方案
  3. 多图插入,我就找个教程 照着弄就行

##源码

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% LaTeX 模板,主要针对 A4 纸的中文Paper。
%%
%% Ver 1.0 By Tstar RLCgroup
%%
%% You can mofify it and distribute it freely ?
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 文章模板:utf-8编码,A4 纸,10磅,文章类型为article,
% 这里设置UTF8后,下面只需要使用ctex包就能直接用中文
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[UTF8,a4paper,10pt]{article}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% packages
% 这部分声明需要用到的包
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{ctex} % 中文支持
\usepackage{fancyhdr}
\usepackage{multicol} % 正文单双栏混排
\usepackage{lastpage} % 用于获得最大页数,页眉显示用
\usepackage{geometry} % 用于设置页边距
\usepackage[subfigure,AllowH]{graphfig} %图片相关

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%定义页边距
%geometry使用手册
%http://www.ctex.org/documents/packages/layout/geometry.htm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\geometry{left=3cm,right=3.8cm,top=2.5cm,bottom=2.5cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%定义行间距为1.1倍行距
\renewcommand{\baselinestretch}{1.1}
%重新定义缩进长度 pt是字号
\parindent 22pt

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 页眉页脚定义
% 因为首页会自动定义成plain格式 http://www.ctex.org/documents/packages/layout/fancyhdr.htm
% but我喜欢每一页都有页眉,so重定义plain型,
% 后面就全设置成plain型好了orz,其实应该改成fancy型再设置fancy的属性
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fancypagestyle{plain}{
\fancyhf{}
\lhead{Month, Year}
\chead{\centering{chinese latex template}}
\rhead{Page \thepage\ of \pageref{LastPage}}
\lfoot{}
\cfoot{}
\rfoot{}}
\pagestyle{plain}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 标题,作者,通信地址定义
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% texbf{…}为加粗
% huge{…}等等调节字体的
\title{\textbf{\huge{Latex中文模板}}}
\author{author1,author2\
(南京大学工程管理学院)}
\date{} % 这一行用来去掉默认的日期显示

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 文章正文
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 此行使文献引用以上标形式显示
\newcommand{\supercite}[1]{\textsuperscript{\cite{#1}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 显示title
\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 中文摘要
% 调整摘要、关键词,中图分类号的页边距
% 中英文同时调整
% 因为geometry命令不能用在正文区只能用这看起来很麻烦的方法了orz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\oddsidemargin}{ 1cm} % 3.17cm - 1 inch
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textwidth}{13.50cm}
%添加标题和摘要的距离
%vspace{…}是竖直距离
%hspace{…}是水平距离
\vspace{-0.2cm}
%center是居中用的
\begin{center}
%在这里写中文摘要
%heiti表示…黑体,kaishu是楷书,还有songti宋体,lishu隶书,fangsong仿宋
\parbox{\textwidth}{
{\heiti 摘~~~要}\quad {\kaishu 这是一个菜菜的latex中文模板,课程论文、大作业的时候可以用用吧。}\
{\heiti 关键词} \quad {\kaishu latex,菜菜的,中文模板,课程论文}}
\end{center}
\vspace{0.5cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 英文摘要
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \为换行,可以附加行间距;\par是结束并开始下一段,多一个首行缩进
\begin{center}
\large{\textbf{chinese latex template}}\

%writer and communication address
\textbf{author1, author2}\[2pt]
\small{\textit{(Nanjing University, School of Management and Engineering, Department of Automation)}}\[14pt]
\parbox{\textwidth}{
%English abstract
\small{\textbf{Abstract}\quad This is a basic chinese latex template for novice,could be used for course eassy\
%English key word
\textbf{Key Words}\quad latex, basic, chinese template, course eassy}}
\end {center}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 目录页-------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\tableofcontents
\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 正文由此开始-------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 恢复正文页边距
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\oddsidemargin}{-.5cm} % 3.17cm - 1 inch
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textwidth}{17.00cm}

\section{引用文献}
%\indent 为首行缩进
%引用文献
\indent 文献\supercite{ref1,ref2}中提到:南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛
\subsection{列表}
\begin{itemize}
\item 身是菩提树,心如明镜台
\item 时时勤拂拭,勿使惹尘埃.
\item 菩提本无树,明镜亦非台
\item 本来无一物,何处惹尘埃.
\end{itemize}
南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛
\section{插入图片}
\begin{Figure}[H]{aaa}[qwad]
%pic和tex文件保存在同一路径下
\graphfile[30]{1.png}[picture]
%相对路径(推荐),可以在tex所在路径建立一个fig 文件夹放图片
%\graphfile[60]{fig//1.png}[picture]
%绝对路径,从电脑任意位置寻找图片
%\graphfile[30]{C://Users//TstarYSY//Desktop//fig//1.png}[picture]
\end{Figure}
\vspace{3ex}
% \noindent 取消首行缩进
\noindent 南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛\par
南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛
\par
\begin{Figure}[H]{asdf}[111]
\graphfile[34]{1.png}[picture1]
\graphfile[36]{1.png}[picture2]
\par
\end{Figure}
\section{表格}
南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛
\par
\vspace{3ex}
\begin{table}[h]
\centering
%{|l|c|c|}指明有3列而且对其方式是左中中,|表示要加竖线
%\hline表示添加横线
\begin{tabular}{|l|c|c|}\hline
%&表示一个单元格内容结束
%multicolumn{n}{…}{…}表示合并n个单元格,指明对齐方式和内容
Setting&\multicolumn{2}{c|}{A4 size paper}\\hline
&mm&inches\
Top&25&1.0\
Bottom&25&1.0\
Left&20&0.8\
Right&20&0.8\
Column Width&82&3.2\
Column Spacing&6&0.25\\hline
\end{tabular}
\caption{a table}
\label{tab:table1}
\end{table}
\vspace{3ex}
\noindent 南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛
\section{公式}
南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛
\noindent
\begin{figure}[h]
\begin{minipage}[h]{0.48\linewidth}
[\alpha \ge \delta {\rm{ + }}\overline {\eta * \beta } ]
\end{minipage}
\begin{minipage}[h]{0.48\linewidth}
[\left[ {\begin{array}{*{20}{c}}
{{a_1}}&{{a_2}}&\alpha &\beta \
\chi &\varphi &\gamma &\eta \
\theta &{{\zeta _3}}&\xi &\omega
\end{array}} \right]]
\end{minipage}
\vspace{3ex}
\caption{aaa}
\end {figure}
\par\noindent
南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛南无阿弥陀佛
\section{结束}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 参考文献
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\small
\begin{thebibliography}{99}
\setlength{\parskip}{0pt} %段落之间的竖直距离
\bibitem{ref1}吴承恩. 西游记~[M], 明14XX年.
\bibitem{ref2} 玄奘. 大唐西域记学报~[J], 唐6XX年, 1(2): 23-55.
\end{thebibliography}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 文章结束
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\end{document}

你可能感兴趣的:(latex中文简易模板,课程论文使用)