IEEE论文模板程序+Tex live2019 + Tex studio操作环境以及遇到的一些如:Misplaced alignment tab character &的报错问题

IEEE论文模板程序+Tex live2019 + Tex studio操作环境以及遇到的一些如:Misplaced alignment tab character &的报错问题

IEEE论文模板程序+Tex live2019 + Tex studio操作环境的选择

最近,我们专业英语老师让我们按照IEEE期刊格式来写一篇关于自己方向上的论文,作为我们的期末考试,本来老师已经发了一篇word模板给我们,但是考虑到Word操作起来有点麻烦,且添加或者删减内容可能导致格式发生错误,所以就采用了Tex live2019 + Tex studio的操作环境,至于为什么选择Tex live + Tex studio,是看到网上说latex+texstudio是比较推崇的。。。

安装Tex live2019 + Tex studio操作环境

安装Tex live2019 + Tex studio这两个软件比较简单,没有其他大型软件这么多要求,Tex live是运行环境,必须先装这个,否则Tex studio会报错的,然后再安装 Tex studio编辑软件,基本上所有的排版代码都是在 Tex studio上面写的,因为没有什么复杂的流程,所以我就直接放上我的参考链接,供大家学习安装:https://blog.csdn.net/zaishuiyifangxym/article/details/88170827
(纯属交流,应该没有侵权吧,哈哈)
在这里插入图片描述
Tex live2019环境安装完毕后,使用tex -version指令,查看Tex live2019版本号,如果没有就说明安装失败(我第一次安装了好久,发现没有版本号,失败)。
再安装Tex studio编辑软件,这个安装速度很快,安装完后,按照我前面的参考链接进行简单的配置就行了。
接下来就可以编辑排版代码了

在tex -version编辑软件下,编写排版代码

在这里插入图片描述
最后生成的PDF跟上面差不多,因为有关我导师方向,我就不把相关的内容放上去了,用***代替了,在这里我主要想放上我的排版代码,这样大家就至少在排版的时候能找出自己想要的代码,都是通用的,改改内容就ok了:
在写代码之前要准备几个文件,文件如下,cls是一个模板,相当于C语言中一个头文件,需要在tex代码中调用,奉上链接(失效请评论):
链接:https://pan.baidu.com/s/1wJoWNIhIm_bfFQUtw1RCSA
提取码:kcoc
在这里插入图片描述
然后奉上代码(下面的代码不在上面的链接中,是我的IEEE_HW.tex的排版代码,里面主要是有基本完整的参考代码,如果插入摘要、插入图片、插入各个部分、插入文献、收缩字节等等,我就是靠这个完成的论文):


%% IEEE_HW.tex
%% V1.4b
%% 2019/12/11
%% by Michael Shell
%% see http://www.michaelshell.org/
%% for current contact information.
%%
%% This is a skeleton file demonstrating the use of IEEEtran.cls
%% (requires IEEEtran.cls version 1.8b or later) with an IEEE
%% journal paper.
%%
%% Support sites:
%% http://www.michaelshell.org/tex/ieeetran/
%% http://www.ctan.org/pkg/ieeetran
%% and
%% http://www.ieee.org/
%%*************************************************************************


\documentclass[conference, 12pt]{IEEEtran}
%\documentclass[journal]{IEEEtran}
%\documentclass[preprint,review,12pt,authoryear]{elsarticle}


\usepackage[UTF8, scheme = plain, heading = false]{ctex}
%由于texlive不是像ctex自带对中文支持,所以输入中文要引入宏包,否则会报错


% *** GRAPHICS RELATED PACKAGES ***
\ifCLASSINFOpdf
% \usepackage[pdftex]{graphicx}
% \DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\else
% or other class option (dvipsone, dvipdf, if not using dvips). graphicx
\fi
% Some very useful LaTeX packages include:
\usepackage{graphicx}
\usepackage{caption2}
\usepackage{subfigure}
\usepackage{float}
%graphicx——如果需要插入图片就需要加入这个宏包
%caption2——修改图注相关
%subfigure——用来插入插入并列分布的图片
%float——确定图片是否为浮动,而不是在一个固定的地方


\usepackage{indentfirst}
%首行缩进的宏包


% *** MATH PACKAGES ***
%
%\usepackage{amsmath}


% *** SPECIALIZED LIST PACKAGES ***
%
%\usepackage{algorithmic}


% *** ALIGNMENT PACKAGES ***
%
%\usepackage{array}


