5

I want to create a book of poems and I want to place every poem at the middle of the page. I think that calculating the max width of the poem and placing it at the middle might be tricky so I decided to just apply manually some padding on every verse.

I include my code so far

\documentclass[a5paper,pagesize,10pt,bibtotoc,pointlessnumbers,
normalheadings,DIV=9,twoside=false]{scrbook}

% twoside, openright
\KOMAoptions{DIV=last}

\usepackage{trajan}


\usepackage[georgian]{babel}
\usepackage{fontspec}



\linespread{1.05} 

\usepackage{verbatim} % for comments
\usepackage{listings} % for comments

\usepackage{calc}
\usepackage{verse}

\usepackage{blindtext}

\setmainfont{DejaVu Serif}

\newcommand{\q}[1]{>>\textit{#1}<<}

\title{A book title}   
\author{Author Name} 
\date{\today} 

\begin{document}




        \centering{
            {\fontsize{22}{25}\selectfont 
        უშენობა}
        }\\

        \vspace{10mm}


\begin{verse}
გავაღებ  კარს,\\
შევხედავ  ცას.\\
ოდესმე  ჩავწვდებით,\\
ცხოვრების  აზრს.\\
გაუფრთხილდეთ  მას,\\
რაც  დღეს  გვაქვს.\\

\end{verse}


\end{document}
3
  • \centering is not a command with an argument.
    – egreg
    Feb 23, 2014 at 10:25
  • I just used this for the title, it is working though. Should I had to mention that I am using Lualatex compiler? Feb 23, 2014 at 10:30
  • No, it doesn't work: \centering will apply center alignment to the whole document.
    – egreg
    Feb 23, 2014 at 10:31

3 Answers 3

3

You have to use the \versewidth feature described in the manual of verse; here's a minimal example.

\documentclass[a5paper,pagesize,10pt,bibtotoc,pointlessnumbers,
normalheadings,DIV=9,twoside=false]{scrbook}

% twoside, openright
\KOMAoptions{DIV=last}

\usepackage[georgian]{babel}
\usepackage{fontspec}
\setmainfont{DejaVu Serif}

\usepackage{verse}

\linespread{1.05} 

\begin{document}

\begin{center}
\Huge უშენობა
\end{center}

\settowidth{\versewidth}{გაუფრთხილდეთ  მას,}
\begin{verse}[\versewidth]
გავაღებ  კარს,\\
შევხედავ  ცას.\\
ოდესმე  ჩავწვდებით,\\
ცხოვრების  აზრს.\\
გაუფრთხილდეთ  მას,\\
რაც  დღეს  გვაქვს.
\end{verse}

\end{document}

Don't use \centering like you do: it's wrong.

enter image description here

1
  • Thanks for the information. Both poem title and verse centering are very helpful for the task I have to do. Feb 23, 2014 at 10:39
4

the environment verse seems to use an internal lap macro. However, you can indent the verse box and using package varwidth if you do not want to look for the longest line for versewidth

\documentclass[a5paper,pagesize]{scrbook}
\usepackage{trajan}
\usepackage[georgian]{babel}
\usepackage{fontspec}
\setmainfont{DejaVu Serif}
\usepackage[showframe]{geometry}

\usepackage{verse}
\usepackage{varwidth}
\let\Verse\verse
\let\endVerse\endverse
\renewcommand\verse[1]{%
  {\fontsize{22}{25}\selectfont#1\par\vspace{10mm}}
  \hspace*{3em}%%%%%%%%%%%%%%%
  \varwidth{\textwidth}\Verse}

\renewcommand\endverse{\endvarwidth\endVerse}

\begin{document}
\begin{center}

\begin{verse}{უშენობა}
გავაღებ  კარს,\\
შევხედავ  ცას.\\
ოდესმე  ჩავწვდებით,\\
ცხოვრების  აზრს.\\
გაუფრთხილდეთ  მას,\\
რაც  დღეს  გვაქვს.\\
\end{verse}

\begin{verse}{უშენობა}
გავაღებ  კარს,\\
შევხედავ  ცას. ოდესმე  ჩავწვდებით,\\
ცხოვრების  აზრს. გაუფრთხილდეთ  მას,\\
რაც  დღეს  გვაქვს.\\
\end{verse}
\end{center}

\end{document}

enter image description here

0

After loading the verse package also load gmverse.

This package allows:

  1. automatic centering -based on a weighted average of line lengths
  2. no need to use // to end each line, just put a blank line between stanzas. (Great if you are copy/pasting from another source).

It gives great results.

\documentclass[a5paper,pagesize]{scrbook}
\usepackage{trajan}
\usepackage[georgian]{babel}
\usepackage{fontspec}
\setmainfont{DejaVu Serif}
\usepackage[showframe]{geometry}

\usepackage{verse,gmverse}

% look, no centering command needed

\begin{document}
\vocweigh3.  %not needed according to doc, but it doesn't seem to work without it 

\poemtitle{უშენობა}
\begin{verse}
გავაღებ  კარს,
შევხედავ  ცას.\\
ოდესმე  ჩავწვდებით,
ცხოვრების  აზრს.
გაუფრთხილდეთ  მას,
რაც  დღეს  გვაქვს.
\end{verse}

\poemtitle{უშენობა}
\begin{verse}
გავაღებ  კარს,
შევხედავ  ცას. ოდესმე  ჩავწვდებით,
ცხოვრების  აზრს. გაუფრთხილდეთ  მას,
რაც  დღეს  გვაქვს.
\end{verse}


\end{document}

It also uses a poemtitle command to allow setting easily the title style, in the memoir package there is \PoemTitle which allows numbered poems. and makes it simple to have an index of first lines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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