![如果使用未编号的部分,浮动换行图会使整篇文章文本换行](https://linux22.com/image/438497/%E5%A6%82%E6%9E%9C%E4%BD%BF%E7%94%A8%E6%9C%AA%E7%BC%96%E5%8F%B7%E7%9A%84%E9%83%A8%E5%88%86%EF%BC%8C%E6%B5%AE%E5%8A%A8%E6%8D%A2%E8%A1%8C%E5%9B%BE%E4%BC%9A%E4%BD%BF%E6%95%B4%E7%AF%87%E6%96%87%E7%AB%A0%E6%96%87%E6%9C%AC%E6%8D%A2%E8%A1%8C.png)
我有以下文章:
\documentclass[10pt]{article}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
Pig chislic turducken short ribs boudin jerky venison sausage ground round cupim strip steak beef ribs swine buffalo sirloin. Jowl tongue porchetta beef ribs boudin biltong filet mignon pork belly ham hock meatball. Bacon landjaeger strip steak, venison andouille shankle ground round tail doner corned beef pork loin rump tri-tip porchetta jowl. Short loin chicken pork belly sirloin pancetta jerky doner capicola cupim rump spare ribs andouille shankle salami. Chuck shoulder short loin, rump salami burgdoggen short ribs swine beef drumstick shank andouille frankfurter. Pork landjaeger ground round chicken, biltong picanha shank meatloaf strip steak cupim sausage capicola. Cupim short loin prosciutto pork loin cow bresaola pastrami salami short ribs strip steak frankfurter rump biltong picanha ground round.
\begin{wrapfigure}{R}{.5\textwidth}
\begin{center}
\includegraphics[width=.45\textwidth]{frog}
\end{center}
\caption{this is my caption}
\end{wrapfigure}
\section*{Meat}
Bacon ipsum dolor amet pork loin bresaola t-bone ball tip boudin pig brisket alcatra turducken ground round pork chop chuck shank. Turkey turducken salami cupim jowl buffalo short loin beef ribs pork belly shoulder picanha ground round burgdoggen. Filet mignon tongue alcatra, bacon picanha ribeye hamburger pastrami salami landjaeger brisket shoulder ground round drumstick. Pork tail biltong boudin, shoulder beef ribs brisket. Meatball doner pork belly, bacon salami chislic pork chop rump sausage kevin buffalo hamburger tail turducken. Pork loin beef tri-tip, shank doner spare ribs fatback swine pancetta.
Spare ribs turkey strip steak salami sirloin bresaola rump jerky. Beef ribs frankfurter pork loin pig sirloin. Cupim kielbasa jowl, porchetta turducken brisket pastrami fatback spare ribs short ribs jerky t-bone chislic. Tail turducken pastrami, capicola tongue kevin kielbasa ham hock corned beef cupim sausage shoulder. Tri-tip doner swine biltong salami. Frankfurter buffalo corned beef bresaola, pastrami brisket fatback ground round ham meatloaf pork loin hamburger jerky.
Pig chislic turducken short ribs boudin jerky venison sausage ground round cupim strip steak beef ribs swine buffalo sirloin. Jowl tongue porchetta beef ribs boudin biltong filet mignon pork belly ham hock meatball. Bacon landjaeger strip steak, venison andouille shankle ground round tail doner corned beef pork loin rump tri-tip porchetta jowl. Short loin chicken pork belly sirloin pancetta jerky doner capicola cupim rump spare ribs andouille shankle salami. Chuck shoulder short loin, rump salami burgdoggen short ribs swine beef drumstick shank andouille frankfurter. Pork landjaeger ground round chicken, biltong picanha shank meatloaf strip steak cupim sausage capicola. Cupim short loin prosciutto pork loin cow bresaola pastrami salami short ribs strip steak frankfurter rump biltong picanha ground round.
\end{document}
换行后,虽然没有图像,但文章剩余的文本也会换行:
但如果我\section*{Frog}
与交换\section{Frog}
,它就会按预期工作:
我是不是漏掉了什么?为什么不适wrapfigure
用于未编号的部分?
答案1
这显示了如何使用 paracol\splitpar
和来实现这一点\continuepar
。
要手动拆分段落,首先将 paracol 延伸至段落末尾,长度要比定位图末尾所需的长度要长。然后添加\splitpar{...}
以包含最后一段的其余部分,并\continuepar
在之后添加\end{paracol}
。
如果边缘不均匀,请添加\sloppy
内部伞绳。
\documentclass[10pt]{article}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{paracol}
\newsavebox{\textbox}
\newcommand{\splitpar}[2][\textwidth]{% #1 = width of column (optional), #2 = rest of paragraph after split
\unskip\strut{\parfillskip=0pt\parskip=0pt\par}%
\global\setbox\textbox=\vbox{\hsize=#1\relax\noindent\strut #2\strut}}
\newcommand{\continuepar}{\unvbox\textbox}
\begin{document}
Pig chislic turducken short ribs boudin jerky venison sausage ground round cupim strip steak beef ribs swine buffalo sirloin. Jowl tongue porchetta beef ribs boudin biltong filet mignon pork belly ham hock meatball. Bacon landjaeger strip steak, venison andouille shankle ground round tail doner corned beef pork loin rump tri-tip porchetta jowl. Short loin chicken pork belly sirloin pancetta jerky doner capicola cupim rump spare ribs andouille shankle salami. Chuck shoulder short loin, rump salami burgdoggen short ribs swine beef drumstick shank andouille frankfurter. Pork landjaeger ground round chicken, biltong picanha shank meatloaf strip steak cupim sausage capicola. Cupim short loin prosciutto pork loin cow bresaola pastrami salami short ribs strip steak frankfurter rump biltong picanha ground round.
\begin{paracol}{2}
\switchcolumn
\begin{figure}[h]
\centering
\includegraphics[width=.45\textwidth]{example-image}
\caption{this is my caption}
\end{figure}
\hrule% remove from final version
\switchcolumn
\sloppy% SOP for narow columns
\section*{Meat}
Bacon ipsum dolor amet pork loin bresaola t-bone ball tip boudin pig brisket alcatra turducken ground round pork chop chuck shank. Turkey turducken salami cupim jowl buffalo short loin beef ribs pork belly shoulder picanha ground round burgdoggen. Filet mignon tongue alcatra, bacon picanha ribeye hamburger pastrami salami landjaeger \splitpar{\fussy brisket shoulder ground round drumstick. Pork tail biltong boudin, shoulder beef ribs brisket. Meatball doner pork belly, bacon salami chislic pork chop rump sausage kevin buffalo hamburger tail turducken. Pork loin beef tri-tip, shank doner spare ribs fatback swine pancetta.}
\end{paracol}
\continuepar
Spare ribs turkey strip steak salami sirloin bresaola rump jerky. Beef ribs frankfurter pork loin pig sirloin. Cupim kielbasa jowl, porchetta turducken brisket pastrami fatback spare ribs short ribs jerky t-bone chislic. Tail turducken pastrami, capicola tongue kevin kielbasa ham hock corned beef cupim sausage shoulder. Tri-tip doner swine biltong salami. Frankfurter buffalo corned beef bresaola, pastrami brisket fatback ground round ham meatloaf pork loin hamburger jerky.
Pig chislic turducken short ribs boudin jerky venison sausage ground round cupim strip steak beef ribs swine buffalo sirloin. Jowl tongue porchetta beef ribs boudin biltong filet mignon pork belly ham hock meatball. Bacon landjaeger strip steak, venison andouille shankle ground round tail doner corned beef pork loin rump tri-tip porchetta jowl. Short loin chicken pork belly sirloin pancetta jerky doner capicola cupim rump spare ribs andouille shankle salami. Chuck shoulder short loin, rump salami burgdoggen short ribs swine beef drumstick shank andouille frankfurter. Pork landjaeger ground round chicken, biltong picanha shank meatloaf strip steak cupim sausage capicola. Cupim short loin prosciutto pork loin cow bresaola pastrami salami short ribs strip steak frankfurter rump biltong picanha ground round.
\end{document}
虽然这不会自动浮动到下一页,但您可以手动在页面末尾拆分段落并从最顶部开始拆分。
\documentclass[10pt]{article}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{paracol}
\newsavebox{\textbox}
\newcommand{\splitpar}[2][\textwidth]{% #1 = width of column (optional), #2 = rest of paragraph after split
\unskip\strut{\parfillskip=0pt\parskip=0pt\par}%
\global\setbox\textbox=\vbox{\hsize=#1\relax\noindent\strut #2\strut}}
\newcommand{\continuepar}{\unvbox\textbox}
\begin{document}
\rule{1em}{40\baselineskip}
Pig chislic turducken short ribs boudin jerky venison sausage ground round cupim strip steak beef ribs swine buffalo sirloin. Jowl tongue porchetta beef ribs boudin biltong filet mignon pork belly ham hock meatball. Bacon landjaeger strip steak, venison andouille shankle ground round tail doner corned beef pork loin rump tri-tip porchetta jowl. Short loin chicken pork belly sirloin pancetta \splitpar[\dimexpr 0.5\textwidth-0.5\columnsep]{\sloppy jerky doner capicola cupim rump spare ribs andouille shankle salami. Chuck shoulder short loin, rump salami burgdoggen short ribs swine beef drumstick shank andouille frankfurter. Pork landjaeger ground round chicken, biltong picanha shank meatloaf strip steak cupim sausage capicola. Cupim short loin prosciutto pork loin cow bresaola pastrami salami short ribs strip steak frankfurter rump biltong picanha ground round.}
\begin{paracol}{2}
\switchcolumn
\begin{figure}[h]
\centering
\includegraphics[width=.45\textwidth]{example-image}
\caption{this is my caption}
\end{figure}
%\hrule% remove from final version
\switchcolumn
\continuepar
\end{paracol}
\section*{Meat}
Bacon ipsum dolor amet pork loin bresaola t-bone ball tip boudin pig brisket alcatra turducken ground round pork chop chuck shank. Turkey turducken salami cupim jowl buffalo short loin beef ribs pork belly shoulder picanha ground round burgdoggen. Filet mignon tongue alcatra, bacon picanha ribeye hamburger pastrami salami landjaeger brisket shoulder ground round drumstick. Pork tail biltong boudin, shoulder beef ribs brisket. Meatball doner pork belly, bacon salami chislic pork chop rump sausage kevin buffalo hamburger tail turducken. Pork loin beef tri-tip, shank doner spare ribs fatback swine pancetta.
Spare ribs turkey strip steak salami sirloin bresaola rump jerky. Beef ribs frankfurter pork loin pig sirloin. Cupim kielbasa jowl, porchetta turducken brisket pastrami fatback spare ribs short ribs jerky t-bone chislic. Tail turducken pastrami, capicola tongue kevin kielbasa ham hock corned beef cupim sausage shoulder. Tri-tip doner swine biltong salami. Frankfurter buffalo corned beef bresaola, pastrami brisket fatback ground round ham meatloaf pork loin hamburger jerky.
Pig chislic turducken short ribs boudin jerky venison sausage ground round cupim strip steak beef ribs swine buffalo sirloin. Jowl tongue porchetta beef ribs boudin biltong filet mignon pork belly ham hock meatball. Bacon landjaeger strip steak, venison andouille shankle ground round tail doner corned beef pork loin rump tri-tip porchetta jowl. Short loin chicken pork belly sirloin pancetta jerky doner capicola cupim rump spare ribs andouille shankle salami. Chuck shoulder short loin, rump salami burgdoggen short ribs swine beef drumstick shank andouille frankfurter. Pork landjaeger ground round chicken, biltong picanha shank meatloaf strip steak cupim sausage capicola. Cupim short loin prosciutto pork loin cow bresaola pastrami salami short ribs strip steak frankfurter rump biltong picanha ground round.
\end{document}