请选择 进入手机版 | 继续访问电脑版

Latex的中文模板分享~~~

[复制链接]
滚雪球少年 发表于 2021-1-2 12:16:37 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题
LATEX排版

在刚开始学习Latex的时候为了找到一个符合的中文模板费劲了心思,在这里给各人分享我现在在用的Latex模板。
  1. \documentclass[a4paper,11pt,onecolumn,twoside]{article}\usepackage{fancyhdr} %页眉页脚宏包\usepackage{ctex}\usepackage{xcolor}\usepackage{colortbl,booktabs}\usepackage{listings}\usepackage{multicol}\usepackage{picins}  \usepackage{amsmath}\usepackage{indentfirst}\usepackage{subfig}\usepackage{appendix}\usepackage{amsthm}\usepackage[left=1.7cm,right=1.7cm,top=1in,bottom=1in]{geometry}\definecolor{light-gray}{gray}{0.92}%\lstset{language=C}%代码语言抄使用的是matlab %\lstset{breaklines}%自动将长的代码行换行排版%\lstset{extendedchars=false}%办理代码跨页时,章节标题,页眉等汉字不显示的问题\lstset{%%alsolanguage=Java,%language={[ISO]C++},       %language为,另有{[Visual]C++}alsolanguage=[ANSI]C,      %可以添加许多个alsolanguage,如alsolanguage=matlab,alsolanguage=VHDL等%alsolanguage= tcl,alsolanguage= XML,tabsize=4, %  commentstyle=\color{red!50!green!50!blue!50},%浅灰色的注释  showstringspaces=false,%不显示代码字符串中间的空格标志  stringstyle=\ttfamily, % 代码字符串的特殊格式  keepspaces=true, %  breakindent=22pt, %  numbers=none,%左侧显示行号 往左靠,还可以为right,或none,即不加行号  %numberstyle=\tiny, %行号字体用小号  numberstyle={\color[RGB]{0,192,192}\tiny}   basicstyle=\footnotesize, % 这句设置代码的巨细  showspaces=false, %  flexiblecolumns=true, %  breaklines=true, %对过长的代码自动换行  breakautoindent=true,%  breakindent=4em, %  aboveskip=0.1em, %代码块边框  tabsize=1,  showstringspaces=false, %不显示字符串中的空格  backgroundcolor=\color[RGB]{245,245,244},   %代码配景致  %backgroundcolor=\color[rgb]{0.91,0.91,0.91}    %添加配景致  escapeinside={(*@}{@*)},  %在``里显示中文  %% added by http://bbs.ctex.org/viewthread.php?tid=53451  fontadjust,  captionpos=t,  framextopmargin=2pt,framexbottommargin=2pt,abovecaptionskip=-3pt,belowcaptionskip=3pt,  texcl=true,  % 设定中文辩论,断行,列模式,数学情况输入,listing数字的样式  extendedchars=false,columns=flexible,mathescape=true  % numbersep=-1em}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  lengths%    下面的下令重界说页面边距,使其符合中文刊物习惯。%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\addtolength{\topmargin}{0pt}\setlength{\oddsidemargin}{-0.9cm}  % 3.17cm - 1 inch\setlength{\evensidemargin}{\oddsidemargin}\setlength{\textwidth}{17cm}\setlength{\textheight}{24cm}    % 24.62%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\renewcommand{\baselinestretch}{1.1} %界说行间距\parindent 22pt %重新界说缩进长度%界说题目和作者信息\title{\huge{Latex模板实例}}%这是脚注\thanks{收稿日期:~XXXX$-$XX$-$XX. %基金项目:国家自然科学基金资助项目~(51685168)}}\author{goooooodream\\[2pt]\normalsize电子科学与工程学院 \\[2pt]}\date{} % 这一行用往复掉默认的日期显示\fancypagestyle{plain}{\fancyhf{}\lhead{2020~年~5~月~30~日} %    这是页眉的左边%\scriptsize{XXXX~年~XX~月}}\chead{\centering{Latex~~设~~计~~报~~告}}   %可以通过\textbf下令来设置下方的英文字体(如果用英文的话)\rhead{Page:~~\thepage}%\scriptsize{October, 2004}} \lfoot{}\cfoot{}\rfoot{}  %这应该是显示页脚的}\pagestyle{fancy}\fancyhf{}\fancyhead[OR,EL]{Page:~~\thepage}\fancyhead[OC]{\centering{Latex~~设~~计~~报~~告}}\fancyhead[EC]{\centering{《Latex设计陈诉》}}\fancyhead[OL,ER]{2020~年~12~月}\lfoot{}\cfoot{}\rfoot{}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 正文两栏情况不允许float情况,比如 figure, table。所以重新界说% figure,使之可以浮动到你想要的位置。table也同样,把figure改为% table就可以。%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\newenvironment{figurehere}%  {\def\@captype{figure}}%  {}%\makeatother    双栏排版会用到(图片)\renewcommand{\figurename}{图}\renewcommand{\tablename}{表}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  文章正文%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 此行使文献引用以上标形式显示%\newcommand{\supercite}[1]{\textsuperscript{\cite{#1}}}\maketitle%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  中文摘要%  调解摘要、关键词,中图分类号的页边距%  中英文同时调解%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\setlength{\oddsidemargin}{ 1cm}  % 3.17cm - 1 inch\setlength{\textwidth}{13.50cm}\vspace{-.8cm}\begin{center}\parbox{\textwidth}{\heiti{摘~~~要}\quad \kaishu{~这是摘要摘要要要要~~~~~~}\\\heiti{关键词}\quad   %quad下令是留出当前字体下的一个汉字的空格\kaishu{Latex;中文模板}\\%\heiti{中图分类号\quad TG9527}\qquad  %\heiti{文献标识码}\quad A}\end{center}%  文章编号(左上角)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\begin{minipage}[c]{10cm}\vspace{-35.5cm}\end{minipage}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  规复正文页边距%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\setlength{\oddsidemargin}{-.5cm}  % 3.17cm - 1 inch\setlength{\evensidemargin}{\oddsidemargin}\setlength{\textwidth}{17.00cm}%  正文由此开始-------------------------
复制代码
将上述代码加入Latex中就可以添加\section{}就可以写正文了。

来源:https://blog.csdn.net/dachuangdabian/article/details/112056743
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

发布主题

专注素材教程免费分享
全国免费热线电话

18768367769

周一至周日9:00-23:00

反馈建议

27428564@qq.com 在线QQ咨询

扫描二维码关注我们

Powered by Discuz! X3.4© 2001-2013 Comsenz Inc.( 蜀ICP备2021001884号-1 )