如何最大限度地减少环绕图像时出现的文本间隙?

如何最大限度地减少环绕图像时出现的文本间隙?

所以我遇到了这个问题。我正在使用 XeTex 编译器(但我认为其余的编译器也给出了相同的结果)

我正在使用一种\parshape样式方法,以便在两列文本的中间形成一个用于大图像的空间。

事情最终都解决了。除了我需要在段落之间留出空隙的时候。以下是两个例子。第一个例子中,一切都井然有序。第二个例子中,当试图增加\\两个段落之间的垂直空间(仅通过一个行参数)时……一切都乱了套。

我无法通过任何方式修复此问题\vspace......或\vfill......\hfill\hspace

示例 1:文本良好且对齐

示例2:文本被毁

产生这些的代码是...尝试添加(在之前\indent)任何\\\newline产生混乱的文本示例。

\documentclass[openany]{book}
\usepackage[a4paper]{geometry}
\usepackage{multicol}


\title{Pax Romana}
\begin{document}
\newpage
\begin{multicols}{2}

\section{Pax Romana}
\rlap{% Remove horizontal width
\smash{% Remove vertical height
\hspace{\dimexpr\columnwidth+.5\columnsep}% Push content to middle of page
\makebox[0pt][c]{% Centre image in middle of page
 % Drop image full height and scale
 %\raisebox{-\height}{\includegraphics[scale=0.90,width=14cm ,height=20cm]{}}%picture itself is irrelevant
}%
}%
}\hfill%
\\[-2\baselineskip] 

%Form a shape around the picture for N lines (each line is specified by <p1,p2>)
%where p1: distance space from start of line. p2: length of line
\parshape 50 
0pt \columnwidth% 1
0.0\columnwidth 0.88\columnwidth% 2
0.0\columnwidth 0.88\columnwidth% 3
0.0\columnwidth 0.88\columnwidth% 4
0.0\columnwidth 0.88\columnwidth% 5
0.0\columnwidth 0.88\columnwidth% 6
0.0\columnwidth 0.90\columnwidth% 7
0.0\columnwidth 0.80\columnwidth% 8
0.0\columnwidth 0.75\columnwidth% 9
0.0\columnwidth 0.75\columnwidth% 10
0.0\columnwidth 0.75\columnwidth% 11
0.0\columnwidth 0.60\columnwidth% 12
0.0\columnwidth 0.60\columnwidth% 13
0.0\columnwidth 0.60\columnwidth% 14
0.0\columnwidth 0.60\columnwidth% 15
0.0\columnwidth 0.60\columnwidth% 16
0.0\columnwidth 0.55\columnwidth% 17
0.0\columnwidth 0.55\columnwidth% 18
0.0\columnwidth 0.55\columnwidth% 19
0.0\columnwidth 0.55\columnwidth% 20
0.0\columnwidth 0.55\columnwidth% 1
0.0\columnwidth 0.40\columnwidth% 2
0.0\columnwidth 0.40\columnwidth% 3
0.0\columnwidth 0.40\columnwidth% 4
0.0\columnwidth 0.40\columnwidth% 5
0.0\columnwidth 0.40\columnwidth% 6
0.0\columnwidth 0.40\columnwidth% 7
0.0\columnwidth 0.45\columnwidth% 8
0.0\columnwidth 0.45\columnwidth% 9
0.0\columnwidth 0.45\columnwidth% 10
0.0\columnwidth 0.45\columnwidth% 11
0.0\columnwidth 0.40\columnwidth% 12
0.0\columnwidth 0.40\columnwidth% 13
0.0\columnwidth 0.40\columnwidth% 14
0.0\columnwidth 0.40\columnwidth% 15
0.0\columnwidth 0.40\columnwidth% 16
0.0\columnwidth 0.30\columnwidth% 17
0.0\columnwidth 0.30\columnwidth% 18
0.0\columnwidth 0.30\columnwidth% 19
0.0\columnwidth 0.20\columnwidth% 20
0.0\columnwidth 0.20\columnwidth% 1
0.0\columnwidth 0.20\columnwidth% 2
0.0\columnwidth 0.40\columnwidth% 3
0.0\columnwidth 0.40\columnwidth% 4
0.0\columnwidth 0.55\columnwidth% 1
0.0\columnwidth 0.40\columnwidth% 2
0.0\columnwidth 0.40\columnwidth% 3
0.0\columnwidth 0.40\columnwidth% 4
0.0\columnwidth 0.40\columnwidth% 5
0pt \columnwidth% 5
\indent Pax Romana (Latin for "Roman peace") was the long period of relative peace and minimal expansion by military force experienced by the Roman Empire in the 1st and 2nd centuries AD. Since it was established by Augustus, it is sometimes called Pax Augusta. It;s span was approximately 206 years (27 BC to 180 AD) according to Encyclopaedia Britannica[1] or from 70 AD to 192 AD according to The Cambridge Ancient History. \hfill\\
\indent The Pax Romana is said  to have been a "miracle" because prior to it there had never been peace for so many centuries in a given period of human history.[3] According to Walter Goffart however, "peace is not what one finds in it[s pages]".[2]  \hfill\\ 
\indent Eckstein also notes that the incipient Pax Romana appeared during the Republic and that its temporal span varied with geographical region as well: "Although the standard textbook dates for the Pax Romana, the famous “Roman Peace” in the Mediterranean, are 31 BC to AD 250, the fact is that the Roman Peace was emerging in large regions of the Mediterranean at a much earlier date: Sicily after 210 [BC]; peninsular Italy after 200 [BC]; the Po Valley after 190 [BC]; most of Spain after 133 [BC]; North Africa after 100 [BC]; and for ever longer stretches of time in the Greek East". \hfill\\
\newpage
\end{multicols}
\end{document}

