latex使用记录

目录

1、表格

参考资料:

1)两个上下小表格合一个标签表格

2)两个左右小表格合成一个标签表格

2、图片

参考资料:

1)期刊双栏中并排

2)文章中并排


1、表格

参考资料:

Latex基本表格绘制_派大星爱摸鱼的博客-CSDN博客_latex画表格

Latex 并排表格 - 知乎

positioning - How can I have two tables side by side? - TeX - LaTeX Stack Exchange

1)两个上下小表格合一个标签表格

\usepackage{booktabs} % 添加三线表格粗线

 \begin{table}
	\caption{Caption for total table}
	\centering
	\subtable[Caption for table 1]{
		\begin{tabular}{c|c}
			\toprule % 添加表格头部粗线
			\textbf{Parameter} & \textbf{Values} \\
			\hline
			use\_fej & 1 \\
			calib\_cam\_extrinsics & 1 \\
			calib\_cam\_intrinsics & 1 \\
			calib\_cam\_timeoffset & 1 \\
			max\_slam & 75 \\
			max\_slam\_in\_update & 25 \\
			\bottomrule % 添加表格尾部粗线
		\end{tabular}
		\label{tab:firsttable}
	}
	\qquad
	\subtable[Caption for table 2]{        
		\begin{tabular}{c|c}
			\toprule % 添加表格头部粗线
			\textbf{Parameter} & \textbf{Values} \\
			\hline
			use\_fej & 1 \\
			calib\_cam\_extrinsics & 1 \\
			calib\_cam\_intrinsics & 1 \\
			calib\_cam\_timeoffset & 1 \\
			max\_slam & 75 \\
			max\_slam\_in\_update & 25 \\
			\bottomrule % 添加表格尾部粗线
		\end{tabular}
		\label{tab:firsttable}
	}
	\end{table}

2)两个左右小表格合成一个标签表格

\usepackage{booktabs} % 添加三线表格粗线

\begin{table}
\caption{Parameters setting}
\subtable[Setting for optical]{
	\begin{tabular}{c|c}
		\toprule % 添加表格头部粗线
		\textbf{Parameter} & \textbf{Values} \\
		\hline
		use\_fej & 0 \\
		calib\_cam\_extrinsics & 0 \\
		calib\_cam\_intrinsics & 0 \\
		calib\_cam\_timeoffset & 0 \\
		max\_slam & 0 \\
		max\_slam\_in\_update & 0 \\
		\bottomrule % 添加表格尾部粗线
	\end{tabular}
	\label{tab:lkSet}
}
\quad
\subtable[Setting for initialization]{        
	\begin{tabular}{c|c}
		\toprule % 添加表格头部粗线
		\textbf{Parameter} & \textbf{Values} \\
		\hline
		use\_fej & 1 \\
		calib\_cam\_extrinsics & 1 \\
		calib\_cam\_intrinsics & 1 \\
		calib\_cam\_timeoffset & 1 \\
		max\_slam & 75 \\
		max\_slam\_in\_update & 25 \\
		\bottomrule % 添加表格尾部粗线
	\end{tabular}
	\label{tab:initSet}
}
\end{table}

2、图片

参考资料:

Latex如何插入多个图片,实现并排排列或者多行多列排列_脑壳二的博客-CSDN博客_latex图片并排

1)期刊双栏中并排

 

\documentclass[journal]{IEEEtran}
\usepackage[justification=centering]{caption} % 用于使图片居中
\usepackage{graphicx} % 插入图片的宏包

\begin{document}

\begin{figure}[htbp]
	\centering
	\begin{minipage}{0.49\linewidth}
		\centering
		\includegraphics[width=0.9\linewidth]{fig/origin_raw.png}
		\caption{chutian1}
		\label{chutian1}%文中引用该图片代号
	\end{minipage}
	\begin{minipage}{0.49\linewidth}
		\centering
		\includegraphics[width=0.9\linewidth]{fig/optical_raw.png}
		\caption{chutian2}
		\label{chutian2}%文中引用该图片代号
	\end{minipage}
\end{figure}


\end{document}

2) 何并为一个图

\documentclass[journal]{IEEEtran}
\usepackage[justification=centering]{caption} % 用于使图片居中
\usepackage{graphicx} % 插入图片的宏包
\usepackage{subcaption}
\begin{document}

\begin{figure}[htbp]
	\centering
	\begin{subfigure}{0.49\linewidth}
		\centering
		\includegraphics[width=0.9\linewidth]{fig/origin_raw.png}
		\caption{chutian3}
		\label{chutian3}%文中引用该图片代号
	\end{subfigure}
	\centering
	\begin{subfigure}{0.49\linewidth}
		\centering
		\includegraphics[width=0.9\linewidth]{fig/optical_raw.png}
		\caption{chutian4}
		\label{chutian4}%文中引用该图片代号
	\end{subfigure}
	\caption{mother of chutian}
	\label{da_chutian}
\end{figure}

\end{document}

3)文章中并排

\documentclass{article}
\usepackage{graphicx} % 插入图片的宏包

\begin{document}

\begin{figure}
	\centering
	\begin{minipage}{0.5\textwidth}
		\centering
		\includegraphics[width=0.9\textwidth]{fig/origin_raw.png} % first figure itself
		\caption{first figure}
	\end{minipage}\hfill
	\begin{minipage}{0.5\textwidth}
		\centering
		\includegraphics[width=0.9\textwidth]{fig/optical_raw.png} % second figure itself
		\caption{second figure}
	\end{minipage}
\end{figure}

\end{document}



相关推荐

  1. 在html中使用数学公式latex

    2024-07-17 11:56:02       27 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-17 11:56:02       67 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-17 11:56:02       72 阅读
  3. 在Django里面运行非项目文件

    2024-07-17 11:56:02       58 阅读
  4. Python语言-面向对象

    2024-07-17 11:56:02       69 阅读

热门阅读

  1. electron中app.whenReady()和app.on(‘ready‘)的区别

    2024-07-17 11:56:02       22 阅读
  2. Scikit-Learn 基础教程

    2024-07-17 11:56:02       22 阅读
  3. 八部金刚功1.0.9-july 17th-冥想1.1.7

    2024-07-17 11:56:02       24 阅读
  4. docker-cli & nerdctl & ctr & crictl容器命令比较

    2024-07-17 11:56:02       17 阅读
  5. Django captcha 验证

    2024-07-17 11:56:02       23 阅读
  6. Django REST Framework(九)GenericAPIView视图子类

    2024-07-17 11:56:02       25 阅读
  7. 【C++】C语言和C++的区别

    2024-07-17 11:56:02       22 阅读
  8. Angular 开发编码规约

    2024-07-17 11:56:02       27 阅读
  9. 2407d,让d的printf安全

    2024-07-17 11:56:02       30 阅读
  10. 【python】python装饰器整理

    2024-07-17 11:56:02       20 阅读
  11. 金豺狼优化算法(GWO)及其Python和MATLAB实现

    2024-07-17 11:56:02       25 阅读
  12. ChatGPT等模型SQL优化提示词

    2024-07-17 11:56:02       24 阅读
  13. 使用mysql shell搭建MGR

    2024-07-17 11:56:02       26 阅读
  14. 工作常用sql 总结-长期更新

    2024-07-17 11:56:02       18 阅读