Fre*_*old 7 layout latex text-alignment figure
我的图像和文字有问题.我有这个代码:
Some text...\\
\begin{figure}[ht]
\centering
\includegraphics[scale=0.75]{picture.jpg}
\caption{The caption}
\label{fig:picture}
\end{figure}
Some more text...
Run Code Online (Sandbox Code Playgroud)
基本上,我想要这个:
Some text. (Above image in the code)
[end of page / new page]
image
Some more text. (Below the image in the code)
[start of new section]
Run Code Online (Sandbox Code Playgroud)
但是,上面的代码给我的是:
Some text. (Above image in the code)
Some more text. (Below the image in the code)
[end of page / new page]
image
[start of new section]
Run Code Online (Sandbox Code Playgroud)
Latex坚持将所有内容放在图像上方的新部分,即使它位于代码中的图像下方.可能是因为图像浮在上面 - 但我的另类选择是什么?第一页上没有足够的空间在那里显示图像,我不能使用[h]作为浮点对齐.
我可以通过创建一个空的新部分来"破解它",\section*{}
但这会创建一些看起来很奇怪的空白区域.有什么建议?
Ale*_*tin 16
如果你真的需要在那个地方有这个数字,请使用float
包:
在序言中:
\usepackage{float}
Run Code Online (Sandbox Code Playgroud)
那么,在文中:
Some text...
\begin{figure}[H]
\centering
\includegraphics[scale=0.75]{picture.jpg}
\caption{The caption}
\label{fig:picture}
\end{figure}
Some more text...
Run Code Online (Sandbox Code Playgroud)
尽管如此,更可取的是让LaTeX放置花车.
另一种做同样事情的方法是使用caption
包.
在序言中:
\usepackage{caption}
Run Code Online (Sandbox Code Playgroud)
那么,在文中:
Some text...
\begin{center}
\includegraphics[scale=0.75]{picture.jpg}\\
\caption{figure}[LOF entry]{The caption}
\label{fig:picture}
\end{center}
Some more text...
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
46230 次 |
最近记录: |