可能重复:
将表格/图片放在靠近提及的地方
\usepackage{amsfonts}
\usepackage{pdfpages}
\usepackage[hidelinks,unicode]{hyperref} %- to zeby byly polskie znaki w bookmarkach + konwersja na utf8
%\usepackage[hidelinks]{hyperref}
\usepackage{etoolbox}
\usepackage[T1,OT4]{fontenc}
\usepackage{graphicx}
\usepackage{hypcap}
\usepackage{anysize}
\marginsize{3.5cm}{2.5cm}{2cm}{2cm}
\let\origfigure\figure
\let\endorigfigure\endfigure
\renewcommand\baselinestretch{1.5}
\patchcmd{\thebibliography}{*}{}{}{}
\makeatletter
\g@addto@macro\@floatboxreset\centering
\makeatother
\SetSectionFormatting[breakbefore]{chapter} {24pt plus5pt minus2pt}
{\FormatHangHeading{\fontsize{17}{17}\textbf}} {10pt plus3pt}
\SetSectionFormatting{section} {24pt plus5pt minus2pt}
{\FormatHangHeading{\fontsize{14}{14}\textbf}} {10pt plus3pt}
\SetSectionFormatting{subsection} {24pt plus5pt minus2pt}
{\FormatHangHeading{\fontsize{12}{12}\textbf}} {10pt plus3pt}
\makeatletter
\pretocmd{\tableofcontents}{%
\if@openright\cleardoublepage\else\clearpage\fi
\pdfbookmark[0]{\contentsname}{toc}%
}{}{}%
\makeatother
\begin{document}
%\language 12345 % wyłącza dzielenie wyrazów
\pagenumbering{Alph}
\begin{titlepage}
\pdfbookmark{Strona tytułowa}{}
\includepdf[pages=1-]{strona_tytulowa.pdf}
\end{titlepage}
\pagenumbering{arabic}
\tableofcontents
\input{tresc.tex}
\input{bibliografia.tex}
\end{document}
tresc.tex:
\chapter{Bzdety}\label{rozdzial-bzdety}
W rozdziale \ref{rozdzial-bzdety} ze strony \pageref{rozdzial-bzdety} znajduje się obrazek \ref{obraz-jesien} na stronie \pageref{obraz-jesien}.
The first paragraph.
\begin{figure}
\includegraphics[scale=1]{a.jpg}
\caption[Opcjonalny skrócony opis do spisu obrazków]{Opis}
\label{obraz-jesien}
\end{figure}
The second paragraph.
我期望的是这样的:
The first paragraph.
[image]
[caption]
The second paragraph.
我有:
The first paragraph.
The second paragraph.
[image]
[caption]
图片位于下一页的正中央。我该如何修复?
答案1
使用位置说明符,例如,您可以[h]
像下面这样使用:
\begin{figure}[h]
... figure contents ...
\end{figure}