在 LaTeX 中将文本环绕在图形周围
当我将文本环绕在图形周围时,我无法让它环绕正确的文本。基本上,我想让图形所在部分中的文本环绕它,但是当我编译它时,我的图形最终会位于页面下方另一部分中的文本旁边。 1.我该如何改变这个? 2.(有点小问题)如何将标题标签(例如“图1”)设置为粗体?
\usepackage{graphicx}
\usepackage{wrapfig}
...
\begin{wrapfigure}{r}{40mm}
\begin{center}
\includegraphics[scale=0.5]{image}
\end{center}
\caption{This is the image.}
\end{wrapfigure}
When I wrap my text around a figure I cannot get it to wrap around the correct text. Basically, I want to have the text in the section the figure is in wrap around it, but when I compile it my figure ends up being farther down the page next to text in another section. 1. How do I change this? 2. (kind of a minor point) How do I make the label for the caption, such as "Figure 1.", bold?
\usepackage{graphicx}
\usepackage{wrapfig}
...
\begin{wrapfigure}{r}{40mm}
\begin{center}
\includegraphics[scale=0.5]{image}
\end{center}
\caption{This is the image.}
\end{wrapfigure}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题#1
这可能取决于
\includegraphics
选项指定的宽度可能大于wrapfigure< 开头指定的宽度/代码> 环境。
最好指定与
\textwidth
相关的宽度。此外,由于wrapfig框比figure框稍大,所以它应该总是大一点:
问题#2
使用
caption
包,您可以更改您喜欢的标签。如果您只想将它们加粗,请输入您的序言:Question #1
It may depend on the fact that the width specified as the option of
\includegraphics
may be greater than the width specified at the beginning of thewrapfigure
environment.It is always better to specify widths in relation to the
\textwidth
.Furthermore, since the wrapfig box is slightly larger than the figure box, it should always be a little larger:
Question #2
Using the
caption
package, you can change the layout of the labels as you prefer. If you just want them to be bold, type in your preamble: