Skip to content
TheChatArchiveThe Chat Archive
Unspecified model (huggingface.xxx)Hugging Face ShareLM (browser-extension contributions)

Create a latex wrapfigure to show the following figure: \begin{figure}[p] \centering…

  1. User

    Create a latex wrapfigure to show the following figure:

    \begin{figure*}[p] \centering \includegraphics[width=.9\textwidth]{images/illustration.pdf}

    \caption[short]{Illustration of a scaled family (points), and a scaling law (dashed yellow).} \end{figure*}

  2. Assistant

    To create a LaTeX wrapfigure instead of a regular figure, you will need to replace the figure* environment with wrapfigure and specify the width of the figure as well as its placement (left or right). Here is how you can modify your code to achieve this: \begin{wrapfigure}[number of lines]{placement}{width} \centering \includegraphics[width=\textwidth]{images/illustration.pdf} \caption[short]{Illustration of a scaled family (points), and a scaling law (dashed yellow).} \end{wrapfigure} Copied Here:

    number of lines is the number of lines of text that will wrap around the figure. placement can be one of the following: r (right), l (left), i (inside, i.e., inside the text margin), or o (outside, i.e., outside the text margin). The i and o options require the wrapfig package to be used in a two-column document. width is the width of the figure. Since you're using \textwidth for the \includegraphics width, the width here should match or be slightly larger than the width you use for the image, to account for the caption.

    Since you're currently using \textwidth for the image width within a figure* environment, which spans both columns in a two-column document, switching to wrapfigure means you'll need to adjust the width to fit within one column. If you're in a single-column document, you can keep using \textwidth, but in a two-column document, you might want to use something like 0.45\textwidth or slightly less, depending on the space you have available and the size of your figure. Here's an example for a two-column document: \begin{wrapfigure}{r}{0.45\textwidth} \centering \includegraphics[width=\textwidth]{images/illustration.pdf} \caption[short]{Illustration of a scaled family (points), and a scaling law (dashed yellow).} \end{wrapfigure} Copied And for a single-column document: \begin{wrapfigure}{r}{0.8\textwidth} \centering \includegraphics[width=\textwidth]{images/illustration.pdf} \caption[short]{Illustration of a scaled family (points), and a scaling law (dashed yellow).} \end{wrapfigure} Copied Remember, these are just examples. You need to adjust the width and number of lines parameters according to your specific document layout and figure size.