18

画像とテキストに問題があります。私はこのコードを持っています:

Some text...\\

\begin{figure}[ht]
\centering
\includegraphics[scale=0.75]{picture.jpg}
\caption{The caption}   
\label{fig:picture}
\end{figure}

Some more text...

基本的に、私はこれが欲しいです:

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]

しかし、上記のコードが私に与えるものはこれです:

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]

ラテックスは、コード内の画像の下にある場合でも、画像の上に新しいセクション以外のすべてを配置することを主張します。それはおそらく画像が上に浮かんでいるためです-しかし、私の代替案は何ですか?最初のページに画像を表示するのに十分なスペースがないため、[h]をfloat-alignmentとして使用できません。

のように空の新しいセクションを作成することで「ハック」できます\section*{}が、これにより空白が作成され、奇妙に見えます。助言がありますか?

4

1 に答える 1

35

その場所にフィギュアを配置する必要がある場合は、次のパッケージを使用しくださいfloat

前文:

\usepackage{float}

次に、テキストで:

Some text...

\begin{figure}[H]
  \centering
  \includegraphics[scale=0.75]{picture.jpg}
  \caption{The caption}   
  \label{fig:picture}
\end{figure}

Some more text...

とはいえ、LaTeXにフロートを配置させる方が望ましいです。


同じことを行う別の方法は、captionパッケージを使用することです。

前文:

\usepackage{caption}

次に、テキストで:

Some text...

\begin{center}
  \includegraphics[scale=0.75]{picture.jpg}\\
  \caption{figure}[LOF entry]{The caption}   
  \label{fig:picture}
\end{center}

Some more text...
于 2010-05-13T15:30:19.733 に答える