From 1c879d830e4604a9c253e24124016d42379678f0 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sat, 9 May 2009 16:53:03 +0200 Subject: [PATCH] Add new style file. Useful for cover handling and image/gtab printing. --- songbook.sty | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 songbook.sty diff --git a/songbook.sty b/songbook.sty new file mode 100644 index 00000000..3002fcb9 --- /dev/null +++ b/songbook.sty @@ -0,0 +1,34 @@ +\makeatletter + +\newlength{\coverheight} +\setlength{\coverheight}{2cm} +\newlength{\coverspace} +\setlength{\coverspace}{0.1cm} +\newcommand{\songcover}{} +\newsongkey{cov}{\let\songcover\@empty}{\def\songcover{#1}} +\newcommand\cover{% + \ifchorded% + \ifx\songcover\@empty\else% + \mbox{% + \includegraphics[height=\coverheight]{\songcover}% + \hspace{\coverspace}% + }% + \fi% + \fi% +} + +\iflyric% + \renewcommand{\gtab}[2]{}% +\fi% + +\newcommand{\image}[2]{% + \ifchorded% + \begin{flushright}% + \includegraphics[width=#2cm]{#1}% + \end{flushright}% + \fi% +} + +\makeatother + +