Latex 基础学习——通过IEEE模板

Latex 基础学习——通过IEEE模板

本文拆解注释了IEEE会议通用的Latex模板,对latex基础语言进行了学习,方便日后使用Latex模板进行更便捷的检索。

文章标题、作者

documentclass[conference]{IEEEtran}  %文章属于会议类型,基于IEEEtran模板,模板由IEEEtan.cls定义
\IEEEoverridecommandlockouts
% The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out.
\usepackage{cite}%引用参考文献宏
\usepackage{amsmath,amssymb,amsfonts}%数学公式宏
\usepackage{algorithmic}    
\usepackage{graphicx} %调插入图像宏
\usepackage{textcomp} %text companion字体宏
\usepackage{xcolor}%颜色宏

%\usepackage{ctex}  
%我自己添加的使用宏包(为了能够显示汉字)
%这里注释掉,使用之后会出现警告,暂时未解决

%定义参考文献格式
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\begin{document}%开始文章内容

%定义文章标题格式:三部分:标题/副标题/致谢
\title{
    Conference Paper Title*\\%文章标题
    %footnotesize:脚注;\texesuperscript{*表示左上角的*号},将其放到文后可以变为右上角
    %Note: Sub-titles are not captured in Xplore andshould not be used
    {\footnotesize \textsuperscript{left upper sym}This is footnote\textsuperscript{right upper sym}}
    %thanks:左下角致谢,一般写基于什么基金、什么什么协会
    \thanks{Here is the thanks}
}
%定义作者格式:
\author{
    %以下为模板,需要添加作者可以复制粘贴,注意一作是st,二作是ed,之后才是th
    \IEEEauthorblockN{1\textsuperscript{st} Given Name Surname}%第几作者、名姓
    \IEEEauthorblockA{\textit{dept. name of organization (of Aff.)} \\%机构具体名称
    \textit{name of organization (of Aff.)}\\%大学名称
    City, Country \\%地址
    email address or ORCID}%联系邮箱
    \and%and用于分栏,最多可以分三栏
    \IEEEauthorblockN{2\textsuperscript{ed} Given Name Surname}
    \IEEEauthorblockA{\textit{dept. name of organization (of Aff.)} \\
    \textit{name of organization (of Aff.)}\\
    City, Country \\
    email address or ORCID}
    \and%and用于分栏,最多可以分三栏
    %示例
    \IEEEauthorblockN{3\textsuperscript{th} Pnjie M}
    \IEEEauthorblockA{\textit{Here is the afflication's parcific name} \\
    \textit{Here is the university name}\\
    City, Country \\
    email address or ORCID}
}

\maketitle%在pdf中显示标题,不加就不会显示标题信息

%摘要撰写,格式通过IEEEtran.cls定义
% *CRITICAL: Do Not Use Symbols, Special Characters, Footnotes, or Math 
%  in Paper Title or Abstract.
\begin{abstract}
    Here is the abstract
\end{abstract}

%关键词撰写,格式通过IEEEtran.cls定义
%通过, 隔开(逗号后有一个空格,但latex不会编译,相当于没有)
\begin{IEEEkeywords}
    keywords1, keywords2, keywords3, keywords4
\end{IEEEkeywords}

文章章节生成

%正文第一章节,一般期刊会议文章通过\section\subsection\subsubsection就可以
%毕业论文可以通过\chapter\section\subsection\subsubsection的形式
\section{1st section(Introduction)}
    Here is the 1st section
    This document is a model and instructions for \LaTeX.
    Please observe the conference page limits. 
%第二章节
\section{2ed section}
    Here is the 2rd section
    \subsection{subsection}
    \subsection{subsection}
%第三章节
\section{3rd section}
    Here is the 3rd section
    \subsection{subsection}
    \subsubsection{subsubsection }
    \subsection{subsection}
    \subsubsection{subsubsection}
%...以此类推可以完成全部章节的写作

\section{Ease of Use}%使用说明
    \subsection{Maintaining the Integrity of the Specifications}
    don't change any thing in the IEEEtran.cls.

标签生成和引用的方法

%一些易错说明
%此处引入\label{}和\ref{}的用法:
%在IEEE模板里,\label{label name}是打标签,ref{label name}是引用标签,默认的标签显示为section-subsection;
%模板中用eref来表示公式引用,eref需要宏包amsmath,引用显示效果为括号+公式的标号;
%图和表的\label必须放在图片定义的最后,\caption之后,\end之前,这样引用才会是1/2/3
%否则图表的引用是默认显示,即section-subsection
\section{Prepare Your Paper Before Styling}
\subsection{ref\&label Sample}\label{sec1}
Regular label and ref sample: \\
here i will ref this subsection, so i 
\backslash ref \left\{sec1\right\}
then you can see:\ref{sec1}\\
Pic and table sample:
Table:
\begin{table}[htbp]
    \caption{Table sample }
    \begin{center}
    \begin{tabular}{|c|c|c|c|}
    \hline
    \textbf{Table}&\multicolumn{3}{|c|}{\textbf{Table Column Head}} \\
    \cline{2-4} 
    \hline 
    \end{tabular}
    \label{tablesample}
    \end{center}
\end{table}
here i will \backslash ref \left\{tablesampel\right\} 
so you can see table \ref{tablesample}.

Figure:
\begin{figure}[htbp]
    \centerline{\includegraphics{sample.png}}
    \caption{Example of a figure caption.}
    \label{figsample}
\end{figure}
here i will \backslash ref \left\{figsample\right\} 
so you can see Fig \ref{figsample}.
\subsection{tips}
%单独编辑文本文档
Before you begin to format your paper, first write and save the content as a 
separate text file. Complete all content and organizational editing before 
formatting. Please note sections \ref{AA} below for more information 
on proofreading, spelling and grammar.
%不需要给你的文章段落编号,latex会自动编号
Keep your text and graphic files separate until after the text has been 
formatted and styled. Do not number text heads---{\LaTeX} will do that 
for you.

\subsection{Abbreviations and Acronyms}\label{AA}
\begin{itemize}
\item Define abbreviations and acronyms the first time they are used in the text, 
even after they have been defined in the abstract. 
\item Abbreviations such as IEEE, SI, MKS, CGS, ac, dc, and rms do not have to be defined. 
\item Do not use abbreviations in the title or heads unless they are unavoidable.
\end{itemize}

枚举编号 itemize的用法

%此处引入itemize的用法:如上下所示,item的显示效果是带属性的小圆点,包括在\begin{itemize}和
%\end{itemize}里,前面用\item引入小圆点,\item[!]会显示不同效果,类似还有item[*],\item[-]

%单位符号的使用注意事项
\subsection{Units}
\begin{itemize}
    \item[-]
    \item[*]
    \item[!]  
\item Use either SI (MKS) or CGS as primary units. (SI units are encouraged.) English units may be used as secondary units (in parentheses). An exception would be the use of English units as identifiers in trade, such as ``3.5-inch disk drive''.
\item Avoid combining SI and CGS units, such as current in amperes and magnetic field in oersteds. This often leads to confusion because equations do not balance dimensionally. If you must use mixed units, clearly state the units for each quantity that you use in an equation.
\item Do not mix complete spellings and abbreviations of units: ``Wb/m\textsuperscript{2}'' or ``webers per square meter'', not ``webers/m\textsuperscript{2}''. Spell out units when they appear in text: ``. . . a few henries'', not ``. . . a few H''.
\item Use a zero before decimal points: ``0.25'', not ``.25''. Use ``cm\textsuperscript{3}'', not ``cc''.)
\end{itemize}

