From f63b48d86669b27d3fa24ad5562f46fe5c209927 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Sat, 4 Feb 2012 16:33:28 +0100 Subject: [PATCH 10/32] gitignore: add *~ --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a8410ab5..d913a000 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ staging/ utils/release.sh utils/tarball.sh utils/send.sh +*~ *.aux *.sbd *.sbx From be42408e2a6b50e58cd62c0112316f4bb295bf69 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 17:53:12 +0100 Subject: [PATCH 15/32] Add importantdiagramonly option to the crepbook document class The importonlydiagramonly option allows to print only chord diagrams that have been flagged as important by the author of the song. The important chords are generally complicated uncommon chords and their diagram is registered with the starred version of the gtab macro. --- tex/crepbook.cls | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tex/crepbook.cls b/tex/crepbook.cls index 98b3d00e..6a1ffa0a 100644 --- a/tex/crepbook.cls +++ b/tex/crepbook.cls @@ -10,12 +10,14 @@ \newif{\iftabs} \newif{\iflilypond} \newif{\ifnodiagram} +\newif{\ifimportantdiagramonly} \newif{\ifpictures} \tabsfalse \lilypondfalse \nodiagramtrue \picturesfalse +\importantdiagramonlyfalse % Options \DeclareOption{tabs}{\tabstrue} @@ -24,6 +26,7 @@ \DeclareOption{nolilypond}{\lilypondfalse} \DeclareOption{nodiagram}{\nodiagramtrue} \DeclareOption{diagram}{\nodiagramfalse} +\DeclareOption{importantdiagramonly}{\importantdiagramonlytrue\nodiagramfalse} \DeclareOption{pictures}{\picturestrue} \DeclareOption{nopictures}{\picturesfalse} @@ -217,8 +220,25 @@ \fi% }% +\let\gtab@Original\gtab +\newcommand{\gtab@Hidden}[2]{}% \ifnodiagram% - \renewcommand{\gtab}[2]{}% +\renewcommand{\gtab}{\@ifstar + \gtab@Hidden% + \gtab@Hidden% +} +\else% +\ifimportantdiagramonly% +\renewcommand{\gtab}{\@ifstar + \gtab@Original% + \gtab@Hidden% +} +\else% +\renewcommand{\gtab}{\@ifstar + \gtab@Original% + \gtab@Original% +} +\fi% \fi% \newcommand{\lilypond}[1]{% From e937a7509344aa7ef62b93f078dcb2f7532b592e Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 17:56:08 +0100 Subject: [PATCH 16/32] Bump the crepbook document class version number --- tex/crepbook.cls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tex/crepbook.cls b/tex/crepbook.cls index 6a1ffa0a..89fce4b1 100644 --- a/tex/crepbook.cls +++ b/tex/crepbook.cls @@ -2,7 +2,7 @@ % for LaTeX2e % \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesClass{crepbook}[2009/11/12 v0.4.2 LaTeX document class for Crep +\ProvidesClass{crepbook}[2012/02/19 v0.5.0 LaTeX document class for Crep Books] \makeatletter\def\input@path{{tex/}} From 5fe4964feb2e7318b8c46f969c639c5103242d3f Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 18:06:44 +0100 Subject: [PATCH 17/32] Add a new template that allows the importantdiagramonly options. --- templates/patacrep-improved.tmpl | 100 +++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 templates/patacrep-improved.tmpl diff --git a/templates/patacrep-improved.tmpl b/templates/patacrep-improved.tmpl new file mode 100644 index 00000000..53496683 --- /dev/null +++ b/templates/patacrep-improved.tmpl @@ -0,0 +1,100 @@ +% Copyright (C) 2009-2010 Romain Goffe, Alexandre Dupas +% Copyright (C) 2008 Kevin W. Hamlen +% +% This program is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License +% as published by the Free Software Foundation; either version 2 +% of the License, or (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the Free Software +% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +% MA 02110-1301, USA. +% +% The latest version of this program can be obtained from +% http://songs.sourceforge.net. +% +% Modified to serve personnal purposes. Newer versions can be +% obtained from http://www.lohrun.net. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Template parameters +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%:[ +%%: {"name":"title", "description":"Title", "default":"Recueil de chansons pour guitare", "mandatory":true}, +%%: {"name":"author", "description":"Author", "default":"Crep (R. Goffe) \\and Lohrun (A. Dupas)", "mandatory":true}, +%%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, +%%: {"name":"lang", "description":"Language", "default":"french"}, +%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, +%%: {"name":"version", "description":"Version", "default":"3.4.7"}, +%%: {"name":"subtitle", "description":"Subtitle"}, +%%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, +%%: {"name":"mail", "description":"Email", "default":"crep@team-on-fire.com"}, +%%: {"name":"picture", "description":"Picture", "type":"file", "default":"feel-the-music"}, +%%: {"name":"picturecopyright", "description":"Copyright", "default":"foxygamergirl@deviantart.com"}, +%%: {"name":"footer", "description":"Footer", "default":"\\begin{flushleft}\\includegraphics[width=3cm]{on-fire}\\end{flushleft}"}, +%%: {"name":"license", "description":"License", "default":"\\input{license.tex}"}, +%%: {"name":"mainfontsize", "description":"Font Size", "type":"font", "default":"10"}, +%%: {"name":"songnumberbgcolor", "description":"Number Shade", "type":"color", "default":"#D1E4AE"}, +%%: {"name":"notebgcolor", "description":"Note Shade", "type":"color", "default":"#D1E4AE"}, +%%: {"name":"indexbgcolor", "description":"Index Shade", "type":"color", "default":"#D1E4AE"} +%%:] +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% begin document +\documentclass[\getbooktype,\getbookoptions,\getmainfontsize]{tex/crepbook} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{lmodern} +\usepackage[portuguese,spanish,english,french]{babel} + +\title{\gettitle} +\author{\getauthor} +\subtitle{\getsubtitle} +\version{\getversion} +\mail{\getmail} +\web{\getweb} +\picture{\getpicture} +\picturecopyright{\getpicturecopyright} +\footer{\getfooter} +\licence{\getlicense} +\lang{\getlang} + +\newindex{titleidx}{\getname_title} +\newauthorindex{authidx}{\getname_auth} + +\graphicspath{ + {img/}, +} + +\definecolor{SongNumberBgColor}{HTML}{\getsongnumberbgcolor} +\definecolor{NoteBgColor}{HTML}{\getnotebgcolor} +\definecolor{IndexBgColor}{HTML}{\getindexbgcolor} + +\renewcommand{\snumbgcolor}{SongNumberBgColor} +\renewcommand{\notebgcolor}{NoteBgColor} +\renewcommand{\idxbgcolor}{IndexBgColor} + +\pagestyle{empty} + +\begin{document} + +\maketitle + +\showindex{Index des chansons}{titleidx} +\showindex{Index des auteurs}{authidx} + +\notenamesin{A}{B}{C}{D}{E}{F}{G} +\notenamesout{La}{Si}{Do}{RĂ©}{Mi}{Fa}{Sol} + +\songsection{Liste des chansons} +\begin{songs}{titleidx,authidx} + \getsongslist +\end{songs} + +\end{document} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% end document From 55326f0a6db6115325874e5c41f60d071184156f Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 18:07:39 +0100 Subject: [PATCH 18/32] Add a new songbook for Matteo's transcripted songs --- books/matteo.sb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 books/matteo.sb diff --git a/books/matteo.sb b/books/matteo.sb new file mode 100644 index 00000000..02974b2e --- /dev/null +++ b/books/matteo.sb @@ -0,0 +1,23 @@ +{ +"template" : "patacrep-improved.tmpl", +"lang" : "french", +"bookoptions" : [ + "diagram", + "lilypond", + "pictures" + ], +"booktype" : "chorded", +"subtitle" : "Matteo's songs", +"songs" : [ + "Hubert-Felix_Thiefaine/Sentiments_numeriques_revisites.sg", + "Jean_Leloup/Promeneur.sg", + "Maxime_Le_Forestier/Parachutiste.sg", + "Yves_Simon/Les_bateaux_du_metro.sg", + "Soldat_Louis/Du_rhum_des_femmes.sg", + "Soldat_Louis/Tirer_des_caisses.sg", + "Soldat_Louis/Savannah.sg", + "Leonard_Cohen/Winter_lady.sg", + "Leonard_Cohen/A_bunch_of_lonesome_heroes.sg", + "Leonard_Cohen/The_old_revolution.sg", + "Jacques_Higelin/Je_ne_peux_plus_dire_je_t_aime.sg"] +} From 0be05823e97b4644b7249790976c2460519240f3 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 18:08:55 +0100 Subject: [PATCH 19/32] Show only important diagram for the Matteo's songbook --- books/matteo.sb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/books/matteo.sb b/books/matteo.sb index 02974b2e..1ab21334 100644 --- a/books/matteo.sb +++ b/books/matteo.sb @@ -2,7 +2,7 @@ "template" : "patacrep-improved.tmpl", "lang" : "french", "bookoptions" : [ - "diagram", + "importantdiagramonly", "lilypond", "pictures" ], From ba6f47430c290c12d8123e02c93683a3e680fbae Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 19:14:33 +0100 Subject: [PATCH 22/32] Add repeatchords option to the crepbook document class The repeatchords option enables chords printing in repeated chords section. The new repeatedchords environment is used by song authors to declare that chords enclosed in the environment are only the repeated version of the chords given earlier. This environment allows users who prefer to repeat chords on every verse and chorus to write them down, and in conjunction with the repeatchords option to have songbooks that displays the repeated chords. --- tex/crepbook.cls | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tex/crepbook.cls b/tex/crepbook.cls index 89fce4b1..33d3bb10 100644 --- a/tex/crepbook.cls +++ b/tex/crepbook.cls @@ -12,12 +12,14 @@ \newif{\ifnodiagram} \newif{\ifimportantdiagramonly} \newif{\ifpictures} +\newif{\ifnorepeatchords} \tabsfalse \lilypondfalse \nodiagramtrue \picturesfalse \importantdiagramonlyfalse +\norepeatchordstrue % Options \DeclareOption{tabs}{\tabstrue} @@ -29,6 +31,8 @@ \DeclareOption{importantdiagramonly}{\importantdiagramonlytrue\nodiagramfalse} \DeclareOption{pictures}{\picturestrue} \DeclareOption{nopictures}{\picturesfalse} +\DeclareOption{norepeatchords}{\norepeatchordstrue} +\DeclareOption{repeatchords}{\norepeatchordsfalse} \DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{article}} \DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{article}} @@ -434,4 +438,24 @@ \end{verse*} } +%% \SB@chordsoff with a greater for the line spacing +\newcommand{\CB@chordshidden}{% + \def\SB@bracket##1]{\ignorespaces}% + \let\SB@rechord\relax% + \let\SB@ch\SB@ch@off% + \ifSB@measurespec% + \ifmeasures\SB@measureson\else\SB@measuresoff\fi% + \else% + \SB@measuresoff% + \fi% + \ifSB@preamble\let\colbotglue{\z@\@plus.5\textheight}\fi% + \SB@setbaselineskip% +} + +\newenvironment{repeatedchords}{% + \ifnorepeatchords% + \CB@chordshidden% + \fi +}{}% + \makeatother From 10773b3f77d1730e7abba74723a4cd13aef3f233 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 19:20:14 +0100 Subject: [PATCH 23/32] Allow the repeatchords option in this template --- templates/patacrep-improved.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/patacrep-improved.tmpl b/templates/patacrep-improved.tmpl index 53496683..f3e48ae3 100644 --- a/templates/patacrep-improved.tmpl +++ b/templates/patacrep-improved.tmpl @@ -29,7 +29,7 @@ %%: {"name":"author", "description":"Author", "default":"Crep (R. Goffe) \\and Lohrun (A. Dupas)", "mandatory":true}, %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, %%: {"name":"lang", "description":"Language", "default":"french"}, -%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, +%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, %%: {"name":"version", "description":"Version", "default":"3.4.7"}, %%: {"name":"subtitle", "description":"Subtitle"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"},