概述
Latex插图的命令是includegraphics[选项]{文件} 该命令详情
找到命令关键词,去此网站查找,如subfigure
subfigure 英文的overleaf 官方文档搜索代码更佳
例如(编辑器中会自动补全代码,有的参数要赋值,默认有等号):
includegraphics[width=textwidth,viewport=10 10 600 600,clip]{./figure/test3.png}
width=textwidth, 将所插入图形缩放到和文本行的宽度一样宽。
viewport=10 10 600 600,clip , 输入左上角向右下角坐标,具体可以查看生成图片尺寸;clip表示只显示裁剪出的部分
includegraphics[width=textwidth]{graphics.eps}
将所插入图形缩放到和文本行的宽度一样宽。includegraphics[width=0.80textwidth]{graphics.eps}
使得插入图形的宽度为文本行宽的 80%。当与 calc 宏包配合使用 时,下面的命令可令图形的宽度比文本行宽少 2 英寸:
usepackage{caption}
usepackage{subcaption}
begin{figure} % 双栏时使用 {figure*}
centering
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{graph1}
caption{$y=x$}
label{fig:y equals x}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{graph2}
caption{$y=3sinx$}
label{fig:three sin x}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{graph3}
caption{$y=5/x$}
label{fig:five over x}
end{subfigure}
caption{Three simple graphs}
label{fig:three graphs}
end{figure}
figure参数
Parameter Position
h-=-=-=Place the float here, i.e., approximately at the same point it occurs in the source text (however, not exactly at the spot)
t-=-=-=Position at the top of the page. b Position at the bottom of the page.
p-=-=-=Put on a special page for floats only.
!-=-=-=Override internal parameters LaTeX uses for determining “good” float positions.
H-=-=-=Places the float at precisely the location in the LATEX code. Requires the float package, though may cause problems occasionally. This is somewhat equivalent to h!.
labels and 交叉引用
图和公式表格一样,可以被其它文本引用。交叉引用非常简单,只需要在figure环境添加一个label,然后再用这个label指向该图片。
begin{figure}[h]
centering
includegraphics[width=0.25textwidth]{mesh}
caption{a nice plot}
label{fig:mesh1}
end{figure}
As you can see in the figure ref{fig:mesh1}, the
function grows near 0. Also, in the page pageref{fig:mesh1}
is the same example.
https://www.overleaf.com/learn/latex/Inserting_Images#Generating_high-res_and_low-res_images
label{fig:mesh1}
This will set a label for this figure. Since labels can be used in several types of elements within the document, it’s a good practice to use a prefix, such as fig: in the example.
ref{fig:mesh1}
This command will insert the number assigned to the figure. It’s automatically generated and will be updated if insert some other figure before the referenced one.
pageref{fig:mesh1}
This prints out the page number where the referenced image appears.
最后
以上就是称心招牌为你收集整理的Latex系列(四)---论文图片排版figure参数的全部内容,希望文章能够帮你解决Latex系列(四)---论文图片排版figure参数所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复