答案1
\documentclass{article}
\usepackage{wrapfig}
\usepackage{framed}
\usepackage{graphicx}
\begin{document}
\begin{wrapfigure}{r}{0.5\textwidth}
\begin{framed}
\caption{A test figure with its caption}\label{fig:plots}
\includegraphics[width=1\textwidth]{example-image}
\end{framed}
\end{wrapfigure}
a aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a
a aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a
a aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a
a aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a
\end{document}
生产
请编辑您的问题以获得一个完整的小文档,显示您如何定义命令并生成您显示的输出。