% *** SUBFIGURE PACKAGES ***
%\ifCLASSOPTIONcompsoc
%  \usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}


% *** FLOAT PACKAGES ***
%\usepackage{fixltx2e}


%\usepackage{stfloats}
% stfloats.sty was written by Sigitas Tolusis. This package gives LaTeX2e


% *** PDF, URL AND HYPERLINK PACKAGES ***
%\usepackage{url}


% *** Do not adjust lengths that control margins, column widths, etc. ***
% *** Do not use packages that alter fonts (such as pslatex).         ***


% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}


\begin{document}
	% paper title
	\title{The implementation and design of acquisition\\ *****}
	%\vspace{-0.1cm}表示减小间距0.1cm}
	
	
	% author names and IEEE memberships
	\author{name,~ID\IEEEmembership{}\\school\\E-mail: ***@mail.***.edu.cn\vspace{-0.1cm}}
	%\vspace{-2em}是为了缩小标题和第一行正文的间距
	% <-this % stops a space
		
	% make the title area
	\maketitle
	
	
	% As a general rule, do not put math, special symbols or citations
	% in the abstract or keywords.
	\begin{abstract}
		Since we are living in a three-dimensional world,***
		%这里添加摘要部分
	\end{abstract}
	
	
	% Note that keywords are not normally used for peerreview papers.
	\begin{IEEEkeywords}
		3D ,Triangulation method ***
		%这里添加keywords部分
	\end{IEEEkeywords}
	
	
	% creates the second title. It will be ignored for other modes.
	\IEEEpeerreviewmaketitle
	
	
	\section{Introduction}
	% The very first letter is a 2 line initial drop letter followed
	% by the rest of the first word in caps.
	% Here we have the typical use of a "T" for an initial drop letter
	% and "HIS" in caps to complete the first word.
	\IEEEPARstart This paper mainly studies ***
	%这里添加Introduction部分

	
	\section{Data Acquisition***}
	%大写的话字体会大一号,但是不管大写小写,编译出来的都是大写
	The method of extracting three-dimensional information***
	%这里添加第二部分,题目自己定
	
	
	\subsection{Binocular Stereo Vision(BSV)}
	%子分段会以字母开头(应该是IEEE的固定形式)
	

	\begin{figure}[ht]		
	\centering
	\includegraphics[scale=0.45]{***.png}
	\caption{***}
	\centering
	\label{figl}	
	\end{figure}

	\noindent\\
	\indent\setlength{\parindent}{2em}
	
	Two cameras are on the same baseline,***
	
	\begin{figure}[ht]		
	\flushright
	%对图片右对齐
	\includegraphics[scale=0.7]{***.png}	
	\end{figure}

	\vspace{-0.4cm}
	%减小间距0.4cm
	\noindent\\
	\indent\setlength{\parindent}{2em}
	This method has high reliability***
	
	\subsection{Structured***}
	%子分段会以字母开头(应该是IEEE的固定形式)
	Structured is based on ***
	

	\subsection{***}
	%子分段会以字母开头(应该是IEEE的固定形式)
	*** is to calculate ***
	
	\begin{figure}[ht]		
	\centering
	\includegraphics[scale=0.3]{***.png}
	\caption{***}
	\centering
	\label{fig2}	
	\end{figure}

	\vspace{-0.4cm}
	%减小间距0.4cm
	\noindent\\
	\indent\setlength{\parindent}{2em}
	The ***surface\cite{Elkhalili2006A}. ***
	
	
	The basic formula of***:
	\begin{figure}[ht]		
	\flushright
	%对图片右对齐
	\includegraphics[scale=0.6]{***.png}	
	\end{figure}

	\noindent\\
	\indent\setlength{\parindent}{2em}In the above***
	
	According***

	\subsubsection{***}
	\noindent\\
	\indent\setlength{\parindent}{2em}
	Pul***
	%这个版本中好像直接用\subsubsection没办法直接换行,要添加“\noindent\\”指令才行
	%\indent\\setlength{\parindent}{2em}是首行缩进指令,前提是前面已经包含了相应的宏包
	
	\begin{figure}[ht]		
	\centering
	\includegraphics[scale=0.3]{***.png}
	\caption{***}
	\centering
	\label{fig3}	
	\end{figure}

	\subsubsection{***}
	\noindent\\
	 \indent\setlength{\parindent}{2em}
	 In the ***

	\begin{figure}[ht]		
	\centering
	\includegraphics[scale=0.3]{***.png}
	\caption{***}
	\centering
	\label{fig4}	
	\end{figure}


	***
	
	\section{The Implementation of System}
	%大写的话字体会大一号,但是不管大写小写,编译出来的都是大写
	After***
	
	\begin{figure}[ht]		
	\centering
	\includegraphics[scale=0.5]{***.png}
	\caption{***}
	\centering
	\label{fig5}	
	\end{figure}

	\indent\setlength{\parindent}{2em}
	Th***

	\subsection{Hardware Circuit Design}
	The hardware***
	
	
	\subsubsection{***}	
	\noindent\\
	\indent\setlength{\parindent}{2em}
	The ***
	
	\begin{figure}[ht]		
	\centering
	\includegraphics[scale=0.3]{***.png}
	\caption{***}
	\centering
	\label{fig6}	
	\end{figure}

	\subsubsection{***}
	\noindent\\
	\indent\setlength{\parindent}{2em}
	Since***
	\begin{figure}[ht]		
	\centering
	\includegraphics[scale=0.38]{***.png}
	\caption{****}
	\centering
	\label{fig7}	
	\end{figure}

	\vspace{-0.2cm}
	%减小间距0.2cm
	\noindent\\
	\indent\setlength{\parindent}{2em}
	At present***
	
		
	\subsubsection{master controller}
	\noindent\\
	\indent\setlength{\parindent}{2em}Based on***
	
	\noindent\\
	\indent\setlength{\parindent}{2em}
	Complex***
	
	\noindent\\
	\indent\setlength{\parindent}{2em}
	FPGA ***

	\vspace{-0.1cm}
	%减小间距0.1cm
	\subsection{***}
	The software***
	
	\begin{figure}[ht]		
	\centering
	\includegraphics[scale=0.55]{***.png}
	\caption{***}
	\centering
	\label{fig8}	
	\end{figure}

	According to***
	
	\subsection{***}	
	Afte***
	
	\noindent\\
	\indent\setlength{\parindent}{2em}
	Then***
	
	\begin{figure}[ht]		
	\centering
	\includegraphics[scale=0.45]{***.png}
	\caption{***}
	\centering
	\label{fig9}	
	\end{figure}

	\vspace{-0.2cm}
	%减小间距0.2cm
	\section{Conclusion}

	\subsection{Analysis of Result}
	Based***
	
	\subsection{Some Prospect}
	Although ***
	\noindent\\
	\indent\setlength{\parindent}{2em}
	Select***
	ability\cite{AtalarA};
	\noindent\\
	\indent\setlength{\parindent}{2em}
	Because the **
	\noindent\\
	\indent\setlength{\parindent}{2em}
	In order to ***	
	\noindent\\
	\indent\setlength{\parindent}{2em}
	In order***
	
		
	% use section* for acknowledgment
	\section*{Acknowledgment}
	The author would like to acknowledge her tutor,***
	
	% Can use something like this to put references on a page
	% by themselves when using endfloat and the captionsoff option.
	\ifCLASSOPTIONcaptionsoff
	\newpage
	\fi
		
	% trigger a \newpage just before the given reference
	% number - used to balance the columns on the last page
	\bibliographystyle{IEEEtran}      %IEEEtran为给定模板格式定义文件名
	\bibliography{reference}                        %ref为.bib文件名
	
	% that's all folks
\end{document}

需要注意的问题以及报错的问题

1、出现报错:Something’s wrong–perhaps a missing \item. \end{thebibliography}
解决方法:
(1)先关闭*.tex文件,然后删除*.bbl文件;
(2)打开*.tex文件,在文章中的任何地方加上\cite{*}这条语句;
(3)再次编译,就没有问题了。

2、出现报错:Misplaced alignment tab character &
解决方法:
在用latex导入参考文献时,有时会出现这种错误,原因在于参考文献中出现了&,这是我们在前面加上\就可以了。即:& -> &
(如果bib文件修改保存后还报错,建议删除bbl文件,并且关闭.tex文件,重新打开,并编译构建)

3、在插入图片时,注意图片路径和文件路径的关系,有不同的插入方法,请自行查找资料

3、其实在插入文献的时候,开始可能会出现一些问题,如果是bbl的问题,不妨试试建议删除bbl文件,并且关闭.tex文件,重新打开,并编译构建,我几次都这样好了

从啥都不知道,到得到老师要求的IEEE格式的论文,我一共花了不到3天时间,有些问题可能没办法涉及到,如果有什么问题可以评论。

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值