文字旁边附上一幅图片

为了实现如下图这样的效果(为图片附上一段解释):

使用wrapfig实现:

\documentclass{article}

\usepackage{wrapfig}
\usepackage{graphicx}

\begin{document}
文字和图片的顺序为:先放图片,再放图片旁的文字。

\begin{wrapfigure}{r}{.35\textwidth}    %{r}表示图片位于文字的右方,{l}同理 
	\vspace{-15pt}    %负的越多,图片越靠上方
	\begin{flushright}    %图片靠右对齐
		\includegraphics[scale=.29]{cat.png}    %scale描述图片的缩放程度
	\end{flushright}
	\vspace{-30pt}    %负的越多,图片下方的空白越少
\end{wrapfigure}

These are two very different frameworks for how to build a machine learning model.
Consider a visual metaphor: imagine we’re trying to distinguish dog images from 
cat images. A generative model would have the goal of understanding what dogs look 
like and what cats look like. You might literally ask such a model to ‘generate’, 
i.e. draw, a dog. Given a test image, the system then asks whether it’s the cat 
model or the dog model that better fits (is less surprised by) the image, and 
chooses that as its label.

\end{docment}

posted @ 2020-07-02 18:15  DifDay哒哒哒  阅读(254)  评论(0编辑  收藏  举报