【latex】总结使用到的画图、表格及公式操作(新增IEEE会议参考文献)

前言

  • 推荐使用overleaf写latex文章,内含很多会议/期刊的模板,可以直接套用。
    https://www.overleaf.com
  • 下文都是在写论文过程中比较头疼的部分,有人建议我写完文章,最后再调整格式。但图片过大看起来实在是不适~

插入图片

\begin{figure}[!htbp]
    \centerline{\includegraphics[width=1.0\linewidth,scale=0.3]{pic.png}}
    \caption{the description of picture} 
    \label{fig:pic_name}
\end{figure}

解释:
[!hbtp]: 图片位置格式

  • [h] 当前位置(here):h 表示你在编写的时候中在哪里,论文最终显示图片的位置就在哪里,但是如果这一页的空间不足以放下这个图片,此时图片会转到下一页;
  • [t] 顶端(top):t 表示优先将图片放置在页面对应排的顶部;
  • [b] 底端(bottom):b 表示优先将图片放置在页面对应排的底部;
  • [p] 浮动:将图片设置为浮动状态,系统会自动排版图片的位置;

\centerline 居中显示
\includegraphics 图片及参数:[]内放置图片的参数,其中width=1.0是图片的大小,\linewidth是按照文章行的宽度,合在一起是图片宽度等于文章行的宽度;\scale是等比放大缩小。、
\caption: 描述图片
\label: 用于引用图片的名称

如何在文中引用图片? \ref{fig:pic_name}

图片大小

\includegraphics[scale=0.3] :将图片缩小到0.3倍大小

宽度更改

\includegraphics[width=1.0\linewidth]:将图片的宽度和文章宽度齐平
\includegraphics[width=1.0\textheight]:图片高度和页面高度设置一致

表格

推荐使用转换工具:https://tableconvert.com/
可以导入excel,也可以直接在上面制作表格后转换。
【latex】总结使用到的画图、表格及公式操作(新增IEEE会议参考文献)_第1张图片

另一个工具,也很简洁,可以进行更全面的操作,对单元格进行合并。但是有时候会出现一些细节格式问题,还是推荐自己进行下列操作。ref:https://www.tablesgenerator.com/

插入表格

\begin{table}[!ht]
	\Large
    \centering
    \caption{table description}
    \begin{tabular}{|c|c|c|}
    \hline
        \textbf{} & \textbf{height} & \textbf{width} \\ \hline
        \textbf{A} & 1 & 3 \\ \hline
        \textbf{B} & 2 & 4 \\ \hline
        \textbf{C} & 5 & 6 \\ \hline
    \end{tabular}
    \label{tab:tab_name}
\end{table}

生成样式:
【latex】总结使用到的画图、表格及公式操作(新增IEEE会议参考文献)_第2张图片

解释:

  • \certering 代表居中
  • \hline 代表添加的横线
  • \ 代表换行
  • & 隔开单元格内容

如何在文中引用表格? \ref{tab:tab_name}

表格内部字体调整

\begin{table}[!h]
\small %此处写字体大小控制命令
\begin{tabular}
...
\end{tabular}
\end{table}

元素对应的字体大小:

size 10pt (default) 11pt option 12pt option
\tiny 5pt 6pt 6pt
\scriptsize 7pt 8pt 8pt
\footnotesize 8pt 9pt 10pt
\small 9pt 10pt 11pt
\normalsize 10pt 11pt 12pt
\large 12pt 12pt 14pt
\Large 14pt 14pt 17pt
\LARGE 17pt 17pt 20pt
\huge 20pt 20pt 25pt
\Huge 25pt 25pt 25pt

复杂表格

合并多行

\centering
\caption{A table}
\label{tab:tab_name}
\begin{tabular}{|c|c|c|}
\hline
\textbf{} & \textbf{height} & \textbf{width} \\\hline
                                               & a1              & 1              \\ \cline{2-3} 
\multirow{-2}{*}{\textbf{A}}                   & a2              & 2              \\ \hline
\textbf{B}                                     & b               & 3              \\ \hline
\textbf{C}                                     & c               & 4              \\ \hline
\end{tabular}
\end{table}

效果如图:
【latex】总结使用到的画图、表格及公式操作(新增IEEE会议参考文献)_第3张图片

解释:

  • \multirow{-2}{*}{\textbf{A}} 代表单元格内容为A的占据了两行,且剧中表示。\multirow{NUMBER_OF_ROWS}{WIDTH}{CONTENT} ,其中NUMBER_OF_ROWS代表跨越几行,- 让单元格居中中。另一行的单元格应为空。
  • \cline[2,3] 代表在第二三列加上竖线

合并多列

\begin{table}[!ht]
\centering
\caption{A table}
\label{tab:tab_name}
\begin{tabular}{|c|c|c|}
\hline
\textbf{}  & \multicolumn{1}{c|}{\textbf{height}} & \textbf{width} \\ \hline
\textbf{X} & \multicolumn{2}{c|}{a1}     \\ \hline
\textbf{A} & \multicolumn{1}{c|}{a2} & 2 \\ \hline
\textbf{B} & \multicolumn{1}{c|}{b}  & 3 \\ \hline
\textbf{C} & \multicolumn{1}{c|}{c}  & 4 \\ \hline
\end{tabular}
\end{table}

效果如图:
【latex】总结使用到的画图、表格及公式操作(新增IEEE会议参考文献)_第4张图片

\multicolumn{2}{c|}{a1},使得内容为 a1 的这一个单元格占据了两列。注意这里的ALIGNMENT写的是c|代表表格内容居中,表格右侧有竖线而左侧没有。

表格大小自适应

\begin{table}[!h]
\resizebox{\linewidth}{!}{
\begin{tabular}{|c|c|c|}
...
\end{tabular}
}
\end{table}

\resizebox{width}{height}代表重置表格宽高,例如\resizebox{\linewidth}{!}代表按照文本宽度变化,高度不变

公式

使用转换工具,ref:https://www.latexlive.com/

最好用的工具,没有之一,可惜现在图片识别的次数限制2次!如果有别的好用的识别工具请推荐一下 ~~

插入公式

\begin{equation}
    \caption{formula}
    \label{eq:formula}
    \alpha=b+1
\end{equation}

这样生成的公式会有一个单独的编号,如图:
在这里插入图片描述

如何在文中引用表格? \eqref{eq:formula}

多行公式同一编号

如果是多行公式怎么统一编号呢?加入align\\

\begin{equation}
\caption{formula}
\label{eq:formula}
\begin{aligned}
    \alpha=b+1,\\
    b=\omega+1. \\
\end{aligned}
\end{equation}

效果如图:
在这里插入图片描述

多行公式不同编号

\begin{align}
    \alpha=b+1,\\
    b=\omega+1. 
\end{align}

效果如图:
在这里插入图片描述

按等号对齐

等号之前加入&符号

\begin{align}
    \alpha&=b+1,\\
    b&=\omega+1. 
\end{align}

效果如图:
在这里插入图片描述

公式过长

split帮公式分行

\begin{equation}
	\begin{split}
	\cos \omega &= \cos^2 \omega - \sin^2 \omega\\
	        &= 2\cos^2 \omega - 1
	\end{split}
\end{equation}

效果如图:
在这里插入图片描述

IEEE会议参考文献

原代码

会议模板给出的形式为:

\begin{thebibliography}{99}

