2

Is it possible to format a verse like this: Example of desired formatiing

(sorry for an example that is not in English, I just don't have English text with such formatting on hand. )

I mean the following formatting:

each even line of the verse has an indent, while odd lines haven't. I would like to make it automatically for the verses of different length, so that I don't need to manually change indent for each even line.

2
  • A question: what a poem is it? It seems te be rather old... Commented Jul 7, 2014 at 10:11
  • @Przemysław Scherwentke This is from "Vertograd Mnogocvetnyj", a collection of poems written by Simeon Polockij (Russian poet of 17th century). It has strong influence of Old Church Slavonic language.
    – yukari
    Commented Jul 7, 2014 at 10:14

3 Answers 3

6

From the manual of the verse package:

\documentclass{article}
\usepackage{verse}
\begin{document}



\settowidth{\versewidth}{In a cavern, in a canyon,}
\poemtitle{Clementine}
\begin{verse}[\versewidth]
\poemlines{2}
\begin{altverse}
\flagverse{1.} In a cavern, in a canyon, \\
Excavating for a mine, \\
Lived a miner, forty-niner, \label{vs:49} \\
And his daughter, Clementine. \\!
\end{altverse}
\begin{altverse}
\flagverse{\textsc{chorus}} Oh my darling, Oh my darling, \\
Oh my darling Clementine. \\
Thou art lost and gone forever, \\
Oh my darling Clementine \\!
\end{altverse}
\poemlines{0}
\end{verse}
\end{document}

printout of picture of verses

Probably the patverse* environment could be helpful as well.

1
  • 1
    +1. Reading the documentation is better than ad hoc solutions. Commented Jul 7, 2014 at 10:43
1

An ad hoc solution. It should be polished, in particular, the definition is to be moved outside verse.

\documentclass{article}

\begin{document}

\let\oldnl=\\

\newcount\evenv
\begin{verse}
\evenv1\relax%
\def\\{\advance\evenv by1\ifodd\evenv\oldnl\else\oldnl\hspace*{2em}\fi}%
$\,$\\
To be, or not to be, that is the question—\\
Whether 'tis Nobler in the mind to suffer\\
The Slings and Arrows of outrageous Fortune,\\
Or to take Arms against a Sea of troubles,\\
And by opposing end them? To die, to sleep—\\
No more; and by a sleep, to say we end\\
The Heart-ache, and the thousand Natural shocks\\
That Flesh is heir to? 'Tis a consummation\\
Devoutly to be wished. To die, to sleep,\\
To sleep, perchance to Dream; Aye, there's the rub,
\end{verse}

\end{document}

enter image description here

0

This way of formatting poetry is similar to what Hebrew biblical poetry uses.

The scripture package supports this with plenty of flexibility and customisation options.

% TeX Program = lualatex

\documentclass{article}
\usepackage{babel}
\babelprovide[import,main]{churchslavic-oldcyrillic}
\babelfont{rm}{Noto Serif}
\usepackage{scripture}
\scripturesetup{
  poetry/leftmargin=0pt
}
\begin{document}
\begin{scripture}
  \begin{poetry}
    Дѣтищь, видя яблоко на древѣ красное,
    многим трудом приложит стяжати оное.

    Егда же, стяжав, узрит внутрь червие быти,
    суетны труды своя обыче хулити.
    
    Тако иже похотми искушен бывает,
    утѣхи ради плотски много ся труждает.
  \end{poetry}
\end{scripture}
\end{document}

output

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .