Skip to content
TheChatArchiveThe Chat Archive
ChatGPT (model unspecified)· OpenAIHugging Face ShareLM (browser-extension contributions)

I transformed figure to wrapfig, what include should I have? \begin{wrapfig} \centering…

  1. User

    I transformed figure to wrapfig, what include should I have? \begin{wrapfig} \centering \includegraphics[width=.65\linewidth]{skill_dist.png} \caption{Soft-skill comparison between Claude-3.5-Sonnet and GPT-4o, Qwen-Plus and Humanity across ten key capability dimensions. Each environment in TextArena is weighted by its relevance to specific skills, allowing for a granular comparison of model strengths and weaknesses. Each skill is normalized separately for presentation, see leaderboard for full data.} \label{fig:skill-comparison} \end{wrapfig}

  2. Assistant

    To use the wrapfig environment in LaTeX, you need to include the wrapfig package in your preamble. Also, since you’re using \includegraphics, you should ensure the graphicx package is included as well (which you probably already have if you were using figure before). Here's what you need to include in your LaTeX preamble: latexCopiarEditar\usepackage{wrapfig} \usepackage{graphicx}

    Optionally, you might also want caption or subcaption if you’re doing more complex figure setups, but for your example, just those two are enough. Let me know if you want help tweaking the wrapfig layout—it can be a little tricky with alignment and text flow.

  3. User

    I still get this error: You have created an environment (using \begin{…} and \end{…} commands) which is not recognized. Make sure you have included the required package for that environment in your preamble, and that the environment is spelled correctly.

  4. Assistant

    Ah, I see the issue—you’re using \begin{wrapfig} without specifying placement and width, which are required arguments for the wrapfig environment. The correct syntax is: latexCopiarEditar\begin{wrapfigure}[lines]{placement}{width} % figure contents here \end{wrapfigure}

    Example (based on your figure): latexCopiarEditar\begin{wrapfigure}{r}{0.65\linewidth} \centering \includegraphics[width=\linewidth]{skill_dist.png} \caption{Soft-skill comparison between Claude-3.5-Sonnet and GPT-4o, Qwen-Plus and Humanity across ten key capability dimensions. Each environment in TextArena is weighted by its relevance to specific skills, allowing for a granular comparison of model strengths and weaknesses. Each skill is normalized separately for presentation, see leaderboard for full data.} \label{fig:skill-comparison} \end{wrapfigure}

    Key points:

    r places the figure on the right, use l for left.

    0.65\linewidth sets the width of the wrap (not just the image).

    You can add an optional [number of lines] to tweak how far down the text wraps.

    Also, ensure the package name is correct: latexCopiarEditar\usepackage{wrapfig}

    Let me know if you want help adjusting margins or placement!