Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
A question: what a poem is it? It seems te be rather old... –  Przemysław Scherwentke Jul 7 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 Jul 7 at 10:14

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
    
+1. Reading the documentation is better than ad hoc solutions. –  Przemysław Scherwentke Jul 7 at 10:43

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.