实际论文中的Latex

本文详细介绍了如何在LaTeX中处理论文中的图像、表格和引用文献。对于图像,强调了使用float的重要性,推荐使用pdf格式,并提供了插入与引用的代码示例。在表格方面,讲解了不同对齐方式、合并单元格和添加边框的方法。最后,阐述了BibTeX引用的设置步骤,包括创建bib文件和选择合适的样式文件。

使用Latex写论文的常用命令

图片

本文讨论插入的图片和表格均为Float,即不是嵌入在文章里面的。
Latex生成效果:
Latex生成效果
代码:

\usepackage{graphicx}
\usepackage[caption=false,font=footnotesize]{subfig}
\begin{document}
Figure \ref{cats} and figure \ref{a}
\begin{figure}
  \centering
  \subfloat[]{\includegraphics[width=2.5cm]{a.pdf}\label{a}}
  \subfloat[]{\includegraphics[width=2.5cm]{b.pdf}\label{b}}

  \subfloat[]{\includegraphics[width=2.5cm]{a.pdf}\label{c}}
  \subfloat[]{\includegraphics[width=2.5cm]{b.pdf}\label{d}}

  \subfloat[]{\includegraphics[width=2.5cm]{a.pdf}\label{e}}
  \subfloat[]{\includegraphics[width=2.5cm]{b.pdf}\label{f}}
  \subfloat[]{\includegraphics[width=2.5cm]{a.pdf}\label{h}}
  \subfloat[]{\includegraphics[width=2.5cm]{b.pdf}\label{i}}
  \caption{dasf}
  \label{cats}
\end{figure}
\end{document}

解释:

  • {graphicx} {subfig} 图片包
  • [] 决定float对象位置在这里插入图片描述
  • \ref 引用图片label
  • \subfloat之间空行可以当作换行(也可以用命令\hfil来换行)
  • 论文中多用paftex来编译,所以图片格式最好是pdf,通过pdf reader,大部分的图片格式都可以转换成pdf

表格

Latex生成效果:
Latex生成效果
代码:

\usepackage{multirow}
\begin{document}

\begin{table}
\begin{tabular}{l *{3}{c} r|}
  \hline
  \multicolumn{2}{|c}{A-B} &  & D & E \\ \hline \hline
  AA & BB & CC & DD & EE \\ \cline{2-3}
  AAA & BBB & CCC & DDD & EEE \\
  \hline
\end{tabular}
\end{table}

\end{document}

解释:

  • 使用tabular环境,{} 内表示参数,l 向左靠齐,*{3}{c} 三列居中靠齐,r| 向右靠齐并在该列右侧画竖线
  • \hline 画一行横线
  • \multicolumn{2}{|c}{A-B} 合并两列并居中靠齐,在该列左侧画竖线,显示A-B(需要调用multirow包)
  • & 列分割符号,& & 空一列,\ \ 换行
  • \cline{2-3} 从该行第二列到第三列画横线
  • 使用table大环境,以便于更改表格的文字大小 \fontsize,caption大小需要在文档前使用caption包时更改参数

更可以使用bootabs表示更专业的表格
Latex生成效果:
在这里插入图片描述
代码:

\usepackage{booktabs}
\begin{tabular}{llr}
\toprule
\multicolumn{2}{c}{Item} \\
\cmidrule(r){1-2}
Player     & Price (\$) \\
\midrule
Lionel Messi  & 1.0      \\
Cristiano Ronaldo   & 1.0      \\
\bottomrule
\end{tabular}

引用文献

Latex生成效果:
Latex生成效果
代码:

\docmentclass[journal_name]{template_type}

\begin{document}
...
rehabilitaion \cite{human},
...
\bibliographystyle{模板对应的bst文件名}
\bibliography{bib文件名}

\end{document}

bib文件:

@article{human,
  title={Human3. 6m: Large scale datasets and predictive methods for 3d human sensing in natural environments},
  author={Ionescu, Catalin and Papava, Dragos and Olaru, Vlad and Sminchisescu, Cristian},
  journal={IEEE transactions on pattern analysis and machine intelligence},
  volume={36},
  number={7},
  pages={1325--1339},
  year={2013},
  publisher={IEEE}
}

解释:

  • 根据document class找对应的 BibTeX Bibliography Style文件
  • 写自己的bib文件
  • 应用时加入 \cite{…}
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值