改变图形的位置

改变图形的位置
\documentclass{article}

\usepackage{amsfonts,amsmath,amssymb,graphicx,amsthm,mathtools,systeme}
\usepackage{geometry}
\geometry{left=1.5cm,right=1.5cm,top=1.5cm,bottom=2.3cm}
\begin{document}




\noindent Let $D$ be the region bounded by the graphs of $y = x$, $y = 0$ and $x = 1$ as shown in the figure. Evaluate the following quantity:
\begin{equation*}
\int \int_{D}(x^2+3y^2+2xy)dxdy
\end{equation*}
\vspace{-0.8cm}
\begin{figure}[h]
\begin{center}
\includegraphics[scale=0.7]{int.jpg}
%\caption {\scriptsize The region $D$.}
\end{center}
\end{figure}
\vspace{-0.8cm}
\end{document} 

在此处输入图片描述

答案1

adjustbox结合使用minipages可提供更多灵活性

也请看这里——理解小页面 - 顶部对齐

第一个adjustbox

![在此处输入图片描述

没有第一个adjustbox

在此处输入图片描述

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{amsmath}
\usepackage{adjustbox}

\begin{document}

    \section{Having a picture problem?}
    \adjustbox{valign=t}{\begin{minipage}[t]{0.6\linewidth}
            Let $D$ be the region bounded by the graphs of $y = x$, $y = 0$ and $x = 1$ as shown in the figure. Evaluate the following quantity:
            \begin{equation*}
                \int \int_{D}(x^2+3y^2+2xy)dxdy
            \end{equation*}
    \end{minipage}}%
    \hfill
    \adjustbox{valign=t}{\begin{minipage}[t]{0.3\linewidth}
            \includegraphics[width=\linewidth]{foo}
    \end{minipage}}
    

\end{document}

答案2

wrapstuff是个不错的选择。但是它的文档是中文的。

\documentclass{article}
\usepackage{graphicx,amsmath}
\usepackage{lipsum}
\usepackage{wrapstuff}
\begin{document}
\begin{wrapstuff}[type=figure, width=.2\textwidth]
  \centering
  \includegraphics[width=\textwidth]{example-image.jpg}
  \caption{Example Image}
\end{wrapstuff}
\noindent Let $D$ be the region bounded by the graphs of $y = x$, $y = 0$ and $x = 1$ as shown in the figure. Evaluate the following quantity:
\begin{equation*}
\iint_{D}(x^2+3y^2+2xy)dxdy
\end{equation*}
\lipsum[1]
\end{document} 

在此处输入图片描述

width若发现图形看起来很小,请调整键的值。

答案3

另一种方法是使用 paracol。唯一的问题是尝试对齐方程和图形,因为它们不共享基线。

\documentclass{article}

\usepackage{amsfonts,amsmath,amssymb,graphicx,amsthm,mathtools,systeme}
\usepackage{geometry}
\geometry{left=1.5cm,right=1.5cm,top=1.5cm,bottom=2.3cm}
\usepackage{paracol}
\begin{document}

\noindent Let $D$ be the region bounded by the graphs of $y = x$, $y = 0$ and $x = 1$ as shown in the figure. Evaluate the following quantity:

\hrule% show top
\begin{paracol}{2}
%\vfil% center in column
\begin{equation*}
\int \int_{D}(x^2+3y^2+2xy)dxdy
\end{equation*}
\switchcolumn
\begin{figure}[t]
\centering
\includegraphics[width=\linewidth]{example-image}
\caption {\scriptsize The region $D$.}
\end{figure}
\vspace{-\textfloatsep}% remove padding below figure
\end{paracol}
\hrule% show bottom
\end{document} 

演示

答案4

您可以使用float带有选项的包H图中。观察。双重积分代码是\iint并不是\整数 \整数

\documentclass{article}

\usepackage{amsfonts,amssymb,graphicx,amsthm,mathtools,systeme}
\usepackage{geometry}
\usepackage{float}
\geometry{left=1.5cm,right=1.5cm,top=1.5cm,bottom=2.3cm}
\begin{document}
\noindent Let $D$ be the region bounded by the graphs of $y = x$, $y = 0$ and $x = 1$ as shown in the figure. Evaluate the following quantity:
\begin{equation*}
\iint_{D}(x^2+3y^2+2xy)dxdy
\end{equation*}
\begin{figure}[H]
\centering
\includegraphics[scale=0.7]{example-image-b}
%\caption {\scriptsize The region $D$.}
\end{figure}

\end{document} 

在此处输入图片描述

相关内容