LaTex insert pictures

The basic syntax (a) Illustration

% Imported picture packages
\ usepackage {graphicx}

Insert Picture%
% syntax: \ includegraphics [options] {file}
% format: ESP, PDF, PNG, JPG , BMP

(B) inserting the basic settings

1. Description:

Set in the options:

scale = 0.3 disposed scaling

height = 3cm set of picture height

width = width of the image provided 100pt

height = \ set of images relative height 1 textheight

width = 1 \ disposed opposite the image width textwidth

angle = -45 installation angle

Simultaneously setting a plurality of parameters, divided by commas

2. Source:

 

%导言区
\documentclass[UTF8]{ctexart}

%导入图片的宏包
\usepackage{graphicx}
%语法:\includegraphics[可选项]{文件}
%格式:ESP,PDF,PNG,JPG,BMP

%添加路径,图片的搜索路径
%test为与.tex文件在同一文件夹下的一个文件夹,图片都存放在test文件夹中。
\graphicspath{{test/}} 

%正文区
\begin{document}
	\LaTeX{}中的插图
	
	\includegraphics{a.jpg}
	
	\includegraphics{b.png}
	%设置缩放比例
	
	\includegraphics{t.jpg}
	
	\includegraphics[scale=0.3]{t.jpg}
	
	%设置图片的高度
	\includegraphics[height=3cm]{t.jpg}
	
	%设置图片的宽度
	\includegraphics[width=100pt]{t.jpg}
	
	%设置图片的相对高度
	\includegraphics[height=1\textheight]{t.jpg}
	
	%设置图片的相对宽度
	\includegraphics[width=1\textwidth]{t.jpg}
	
	%设置角度
	\includegraphics[angle=-45]{b.png}
	
	%同时设置多个参数时,用逗进行分割
	\includegraphics[width=1\textwidth,angle=-45]{b.png}
	
\end{document}

3. The output effect

Published 118 original articles · won praise 63 · views 40000 +

Guess you like

Origin blog.csdn.net/qq_42185999/article/details/104204759