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.

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}
share|improve this question
    
\centering is not a command with an argument. –  egreg Feb 23 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? –  Menelaos Vergis Feb 23 at 10:30
    
No, it doesn't work: \centering will apply center alignment to the whole document. –  egreg Feb 23 at 10:31
add comment

2 Answers 2

up vote 3 down vote accepted

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

share|improve this answer
    
Thanks for the information. Both poem title and verse centering are very helpful for the task I have to do. –  Menelaos Vergis Feb 23 at 10:39
add comment

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

share|improve this answer
add comment

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.