My leadsheets package is one of my newer packages. It seems to already have some fans – I get the occasional email asking for support and on github it has at the moment of writing 7 people who watch it and 5 stars. I wrote the first time about it on my German blog (neverthless in English).
Personally I use it a lot for writing leadsheets for my band.
What I like quite a lot about leadsheets is the possibility of designing title templates for the
No real surprise here – some colors, some table support, mdframed for adding frames around contents, and needspace.
Next let’s define a horizontal rule:
Now the real fun starts: a new title template:
First we define a new counter so we can have numbered songs. We only step this counter when leadsheets is not in its measuring phase:
Then we put the song number in a table cell with a gray background and the title next to it:
Some vertical space
and that’s it.
Next we define a new verse type template – this is where mdframed comes into play:
And last but not least the setup for using all the new stuff:
Now let’s see what this looks like in a
song
environment. This allows almost complete control about the layout. The next version (which will be on CTAN in a few days) also adds hooks to the song
environment for even more control. In this post I like to show how this can be used to mimick the layout of the songs package.
Let’s start with the needed packages:
\usepackage[table]{xcolor}
\usepackage{array,tabularx,leadsheets,mdframed,needspace}
\usepackage{array,tabularx,leadsheets,mdframed,needspace}
\newlength\songrulewidth
\setlength\songrulewidth{1pt}
\newcommand*\songrule{\par\noindent\rule{\linewidth}{\songrulewidth}\par}
\setlength\songrulewidth{1pt}
\newcommand*\songrule{\par\noindent\rule{\linewidth}{\songrulewidth}\par}
\newcounter{songs}
\definesongtitletemplate{songs}{
\ifsongmeasuring{}{\refstepcounter{songs}}
\vspace*{.5ex}
\noindent
\begin{tabularx}{\linewidth}{>{\columncolor{black!10}}p{1cm}>{\raggedright}X}
\sffamily\huge\strut\thesongs &
\sffamily\Large\itshape\songproperty{title}
\end{tabularx}
\vspace*{.5\baselineskip}
}
\definesongtitletemplate{songs}{
\ifsongmeasuring{}{\refstepcounter{songs}}
\vspace*{.5ex}
\noindent
\begin{tabularx}{\linewidth}{>{\columncolor{black!10}}p{1cm}>{\raggedright}X}
\sffamily\huge\strut\thesongs &
\sffamily\Large\itshape\songproperty{title}
\end{tabularx}
\vspace*{.5\baselineskip}
}
\ifsongmeasuring{}{\refstepcounter{songs}}
\noindent
\begin{tabularx}{\linewidth}{>{\columncolor{black!10}}p{1cm}>{\raggedright}X}
\sffamily\huge\strut\thesongs &
\sffamily\Large\itshape\songproperty{title}
\end{tabularx}
\begin{tabularx}{\linewidth}{>{\columncolor{black!10}}p{1cm}>{\raggedright}X}
\sffamily\huge\strut\thesongs &
\sffamily\Large\itshape\songproperty{title}
\end{tabularx}
\vspace*{.5\baselineskip}
\mdfdefinestyle{songs}{
hidealllines = true ,
leftline = true ,
linewidth = \songrulewidth
}
\defineversetypetemplate{songs}
{ \mdframed[style=songs] }
{ \endmdframed }
hidealllines = true ,
leftline = true ,
linewidth = \songrulewidth
}
\defineversetypetemplate{songs}
{ \mdframed[style=songs] }
{ \endmdframed }
\setleadsheets{
before-song = \needspace{5\baselineskip}\songrule ,
after-song = \songrule ,
title-template = songs ,
chorus/template = songs ,
verse/numbered = false ,
verse/format = \itshape
}
before-song = \needspace{5\baselineskip}\songrule ,
after-song = \songrule ,
title-template = songs ,
chorus/template = songs ,
verse/numbered = false ,
verse/format = \itshape
}
twocolumn
document (lyrics taken from songtexte.com):

Thanks for this package, it’s exactly what I’ve been looking for! I was thinking that I would have to create my own mediocre package, but while reading up on xsim (I’m an extensive exsheets user; thanks for that also), I discovered leadsheets.