图形和文本的显示顺序错误

图形和文本的显示顺序错误

为什么会出现这些数字代替章节标题???

\documentclass[pdftex,12pt,a4paper,english,dutch,leqno]{article}

\usepackage[top=1cm,right=1cm,bottom=1cm,left=1.5cm,noheadfoot]{geometry}
\usepackage{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.markings,patterns,calc}
\usepackage[heightadjust=all]{floatrow}
\usepackage[labelformat=empty]{caption}

\begin{document}

\section*{Why is this section title BELOW the figures ???!!!}

\begin{figure}
\begin{floatrow}
\ffigbox[\FBwidth]
{\begin{tikzpicture}[>=stealth']
\draw[line width=1mm,rotate=45] (0,0) rectangle (2,2);
\end{tikzpicture}}
{\caption{\footnotesize\bf Figure 1.}
\label{fig:_____}}
\hspace{0cm}
\ffigbox[\FBwidth]
{\begin{tikzpicture}[>=stealth']
\draw[line width=1mm] (0,0) circle (3);
\end{tikzpicture}}
{\caption{\footnotesize\bf Figure 2.}
\label{fig:_____}}
\end{floatrow}
\end{figure}

The figures should appear between the section title and THIS line !!!

\end{document}

答案1

Figure 环境会“浮动”以找到页面上的最佳位置。开始绘制图形时,可以使用选项 [htbp!] 来指定图形应该放在“此处”、“此页面的顶部”、此页面的“底部”还是为浮动保留的特殊“页面”。LaTeX 以其无穷的智慧有时会阻止您将图形放在“丑陋”的地方,但您可以使用“!”选项(某种程度上)覆盖其决定。当您没有使用任何选项时,环境会假定您提供了 [tbp],并选择将图形放在页面顶部,即您的部分所在的位置上方。因此使用

\begin{figure}[bp!]

应该可以解决你的问题。

相关内容