公式的生成方法

%生成一个公式
\subsection{To make Equations}
%参考文章:https://blog.csdn.net/NSJim/article/details/109045914
%行内公式:用包括起来的公式即为行内公式,与文本之间不需要空格
example1:a+b=c$ is a inside equation;\par
%行间公式,不自动编号,或者不编号,通过隔开即可
example2:This is a equation without num;
a+b=c
%自动编号的公式,通过\begin\end{equation}包围起来,即可自动编号
%自动编号的引用:标记:\label{eq},引用\ref{eq};
This is a automative number equation:
Punctuate equations with commas or periods when they are part of a sentence, as in:\par
example3:\begin{equation}
a+b=\gamma\label{eq}
\end{equation}
\begin{equation}
    a+b=\beta\label{eq2}
\end{equation}
this is a ref sample(\ref{eq}) and (\ref{eq2});
%手动编号:在begin\end{equation}中加入\tag{num}可以实现手动编号
exapmle4: manual number:
\begin{equation}
    a+b=\beta\label{eq3}
    \tag{999}
\end{equation}
this is a ref manual sample(\ref{eq3})
%使用手动编号将不会影响后续自动编号,如果需要按章节自动编号,则需要引用
%不同的cls文件,IEEEtran的命名规则为不按照章节编号。
\begin{equation}
    a+b=4\label{eq4}    
