如何结束 wrapfigure 环境

如何结束 wrapfigure 环境

当我想要插入一个图形时,我使用了 wrapfigure,但无法在图形后停止它。我使用了代码

\begin{wrapfigure}[8]{r}{20cm}

\documentclass[landscape,12pt,a3paper]{article}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[left=2.00cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}

\setlength{\intextsep}{1cm}
\begin{wrapfigure}[35]{r}{20cm}
    \centering
    \includegraphics[width=20cm]{03-1.pdf}\\
\end{wrapfigure}

    \subsubsection*{Shell sort}
\addcontentsline{toc}{subsubsection}{Shell sort}

Main article: Shell sort

Shell sort was invented by Donald Shell in 1959. It improves upon bubble sort and insertion sort by moving out of order elements more than one position at a time. One implementation can be described as arranging the data sequence in a two-dimensional array and then sorting the columns of the array using insertion sort.

\subsubsection*{Comb sort}
\addcontentsline{toc}{subsubsection}{Comb sort} 
Main article: Comb sort

Comb sort is a relatively simple sorting algorithm originally designed by Wlodzimierz Dobosiewicz in 1980.[19] Later it was rediscovered and popularized by Stephen Lacey and Richard Box with a Byte Magazine article published in April 1991. Comb sort improves on bubble sort. The basic idea is to eliminate turtles, or small values near the end of the list, since in a bubble sort these slow the sorting down tremendously. (Rabbits, large values around the beginning of the list, do not pose a problem in bubble sort)

\subsection*{Distribution sort}
\addcontentsline{toc}{subsection}{Distribution sort}    
See also: External sorting

Distribution sort refers to any sorting algorithm where data are distributed from their input to multiple intermediate structures which are then gathered and placed on the output. For example, both bucket sort and flashsort are distribution based sorting algorithms. Distribution sorting algorithms can be used on a single processor, or they can be a distributed algorithm, where individual subsets are separately sorted on different processors, then combined. This allows external sorting of data too large to fit into a single computer's memory.    \end{document}

在此处输入图片描述

答案1

使用的语法wrapfigure(来自手册):

在此处输入图片描述

您已经使用了该数字35,因此预计会得到那么多窄线。查看问题中的图片,15-17 的值是合适的。适当调整此数字。此外,最好在段落中多加一些文字,以便换行看起来不错。

\documentclass[landscape,12pt,a3paper]{article}
\usepackage[demo]{graphicx}      %% remove demo
\usepackage{wrapfig}
\usepackage[left=2.00cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{lipsum}
\begin{document}

\setlength{\intextsep}{1cm}
\begin{wrapfigure}[8]{r}{20cm}  %% I used 8 here, change suitably
    \centering
    \includegraphics[width=20cm]{03-1.pdf}\\
\end{wrapfigure}
\lipsum[1-2]  %% just for putting more text, yes put more text here
text text  text text  text text  text text  text text ........

\end{document}

在此处输入图片描述

关于编辑的问题,请将wrapfigure以下内容放在

\subsubsection*{Shell sort}
\addcontentsline{toc}{subsubsection}{Shell sort}
\setlength{\intextsep}{1cm}
\begin{wrapfigure}[9]{r}{20cm}
    \centering
    \includegraphics[width=20cm]{03-1.pdf}\\
\end{wrapfigure}

Main article: Shell sort
.
.
.

在此处输入图片描述

但是,段落中的文字太少Main article: Shell sort...

相关内容