使用 `verse` 来规定第一节和上一段之间的距离

使用 `verse` 来规定第一节和上一段之间的距离

使用环境音在给定的散文文本中插入诗歌verse会在第一节和前一段之间以及最后一节和下一段之间引入距离。

在此处输入图片描述

有可能调节这两个差距吗?

答案1

我留给您设置适合您的分隔符作为 的值\topsep。请注意,\partopsep当前面有空白行时会添加verse,因此您可能希望将其设置为 或与 一起设置\topsep

\documentclass{article}

\usepackage{xpatch}
\xpatchcmd\verse
  {\itemsep}
  {\topsep=0pt \partopsep=0pt \itemsep}
  {}{}

\begin{document}

In the beginning, when God created the heavens and the
earth, the earth was a formless wasteland, and darkness covered
the abyss, while a mighty wind swept over the waters.

\begin{verse}
  La vispa Teresa gridava sospesa: \\
  l'ho presa, l'ho presa, la vispa Teresa! \\
  Gridava sospesa: L'ho presa, l'ho presa, \\
  La vispa Teresa! Grida sospesa
\end{verse}

Then God said, Let there be light, and there was light. God
saw how good the light was. God then separated the light from
the darkness.

\end{document}

在此处输入图片描述

答案2

您可以定义自己的myverse环境来调整诗句上方/下方的垂直间距:

在此处输入图片描述

\documentclass{article}

\usepackage[paper=a5paper]{geometry}% Just for this example
\usepackage{mdframed,xkeyval}

\newlength{\mvskipabove}
\newlength{\mvskipbelow}
\makeatletter
\define@key{myverse}{skipabove}{\setlength{\mvskipabove}{#1}}
\define@key{myverse}{skipbelow}{\setlength{\mvskipbelow}{#1}}
\makeatother
\newenvironment{myverse}[1][]
  {\setkeys{myverse}{skipabove=0pt,skipbelow=0pt,#1}%
   \begin{mdframed}[
     leftmargin=1.5em,
     linewidth=0pt,
     innertopmargin=\mvskipabove,
     innerbottommargin=\mvskipbelow]}
  {\end{mdframed}}

\begin{document}

In the beginning, when God created the heavens and the
earth, the earth was a formless wasteland, and darkness covered
the abyss, while a mighty wind swept over the waters.

\begin{verse}
  La vispa Teresa gridava sospesa: \\
  l'ho presa, l'ho presa, la vispa Teresa! \\
  Gridava sospesa: L'ho presa, l'ho presa, \\
  La vispa Teresa! Grida sospesa
\end{verse}

Then God said, Let there be light, and there was light. God
saw how good the light was. God then separated the light from
the darkness.

\begin{myverse}
  La vispa Teresa gridava sospesa: \\
  l'ho presa, l'ho presa, la vispa Teresa! \\
  Gridava sospesa: L'ho presa, l'ho presa, \\
  La vispa Teresa! Grida sospesa
\end{myverse}

Then God said, Let there be light, and there was light. God
saw how good the light was. God then separated the light from
the darkness.

\begin{myverse}[skipabove=5\baselineskip,skipbelow=1pt]
  La vispa Teresa gridava sospesa: \\
  l'ho presa, l'ho presa, la vispa Teresa! \\
  Gridava sospesa: L'ho presa, l'ho presa, \\
  La vispa Teresa! Grida sospesa
\end{myverse}

Then God said, Let there be light, and there was light. God
saw how good the light was. God then separated the light from
the darkness.

\end{document}

上述myverse环境实际上是一个mdframed环境,具有一些默认选项来模拟常规的verse。但是,您可以添加这些默认值,或将它们指定为and/ormyverse形式的可选参数,其中是某个长度。skipabove=<len>skipbelow=<len><len>

相关内容