📄 ieeetran.cls
字号:
% *******
%
%
%
%
%
% *******
% 9/2000 (JVH) changes: (now designated as V1.2)
%
% made some corrections to get closer to LaTeX2e
% 20000906 Juergen v.Hagen
% vonhagen@ihefiji.etec.uni-karlsruhe.de
%
% Permission to redistribute granted as of December 2000.
% *******
%
%
%
%
%
% *******
%
% 1996 (JWD) LaTeX2e version: (now designated as V1.1)
%
% In the most recent TeXhax digest, there was a request for a copy of
% IEEEtrans.sty modified to work with LaTeX2e. I have a version I
% modified to make it IEEEtrans.cls, which I have sent to the person
% making the request and am now sending to you to consider posting to
% the archives.
% --
% Jon Dixon
% dixonj@colorado.edu
% http://spot.colorado.edu/~dixonj/
%
%*******
%
%
%
%
%
%*******
%
% 30-August-1993 original LaTeX 2.09 version (IEEEtran.sty),
% (now designated as V1.0):
%
% by Gerry Murray and Silvano Balemi
% Automatic Control Lab, ETH Zurich, Switzerland
% balemi@aut.ee.ethz.ch
%
%*******
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%
%
%
\ProvidesClass{IEEEtran}[2005/09/13 revision V1.6c by Michael Shell]
\typeout{-- See the "IEEEtran_HOWTO" manual for usage information.}
\typeout{-- The source comments contain changelog notes.}
\NeedsTeXFormat{LaTeX2e}
% define new needed flags to indicate document options
% and set a few "failsafe" defaults
\newif\if@twocolumnmode \global\@twocolumnmodetrue
\newif\if@draftversion \global\@draftversionfalse
\newif\if@draftclsmode \global\@draftclsmodefalse
\newif\if@draftclsmodefoot \global\@draftclsmodefootfalse
\newif\if@confmode \global\@confmodefalse
\newif\if@peerreviewoption \global\@peerreviewoptionfalse
\newif\if@peerreviewcaoption \global\@peerreviewcaoptionfalse
% we HAVE to turn off technote as there is no
% "not a tech note" option
\newif\if@technote \global\@technotefalse
% V1.6 we allow the user to control whether or not the
% font interword spacings are tuned to be more like
% that of IEEE. The default is to tune things.
\newif\if@fonttunesettings \global\@fonttunesettingstrue
% V1.6b flag to show if using a4paper
\newif\if@IEEEusingAfourpaper \global\@IEEEusingAfourpaperfalse
% IEEEtran class scratch pad registers
% dimen
\newdimen\@IEEEtrantmpdimenA
\newdimen\@IEEEtrantmpdimenB
% count
\newcount\@IEEEtrantmpcountA
\newcount\@IEEEtrantmpcountB
% token list
\newtoks\@IEEEtrantmptoksA
% we use \@IEEEptsize so that we can ID the point size (even for 9pt docs)
% as well as LaTeX's \@ptsize to retain some compatability with some
% external packages
\def\@IEEEptsize{10}
\def\@ptsize{0}
% LaTeX does not support 9pt, so we set \@ptsize to 0 - same as that of 10pt
\DeclareOption{9pt}{\def\@IEEEptsize{9}\def\@ptsize{0}}
\DeclareOption{10pt}{\def\@IEEEptsize{10}\def\@ptsize{0}}
\DeclareOption{11pt}{\def\@IEEEptsize{11}\def\@ptsize{1}}
\DeclareOption{12pt}{\def\@IEEEptsize{12}\def\@ptsize{2}}
% \@IEEEmarginE is the side margin for equal margins
% \@IEEEmarginW is the wider side margin when the margins are not equal
% NOTE: BOTH of the above margins are as they appear
% on the paper - they are NOT offset by 1 inch
\DeclareOption{letterpaper}{\setlength{\paperheight}{11in}%
\setlength{\paperwidth}{8.5in}%
\def\@IEEEmarginE{0.680in}%
\def\@IEEEmarginW{0.775in}%
\@IEEEusingAfourpaperfalse}
\DeclareOption{a4paper}{\setlength{\paperheight}{297mm}%
\setlength{\paperwidth}{210mm}%
\def\@IEEEmarginE{14.32mm}%
\def\@IEEEmarginW{17mm}
\@IEEEusingAfourpapertrue}
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
\DeclareOption{onecolumn}{\global\@twocolumnmodefalse}
% the file twocolumn.sty is not read as it changes \textwidth.
\DeclareOption{twocolumn}{\global\@twocolumnmodetrue}
% If the user selects draft, then this class AND any packages
% will go into draft mode.
\DeclareOption{draft}{\global\@draftversiontrue \global\@draftclsmodetrue
\global\@draftclsmodefoottrue}
% draftcls is for a draft mode which will not affect any packages
% used by the document.
\DeclareOption{draftcls}{\global\@draftversionfalse \global\@draftclsmodetrue
\global\@draftclsmodefoottrue}
% draftclsnofoot is like draftcls, but without the footer.
\DeclareOption{draftclsnofoot}{\global\@draftversionfalse \global\@draftclsmodetrue
\global\@draftclsmodefootfalse}
% we provide a final option just for completeness (article.cls has one)
\DeclareOption{final}{\global\@draftversionfalse \global\@draftclsmodefalse
\global\@draftclsmodefootfalse}
\DeclareOption{journal}{\global\@peerreviewoptionfalse \global\@peerreviewcaoptionfalse
\global\@confmodefalse \global\@technotefalse}
\DeclareOption{conference}{\global\@peerreviewoptionfalse \global\@peerreviewcaoptionfalse
\global\@confmodetrue \global\@technotefalse}
\DeclareOption{technote}{\global\@peerreviewoptionfalse \global\@peerreviewcaoptionfalse
\global\@confmodefalse \global\@technotetrue}
\DeclareOption{peerreview}{\global\@peerreviewoptiontrue \global\@peerreviewcaoptionfalse
\global\@confmodefalse \global\@technotefalse}
\DeclareOption{peerreviewca}{\global\@peerreviewoptiontrue \global\@peerreviewcaoptiontrue
\global\@confmodefalse \global\@technotefalse}
\DeclareOption{nofonttune}{\global\@fonttunesettingsfalse}
% IEEE uses Times font, so we'll default to times.
% These three commands make up the entire times.sty package.
\renewcommand{\sfdefault}{phv}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\ttdefault}{pcr}
% enable Times now - so that all class options can see the correct font families
\normalfont\selectfont
% default to US letter paper, 10pt, twocolumn, one sided, final, journal
\ExecuteOptions{letterpaper,10pt,twocolumn,oneside,final,journal}
% overrride these defaults per user requests
\ProcessOptions
% we can send console reminder messages to the user here
\AtEndDocument{\if@confmode%
\typeout{}%
\typeout{** Conference Paper **}%
\typeout{Before submitting the final camera ready copy, remember to:}%
\typeout{}%
\typeout{ 1. Manually equalize the lengths of two columns on the last page}%
\typeout{ of your paper;}%
\typeout{}%
\typeout{ 2. Ensure that any PostScript and/or PDF output post-processing}%
\typeout{ uses only Type 1 fonts and that every step in the generation}%
\typeout{ process uses the US letter (8.5in X 11in) paper size.}%
\typeout{}%
\fi}
% warn about the use of single column other than for draft mode
\if@twocolumnmode\else%
\if@draftclsmode\else%
\typeout{** ATTENTION: Single column mode is not normally used with IEEE publications.}%
\fi%
\fi
% V1.6, if the user is using pdflatex, go ahead and set the output paper size.
% Otherwise, we declare the papersize via a \special for dvips.
% We keep the tests within braces because otherwise, if not using pdflatex,
% \pdfpageheight and \pdfpagewidth will be set to \relax - possibly affecting
% similar tests of other packages.
{\@ifundefined{pdfpageheight}{% not using pdflatex, setup paper size for dvips
\if@IEEEusingAfourpaper
\special{papersize=210mm,297mm}%
\else
\special{papersize=8.5in,11in}%
\fi}%
{% using pdftex, set paper size for pdftex
\global\pdfpageheight\paperheight\global\pdfpagewidth\paperwidth}}
% The idea hinted here is for LaTeX to generate markleft{} and markright{}
% automatically for you after you enter \author{}, \journal{},
% \journaldate{}, journalvol{}, \journalnum{}, etc.
% However, there may be some backward compatibility issues here as
% well as some special applications for IEEEtran.cls and special issues
% that may require the flexible \markleft{}, \markright{} and/or \markboth{}.
% We'll leave this as an open future suggestion.
%\newcommand{\journal}[1]{\def\@journal{#1}}
%\def\@journal{}
% pointsize values
% used with ifx to determine the document's normal size
\def\@IEEEptsizenine{9}
\def\@IEEEptsizeten{10}
\def\@IEEEptsizeeleven{11}
\def\@IEEEptsizetwelve{12}
% FONT DEFINITIONS (No sizexx.clo file needed)
% V1.6 revised font sizes, displayskip values and
% revised normalsize baselineskip to reduce underfull vbox problems
% on the 58pc = 696pt = 9.5in text height we want
% normalsize #lines/column baselineskip (aka leading)
% 9pt 63 11.0476pt (truncated down)
% 10pt 58 12pt (exact)
% 11pt 52 13.3846pt (truncated down)
% 12pt 50 13.92pt (exact)
%
% we need to store the nominal baselineskip for the given font size
% in case baselinestretch ever changes.
\newskip\@IEEEnormalsizefontbaselineskip
\@IEEEnormalsizefontbaselineskip\baselineskip
\ifx\@IEEEptsize\@IEEEptsizenine
\typeout{-- This is a 9 point document.}
\def\normalsize{\@setfontsize{\normalsize}{9}{11.0476pt}}%
\setlength{\@IEEEnormalsizefontbaselineskip}{11.0476pt}%
\normalsize
\abovedisplayskip 1.5ex plus3pt minus1pt%
\belowdisplayskip \abovedisplayskip%
\abovedisplayshortskip 0pt plus3pt%
\belowdisplayshortskip 1.5ex plus3pt minus1pt
\def\small{\@setfontsize{\small}{8.5}{10pt}}
\def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}}
\def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}}
\def\tiny{\@setfontsize{\tiny}{5}{6pt}}
% sublargesize is the same as large - 10pt
\def\sublargesize{\@setfontsize{\sublargesize}{10}{12pt}}
\def\large{\@setfontsize{\large}{10}{12pt}}
\def\Large{\@setfontsize{\Large}{12}{14pt}}
\def\LARGE{\@setfontsize{\LARGE}{14}{17pt}}
\def\huge{\@setfontsize{\huge}{17}{20pt}}
\def\Huge{\@setfontsize{\Huge}{20}{24pt}}
\fi
% Check if we have selected 10 points
\ifx\@IEEEptsize\@IEEEptsizeten
\typeout{-- This is a 10 point document.}
\def\normalsize{\@setfontsize{\normalsize}{10}{12.00pt}}%
\setlength{\@IEEEnormalsizefontbaselineskip}{12pt}%
\normalsize
\abovedisplayskip 1.5ex plus4pt minus2pt%
\belowdisplayskip \abovedisplayskip%
\abovedisplayshortskip 0pt plus4pt%
\belowdisplayshortskip 1.5ex plus4pt minus2pt
\def\small{\@setfontsize{\small}{9}{10pt}}
\def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}}
\def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}}
\def\tiny{\@setfontsize{\tiny}{5}{6pt}}
% sublargesize is a tad smaller than large - 11pt
\def\sublargesize{\@setfontsize{\sublargesize}{11}{13.4pt}}
\def\large{\@setfontsize{\large}{12}{14pt}}
\def\Large{\@setfontsize{\Large}{14}{17pt}}
\def\LARGE{\@setfontsize{\LARGE}{17}{20pt}}
\def\huge{\@setfontsize{\huge}{20}{24pt}}
\def\Huge{\@setfontsize{\Huge}{24}{28pt}}
\fi
% Check if we have selected 11 points
\ifx\@IEEEptsize\@IEEEptsizeeleven
\typeout{-- This is an 11 point document.}
\def\normalsize{\@setfontsize{\normalsize}{11}{13.3846pt}}%
\setlength{\@IEEEnormalsizefontbaselineskip}{13.3846pt}%
\normalsize
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -