From 36262f868c932564873b799f568bd1f3b1809c98 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Jul 2009 00:21:12 +0200 Subject: [PATCH] Merge songbook.sty into crepbook.cls --- chordbook.tex | 7 +---- crepbook.cls | 71 +++++++++++++++++++++++++++++++++++++++++++++++++-- lyricbook.tex | 6 +---- songbook.sty | 66 ----------------------------------------------- volume-1.tex | 7 +---- 5 files changed, 72 insertions(+), 85 deletions(-) delete mode 100644 songbook.sty diff --git a/chordbook.tex b/chordbook.tex index a3ab43bd..7e491e1c 100644 --- a/chordbook.tex +++ b/chordbook.tex @@ -22,15 +22,10 @@ % Modified to serve personnal purposes. Newer versions can be % obtained from http://www.lohrun.net. -\documentclass{crepbook} -\usepackage[bookmarks,bookmarksopen]{hyperref} -\usepackage[chorded]{songs} +\documentclass[chorded]{crepbook} \usepackage[utf8]{inputenc} \usepackage[pdftex]{graphicx, color} \usepackage[english,french]{babel} -\usepackage{fancybox} - -\usepackage{songbook} \newindex{titleidx}{cbtitle} \newauthorindex{authidx}{cbauth} diff --git a/crepbook.cls b/crepbook.cls index be655730..e1f87fb1 100644 --- a/crepbook.cls +++ b/crepbook.cls @@ -2,12 +2,14 @@ % for LaTeX2e % \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesClass{crepbook}[2009/08/01 v0.1 LaTeX document class for Crep +\ProvidesClass{crepbook}[2009/07/19 v0.2 LaTeX document class for Crep Books] \LoadClass[a4paper]{article} -%\RequirePackage{songbook} +\RequirePackageWithOptions{songs} +\RequirePackage{fancybox} +\RequirePackage[bookmarks,bookmarksopen]{hyperref} \def\andname{and} \def\lastandname{\unskip, and} @@ -93,3 +95,68 @@ \@licence \newpage } + +\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 + +% Configuration of the songs package +\titleprefixword{} +\renewcommand{\stitlefont}{\LARGE\bf} +\renewcommand{\printchord}[1]{\small{\it#1}} +\renewcommand{\chorusfont}{\it} +\renewcommand{\showauthors}{% + \hbox{\normalsize\songauthors}% +} +\renewcommand{\idxtitlefont}{\sffamily\bfseries} +\renewcommand{\idxauthfont}{\sffamily\bfseries} +\renewcommand{\idxheadfont}{\sffamily\it\LARGE} +\renewcommand{\idxrefsfont}{\bfseries} + +% Customization of the page appearance +\setlength{\topmargin}{0cm} +\setlength{\oddsidemargin}{0cm} +\setlength{\evensidemargin}{0cm} +\setlength{\textwidth}{16cm} +% header +\setlength{\topskip}{0cm} +\setlength{\headheight}{0cm} +\setlength{\headsep}{0cm} +% column +\setlength{\colminheight}{24cm} +\setlength{\textheight}{26cm} + +\settowidth{\versenumwidth}{1.\ } +\addtolength{\voffset}{-1cm} + +\baselineadj=-2.5pt plus 1pt minus 0pt +\versesep=8pt plus 2pt minus 2pt diff --git a/lyricbook.tex b/lyricbook.tex index 6b294ab7..11b7f6a7 100644 --- a/lyricbook.tex +++ b/lyricbook.tex @@ -22,14 +22,10 @@ % Modified to serve personnal purposes. Newer versions can be % obtained from http://www.lohrun.net. -\documentclass{crepbook} -\usepackage[bookmarks,bookmarksopen]{hyperref} -\usepackage[lyric]{songs} +\documentclass[lyric]{crepbook} \usepackage[utf8]{inputenc} \usepackage[pdftex]{graphicx, color} \usepackage[english,french]{babel} -\usepackage{fancybox} -\usepackage{songbook} \newindex{titleidx}{lbtitle} \newauthorindex{authidx}{lbauth} diff --git a/songbook.sty b/songbook.sty deleted file mode 100644 index e460878c..00000000 --- a/songbook.sty +++ /dev/null @@ -1,66 +0,0 @@ -\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 - - -%\includeonlysongs{1} -\titleprefixword{} -\renewcommand{\stitlefont}{\LARGE\bf} -\renewcommand{\printchord}[1]{\small{\it#1}} -\renewcommand{\chorusfont}{\it} -\renewcommand{\showauthors}{% - \hbox{\normalsize\songauthors}% -} -\renewcommand{\idxtitlefont}{\sffamily\bfseries} -\renewcommand{\idxauthfont}{\sffamily\bfseries} -\renewcommand{\idxheadfont}{\sffamily\it\LARGE} -\renewcommand{\idxrefsfont}{\bfseries} - -% Customization of the page appearance -\setlength{\topmargin}{0cm} -\setlength{\oddsidemargin}{0cm} -\setlength{\evensidemargin}{0cm} -\setlength{\textwidth}{16cm} -% header -\setlength{\topskip}{0cm} -\setlength{\headheight}{0cm} -\setlength{\headsep}{0cm} -% column -\setlength{\colminheight}{24cm} -\setlength{\textheight}{26cm} - -\settowidth{\versenumwidth}{1.\ } -\addtolength{\voffset}{-1cm} - -\baselineadj=-2.5pt plus 1pt minus 0pt -\versesep=8pt plus 2pt minus 2pt - diff --git a/volume-1.tex b/volume-1.tex index 7c256615..d5750385 100644 --- a/volume-1.tex +++ b/volume-1.tex @@ -22,15 +22,10 @@ % Modified to serve personnal purposes. Newer versions can be % obtained from http://www.lohrun.net. -\documentclass{crepbook} -\usepackage[bookmarks,bookmarksopen]{hyperref} -\usepackage[chorded]{songs} +\documentclass[chorded]{crepbook} \usepackage[utf8]{inputenc} \usepackage[pdftex]{graphicx, color} \usepackage[english,french]{babel} -\usepackage{fancybox} - -\usepackage{songbook} \newindex{titleidx}{volume1cbtitle} \newauthorindex{authidx}{volume1cbauth}