[Tex/LaTex] Removing the line indentation from verses and choruses in a song

indentationsongs

Friends, consider the following code using the songs package:

\documentclass[a4paper]{book}

\usepackage[lyric]{songs}
\usepackage{lipsum}

\renewcommand{\chorusfont}{\bfseries}

\newindex{titleidx}{cbtitle}

\begin{document}

\showindex{My index}{titleidx}

\begin{songs}{titleidx}

\beginsong{My cool song}[
  by={John Doe}]

\beginchorus
\lipsum[4]
\endchorus

\beginverse
\lipsum[4]
\endverse

\endsong

\end{songs}

\end{document}

I'm stuck with this line identation from both choruses and verses:

Songs

I'd like to make the subsequent lines aligned with the first line of the group. I tried to alter the \versenumwidth lenght, but it defines the horizontal space reserved for verse numbers to the left. Besides, there is the chorus indentation as well, which I couldn't find anything meaningful.

Any ideas?

Best Answer

The lengths involved are \leftskip and \parindent which are used by the command \justifyleft which, in is turn, is used by \versejustify and \chorusjustify. One possible solution would be then to redefine \justifyleft, but perhaps the original definition would be needed somewhere else, so I opted for defining a new command (which I called \myjustify) to be used by \versejustify and \chorusjustify producing the desired result:

\documentclass[a4paper]{book}
\usepackage[lyric]{songs}
\usepackage{lipsum}

\renewcommand{\chorusfont}{\bfseries}

\newindex{titleidx}{cbtitle}

\makeatletter
 \newcommand\myjustify{%%
 \ifSB@inverse\advance\leftskip\versenumwidth\fi%
 \SB@cbarshift%
 \parindent0pt
}
\makeatother
\renewcommand\versejustify{\myjustify}
\renewcommand\chorusjustify{\myjustify}

\begin{document}

\showindex{My index}{titleidx}

\begin{songs}{titleidx}

\beginsong{My cool song}[
  by={John Doe}]

\beginchorus
\lipsum[4]
\endchorus

\beginverse
\lipsum[3]
\endverse

\endsong

\end{songs}

\end{document}

enter image description here

Related Question