Regelung des Abstandes zwischen der ersten Strophe und dem vorhergehenden Absatz durch „Vers“

Regelung des Abstandes zwischen der ersten Strophe und dem vorhergehenden Absatz durch „Vers“

Das Einfügen von Gedichten in einen gegebenen Prosatext unter Verwendung des Ambient-Elements verseführt eine Distanz zwischen der ersten Strophe und dem vorhergehenden Absatz sowie zwischen der letzten Strophe und dem folgenden Absatz ein.

Bildbeschreibung hier eingeben

Ist es möglich, diese beiden Lücken zu regulieren?

Antwort1

Ich überlasse es Ihnen, die Trennung, die Ihnen am besten passt, als Wert von festzulegen \topsep. Beachten Sie, dass \partopsephinzugefügt wird, wenn eine Leerzeile vor steht. verseSie können es also anstelle von oder zusammen mit festlegen \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}

Bildbeschreibung hier eingeben

Antwort2

Sie können Ihre eigene Umgebung definieren myverse, die den vertikalen Abstand über/unter dem Vers anpasst:

Bildbeschreibung hier eingeben

\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}

Die obige myverseUmgebung ist tatsächlich eine mdframedUmgebung mit einigen Standardoptionen, um eine normale Umgebung nachzuahmen verse. Sie können diese Standardeinstellungen jedoch ergänzen oder sie als optionale Argumente in myverseder Form skipabove=<len>und/oder angeben skipbelow=<len>, wobei <len>eine bestimmte Länge angegeben ist.

verwandte Informationen