diff --git a/crepbook.cls b/crepbook.cls index d687fe87..3ec33ce2 100644 --- a/crepbook.cls +++ b/crepbook.cls @@ -8,10 +8,12 @@ \newif{\iftabs} \newif{\iflilypond} \newif{\ifnodiagram} +\newif{\ifpictures} \tabsfalse \lilypondfalse \nodiagramtrue +\picturesfalse % Options \DeclareOption{tabs}{\tabstrue} @@ -20,6 +22,8 @@ \DeclareOption{nolilypond}{\lilypondfalse} \DeclareOption{nodiagram}{\nodiagramtrue} \DeclareOption{diagram}{\nodiagramfalse} +\DeclareOption{pictures}{\picturestrue} +\DeclareOption{nopictures}{\picturesfalse} \DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{article}} \DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{article}} @@ -50,6 +54,7 @@ \tabsfalse% \lilypondfalse% \nodiagramtrue% + \picturesfalse% \renewcommand{\colbotglue}{0pt plus .5\textheight minus 0pt}% \fi @@ -155,7 +160,7 @@ \newsongkey{cov}{\let\songcover\@empty}{\def\songcover{#1}} \newsongkey{album}{\let\songalbum\@empty}{\def\songalbum{#1}} \newcommand\cover{% - \ifchorded% + \ifpictures% \ifx\songcover\@empty\else% \mbox{% \includegraphics[width=\coverheight]{\songcover}% @@ -172,10 +177,14 @@ \iftranscapos% \transpose{#1}% \else% - \mbox{% - \includegraphics[height=\capoheight]{capodastre}% - \put(-22,8){\Large #1} - }% + \ifpictures + \mbox{% + \includegraphics[height=\capoheight]{capodastre}% + \put(-22,8){\Large #1} + }% + \else + \musicnote{capo: #1}% + \fi \hspace{\coverspace}% \fi% \fi% @@ -192,7 +201,7 @@ } \newcommand{\image}[2]{% - \ifchorded% + \ifpictures% \begin{flushright}% \includegraphics[width=#2cm]{#1}% \end{flushright}% diff --git a/templates/ancient.tmpl b/templates/ancient.tmpl index a33e7d06..18e2f025 100644 --- a/templates/ancient.tmpl +++ b/templates/ancient.tmpl @@ -28,7 +28,7 @@ %%: {"name":"title", "description":"Title", "default":"Recueil de chansons pour guitare", "mandatory":true}, %%: {"name":"author", "description":"Author", "default":"Romain Goffe \\and Alexandre Dupas", "mandatory":true}, %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, -%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs"], "join":",", "mandatory":true, "default":["diagram"]}, +%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs","pictures"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, %%: {"name":"version", "description":"Version", "default":"3.2.6"}, %%: {"name":"subtitle", "description":"Subtitle"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, diff --git a/templates/minimal.tmpl b/templates/minimal.tmpl index d848c733..53bf5020 100644 --- a/templates/minimal.tmpl +++ b/templates/minimal.tmpl @@ -26,7 +26,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%:[ %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, -%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs"], "join":",", "mandatory":true, "default":["diagram"]}, +%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs","pictures"], "join":",", "mandatory":true}, %%: {"name":"mainfontsize", "description":"Font Size", "type":"font", "default":"10"} %%:] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/templates/patacrep-en.tmpl b/templates/patacrep-en.tmpl index bc014554..438fb50d 100644 --- a/templates/patacrep-en.tmpl +++ b/templates/patacrep-en.tmpl @@ -28,7 +28,7 @@ %%: {"name":"title", "description":"Title", "default":"Patacrep Songbook", "mandatory":true}, %%: {"name":"author", "description":"Author", "default":"Romain Goffe \\and Alexandre Dupas", "mandatory":true}, %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, -%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs"], "join":",", "mandatory":true, "default":["diagram"]}, +%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs","pictures"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, %%: {"name":"version", "description":"Version", "default":"3.2.6"}, %%: {"name":"subtitle", "description":"Subtitle"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, diff --git a/templates/patacrep.tmpl b/templates/patacrep.tmpl index 4a6c8f57..bdef474b 100644 --- a/templates/patacrep.tmpl +++ b/templates/patacrep.tmpl @@ -28,7 +28,7 @@ %%: {"name":"title", "description":"Title", "default":"Recueil de chansons pour guitare", "mandatory":true}, %%: {"name":"author", "description":"Author", "default":"Romain Goffe \\and Alexandre Dupas", "mandatory":true}, %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, -%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs"], "join":",", "mandatory":true, "default":["diagram"]}, +%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs","pictures"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, %%: {"name":"version", "description":"Version", "default":"3.2.6"}, %%: {"name":"subtitle", "description":"Subtitle"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, diff --git a/templates/ubuntu.tmpl b/templates/ubuntu.tmpl index 8268c319..6e0b236f 100644 --- a/templates/ubuntu.tmpl +++ b/templates/ubuntu.tmpl @@ -28,7 +28,7 @@ %%: {"name":"title", "description":"Title", "default":"Recueil de chansons pour guitare", "mandatory":true}, %%: {"name":"author", "description":"Author", "default":"Romain Goffe \\and Alexandre Dupas", "mandatory":true}, %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, -%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs"], "join":",", "mandatory":true, "default":["diagram"]}, +%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs","pictures"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, %%: {"name":"version", "description":"Version", "default":"3.2.6"}, %%: {"name":"subtitle", "description":"Subtitle", "default":"ubuntu version"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"},