这与latex模板cls中的twoculumn定义有关,直接查看cls文档即可
在\begin{document}之前加入
\usepackage{CJK}%中文字体包--中文字体使用--投稿时应删除在\begin{document}之后第一行加入
\begin{CJK}{GBK}{song}%kai,楷体,song,宋体准备使用汉字--中文字体使用--投稿时应删除之后就可以愉快的使用汉字了。
如果cls文件没有相关的定义,复制下面的代码到cls文件中:
%%%%%%%%%%%%目录内容%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % used only by IEEEtran's IEEEeqnarray as other packages may % have their own, different, implementations \newcounter{IEEEsubequation}[equation] % as shown when called by user from \ref, \label and in table of contents \def\thesection{\Roman{section}} % I \def\thesubsection{\thesection-\Alph{subsection}} % I-A \def\thesubsubsection{\thesubsection.\arabic{subsubsection}} % I-A.1 \def\theparagraph{\thesubsubsection.\alph{paragraph}} % I-A.1.a \def\theequation{\arabic{equation}} % 1 \def\theIEEEsubequation{\theequation\alph{IEEEsubequation}} % 1a (used only by IEEEtran's IEEEeqnarray) % Main text forms (how shown in main text headings) % V1.6, using \thesection in \thesectiondis allows changes % in the former to automatically appear in the latter \def\thesectiondis{\thesection.} % I. \def\thesubsectiondis{\Alph{subsection}.} % B. \def\thesubsubsectiondis{\arabic{subsubsection})} % 3) \def\theparagraphdis{\alph{paragraph})} % d) % just like LaTeX2e's \@eqnnum \def\theequationdis{{\normalfont \normalcolor (\theequation)}}% (1) % IEEEsubequation used only by IEEEtran's IEEEeqnarray \def\theIEEEsubequationdis{{\normalfont \normalcolor (\theIEEEsubequation)}}% (1a) % redirect LaTeX2e's equation number display and all that depend on % it, through IEEEtran's \theequationdis \def\@eqnnum{\theequationdis} % LIST OF FIGURES AND TABLES AND TABLE OF CONTENTS % \def\@pnumwidth{1.55em} \def\@tocrmarg{2.55em} \def\@dotsep{4.5} \setcounter{tocdepth}{3} % adjusted some spacings here so that section numbers will not easily % collide with the section titles. % VIII; VIII-A; and VIII-A.1 are usually the worst offenders. % MDS 1/2001 \def\tableofcontents{\section*{Contents}\@starttoc{toc}} \def\l@section#1#2{\addpenalty{\@secpenalty}\addvspace{1.0em plus 1pt}% \@tempdima 2.75em \begingroup \parindent \z@ \rightskip \@pnumwidth% \parfillskip-\@pnumwidth {\bfseries\leavevmode #1}\hfil\hbox to\@pnumwidth{\hss #2}\par% \endgroup} % argument format #1:level, #2:labelindent,#3:labelsep \def\l@subsection{\@dottedtocline{2}{2.75em}{3.75em}} \def\l@subsubsection{\@dottedtocline{3}{6.5em}{4.5em}} % must provide \l@ defs for ALL sublevels EVEN if tocdepth % is such as they will not appear in the table of contents % these defs are how TOC knows what level these things are! \def\l@paragraph{\@dottedtocline{4}{6.5em}{5.5em}} \def\l@subparagraph{\@dottedtocline{5}{6.5em}{6.5em}} \def\listoffigures{\section*{List of Figures}\@starttoc{lof}} \def\l@figure{\@dottedtocline{1}{0em}{2.75em}} \def\listoftables{\section*{List of Tables}\@starttoc{lot}} \let\l@table\l@figure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%具体位置根据个人模板情况
在tex文件中添加:
\begin{document} \tableofcontents%目录插入位置如果你的文档是英文的,那么此时就会出现目录
问题是此时编译时将巨慢,慎用此命令,目测随便一个文档,编译时间都是30s起步!
注意一个小问题,第一遍编译时可能不通过,在编译一次就可以了。
如果你的目录是中文的,恭喜你,你的目录极有是乱码。这里有两种现象:1、你的pdf文档中的目录内容是乱码;2、你的pdf左侧的目录栏内的字符时乱码;
这是两个问题,所以分别解决。
此时肯定是你的语法顺序有问题,检查下面位置的这段代码,看是否一致,不一致请自行改正;
\begin{document} \begin{CJK}{GBK}{song} \tableofcontents这个有写大牛将gbk2uni按钮化,不失为一种解决方法,我的方法是dos下
cd 文件夹名 %进入"文件夹名"目录下 gbk2uni 文件名.out pdflatex 文件名.tex问题解决
原本想法是将上面语句写成bat文件,发现pdflatex无法识别*.tex,所以作罢。不过如果自己使用的话,这种方法确实可行的。因为只需要将文件名字确定下来就好办, 不用每次都到dos里运动,编写好之后,点击运行就可以了。
文献模板3.zip发送至q邮箱。
最终效果图