~ latex 導言插入如下語句,能夠避免很多報錯
\documentclass[journal]{IEEEtran} % 如果是IEEEtran論文使用這個
\usepackage{booktabs}
\usepackage{array}
\usepackage{stfloats}
\usepackage{graphicx}
\usepackage{float}
%\usepackage[UTF8]{ctex} % 加了這行,文中圖像標題 "Figure" 會變為 "圖",可以輸入中文,這個不能在英文文檔中使用,會改變整體文章的格式
\usepackage{float}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{multicol}
\usepackage{stfloats}
\usepackage{subfigure}
\usepackage{amsmath}
%\usepackage{txfonts} % 有可能報錯
\usepackage{xspace}
%\usepackage{cite} % 很多期刊需要注銷掉
%\usepackage[justification=centering]{caption} %強制所有圖像小標題居中(如果還是不行就直接使用 \caption{\centering{標題}},這里在 ELSEVIER 期刊中可能還會遇到更多居中問題,參考 https://blog.csdn.net/weixin_40437996/article/details/110777515
\usepackage{caption}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{amsmath}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\usepackage{algorithmicx}
\usepackage[noend]{algpseudocode} % 這是偽代碼里沒有endif,endfor等
\usepackage{algpseudocode}
% 將偽代碼改為input和output
\renewcommand{\algorithmicrequire}{ \textbf{Input:}} %Use Input in the format of
\renewcommand{\algorithmicensure}{ \textbf{Output:}} %UseOutput in the format of
~ 比較好的插入圖像方式
% --------->
\begin{figure*}
\centering
{
\includegraphics[width=5cm]{step6.png}}
\hspace{0in}
{
\includegraphics[width=2.5cm]{step6.jpg}}
\hspace{0in}
{
\includegraphics[width=2.5cm]{step6}}
\hspace{0in}
{
\includegraphics[width=2.5cm]{step6}}
\hspace{0in}
\caption{d}
\end{figure*}
% <--------------
~ 公式居中顯示
\begin{center} %使用centering不好使,使用這個
$\left\{\begin{array}{l}D 1=v l_{2}-v l_{1} \quad D 2=v r_{2}-v r_{1}
\\ D_{1-n}=D 1-n * \frac{\max (D 1, D 2)-\min (D 1, D 2)}{a b s\left(\left(v l_{2}-v l_{1}\right)-\left(v r_{2}-v r_{1}\right)\right)}\end{array}\right.$
\end{center}
~ Latex 中雙欄(跨欄)中插入跨雙欄圖片出現在下一頁問題的解決
之后就可以寫
\begin{figure*}[hb]
\centering
\includegraphics[scale=0.4]{img1.jpg}
\caption{This is a non-floating figure}
\label{fig_framework}
\end{figure*}
但是具體顯示到哪里,還需要在代碼中調整。這是比較坑的地方。

選擇LaTex and later。然后打開Word,雙擊你需要復制的公式,選中公式后按 Crtl+C,然后在mathtype中按Ctrl+V粘貼,在mathtype中再選中復制好的公式,按Crtl+C,這時在剪輯器中轉化成了Latex代碼,在Winedit中按Crtl+V粘貼即可。
這樣處理在latex中可能會報錯,但是pdf卻仍然可以顯示出來(前提是已經有正確的pdf顯示了,這時候會刷新)。
~ 縮小間距(圖片與文字,文字之間等等),填寫到指定位置即可
\vspace{-0.5cm} %調整圖片與上文的垂直距離
~ bib文件中有的項,編譯后仍然報錯沒有
可能是前面各項之間缺了逗號.
***,
***,% <-this % stops a space
\thanks{aaaa}% <-this % stops a space
\thanks{}% <-this % stops a space
\thanks{}}
\maketitle
\bibliography{my_references}
%\bibliography{IEEEtran,my_references.bib}
\centering
\caption{Rendering of each algorithm 1}
\begin{tabular}{m{1.5cm}<{\centering} m{2.5cm}<{\centering} m{2.5cm}<{\centering} m{2.5cm}<{\centering} m{2.5cm}<{\centering} m{2.5cm}<{\centering}}
\begin{abstract}
...
\end{abstract}
\begin{equation}
\begin{split}
...
\end{split}
\end{equation}
~ 公式使用 $$ 會自動換行, 如果使用 $ 則不會換行.
~ latex 目錄結構
-1 \part{part}
0 \chapter{chapter}
1 \section{section}
2 \subsection{subsection}
3 \subsubsection{subsubsection}
4 \paragraph{paragraph}
5 \subparagraph{subparagraph}
~ 公式中無法正確輸出=號(ACM期刊常見)
可以使用\text{=}替換=號
~ 頁眉和頁腳
\usepackage{fancyhdr}
\pagestyle{fancy} % 用於開啟頁眉頁腳設置
\fancyhead{} %清除頁眉
\fancyfoot{} %清除頁腳
\fancyhf{} %同時清除頁眉頁腳
\renewcommand\headrulewidth{0pt} %清除頁眉分割線
\renewcommand\footrulewidth{0pt} %清除頁腳分割線
%\fancypagestyle{plain}{}
\fancyhead[LE,RO]{~\thepage~} % 奇數頁右邊,偶數頁左邊
%\fancyhead[LE]{2} %偶數頁左邊
%\fancyhead[RO]{3} %奇數頁右邊
~ 字體傾斜
\textsl{}
~ ELSEVIER 雙欄圖片表標題居中
在 cas-common.sty 文件中找到
\cs_new:Npn \__make_tbl_caption:nn #1#2 下面找到
{\centering\sffamily\small\textbf{\color{scolor}#1}:\par #2\vskip4pt }} 改為
{\centering\sffamily\small\textbf{\color{scolor}#1}:\ #2\vskip4pt }}
在 \cs_new:Npn \__make_fig_caption:nn #1#2 下面找到
{\rightskip=0pt\sffamily\small\textbf{\color{scolor}#1:}~#2\par } 改為
{\leftskip=0pt\sffamily\small\textbf{\color{scolor}#1:}~#2\par }
之后每個圖片或者表標題都使用\caption{\centering{ }}
~ 偽代碼太長,可以分頁顯示
在引言處加上以下代碼
\usepackage{algorithm,algpseudocode,float}
\usepackage{lipsum}
\makeatletter
\newenvironment{breakablealgorithm}
{% \begin{breakablealgorithm}
\begin{center}
\refstepcounter{algorithm}% New algorithm
\hrule height.8pt depth0pt \kern2pt% \@fs@pre for \@fs@ruled
\renewcommand{\caption}[2][\relax]{% Make a new \caption
{\raggedright\textbf{\ALG@name~\thealgorithm} ##2\par}%
\ifx\relax##1\relax % #1 is \relax
\addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##2}%
\else % #1 is not \relax
\addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##1}%
\fi
\kern2pt\hrule\kern2pt
}
}{% \end{breakablealgorithm}
\kern2pt\hrule\relax% \@fs@post for \@fs@ruled
\end{center}
}
\makeatother
之后將
換成