From 1433186be209c4e9eb533599907cd15a2c8ca125 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Sat, 4 Feb 2012 16:33:28 +0100 Subject: [PATCH 09/27] 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 1811b2fcd3d0f591a02860a01b0474c34974b6bd Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 17:53:12 +0100 Subject: [PATCH 15/27] 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 96506cdd6ffef2b383ed1880704a7cf427ef5ac1 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 17:56:08 +0100 Subject: [PATCH 16/27] 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 802f19583080f77d91546e7416350264313e2a71 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 18:06:44 +0100 Subject: [PATCH 17/27] 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 50d2eed64b6742afa4844cff66443e6bde61ff58 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 18:07:39 +0100 Subject: [PATCH 18/27] 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 a5fda248b02d16f9fdfadb46cbe2106db3a9360c Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 18:08:55 +0100 Subject: [PATCH 19/27] 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 fc64dc88e65656222e8ad4ffdfadaa5936252695 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 19:14:33 +0100 Subject: [PATCH 22/27] 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 d06f4ae6ead02ac703adbeea2b9e58bd899abccb Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 19 Feb 2012 19:20:14 +0100 Subject: [PATCH 23/27] 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"}, From e8da312dc5f83891b30f32fb765437ae964ca5c9 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Wed, 22 Feb 2012 22:15:53 +0100 Subject: [PATCH 27/27] Remove patacrep-improved template and update matteo's songbook --- books/matteo.sb | 3 +- templates/patacrep-improved.tmpl | 100 ------------------------------- templates/patacrep.tmpl | 2 +- 3 files changed, 3 insertions(+), 102 deletions(-) delete mode 100644 templates/patacrep-improved.tmpl diff --git a/books/matteo.sb b/books/matteo.sb index 1ab21334..5b50f86d 100644 --- a/books/matteo.sb +++ b/books/matteo.sb @@ -1,8 +1,9 @@ { -"template" : "patacrep-improved.tmpl", +"template" : "patacrep.tmpl", "lang" : "french", "bookoptions" : [ "importantdiagramonly", + "repeatchords", "lilypond", "pictures" ], diff --git a/templates/patacrep-improved.tmpl b/templates/patacrep-improved.tmpl deleted file mode 100644 index f3e48ae3..00000000 --- a/templates/patacrep-improved.tmpl +++ /dev/null @@ -1,100 +0,0 @@ -% 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","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"}, -%%: {"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 diff --git a/templates/patacrep.tmpl b/templates/patacrep.tmpl index 67c27040..f3e48ae3 100644 --- a/templates/patacrep.tmpl +++ b/templates/patacrep.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","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"},