\bibitem{c1} G. O. Young, ÒSynthetic structure of industrial plastics (Book style with paper title and editor)in Plastics, 2nd ed. vol. 3, J. Peters, Ed.  New York: McGraw-Hill, 1964, pp. 15Ð64.
\bibitem{c2} W.-K. Chen, Linear Networks and Systems (Book style).	Belmont, CA: Wadsworth, 1993, pp. 123Ð135.
\bibitem{c3} H. Poor, An Introduction to Signal Detection and Estimation.   New York: Springer-Verlag, 1985, ch. 4.
\bibitem{c4} B. Smith, ÒAn approach to graphs of linear forms (Unpublished work style),Ó unpublished.
\bibitem{c5} E. H. Miller, ÒA note on reflector arrays (Periodical styleÑAccepted for publication),Ó IEEE Trans. Antennas Propagat., to be publised.
\bibitem{c6} J. Wang, ÒFundamentals of erbium-doped fiber amplifiers arrays (Periodical styleÑSubmitted for publication),Ó IEEE J. Quantum Electron., submitted for publication.
\bibitem{c7} C. J. Kaufman, Rocky Mountain Research Lab., Boulder, CO, private communication, May 1995.
\bibitem{c8} Y. Yorozu, M. Hirano, K. Oka, and Y. Tagawa, ÒElectron spectroscopy studies on magneto-optical media and plastic substrate interfaces(Translation Journals style),Ó IEEE Transl. J. Magn.Jpn., vol. 2, Aug. 1987, pp. 740Ð741 [Dig. 9th Annu. Conf. Magnetics Japan, 1982, p. 301].
\bibitem{c9} M. Young, The Techincal Writers Handbook.  Mill Valley, CA: University Science, 1989.
\bibitem{c10} J. U. Duncombe, ÒInfrared navigationÑPart I: An assessment of feasibility (Periodical style),Ó IEEE Trans. Electron Devices, vol. ED-11, pp. 34Ð39, Jan. 1959.
\bibitem{c11} S. Chen, B. Mulgrew, and P. M. Grant, ÒA clustering technique for digital communications channel equalization using radial basis function networks,Ó IEEE Trans. Neural Networks, vol. 4, pp. 570Ð578, July 1993.
\bibitem{c12} R. W. Lucky, ÒAutomatic equalization for digital communication,Ó Bell Syst. Tech. J., vol. 44, no. 4, pp. 547Ð588, Apr. 1965.
\bibitem{c13} S. P. Bingulac, ÒOn the compatibility of adaptive controllers (Published Conference Proceedings style)in Proc. 4th Annu. Allerton Conf. Circuits and Systems Theory, New York, 1994, pp. 8Ð16.
\bibitem{c14} G. R. Faulhaber, ÒDesign of service systems with priority reservation,Ó in Conf. Rec. 1995 IEEE Int. Conf. Communications, pp. 3Ð8.
\bibitem{c15} W. D. Doyle, ÒMagnetization reversal in films with biaxial anisotropy,Ó in 1987 Proc. INTERMAG Conf., pp. 2.2-1Ð2.2-6.
\bibitem{c16} G. W. Juette and L. E. Zeffanella, ÒRadio noise currents n short sections on bundle conductors (Presented Conference Paper style),Ó presented at the IEEE Summer power Meeting, Dallas, TX, June 22Ð27, 1990, Paper 90 SM 690-0 PWRS.
\bibitem{c17} J. G. Kreifeldt, ÒAn analysis of surface-detected EMG as an amplitude-modulated noise,Ó presented at the 1989 Int. Conf. Medicine and Biological Engineering, Chicago, IL.
\bibitem{c18} J. Williams, ÒNarrow-band analyzer (Thesis or Dissertation style),Ó Ph.D. dissertation, Dept. Elect. Eng., Harvard Univ., Cambridge, MA, 1993. 
\bibitem{c19} N. Kawasaki, ÒParametric study of thermal and chemical nonequilibrium nozzle flow,Ó M.S. thesis, Dept. Electron. Eng., Osaka Univ., Osaka, Japan, 1993.
\bibitem{c20} J. P. Wilkinson, ÒNonlinear resonant circuit devices (Patent style),Ó U.S. Patent 3 624 12, July 16, 1990. 

\end{thebibliography}

修改部分

为了方便直接使用GoogleScholar给出的Bibtex,我们使用如下的引用方式,将上述的内容改成:

\bibliographystyle{IEEEtran}
\bibliography{references}{}

解释:

  • references代表references.bib文件,用于存放文献的BibTex引用。
  • IEEEtran为模板文件IEEETran.cls
    【latex】总结使用到的画图、表格及公式操作(新增IEEE会议参考文献)_第5张图片

如何添加引用

  1. Cite
  2. BibTex
  3. 复制粘贴到references.bib文件
    【latex】总结使用到的画图、表格及公式操作(新增IEEE会议参考文献)_第6张图片

参考资料

  1. https://blog.csdn.net/qq_41775769/article/details/121400026
  2. https://blog.csdn.net/guotong1988/article/details/112068202
  3. https://blog.csdn.net/zzmgood/article/details/36419493
  4. https://blog.csdn.net/weixin_41519463/article/details/103737464
  5. https://blog.csdn.net/Strive_For_Future/article/details/118609968

你可能感兴趣的:(知识碎片,latex)