\end{equation}
%方程组的用法,关注方程组的编号是否会影响整体编号
%方程组有2种方式,分别是\begin{aligned}和\begin{cases}方式,&表示对齐位置,
%推荐使用\begin{cases}方式,使用方法如下:\begin{aligned}方式:
% 需配合\left\{使用,可以使方程组根据=对齐。
This is an equation set sample ,using \verb|{Aligned}|
\begin{equation}
\left\{%给左边加大括号,不知道为什么要配合\right.
\begin{aligned}
&a+b+c=2 \\
&a-b=4 \\
\end{aligned}
\right.
\end{equation}
\\
%\begin{cases}方式:简便,但对齐格式与\begin{aligned}不同。
This is an example of equation set using \verb|{case}|:
\begin{equation}
\begin{cases}
a+b+c=2\\
a-b=4 \label{eq5}\\
\end{cases}
\end{equation}
%使用特殊的begin和end不会使方程组里每一个公式都被编号,但引用的时候label标签必须放在最后一个
%公式后面
\\
ref example(\ref{eq5}).
%subequation的用法,后面用到再说

\subsection{Figures and Tables}
\paragraph{Positioning Figures and Tables} Place figures and tables at the top and 
bottom of columns. Avoid placing them in the middle of columns. Large 
figures and tables may span across both columns. Figure captions should be 
below the figures; table heads should appear above the tables. Insert 
figures and tables after they are cited in the text. Use the abbreviation 
``Fig.~\ref{fig}'', even at the beginning of a sentence.

图表的插入和引用

%此处引入图表的插入方法:
%参考文章:https://blog.csdn.net/qq_31347869/article/details/103832190
%写累了不想写了,等用到再详细补充吧
\begin{table}[htbp]
\caption{Table Type Styles}
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Table}&\multicolumn{3}{|c|}{\textbf{Table Column Head}} \\
\cline{2-4} 
\textbf{Head} & \textbf{\textit{Table column subhead}}& \textbf{\textit{Subhead}}& \textbf{\textit{Subhead}} \\
\hline
copy& More table copy^{\mathrm{a}}& &  \\
\hline
\multicolumn{4}{l}{^{\mathrm{a}}Sample of a Table footnote.}
\end{tabular}
\label{tab1}
\end{center}
\end{table}

\begin{figure}[htbp]
\centerline{\includegraphics{fig1.png}}
\caption{Example of a figure caption.}
\label{fig}
\end{figure}

参考文献的引用方法

%参考文献的使用方法:手动引用和使用bib文件
%咱就是说还是放个参考文章:https://zhuanlan.zhihu.com/p/114733612
%下次用到的时候再细看吧,此次latex自学之旅到此结束,有需要后续会进行补充的
\section*{References}

Please number citations consecutively within brackets \cite{b1}. The 
sentence punctuation follows the bracket \cite{b2}. Refer simply to the reference 
number, as in \cite{b3}---do not use ``Ref. \cite{b3}'' or ``reference \cite{b3}'' except at 
the beginning of a sentence: ``Reference \cite{b3} was the first \ldots''

Number footnotes separately in superscripts. Place the actual footnote at 
the bottom of the column in which it was cited. Do not put footnotes in the 
abstract or reference list. Use letters for table footnotes.

Unless there are six authors or more give all authors' names; do not use 
``et al.''. Papers that have not been published, even if they have been 
submitted for publication, should be cited as ``unpublished'' \cite{b4}. Papers 
that have been accepted for publication should be cited as ``in press'' \cite{b5}. 
Capitalize only the first word in a paper title, except for proper nouns and 
element symbols.

For papers published in translation journals, please give the English 
citation first, followed by the original foreign-language citation \cite{b6}.

\begin{thebibliography}{00}
\bibitem{b1} G. Eason, B. Noble, and I. N. Sneddon, ``On certain integrals of Lipschitz-Hankel type involving products of Bessel functions,'' Phil. Trans. Roy. Soc. London, vol. A247, pp. 529--551, April 1955.
\bibitem{b2} J. Clerk Maxwell, A Treatise on Electricity and Magnetism, 3rd ed., vol. 2. Oxford: Clarendon, 1892, pp.68--73.
\bibitem{b3} I. S. Jacobs and C. P. Bean, ``Fine particles, thin films and exchange anisotropy,'' in Magnetism, vol. III, G. T. Rado and H. Suhl, Eds. New York: Academic, 1963, pp. 271--350.
\bibitem{b4} K. Elissa, ``Title of paper if known,'' unpublished.
\bibitem{b5} R. Nicole, ``Title of paper with only first word capitalized,'' J. Name Stand. Abbrev., in press.
\bibitem{b6} Y. Yorozu, M. Hirano, K. Oka, and Y. Tagawa, ``Electron spectroscopy studies on magneto-optical media and plastic substrate interface,'' IEEE Transl. J. Magn. Japan, vol. 2, pp. 740--741, August 1987 [Digests 9th Annual Conf. Magnetics Japan, p. 301, 1982].
\bibitem{b7} M. Young, The Technical Writer's Handbook. Mill Valley, CA: University Science, 1989.
\end{thebibliography}
\end{document}

IEEE TPE Latex 模板

documentclass[lettersize,journal]{IEEEtran}
\usepackage{amsmath,amsfonts}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{array}
\usepackage{subfig}
\usepackage{textcomp}
\usepackage{stfloats}
\usepackage{url}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{cite}
\hyphenation{op-tical net-works semi-conduc-tor IEEE-Xplore}
% updated with editorial comments 8/9/2021

% 中文编码包
% 导入编码包之后需要在后文需要解码中文的前后添加 \begin{CJK}{UTF8}{gbsn} - \end{CJK}, gbsn = Guo Biao Song Normal
\usepackage{CJKutf8}

\begin{document}
\begin{CJK}{UTF8}{gbsn}
%========================= Title and Author ============================

\title{Enter your title here}

%% Author 两种格式:
    %% 格式1:    
    %\author{
    %   \IEEEauthorblockN{AAA}
    %   \IEEEauthorblockA{Fellow, IEEE\\
    %     Department of XXX\\
    %     University of YYY\\
    %     Email: AAA@xxx.edu}
    % \and(and 后接author 2)
    % \thanks{thanks}
    %}
    %% 格式2:
    % \author{Masahito Hayashi~\IEEEmembership{Fellow,~IEEE}, 
    %     John Smith~\IEEEmembership{Member,~IEEE}
    % \thanks{thanks}
    %}

\author{
    \IEEEauthorblockN{AAA}
    \IEEEauthorblockA{Fellow, IEEE\\
        Department of XXX\\
        University of YYY\\
        Email: AAA@xxx.edu}
    \and
    \IEEEauthorblockN{BBB}
    \IEEEauthorblockA{Institute of ZZZ\\
        City, Country\\
        Email: BBB@zzz.com}
    \and
    \IEEEauthorblockN{Third Author}
    \IEEEauthorblockA{Member, IEEE\\
        Company Name\\
        Email: third@company.com}
\thanks{Thanks 2 Here: This paper was produced by the IEEE Publication Technology Group. They are in Piscataway, NJ.}% <-this % stops a space
}

% The paper headers
\markboth{Journal of \LaTeX\ Class Files,~Vol.~18, No.~9, September~2020}%
{How to Use the IEEEtran \LaTeX \ Templates}

\IEEEpubid{0000--0000/00\$00.00~\copyright~2021 IEEE}
% Remember, if you use this you must call \IEEEpubidadjcol in the second
% column for its text to clear the IEEEpubid mark.
\maketitle
%========================= Title and Author ============================


%=========================main content =================================
\begin{abstract}
abstract
\end{abstract}

\begin{IEEEkeywords}
Class, IEEEtran, \LaTeX, paper, style, template, typesetting.
\end{IEEEkeywords}

\section{Introduction}
here is introduction

    \subsection{subsection}
    Here is introduction subsection

\section{Review}
Review

\section{Simulation}
Simulation

\section{Experiments}
Experiments

\section{Results}
Results

%=========================main content =================================
\end{CJK}
\end{document}


哇哦,你居然看完了,蛮不错的~~~///(^v^)\\\~~~
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