所以我担心的是......

  1. \parshape除了在段落之间设置可变的空间,而且不弄乱文本之外,有没有更简单的方法可以做到这一点?
  2. 用这种\parshape方法...如何修复此类文字空白发生在换线等等的时候

答案1

我不确定我是否明白您要做什么,但它是这样的吗?

带跳跃的段落

如果是这样,您可以\mbox{}在想要留空的行上使用以下方法来创建间隙:

\documentclass[openany]{book}
\usepackage[a4paper]{geometry}
\usepackage{multicol}


\title{Pax Romana}
\begin{document}
\newpage
\begin{multicols}{2}

\section{Pax Romana}
\rlap{% Remove horizontal width
\smash{% Remove vertical height
\hspace{\dimexpr\columnwidth+.5\columnsep}% Push content to middle of page
\makebox[0pt][c]{% Centre image in middle of page
 % Drop image full height and scale
 %\raisebox{-\height}{\includegraphics[scale=0.90,width=14cm ,height=20cm]{}}%picture itself is irrelevant
}%
}%
}\hfill%
\\[-2\baselineskip]

%Form a shape around the picture for N lines (each line is specified by <p1,p2>)
%where p1: distance space from start of line. p2: length of line
\parshape 50
0pt \columnwidth% 1
0.0\columnwidth 0.88\columnwidth% 2
0.0\columnwidth 0.88\columnwidth% 3
0.0\columnwidth 0.88\columnwidth% 4
0.0\columnwidth 0.88\columnwidth% 5
0.0\columnwidth 0.88\columnwidth% 6
0.0\columnwidth 0.90\columnwidth% 7
0.0\columnwidth 0.80\columnwidth% 8
0.0\columnwidth 0.75\columnwidth% 9
0.0\columnwidth 0.75\columnwidth% 10
0.0\columnwidth 0.75\columnwidth% 11
0.0\columnwidth 0.60\columnwidth% 12
0.0\columnwidth 0.60\columnwidth% 13
0.0\columnwidth 0.60\columnwidth% 14
0.0\columnwidth 0.60\columnwidth% 15
0.0\columnwidth 0.60\columnwidth% 16
0.0\columnwidth 0.55\columnwidth% 17
0.0\columnwidth 0.55\columnwidth% 18
0.0\columnwidth 0.55\columnwidth% 19
0.0\columnwidth 0.55\columnwidth% 20
0.0\columnwidth 0.55\columnwidth% 1
0.0\columnwidth 0.40\columnwidth% 2
0.0\columnwidth 0.40\columnwidth% 3
0.0\columnwidth 0.40\columnwidth% 4
0.0\columnwidth 0.40\columnwidth% 5
0.0\columnwidth 0.40\columnwidth% 6
0.0\columnwidth 0.40\columnwidth% 7
0.0\columnwidth 0.45\columnwidth% 8
0.0\columnwidth 0.45\columnwidth% 9
0.0\columnwidth 0.45\columnwidth% 10
0.0\columnwidth 0.45\columnwidth% 11
0.0\columnwidth 0.40\columnwidth% 12
0.0\columnwidth 0.40\columnwidth% 13
0.0\columnwidth 0.40\columnwidth% 14
0.0\columnwidth 0.40\columnwidth% 15
0.0\columnwidth 0.40\columnwidth% 16
0.0\columnwidth 0.30\columnwidth% 17
0.0\columnwidth 0.30\columnwidth% 18
0.0\columnwidth 0.30\columnwidth% 19
0.0\columnwidth 0.20\columnwidth% 20
0.0\columnwidth 0.20\columnwidth% 1
0.0\columnwidth 0.20\columnwidth% 2
0.0\columnwidth 0.40\columnwidth% 3
0.0\columnwidth 0.40\columnwidth% 4
0.0\columnwidth 0.55\columnwidth% 1
0.0\columnwidth 0.40\columnwidth% 2
0.0\columnwidth 0.40\columnwidth% 3
0.0\columnwidth 0.40\columnwidth% 4
0.0\columnwidth 0.40\columnwidth% 5
0pt \columnwidth% 5
\indent Pax Romana (Latin for "Roman peace") was the long period of relative peace and minimal expansion by military force experienced by the Roman Empire in the 1st and 2nd centuries AD. Since it was established by Augustus, it is sometimes called Pax Augusta. It;s span was approximately 206 years (27 BC to 180 AD) according to Encyclopaedia Britannica[1] or from 70 AD to 192 AD according to The Cambridge Ancient History.\\
\mbox{ }\\
\indent The Pax Romana is said  to have been a "miracle" because prior to it there had never been peace for so many centuries in a given period of human history.[3] According to Walter Goffart however, "peace is not what one finds in it[s pages]".[2]\\
\mbox{ }\\
\indent Eckstein also notes that the incipient Pax Romana appeared during the Republic and that its temporal span varied with geographical region as well: "Although the standard textbook dates for the Pax Romana, the famous “Roman Peace” in the Mediterranean, are 31 BC to AD 250, the fact is that the Roman Peace was emerging in large regions of the Mediterranean at a much earlier date: Sicily after 210 [BC]; peninsular Italy after 200 [BC]; the Po Valley after 190 [BC]; most of Spain after 133 [BC]; North Africa after 100 [BC]; and for ever longer stretches of time in the Greek East".\\
\newpage
\end{multicols}
\end{document}

相关内容