想用latex写一个中文文档,看上了《自动化学报》的模板,感觉不错,下载下来在本地的tex live上编译,报了一大串错;上传到overleaf,还是报错;原来是这个模板太老了,居然还在用CTex,正经人谁还用已经淘汰了的CTex啊。而且,模板给的老版CTex下载地址http://www.aas.net.cn/UserFiles/File/CTeX-2.4.6-Full.exe根本为空啊,老同志不讲武德啊。这个年轻人CTeX-2.4.6-Full给的ftp也下不了。

那咋整呢,我一个latex小白,翻来覆去思想斗争了一个月,做出了一个违背祖宗的决定,我要魔改这个模板,把模板迁到tex live上来。总的来说,这个模板的问题在于用的CJKpicins等包太落后了,统统改成tex live上的包!
主要改ass.clsass.cfgtemplate.tex三个文件,然后其他的文件统统都可以删了,岂不美哉~

魔改结果:
ass.cls

%%
%%
%%  作者: 自动化所自由软件协会 尚书林 左年明
%%
%% Copyright (C) 2006 by SHANG Shulin<shangsl@gmail.com>,
%%                       ZUO Nianming<nianming@gmail.com>
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3a
%% of this license or (at your option) any later version.
%% The latest version of this license is in:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3a or later is part of all distributions of LaTeX
%% version 2004/10/01 or later.
%%
%% Here we say thanks to cwang.ustc@gmail.com for telling us and fix the bug that
%% AAS can display fangsong font correctly\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{aas}[2006/04/24 v0.3 AAS CJK LaTeX template class] % Need to be changed with new release
%
\LoadClass[a4paper, 10pt,twocolumn,twoside,final]{article}
\RequirePackage{ifthen}
\usepackage{flushend}
\usepackage{ctex}
\usepackage{picinpar}
\usepackage{ccaption}
\RequirePackage{calc}
%
%
%%--------PAGE FORMAT---------%%
\setlength{\topmargin}{0mm}
\setlength{\headsep}{15pt}  % 页眉底 与正文上面之间的距离
\setlength{\headheight}{6mm}
\setlength{\oddsidemargin}{-7mm}
\setlength{\evensidemargin}{-7mm}
\setlength{\voffset}{-0.40in}   % one inch + \voffset 页眉顶到页顶的距离
\setlength{\hoffset}{0mm}
\setlength{\footskip}{3.5em}
\setlength{\columnsep}{6mm} % 设置两栏之间的间距\textwidth \paperwidth%
\textheight \paperheight%
\addtolength\textwidth{-38mm}
\addtolength\textheight{-62mm}
% extra vertical space between paragraphs normally
\setlength{\parskip}{0mm}
% extra vertical space between paragraphs within a list item
%\setlength{\parsep}{0mm}%% 下面两条命令设定displaymath与上下文的间距
\setlength{\abovedisplayskip}{8pt plus 2pt minus 2.5pt}
\setlength{\belowdisplayskip}{8pt plus 2pt minus 2.5pt}\setlength{\doublerulesep}{0.5pt}%% 行距
\renewcommand{\baselinestretch}{1.15} % 1.22 --- 1.25倍行距
\renewcommand{\arraystretch}{1.16}
%
%%------------ Define font -----------------%%
\newcommand{\song}{\CJKfamily{zhsong}}    % 宋体
\newcommand{\fs}{\CJKfamily{zhfs}}    % 仿宋体
\newcommand{\kai}{\CJKfamily{zhkai}}      % 楷体
\newcommand{\hei}{\CJKfamily{zhhei}}      % 黑体
\newcommand{\li}{\CJKfamily{zhli}}        % 隶书
\newcommand{\you}{\CJKfamily{zhyou}}      % 幼圆
\let\songti\song
\let\fangsong\fs
\let\kaishu\kai
\let\heiti\hei
\let\lishu\li
\let\youyuan\you
%
\newlength\aas@linespace
\newcommand{\aas@choosefont}[3]{%\setlength{\aas@linespace}{#1*\real{\baselinestretch}}%\fontsize{#1}{\aas@linespace plus#2 minus #3}\selectfont}\renewcommand\zihao[1]{%
\ifthenelse{\equal{#1}{0}}{%\aas@choosefont{42bp}{.5pt}{.3pt}}{}%
\ifthenelse{\equal{#1}{0-}}{%\aas@choosefont{36bp}{.5pt}{.3pt}}{}%
\ifthenelse{\equal{#1}{1}}{%\aas@choosefont{26bp}{.5pt}{.3pt}}{}%
\ifthenelse{\equal{#1}{1-}}{%\aas@choosefont{24bp}{.5pt}{.3pt}}{}%
\ifthenelse{\equal{#1}{2}}{%\aas@choosefont{22bp}{.5pt}{.3pt}}{}%
\ifthenelse{\equal{#1}{2-}}{%\aas@choosefont{18bp}{.3pt}{.2pt}}{}%
\ifthenelse{\equal{#1}{3}}{%\aas@choosefont{16bp}{.3pt}{.2pt}}{}%
\ifthenelse{\equal{#1}{3-}}{%\aas@choosefont{15bp}{.3pt}{.2pt}}{}%
\ifthenelse{\equal{#1}{4}}{%\aas@choosefont{14bp}{.3pt}{.2pt}}{}%
\ifthenelse{\equal{#1}{4-}}{%\aas@choosefont{12bp}{.3pt}{.2pt}}{}%
\ifthenelse{\equal{#1}{5}}{%\aas@choosefont{10.5bp}{.3pt}{.2pt}}{}%
\ifthenelse{\equal{#1}{5-}}{%\aas@choosefont{9bp}{.2pt}{.1pt}}{}%
\ifthenelse{\equal{#1}{6}}{%\aas@choosefont{7.5bp}{.2pt}{.1pt}}{}%
\ifthenelse{\equal{#1}{-6}}{%\aas@choosefont{6.5bp}{.2pt}{.1pt}}{}%
\ifthenelse{\equal{#1}{7}}{%\aas@choosefont{5.5bp}{.1pt}{.1pt}}{}%
\ifthenelse{\equal{#1}{8}}{%\aas@choosefont{5bp}{.1pt}{.1pt}}{}}%%----- Redefine \tiny \scriptsize \footnotesize\small ----------%%
%%-------------------------\normalsize --------------------------%%
%%---------------\large \Large \LARGE \huge \Huge ---------------%%
%% Refer to ctex
\def\tiny{\zihao{7}}
\def\scriptsize{\zihao{6-}}
\def\footnotesize{\zihao{6}}
\def\small{\zihao{5-}}
\def\normalsize{\zihao{5}}%
\def\large{\zihao{4-}}%
\def\Large{\zihao{3-}}%
\def\LARGE{\zihao{2-}}%
\def\huge{\zihao{2}}%
\def\Huge{\zihao{1}}%
\normalsize % make \baselinestretch take affect
% 改文献的序号[1]为 1
\renewcommand{\@biblabel}[1]{#1}
% 使整篇文章的首段都有缩进
\let\@afterindentfalse\@afterindenttrue\@afterindenttrue
% 参考文献号上标显示
\def\@cite#1#2{\textsuperscript{[{#1\if@tempswa, #2\fi}]}}
%
% 两脚注间的竖直距离
\setlength{\footnotesep}{0pt}
% 重新定义 脚注条
\def\footnoterule{\kern-3\p@ \hrule width .7\columnwidth height 0.4pt \kern 2.6\p@}
%
%%-------- maketitle --------%%
%
\newcommand{\cntitle}[1]{\gdef\aas@cntitle{{\zihao{2-}\hei #1}}}
\newcommand{\cnauthor}[1]{\gdef\aas@cnauthor{\zihao{4-} \fs #1}}
\newcommand{\doi}[1]{\gdef\aas@doi{{\noindent\small {\bf DOI}\quad #1}}}
%
\newcommand{\entitle}[1]{\gdef\aas@entitle{{\large\bf #1}}}
\newcommand{\enauthor}[1]{\gdef\aas@enauthor{\small #1}}
\newcommand{\enaddress}[1]{\gdef\aas@enaddress{{\noindent\small {\bf Citation}\quad #1}}}
\newcommand{\email}[1]{\gdef\aas@email{{\centering\footnotesize (E-mail: #1)}}}
\newcommand{\enabstract}[1]{\gdef\aas@enabstract{{\noindent\small {\bf Abstract}\quad #1}}}
\newcommand{\enkeyword}[1]{\gdef\aas@enkeyword{{\noindent\small {\bf Key words}\quad #1}}}
%
\renewcommand{\refname}{\centering \normalsize\bf References}
%
\renewcommand{\maketitle}{\par\begingroup\def\thefootnote{}%  the \thanks{} mark type is empty\def\footnotemark{}% and kill space from \thanks within author\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%\long\def\@makefntext##1{\parindent 1em\noindent\hb@xt@0.5em{%\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%\twocolumn[\@maketitle]%\thispagestyle{aas@firstheadings}%ssl\@thanks%\endgroup%\setcounter{footnote}{0}%\global\let\thanks\relax%\global\let\maketitle\relax%\global\let\@maketitle\relax%\global\let\@thanks\@empty%\global\let\@author\@empty%\global\let\@title\@empty%\global\let\title\relax%\global\let\author\relax%\global\let\and\relax%
%\global\let\aas@cntitle\relax%\global\let\aas@cnauthor\relax%\global\let\aas@cnaddress\relax%\global\let\aas@cnabstract\relax%\global\let\aas@cnkeyword\relax%\global\let\aas@doi\relax%
%\global\let\cntitle\relax%\global\let\cnauthor\relax%\global\let\cnaddress\relax%\global\let\cnabstract\relax%\global\let\cnkeyword\relax%\global\let\cncl\relax%\global\let\email\relax%\global\let\doi\relax%
%\global\let\aas@entitle\relax%\global\let\aas@enauthor\relax%\global\let\aas@enaddress\relax%\global\let\aas@enabstract\relax%\global\let\aas@enkeyword\relax%
%\global\let\entitle\relax%\global\let\enauthor\relax%\global\let\enaddress\relax%\global\let\enabstract\relax%\global\let\enkeyword\relax%
}
%
\def\@maketitle{%\let\footnote\thanks%\newpage\null% an empty hbox\vskip 1.0\baselineskip%{\centering%{\aas@cntitle\par}%{\title\par}%{%\vskip 0.8em%\vskip 0.8\baselineskip%\begin{tabular}[t]{c}%\aas@cnauthor%\end{tabular}%\vskip 0.3em%\par%}%\vskip 0.2\baselineskip}%{\linespread{1.0}\selectfont\cabstract\par%\vskip 0.2\baselineskip%\ckeyword\par%\vskip 0.2\baselineskip%\caddress\par%  \vskip 0.2\baselineskip% \aas@doi\par}%\vskip 0.7\baselineskip%{\centering%{\aas@entitle\par}%{%\vskip 1.2em%\vskip 0.5\baselineskip%\begin{tabular}[t]{c}%\aas@enauthor%\end{tabular}%\vskip 0.3em%\par%}%\vskip 0.2\baselineskip}%{\linespread{1.0}\selectfont\aas@enabstract\par%\vskip 0.2\baselineskip%\aas@enkeyword\par%\vskip 0.2\baselineskip%\aas@enaddress\par%    }%\vskip 1.5\baselineskip%
}
%---------------- Define biography ----------------%%
\newenvironment{biography}[1][]{
\vskip 0.4\baselineskip%
\zihao{5-}
\begin{window}[1,c, \includegraphics[height=3.0cm,width=2.4cm, keepaspectratio]{#1},{}]\end{window}
}{\vskip 0.4\baselineskip\par}%% For author who has no photo
\newenvironment{biographynophoto}{\vskip 0.4\baselineskip\zihao{5-}}{\vskip 0.4\baselineskip\par}%%---------------- Redefine section -----------------%%
\setcounter{secnumdepth}{3}\renewcommand\thesection {\@arabic\c@section}
\renewcommand\thesubsection   {\thesection.\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection}\renewcommand\section{\@startsection {section}{1}{\z@}%{-1.5ex \@plus -.2ex \@minus -.2ex}%{1.5ex \@plus.2ex}%{\zihao{4-}\hei}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%{-1.0ex \@plus -.2ex \@minus -.2ex}%{1.0ex \@plus .2ex}%                {\zihao{5}\hei}}\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%{-0.5ex \@plus -.2ex \@minus -.2ex}%{0.5ex \@plus .2ex}%                {\normalsize\hei}}
\renewcommand*\l@section[2]{%\ifnum \c@tocdepth >\z@\addpenalty\@secpenalty\addvspace{1.0em \@plus\p@}%\setlength\@tempdima{1.5em}%\begingroup\parindent \z@ \rightskip \@pnumwidth\parfillskip -\@pnumwidth\leavevmode \bfseries\advance\leftskip\@tempdima\hskip -\leftskip#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par\endgroup\fi}% \newenvironment{sloppypar}{\par\sloppy}{\par}\AtBeginDocument{%\flushend\begin{sloppypar}\input{aas.cfg}%\captiondelim{ }\captionnamefont{\small}\captiontitlefont{\small}}
\AtEndDocument{\clearpage\end{sloppypar}}\endinput

ass.cfg:

%%
%%
%%  作者: 中科院自动化所自由软件协会 尚书林 左年明
%%
%% Copyright (C) 2006 by SHANG Shulin<shangsl@gmail.com>, ZUO Nianming
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3a
%% of this license or (at your option) any later version.
%% The latest version of this license is in:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3a or later is part of all distributions of LaTeX
%% version 2004/10/01 or later.
%%
\newcommand*{\cnabstract}[1]{\gdef\cabstract{\noindent{\zihao{6}{\hei 摘{\quad}要}\quad #1}}}
\newcommand*{\cnkeyword}[1]{\gdef\ckeyword{\noindent{\zihao{6}{\hei 关键词}\quad #1}}}
\newcommand*{\cnaddress}[1]{\gdef\caddress{\noindent{\zihao{6}{\hei 引用格式}\quad #1}}}
%
\renewcommand{\figurename}{\song 图}
\renewcommand{\tablename}{\song 表}
%
\makeatletter
%%------------------aas@firstheadings begin------------------------------------%%
\def\ps@aas@firstheadings{\let\@evenhead\@empty\let\@evenfoot\@empty\let\@oddhead\@empty\let\@oddfoot\@empty\def\@evenhead{%\vbox{%\hbox to \textwidth{\zihao{5-}\quad{\zihao{5-}\song 第}\hskip 0.35em XX\hskip 0.35em{\zihao{5-}\song 卷\hskip 0.8em第}\hskip 0.35em X\hskip 0.35em{\zihao{5-}\song 期}\hfill {\zihao{5-} X\hskip 0.79em X\hskip 0.79em X\hskip 0.79em期\hskip 0.79em刊}\hfill Vol.\hskip 0.18em XX, No.\hskip 0.18em X\quad}%\vskip 2.13mm%\hbox to \textwidth{\zihao{5-}\quad2021{\zihao{5-}\song\hskip 0.35em年\hskip 0.35em}4\hskip 0.35em{\zihao{5-}\song 月}\hskip 8mm\hfill xxx Journal\hfill April, 2021\quad}%\vskip 1.35mm%\hrule width\textwidth height0.63pt\vskip0.85pt \hrule width\textwidth height0.63pt%}}%\def\@evenfoot{%\hbox{}%\zihao{5-}$\copyright$ 200X by {\sl Acta Automatica Sinica}. All rights reserved.% }\let\@oddhead\@evenhead%\let\@oddfoot\@evenfoot%
}%%-----------------aas@firstheadings end--------------------------------------%%%%-------------------aasheadings begin----------------------------------------%%
\def\ps@aasheadings{\let\@evenhead\@empty\let\@evenfoot\@empty\let\@oddhead\@empty\let\@oddfoot\@empty\def\@evenhead{%\vbox{%\vskip 3.2mm%\hbox to \textwidth {\hbox{\zihao{5-}\thepage} \hfill \hbox{\zihao{5-}\song X\hskip 2.30em X\hskip 2.30em X\hskip 2.30em期\hskip 2.30em刊} \hfill \hbox{\zihao{5-} XX\hskip 0.18em{\zihao{5-}\song 卷\ }}}%\vskip 2.0mm%\hbox to \textwidth{\noindent\rule[2mm]{\textwidth}{0.5pt}}%}%}\def\@oddhead{%\vbox{%\vskip 3.2mm%\hbox to \textwidth {\quad {\zihao{5-} X\hskip 0.18em}{\zihao{5-}\song 期}\hfill{\zihao{5-}\song这是一个模板}\hfill {\zihao{5-}\thepage}}%\vskip 2.0mm%\hbox to \textwidth{\noindent\rule[2mm]{\textwidth}{0.5pt}}%  }}%
}
%---------------------headings end------------------------------------------%%
\makeatother

template.tex:

\documentclass{aas}
\usepackage{multicol}
\usepackage{subfigure}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{url}
\usepackage{ccaption}
\usepackage{booktabs} % 做三线表的上下两条粗线用\setcounter{page}{1}\begin{document}\cntitle{{\hei\qquad 这是一个模板}% \thanks{收稿日期\%     XXXX-XX-XX%     \quad%     录用日期\%     XXXX-XX-XX}% \thanks{Manuscript received%     Month Date, Year;%     accepted%     Month Date, Year}\thanks{国家自然科学基金(xxxxxx)资助}\thanks{Supported by National Natural Science Foundation of China (xxxx)}% \thanks{本文责任编委\ XXX}% \thanks{Recommended by Associate Editor BIAN Wei}\thanks{1. 华清大学雷系 \ 北京\ 100084}\thanks{1. Department of Thunder, Huatsing University, Beijing 100084}}\cnauthor{大爷$^{\scriptscriptstyle 1}$\hspace{1em}二大爷$^{\scriptscriptstyle 1}$\hspace{1em}三大爷$^{\scriptscriptstyle 1}$
}\cnabstract{本文魔改了自动化学报的模板.}\cnkeyword{Latex,模板}\doi{xxxxxxxxxxxxxxxxxxxxxx}\entitle{This Is a Template}\enauthor{Father$^1$\qquadSecond Father$^1$\qquadThird Father$^1$
}\enabstract{This is a template.}\enkeyword{latex, template}\cnaddress{大爷,二大爷,三大爷. 这是一个模板. xxx期刊, 2021,\textbf{XX}(X): X$-$X}\enaddress{Father, Second Father, Third Father. This Is a Template.\textsl{xxx Journal}, 2021, \textbf{XX}(X): X$-$X}\maketitle\pagestyle{aasheadings}%这一章为引言,无需写标题.本文是魔改《自动化学报》的中文稿件\LaTeX
模版的一个样例和使用说明.模版的中文支持Tex Live.这一章为引言,无需写标题.\section{准备稿件}\end{document}

最后,记得用xelatex编译哦,用pdflatex编译不出来。

结果看起来就跟《自动化学报》差不多啦,咦等等,字号好像差亿点点,我也没改字体大小呀,不过也没关系啦,反正我也不是要投稿,就算要投稿也是格式不限的,接收的时候才要排版吧,到那时候,交给编委的工具人去排版它不香吗,打工人何必为难打工人呢。

魔改《自动化学报》Latex模板相关推荐

  1. 自动化学报latex模板——ctex2.4.6和ctex2.9.2直接使用步骤

    自动化学报latex模板--ctex2.4.6和ctex2.9.2直接使用步骤 1.背景及问题 最近在使用自动化学报latex模板写作业时,一只对latex搞不清楚,网上关于各种版本的latex下载了 ...

  2. 自动化学报latex模板使用说明

    最近投稿自动化学报 用到了学报的latex模板 问题颇多 在此记录 希望能帮助到投稿该学报的人 1.  需下载学报官网的CTex和字体,一步步安装好Ctex后,再将字体复制到 windows/font ...

  3. latex中文支持问题,自动化学报latex模板问题

    mikctex 与 texlive 这两个都是编译工具,都有配有的编辑工具 mikctex对应的有中文CTEX中文套件(已经过时了) texlive对应有texstudio 注意:编辑器可用多个编译工 ...

  4. ubuntu18.04 texstudio下使用自动化学报latex模板的坑

    模板下载地址: http://www.aas.net.cn/news/lunwenmoban.htm 1.缺少picins以及psfig 下载地址: https://ctan.org/tex-arch ...

  5. 使用自动化学报latex模板时,dvi2pdf失败

    出现以下提示: dvi2pdf returned nonzero Exit Code(1) indicating that some probles might have occurred durin ...

  6. 自动化学报latex模板下载

    链接:http://www.aas.net.cn/news/lunwenmoban.htm

  7. 系统工程学报LaTeX 模板使用心得

    系统工程学报LaTeX 模板使用心得 前言 使用篇(仅该部分用到文档) 前言 本文为 B站视频的一个辅助文件.主要针对已经学过,且会用 latex ,但是遇见了系统工程学报这种古董模板又发愁的人. 为 ...

  8. 密码学报Latex模板使用pdf转换成word

    密码学报Latex模板使用 首先从密码学报下载模板 然后注册overleaf账号 创建新项目,把.zip包导入 修改编译器为XeLaTeX 然后点击重新编译即可 pdf转换成word 编写玩文章后,生 ...

  9. 计算机学报latex模板使用方法

    1.登录计算机学报官网: http://cjc.ict.ac.cn/ 2.找到模板下载地址: 3.下载后得到压缩包,解压压缩包. 4.在ctex中打开刚才解压得到文件夹中的可执行文件 5.把对应的地方 ...

  10. 机械工程学报latex模板_高考报志愿:卓越大学联盟E9,华南理工大学,南方电网摇篮,人工智能挺厉害!...

    原标题:高考报志愿:卓越大学联盟E9,华南理工大学,南方电网摇篮,人工智能挺厉害! 卓越大学联盟E9,华南理工大学,南方电网摇篮,人工智能挺厉害! 华南理工大学在理工类大学应该能排第二,我个人认为赶不 ...

最新文章

  1. Java的最大优势还是跨平台么?
  2. Linux程序包管理,YUM命令使用解析。
  3. kubernetes (1)基本概念
  4. python图片解析库_python用来获得图片exif信息的库实例分析
  5. 前端利用CryptoJS进行AES对称加解密(16进制编码)
  6. 人工智能只能用python吗_为什么人工智能用Python?
  7. EXEC和sp_executesql的区别
  8. 分组求和计算_excel聚合、累计、分组累计、分组聚合函数
  9. chrome 调试 ios h5
  10. (林雷看来13):功能优先,发展和重建同步,业绩后
  11. visual什么颜色好用_口红哪个牌子好用?浓郁显白的口红超合适你der
  12. 计算机搜索功能怎么搜内容,怎么让Windows7系统搜索文件内容
  13. 关于折叠屏手机的适配
  14. 《股票大作手操盘术--杰西.利弗莫尔》
  15. c++中整形输入逗号_Excel 2013中单元格添加下拉列表的方法
  16. 为公寓运营商提供SaaS管理系统,寓小二获贝壳找房5000万元A轮融资...
  17. Redis-Java客户端
  18. 绘图工具-PlantUML
  19. Mahout使用入门
  20. SQL server用户Sa登录失败的解决方法

热门文章

  1. 打开天正显示服务器连接不可用,打开天正提示找不到可用cad版本 - 卡饭网
  2. MS Office 2007 Project 安装方法
  3. Java8 Stream流的常用方法和讲解
  4. 人工智能在电气中的应用,电力电子与人工智能
  5. jsonobject json对象里面_将json字符串转为json对象,从对象中取需要的数据
  6. Python中字典及其使用
  7. 从零搭建个人网站服务器
  8. 使用tensorflow和densenet神经网路实现语谱图声纹识别,即说话人识别。
  9. 前端学习日记 -- 五月
  10. 基于Face++使用python+opencv来实现人脸验证及人脸解锁