Latex学习笔记(十一)各种图片的插入

2022-06-14 09:48:21 浏览数 (2)

插入单张普通图片:

代码语言:javascript复制
begin{figure}[H]
	small
	centering
	includegraphics[width=.6textwidth]{1.png}
	caption{SIER Model of Ebola propagation } 
end{figure}

插入三张图(第一行两张,第二行一张居中):

代码语言:javascript复制
begin{figure}[H]
	centering
	subfigure[Guinea]{
		includegraphics[width=7.5cm]{ji2.png}
		%caption{fig1}
	}
	quad
	subfigure[Liberia]{
		includegraphics[width=7.5cm]{li2.png}
	}
	quad
	centering
	subfigure[Sierra Leone]{
		includegraphics[width=7.5cm]{sa2.png}
	}
	quad
	caption{Changes in drug demand over time in three countries}
end{figure}

插入三张图片(一行三张):

代码语言:javascript复制
begin{figure}[H]
	centering
	begin{minipage}[c]{0.3textwidth} %minipage使之保持同一行,0.2占这行的0.2
		centering
		includegraphics[width=1textwidth]{1.jpg} %0.5指图片宽度
		caption{hair dryer}
	end{minipage}%
	begin{minipage}[c]{0.3textwidth}
		centering
		includegraphics[width=1textwidth]{2.jpg}
		caption{microwave}
	end{minipage}
	begin{minipage}[c]{0.3textwidth}
		centering
		includegraphics[width=1textwidth]{3.jpg}
		caption{pacifier}
	end{minipage}
end{figure}

注:使用时只需修改图片路径,修改caption图片标题

0 人点赞