5

I am working on a Bhagavad Gita recitation book wherein the verses need to be formatted in a particular fashion as shown in the image.

https://i.stack.imgur.com/TPr6y.png

The entire verse needs to be centre aligned AND italicized while the 2nd and 4th line needs to be slightly indented with reference to the 1st and 3rd lines.

In LO Writer, this can be achieved by using Paragraph Styles. In LaTeX, I think we should define a new environment, but am unaware of the code to be written to achieve this.

Can someone help? I'm using XeLaTeX with documentclass as book.

vrgovinda
  • 330

1 Answers1

5

Use the verse package and the altverse formating environment.

% parastylesprob.tex  SE 598663

\documentclass{book}

\usepackage{verse}

\newcommand{\textlines}{This is just a couple of lines of text so that one can see the the textwidth of this document, and help visualize where the midpoint is.} \newcommand{\verseline}{This is a line of verse} \settowidth{\versewidth}{\verseline}

\begin{document} \textlines

\begin{verse}[\versewidth] \begin{altverse} \verseline \ \verseline \ \verseline \ \verseline \end{altverse}

\begin{altverse} \verseline \ \verseline \ \verseline \ \verseline \end{altverse} \end{verse}

\textlines

\end{document}

enter image description here

Peter Wilson
  • 28,066
  • Thank you for your reply. In your example, you have used the same sentence. But as I have shown in the question, I need italics format for all the four lines and in this way for all 700 shlokas of the Bhagavad Gita. Can you please throw light on this. – vrgovinda Dec 09 '21 at 12:44
  • In essence, I need to create a new environment which can combine the functionality of the verse & altverse environments and also italicize the contents within. – vrgovinda Dec 09 '21 at 13:25
  • 1
    @VrajarajaGovindaDas Perhaps you've misunderstood Peter's answer. In your actual document you would not use the \verseline macro; that was just created as a sample to quickly create lines. Instead just write the lines of your verses. And you can just add \itshape inside the {verse} environment to get italics. – Alan Munn Dec 09 '21 at 13:42
  • @AlanMunn Great!! Thank you very much for the clarification. – vrgovinda Dec 10 '21 at 13:27