我正在编写一份较长的项目报告,应该采用这种IEEEtran
格式。由于这份文件长达 100 多页,我们觉得最好把它写成论文而不是研究论文。基本上,我们想把它分成几个章节。
但是,据我了解,该\chapter
环境仅适用于文档类型report
(也许scrreprt
)。IEEEtran
另一方面,格式适用于分为几个“部分”而不是“章节”的研究文章。我无法在其中使章节发挥作用。
我怎样才能完成必要的事情?
答案1
尝试将其插入到序言中(未测试,所以可能会把一切都搞乱):
\makeatletter
\newcounter{chapter}
\ifCLASSOPTIONcompsoc
\def\thechapter{\arabic{chapter}}
\ifCLASSOPTIONconference% compsoc conference
\def\thechapterdis{\thechapter.}
\else% compsoc not conferencs
\def\thechapterdis{\thechapter.}
\fi
\else
\def\thechapter{\Roman{chapter}}
\def\thechapterdis{\thechapter.}
\fi
\def\tableofcontents{\chapter*{\contentsname}\@starttoc{toc}}
\def\listoffigures{\chapter*{\listfigurename}\@starttoc{lof}}
\def\listoftables{\chapter*{\listtablename}\@starttoc{lot}}
\def\thebibliography#1{\chapter*{\refname}%
\addcontentsline{toc}{chapter}{\refname}%
% V1.6 add some rubber space here and provide a command trigger
\footnotesize\vskip 0.3\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep\relax
\itemsep \IEEEbibitemsep\relax
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\let\@IEEElatexbibitem\bibitem%
\def\bibitem{\@IEEEbibitemprefix\@IEEElatexbibitem}%
\def\newblock{\hskip .11em plus .33em minus .07em}%
% originally:
% \sloppy\clubpenalty4000\widowpenalty4000%
% by adding the \interlinepenalty here, we make it more
% difficult, but not impossible, for LaTeX to break within a reference.
% IEEE almost never breaks a reference (but they do it more often with
% technotes). You may get an underfull vbox warning around the bibliography,
% but the final result will be much more like what IEEE will publish.
% MDS 11/2000
\ifCLASSOPTIONtechnote\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty100%
\else\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty500\fi%
\sfcode`\.=1000\relax}
\let\endthebibliography=\endlist
\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
\def\@schapter#1{\if@twocolumn
\@topnewpage[\@makeschapterhead{#1}]%
\else
\@makeschapterhead{#1}%
\@afterheading
\fi}
\def\@makeschapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
\newcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 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
\penalty\@highpenalty
\endgroup
\fi}
\makeatother
我从中复制了一些代码book.cls
,并修改了一些 che 代码以IEEEtran.cls
使用chapter
s 而不是section
s。
附录的排版方式不正确。