插入 pdf 图形时如何避免出现空白?

插入 pdf 图形时如何避免出现空白?

在以下一段 latex 代码中,我想将一个名为 sharpideq2 的 pdf 图形放置在第 1 页的文本行中,避免出现空白。但我得到的却是单独放置在第 2 页中间的图形。该图形只能保存为 pdf 格式,并占据一个 pdf 页面的中间。你能帮助我吗?

\documentclass[11 pt,a4paper,oneside,openany, notitlepage]{article}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{amsmath, amssymb, graphics}
\usepackage{amsthm}
\usepackage{amsfonts}
\marginparwidth 0pt
\oddsidemargin 0pt
\evensidemargin 0pt
\marginparsep 0pt
\linespread{1.5}
\topmargin 0pt
\textwidth 6.5in
\textheight 8.5 in
\usepackage{epsfig}
\usepackage{geometry}
\usepackage{morefloats}
\usepackage{bbm}
\usepackage{color}
\usepackage{enumerate}
\usepackage{bigints}
\usepackage{float}



\begin{document}
... which implies that 
\begin{equation}
\label{sharpideq1}
\begin{aligned}
\mathbb{P}(G_{\cdot 1}=g_{\bullet,1}|W_1=w_1,N=n) \times ... & \times \mathbb{P}(G_{\cdot N}=g_{\bullet,N}|W_N=w_N,N=n) \\
& \leq \prod_{j=1}^{N} \mathbb{P}(S_{\theta_u}^{(j)} \cap \tilde{K}^{(b,j)}\neq \emptyset|W_j=w_j,N=n)
\end{aligned}
\end{equation}
\colorbox{yellow}{Since $\epsilon_{\cdot j}$ are independently distributed across $j$ under Assumption 1}, \colorbox{yellow}{$G_{\cdot j}$ and $S^{(j)}_{\theta_u}$ are} 
\colorbox{yellow}{independently distributed across $j$ conditioned on $W_j,N$}. Thus, 
\begin{equation}
\label{sharpideq2}
\mathbb{P}(G=g|X=x,N=n)=\mathbb{P}(G_{\cdot 1}=g_{\bullet,1}|W_1=w_1,N=n) \times ... \times \mathbb{P}(G_{\cdot N}=g_{\bullet,N}|W_N=w_N,N=n)
\end{equation}
as illustrated in this example
% \begin{figure}[H]
% \begin{center}
% \centerline{\includegraphics[scale=0.6]{sharpideq2.pdf}}
% \end{center}
% \caption{Blah blah}
% \end{figure}
For the same reason
\begin{equation}
\label{sharpideq3}
\mathbb{P}(S_{\theta_u} \cap K^b \neq \emptyset| X=x,N=n)=\prod_{j=1}^{N} \mathbb{P}(S_{\theta_u}^{(j)} \cap \tilde{K}^{(b,j)}\neq \emptyset|W_j=w_j,N=n)
\end{equation}

\end{document}

答案1

在此处输入图片描述

使用\usepackage{capt-of}然后:

as illustrated in this example
\begin{center}
\includegraphics[scale=0.6]{sharpideq2.pdf}

\captionof{figure}{Blah blah}
\end{center}
For the same reason

\documentclass[11 pt,a4paper,oneside,openany, notitlepage]{article}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{amsmath, amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\marginparwidth 0pt
\oddsidemargin 0pt
\evensidemargin 0pt
\marginparsep 0pt
\linespread{1.5}
\topmargin 0pt
\textwidth 6.5in
\textheight 8.5 in
\usepackage{geometry}
\usepackage{morefloats}
\usepackage{bbm}
\usepackage{enumerate}
\usepackage{bigints}
\usepackage{float}
\usepackage{capt-of}


\begin{document}
... which implies that 
\begin{equation}
\label{sharpideq1}
\begin{aligned}
\mathbb{P}(G_{\cdot 1}=g_{\bullet,1}|W_1=w_1,N=n) \times ... & \times \mathbb{P}(G_{\cdot N}=g_{\bullet,N}|W_N=w_N,N=n) \\
& \leq \prod_{j=1}^{N} \mathbb{P}(S_{\theta_u}^{(j)} \cap \tilde{K}^{(b,j)}\neq \emptyset|W_j=w_j,N=n)
\end{aligned}
\end{equation}
\colorbox{yellow}{Since $\epsilon_{\cdot j}$ are independently distributed across $j$ under Assumption 1}, \colorbox{yellow}{$G_{\cdot j}$ and $S^{(j)}_{\theta_u}$ are} 
\colorbox{yellow}{independently distributed across $j$ conditioned on $W_j,N$}. Thus, 
\begin{equation}
\label{sharpideq2}
\mathbb{P}(G=g|X=x,N=n)=\mathbb{P}(G_{\cdot 1}=g_{\bullet,1}|W_1=w_1,N=n) \times ... \times \mathbb{P}(G_{\cdot N}=g_{\bullet,N}|W_N=w_N,N=n)
\end{equation}
as illustrated in this example
\begin{center}
\rule{3cm}{4cm}

\captionof{figure}{zzzz}
\end{center}
For the same reason
\begin{equation}
\label{sharpideq3}
\mathbb{P}(S_{\theta_u} \cap K^b \neq \emptyset| X=x,N=n)=\prod_{j=1}^{N} \mathbb{P}(S_{\theta_u}^{(j)} \cap \tilde{K}^{(b,j)}\neq \emptyset|W_j=w_j,N=n)
\end{equation}

\end{document}

与您的序言无关的评论:

\documentclass[11 pt,a4paper,oneside,openany, notitlepage]{article}

11 pt偶然起作用,但最好使用11pt这不是长度规范(单位周围可以使用空格),而是姓名的一个选项。

\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{amsmath, amssymb, graphics}

您已经加载,graphicx因此graphics此处不执行任何操作。

\usepackage{amsthm}
\usepackage{amsfonts}

您已加载,amssymb因此amsfonts此处不执行任何操作

\marginparwidth 0pt
\oddsidemargin 0pt
\evensidemargin 0pt
\marginparsep 0pt
\linespread{1.5}
\topmargin 0pt
\textwidth 6.5in
\textheight 8.5 in

这些是 TeX 原始设置,但最好使用您稍后定义的包(并且在文档类选项中明确指定但随后以英寸为单位设置文本块的大小geometry有点不寻常。)a4paper

\usepackage{epsfig}

除非您使用\epsfig20 世纪 80 年代流行的 LaTeX2.09 命令的片段,否则请不要使用此包。

\usepackage{geometry}

该包已加载但未使用(见上文)

相关内容