Browse Source

add book option to show/hide pictures

remotes/origin/translate_notes
Romain Goffe 14 years ago
parent
commit
d62e82e7e0
  1. 21
      crepbook.cls
  2. 2
      templates/ancient.tmpl
  3. 2
      templates/minimal.tmpl
  4. 2
      templates/patacrep-en.tmpl
  5. 2
      templates/patacrep.tmpl
  6. 2
      templates/ubuntu.tmpl

21
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}%

2
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"},

2
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"}
%%:]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

2
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"},

2
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"},

2
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"},

Loading…
Cancel
Save